#cursive

generated UTC: 2023-02-13 19:07
latest data: https://clojurians-log.clojureverse.org/cursive/2023-02-11
messages: 33921
pro tips:
* Double click on text to filter by it. (doubleclick + cmd-f for extra points).
* Click on date to keep day visible regardless of filter.
* Click on time to keep hour visible regardless of filter.
#2015-07-0316:51jackjames@cfleming: in that old refheap i mentioned something about hitting "refresh" in the leiningen tool window. i never did really understand what was going on there, but it was something that i battled for a couple hours before you helped me figure it out. i assume that if you follow the new wiki instructions word for word it's not necessary, but might be a note to add to that doc if people start having trouble when trying to adapt the process described in the new wiki to existing projects or whatever.#2015-07-0316:51jackjamesi think that's where it came into play...was having trouble w/ the repl within cursive when there were newly added deps in project.clj? can't really recall#2015-07-0316:52cflemingYeah, I'll do that, thanks. I'm about to revamp the doc in a pretty major way, and that's definitely on the list.#2015-07-0316:52cflemingI'll probably also add a popup banner at the top of project.clj when you've modified it but not synced afterwards.#2015-07-0316:53jackjameshmm, actually, maybe i was/am shooting myself in the foot by removing the "before launch" tasks? that's something i've just always done without really understanding why i'm doing it.#2015-07-0316:54cflemingThat's probably because it's really confusing.#2015-07-0316:54cflemingAnd will also be clarified in the doc.#2015-07-0316:55cflemingBut no, that shouldn't be a problem. There's also a bug right now where the project.clj isn't always saved when it should be. I'm planning to fix that for the next build too.#2015-07-0408:12pupenoI just used slurp forward successfully without trying all combinations of slurp/barf first! This feels really satisfying.#2015-07-0414:00cfleming@pupeno: Haha nice!#2015-07-1404:07pupeno@cfleming: is it true that with IntelliJ 15, in Cursive, you’ll be able to debug expression by expression?#2015-07-1407:57cfleming@pupeno: Not right away, I’ll have to implement it, but I hope so.#2015-07-1407:57cflemingThey support that for Java lambdas now.#2015-07-1407:57pupenoSounds really cool simple_smile#2015-07-1407:58pupenoAt the Clojure Dojo here in London yesterday someone was complaining about how hard it is to debug due to lack of that.#2015-07-1407:58cflemingI was thinking about it last night, it’s potentially tricky since in Clojure you don’t know what is an expression just by looking at the source.#2015-07-1407:58cflemingWell, it has its moments, but I use the debugger all the time and it’s never been a showstopper.#2015-07-1407:59cflemingIt depends on how they have implemented it, I haven’t looked yet. I’ll have to speak to their debugger developer and see if I can get some more info.#2015-07-1407:59pupenoWell, when I’m debugging Ruby, sometimes the debugger jumps erratically between lines inside a method and I suppose it’s some bug between RubyMine and the debugger. Even with that happening every now and then, the debugger is very useful.#2015-07-1408:00pupenoWhat I’m saying is that a non-perfect debugger, at least for me, it’s a very useful tool (unlike a non-perfect compiler).#2015-07-1408:00cflemingYes, absolutely.#2015-07-1408:00pupenoI haven’t done any debugging of Clojure at all. I should play with that a bit.#2015-07-1408:01cflemingThere’s some trickiness there with things like threading forms, too - I’m still not sure how best to handle those, or even if I can do very much with it.#2015-07-1408:01cflemingCheck out my talk from clj/west this year, I demo the debugger there and talk a lot about the various limitations of debugging Clojure.#2015-07-1408:02pupenoThis one https://www.youtube.com/watch?v=ql77RwhcCK0&list=PLZdCLR02grLrKAOj8FJ1GGmNM5l7Okz0a&index=16 ?#2015-07-1408:03cflemingYep#2015-07-1814:41pupenoIs it possible to run lein tests in debug mode?#2015-07-1816:03cfleming@pupeno: No, it’s not, unfortunately. There’s no dedicated test runner right now, although I’m hoping to get this in very soon (like, in the next two builds soon).#2015-07-1816:03cflemingUnfortunately the lein run configurations can’t be debugged, because of the way lein starts up and then forks the process to run the actual task (which is the one you’d want to debug).#2015-07-1816:05cflemingIf you’re using the interactive test functionality (https://cursiveclojure.com/userguide/testing.html, slightly out of date) using a debug REPL, you can debug tests that way.#2015-07-1907:17pupeno@cfleming: thanks, I’ll look into that interactive testing.#2015-07-1907:18pupeno@cfleming: do you use a mac with the default cursive keymap? If so, what shortcut did you assign to Switch REPL NS to current file?#2015-07-1907:30cfleming@pupeno: Mine’s a little modified from the default, I have Cmd-Shift-N#2015-07-1907:31pupeno@cfleming: I was setting it to that too, it was conflicting with new scratch file. Since I’m new to IntelliJ (I’m a long time RubyMine user though), I’m having trouble recognizing which conflicts are ok and which ones are problematic… I ended up setting it to the sequence cmd-shif-n,cmd-shift-s.#2015-07-1907:53pupeno@cfleming: the stop and restart buttons in the REPL behave differently to what I’m used to from RubyMine.#2015-07-1907:53pupenoFor example, when the REPL is running I see this:#2015-07-1907:54pupenoThe restart button, next to the stop one, is grayed out. I cannot just click it to have the REPL stop and start automatically.#2015-07-1907:54pupenoWhen I stop it, then it looks like this:#2015-07-1907:55pupenoThe restart button is now enabled, so it just behave likes start, and start seems to never be enabled.#2015-07-1913:46cfleming@pupeno: Yes, that is a bit inconsistent, I should probably fix that.#2015-07-1914:53pupenoDo you want me to submit a bug report somewhere? #2015-07-1918:31cfleming@pupeno: Sure, that would be great, thanks: https://github.com/cursiveclojure/cursive/issues#2015-07-2308:10pupenoLatest version of Cursive is so much more colorful! I mean, the rainbow parenthesis are brighter. I like it.#2015-07-2311:28cfleming@pupeno: Great, glad to hear it. Opinion has been divided - some people thought the others were too subtle, someone has already called the new ones distracting and unpleasant: https://xkcd.com/1172/#2015-07-2416:08henryw374I have a formatting issue I don’t seem able to crack. I have ‘default to Only Indent’ on, which mostly is fine, there is just this case I can’t find the setting for:
(do-blah-blah x
              y
              z)
gets formatted to
(do-blah-blah x
      y
      z)
but i want to keep the original. so this is the case where I want to vertically align with the second list item, even if it appears on the same line as the first. any help appreciated.
#2015-07-2418:23meowFor anyone using boot with Cursive there is some advice here now: https://github.com/boot-clj/boot/wiki/For-Cursive-Users#2015-07-2418:37meowhow do I turn off the code completion feature for the Enter key?#2015-07-2418:41meowfound it: choose lookup item#2015-07-2418:42meowseemed like every time I hit Enter my code was getting replaced unexpectedly#2015-07-2418:43meowI don't mind the tab key choosing the way it does, but does anyone else remove or change the binding on choose lookup item?#2015-07-2418:44colin.yatesmy muscle memory takes me to ‘ESC’ without thinking any more. I do remember this being very jarring when I came to IntelliJ from Eclipse.#2015-07-2418:44colin.yatesNot nearly as much as the speed, consistency and stability though simple_smile.#2015-07-2418:52meowSo far I'm really liking Cursive a lot.#2015-07-2419:35cfleminghenryw374: So you only want to correct the case for do-blah-blah? If so, set the indentation for that form using the intention as described here: https://cursiveclojure.com/userguide/formatting.html. You want to set it to 0.#2015-07-2419:36cfleming@meow: Thanks! I’m glad you’re liking it.#2015-07-2419:37cflemingI don’t remap enter, because it performs a different action to tab. Enter adds the lookup string for the current completion at the caret, whereas tab replaces the current symbol with it.#2015-07-2419:37cflemingSometimes I want to insert, and sometimes I want to replace.#2015-07-2501:10danielcomptonI’m really liking the blue highlight around the REPL when focus is in there#2015-07-2517:56val_waeselynck@cfleming: I'm using a 'conciseness' macro that accepts a binding form as an argument (i.e without the surrounding let or fn). The problem is, Cursive marks all the symbols I define in this binding form as 'unable to resolve', and I end up with a lot of warnings. Is there any way to combat this?#2015-07-2520:54danielcompton@val_waeselynck keep an eye on https://github.com/cursiveclojure/cursive/issues/147#2015-07-2520:56val_waeselynck@danielcompton: thanks!#2015-07-2522:17cfleming@val_waeselynck: Yeah, as explained in that issue Cursive still has a problem with macros.#2015-07-2522:17cflemingThere's really no good workaround yet, sorry.#2015-07-2522:20meowI suppose the inability of Cursive to get the source code (F4) for some things like set! is a known limitation?#2015-07-2522:21meowI really find that a useful way to understand clojure core code.#2015-07-2522:21cfleming@meow: set! is a built in form, it's not a core function#2015-07-2522:21cflemingYou should be able to see source code for any function, though.#2015-07-2522:22meow@cfleming: yes, and I love it#2015-07-2522:22cflemingGreat simple_smile#2015-07-2522:22meowsimple_smile#2015-07-2709:25henryw374Thanks Colin… finally I understand the indent settings a bit more now and have things set up better. There is the case where I have a macro inside another macro and I want them to follow different settings, but apart from that its looking good. https://clojurians.slack.com/archives/cursive/p1437766553000042#2015-07-2715:28cflemingCursive 0.1.59 is out with support for the IntelliJ 15 EAP, for those of you who like the bleeding edge.#2015-07-2715:29colin.yatesthanks @cfleming - that was quick simple_smile#2015-07-2715:29cflemingNo worries - here’s hoping this EAP is relatively stable#2015-07-2715:30cflemingAnd that they can get the JDK mess sorted out quickly.#2015-07-2722:31danielcompton@cfleming: I looked at the EAP release notes and didn’t see anything particularly compelling from a developer perspective, what makes it a worthwhile upgrade before it’s finished?#2015-07-2800:18danielcomptonA day or two ago I had a blue highlight around the REPL panel when my focus was there, but now I can’t seem to get it. Does anyone know what I need to do for that?#2015-07-2800:23danielcomptondnolen [10:55 AM] @shofetim: I’ve been doing Clojure for 7 years (edited) dnolen [10:55 AM] Cider went through a terrible unstable phase and was behind swank-clojure by 3 years in terms of features dnolen [10:55 AM] never had a debugger that ever worked dnolen [10:56 AM] IntelliJ has world class JavaScript support, Cursive has accurate Clojure debugging, eval in frame, YourKit integration, Node.js standard library indexing, trivial to index Google Closure dnolen [10:56 AM] could go on forever really dnolen [10:56 AM] it makes what I was doing in Emacs look primordial (edited)#2015-07-2814:05tbrookeCan I use Cursive with Webstorm if I want the additional javascript support?#2015-07-2814:12cfleming@tbrooke: Not right now, but hopefully soon.#2015-07-2814:12cflemingThe problem is that Webstorm doesn’t provide the Java support that Cursive depends on.#2015-07-2814:13cflemingBut in v15 there’s a bunch of work going on to make some of the semi-built-in plugins (like Java) more modular, which will mean you’ll probably be able to install a Java plugin (or series of plugins) into Webstorm which will allow Cursive to work there.#2015-07-2814:13cflemingThat’s a 3-month or so timeframe I think.#2015-07-2814:14cflemingJetBrains are interested in doing that to support JRuby in RubyMine, amongst other things.#2015-07-2814:15tbrooke@cfleming I guess you could use Ultimate - but that seems like a lot of overhead if you are just doing clojure, clojurescript and some frontend stuff#2015-07-2814:16cflemingRight, although if you turn off all other plugins what you end up with is pretty much Webstorm.#2015-07-2814:16cflemingThe main issue there is cost.#2015-07-2814:27james@cfleming: Hi Colin, is it still looking promising for inline code evaluations (à la Light Table) in the IntelliJ 15 version of Cursive? I’ve been looking at the "noticeable changes" list for the EAP and have been struggling to find a feature that looks like it will help.#2015-07-2814:28cfleming@james: I’m not sure, I have to get a hold of the Swing guy at JetBrains. I’ll write to him now and see what he thinks. If not I’m going to investigate at least making the single lines clickable so they pop up a tree view or something.#2015-07-2815:00james@cfleming: Cool. I’m looking forward to seeing what he says, and what you’ll come up with. simple_smile#2015-07-2815:01cfleming@james: I’m looking forward to what he says too simple_smile#2015-07-2821:17Joe R. Smithoh yes the latest cursive update lets me slurp into a pair of double quotes. simple_smile#2015-07-2821:20danielcompton@cfleming: should you be able to splice a string into a symbol?#2015-07-2821:21danielcomptonThat behaviour surprised me when I did it#2015-07-2821:22cfleming@solussd: Yeah, there’s an issue with whitespace but it’s still pretty nice#2015-07-2821:22cfleming@danielcompton: Do you have an example of what you mean?#2015-07-2821:22Joe R. Smiththing-i-want-in-string “” -> "thing-i-want-in-string"#2015-07-2821:23Joe R. Smithoops, that was a question for daniel#2015-07-2821:23Joe R. Smithbtw, hey daniel!#2015-07-2821:25danielcompton[“cursi|ve”] “Splice sexp” [cursi|ve]#2015-07-2821:25danielcomptonHey Joe!#2015-07-2821:26danielcomptonWhere I expected [“cursi|ve”] “Splice sexp” “cursi|ve”#2015-07-2821:26cflemingNo, I’d expect what you got.#2015-07-2821:26Joe R. SmithI expect the former#2015-07-2821:26Joe R. Smithstring literals are forms#2015-07-2821:26cflemingIf the caret were positioned at the start of the string (before the quote) you’d get what you expected.#2015-07-2821:26danielcomptonsure, makes sense#2015-07-2821:27danielcomptonjust checking, I could see it going either way#2015-07-2821:27cflemingRight, there was an issue to allow “foo b|ar baz” to splice to b|ar, which AFAIK is what Emacs does#2015-07-2908:28cfleming@james: So the word is that they’re going to try to do something for v15, although what form that will take isn’t decided yet.#2015-07-2908:28cflemingI may try to implement something myself and send a pull request since I’m pretty keen to have it work.#2015-07-2908:45james@cfleming: It's a shame that JetBrains aren't prioritising it higher, as I think it's a very useful feature for all REPL-based languages. (In fact, flexible inline content rendering could be useful for lots of other cool things, like test results, documentation, etc.) If you can develop this feature by yourself that would be mind blowing! (And a nice differentiator for Cursive).#2015-07-2908:46cflemingSure - it’s not that they’re not prioritising it, they do have it planned for v15 but they’re all busy on other things. I’ll work with them and see if I can help with it, since it would indeed be useful for many things.#2015-07-2908:47cflemingIt’s a surprisingly difficult thing to do well.#2015-07-3018:30shaunxcodein a cljs file using :require-macros with a :refer I am still seeing the macro as "cannot be resolved" making it so I cannot set the indentation. Is this a known issue or do I need to do something different?#2015-07-3018:32shaunxcode(also thus far cursive has been awesome and I have it setup to do all the things I loved about emacs other than rainbow parens)#2015-07-3018:35shaunxcodehah and now I have that thanks to actually searching in settings#2015-07-3018:57shaunxcodemy quick solution to get the behavior I want most of the time anyway was to just set default to only indent.#2015-07-3022:20cflemingshaunxcode: Great, glad you’re liking it! You’re doing (:require-macros [my.ns :refer [my-macro]]) or something similar to that?#2015-07-3022:20shaunxcodeexactly yeah#2015-07-3022:21shaunxcodething is - at some point it started working hah#2015-07-3022:21shaunxcode(I think maybe when I started a repl in the project?)#2015-07-3022:24cflemingHmm, sometimes the indexes can get a little funky, that might have been it.#2015-07-3022:25cflemingAnyway, I’m glad it’s working, even if the fix is a little suspect simple_smile#2015-07-3119:43kidpolloHola! Does someone know hoe to run a repl in Cursive using lein with-profile ?#2015-07-3119:58marcofiset@kidpollo: I'm not 100% sure as I did not try it myself, but it seems that you can add additional parameters in the run configuration.#2015-07-3120:11kidpolloI tried but the only options you can set are: JVM_ARGS Parameters and Environment#2015-07-3120:17kidpolloit does not really call call lein bla bla bla it calls java ... com.intellij.rt.execution.application.AppMain clojure.main -i -i /private/var/folders/rq/1hv4cqfj74xd793h_d8mllrn2w63cj/T/form-init5547769110448153423.clj#2015-07-3120:17kidpolloso I don't really know what options I could set#2015-07-3120:27kidpolloI am basically wondering how I can load dependencies for specific profiles#2015-07-3120:27kidpollolike:#2015-08-0103:25danielcompton@kidpollo: there’s an issue for this here: https://github.com/cursiveclojure/cursive/issues/212#2015-08-0103:27kidpollooh ok I guess I will have to work around it for now#2015-08-0103:29danielcompton@kidpollo: I think you could just start a REPl at the terminal and then attach to it with Cursive?#2015-08-0104:24danielcomptonAre cljs docstrings supported in Cursive? I couldn’t find any issues about it, does this work for other people?#2015-08-0112:14cfleming@kidpollo: There’s no good solution for that right now, sorry - there should be very soon, though#2015-08-0112:15cflemingIf you only need the profiles when running the REPL, then the best solution is to run the REPL using lein repl :headless and connect to it with a Remote REPL run configuration.#2015-08-0112:16cflemingUnfortunately there’s no good way to sync deps from other profiles to Cursive though.#2015-08-0112:16cflemingi.e. to have those dependencies available in the editor.#2015-08-0113:00Steve PetersonHow to clear the REPL in Cursive (remove temporary vars from the current namespace)? I've found this snippet on StackOverflow: (map #(ns-unmap *ns* %) (keys (ns-interns *ns*))) - can I map it to a shortcut in Cursive REPL?#2015-08-0116:49kidpollothanks @cfleming great work!#2015-08-0120:33cfleming@stevep: Unfortunately you can’t right now, there’s an issue I’m hoping to get to soon: https://github.com/cursiveclojure/cursive/issues/85#2015-08-0120:34cfleming@danielcompton: Yes, they are. I suspect that your problem is https://github.com/cursiveclojure/cursive/issues/995 - if a symbol resolves to two other symbols, the doc isn’t shown. I haven’t figured out how to make IntelliJ show a popup to choose from in that case.#2015-08-0121:55danielcompton@cfleming: you could just show a message in the doc window saying that two symbols were resolved to this, not sure which to pick#2015-08-0121:55danielcomptonas a stopgap#2015-08-0211:29meowHow do I get cursive to use a newer version of a dependency? I changed my project.clj file and that didn't do it.#2015-08-0211:30cfleming@meow: There’s a bug in the current version which is fixed for the next build. Cursive didn’t save all files every time it should have. The easiest way is to Alt-tab to another app (IntelliJ will save all files when it loses focus) and back again, then hit refresh in the Leiningen toolwindow.#2015-08-0211:31cflemingIt’s a little annoying, sorry - it’ll be fixed soon.#2015-08-0211:32cfleming@danielcompton: Yeah, the problem is hooking into the element selection to detect that case - currently Cursive doesn’t get called at all. I’m sure there’s a good way to do it, I just haven’t found it yet.#2015-08-0211:34meow@cfleming: that worked, thanks simple_smile#2015-08-0211:35cflemingNice!#2015-08-0211:35cflemingI’m going to fix the case of adding things to project.clj so it’s much easier soon.#2015-08-0211:38meowI'm really enjoying Cursive, though I'm far from productive with it. Do you have any good resources for getting up-to-speed with structured editing?#2015-08-0211:39cflemingNot really unfortunately, no - just practise is the best advice I can give. There’s some more advice here: https://cursiveclojure.com/archive/1293.html#2015-08-0211:40cflemingI’m actually considering something like a typing tutor for paredit - I think something like that would be really helpful for beginners.#2015-08-0211:43meowAnd I'd love to know how dnolen has cursive configured since he seems quite happy with his workflow for cljs using a simple browser repl. Some wiki pages for this might be nice, since then the community could help out.#2015-08-0211:43cflemingI’m not sure how it would work though.#2015-08-0211:44cflemingYeah, I’ve been planning to update the CLJS wiki with that info. There’s a page on the Figwheel wiki: https://github.com/bhauman/lein-figwheel/wiki/Running-figwheel-in-a-Cursive-Clojure-REPL#2015-08-0211:45cflemingThat’s probably what you want, since I’m almost certain you want Figwheel as well.#2015-08-0211:46cflemingAlso bear in mind that dnolen is generally happy with a pretty minimal setup. I think that makes a lot of sense for CLJS especially, since nREPL doesn’t really buy you much.#2015-08-0211:46cflemingAll the completion etc in a CLJS REPL for Cursive happens from the open project anyway, since the CLJS REPL doesn’t allow you to introspect the running env as much as the CLJ one does.#2015-08-0211:49meow@cfleming: good stuff, thanks#2015-08-0211:50cflemingNo worries. I’m actually in the middle of updating the Cursive website and doc, it should be better soon. I’m also considering open sourcing the doc so others can contribute.#2015-08-0211:55meow@cfleming: That's great. I'm still climbing the learning curve so I'd be happy to really scrutinize the changes if that helps. Whenever you've got the new docs ready.#2015-08-0211:56cfleming@meow: Great, thanks for the offer!#2015-08-0316:40jeremyraineshi all -- I am having some issues starting a REPL in Cursive. I'm following the directions in the above link, but after briefly connecting, the REPL quits with "No nREPL ack received"#2015-08-0316:41jeremyraineshere are my configs, and the error:#2015-08-0316:41jeremyraineshttps://cl.ly/image/0P241W0P402F#2015-08-0316:44jeremyrainesI think it is fixed now by toggling the button away from that option, then back, then clicking Apply /shrug#2015-08-0318:03jeremyrainesI think it'd be helpful if this page listed the keystrokes for slurp, barf, and slice https://cursiveclojure.com/userguide/paredit.html#2015-08-0318:04jeremyrainessplice i mean#2015-08-0318:14jeremyrainesdoes the vim bindings mode conflict with paredit?#2015-08-0318:49jeremyrainesOK, so I'm playing around with the keybindings, and I switched it to use the "Cursive" set that comes. This is nice, but now I can't go back to "None" https://cl.ly/image/2D2E013d0N1n#2015-08-0318:49jeremyrainesit won't let me click Apply#2015-08-0318:49jeremyrainesif I click OK, the Cursive ones are still in effect if I come back to this screen#2015-08-0318:51meow@jeremyraines: I noticed that earlier today as well. Wonder if it's a bug.#2015-08-0318:52jeremyrainesyeah, not sure. I'd like to be able to start from none and define a few custom ones as I go#2015-08-0318:55jeremyrainesbut, applied or not, they also don't seem editable when None is selected. Which I guess could make sense . . . but if so my next question is how do I make a new binding set that I can customize.#2015-08-0319:13jeremyraineslast one for a bit I hope:#2015-08-0319:13jeremyraineswhy won't Structural Editing let me close this form? https://cl.ly/image/3V2l3r431Z2Z#2015-08-0319:14jeremyrainesI have to turn it off, add the closing paren, then the program works#2015-08-0321:05jelleajeremyraines: use a semicolon add parens and delete semicolon again simple_smile#2015-08-0321:10jeremyrainesOK, can you help me understand why that is needed?#2015-08-0403:54danielcomptonHit 1k! https://github.com/cursiveclojure/cursive/issues/1000#2015-08-0411:17cfleming@jeremyraines: So I’m not sure about that REPL error, you should never get that with the shown config because that error is for nREPL and your configuration specifies clojure.main - sounds like that’s sorted now anyway, let me know if it recurs.#2015-08-0411:18cflemingI can’t easily put the shortcuts on the structural editing page because they’re configurable, and there are several different default bindings. There are a couple of requests to be able to make a printable cheat sheet though.#2015-08-0411:19cflemingThere is one by @pupeno, unfortunately I can’t find the link now because of Slack’s 10k message archive limit.#2015-08-0411:19pupenohttps://www.cheatography.com/pupeno/cheat-sheets/cursive-on-mac-os-x/#2015-08-0411:20cflemingThere have been some conflicts with paredit and IdeaVim, yeah - there’s an issue about them but I haven’t spent much time looking into IdeaVim since it’s difficult to debug and get changes into.#2015-08-0411:21cfleming@pupeno: Thanks!#2015-08-0411:22cfleming@jeremyraines: Also, you don’t use the keybindings panel to edit keymappings, just to set up a default binding set. You use the Keymap panel to modify that later. See https://cursiveclojure.com/userguide/keybindings.html#2015-08-0412:37jeremyrainesThanks @pupeno and @cfleming. Understood about the docs page, it makes sense now.#2015-08-0420:19Joe R. SmithAnyone know of an easy way to get the option key in osx to work without using it in combination with the fn key? I’m using emacs bindings and it’s kind of rough. (as an aside: it works in Emacs)#2015-08-0420:19Joe R. Smith^ in cursive/intellij, of course. simple_smile#2015-08-0421:48cfleming@solussd: Which JDK are you using to run IntelliJ? You can check it in IntelliJ IDEA->About IntelliJ IDEA.#2015-08-0421:50Joe R. Smith@cfleming: 1.8.0_40-release-b89#2015-08-0421:51cflemingOk, there have been some reports that recent JDKs broke the Alt key pretty badly, in theory to adhere to Apple’s UI guidelines - I don’t remember the details. I have a feeling that might have been fixed in 1.8.0-60#2015-08-0421:52cflemingI’ll see if I can find the issue, one sec#2015-08-0421:52Joe R. Smithcool thanks— guess I could always just upgrade and find out. simple_smile#2015-08-0421:53cfleminghttps://github.com/cursiveclojure/cursive/issues/962 has a similar report and a link to a YouTrack issue#2015-08-0421:53cflemingAre you using the bundled JDK or an external one?#2015-08-0421:53Joe R. Smithbundled with intellij?#2015-08-0421:53cflemingRight#2015-08-0421:53cflemingWhich IntelliJ version are you running?#2015-08-0421:54Joe R. Smithbundled 15 EAP, but I had this problem in 14 community, too.#2015-08-0421:54Joe R. Smithat least I’m assuming it’s bundled b/c it is a different version than java -version in a shell gives me#2015-08-0422:00cflemingYeah, if it’s the 15 EAP you’re using the bundled JDK. I don’t know what their plan is to upgrade, or to fix that bug. You can try switching the startup JVM to 1.6 using Cmd-Shift-A and use the Switch IDE Boot JDK action to see if that helps.#2015-08-0503:34danielcompton1.8.65 JDK fixes option keys properly apparently#2015-08-0503:34danielcomptonSo you can use option+f as a keyboard shortcut instead of getting a weird ligature added. #2015-08-0507:49cfleming@danielcompton: Nice. I’ll see if I can find out what JetBrains’ plan is to upgrade their custom JDK.#2015-08-0509:47danielcomptonhttps://youtrack.jetbrains.com/oauth?state=%2Fissue%2FIDEA-17392#comment=27-983397#2015-08-0509:47danielcompton@cfleming more detail there ^#2015-08-0509:47danielcompton8u60, not u65. Also that JDK isn't even released yet so it may be a while until Jetbrains bundles it#2015-08-0509:48cflemingRight, that’s the issue linked in the Cursive issue above.#2015-08-0509:51danielcomptonOops, missed all of that#2015-08-0612:59cfleming@cmdrdats: WRT your tweet - yeah, you can do this#2015-08-0612:59cfleming(this was going to be longer than 140 chars)#2015-08-0612:59cmdrdatsawesome - how?#2015-08-0613:00cmdrdatsI was trying cmd-alt-Y (sync project)#2015-08-0613:00cmdrdatsbut that doesn't seem to do anything#2015-08-0613:00cflemingYou can do it using the Refresh action in the leiningen toolwindow. But there’s a bug in the current version which doesn’t save the files to disk first.#2015-08-0613:01cflemingYou can either File->Save All, or switch to another app and back (IntelliJ saves on lost focus)#2015-08-0613:01cmdrdatsoh! I never saw the leiningen tool windows before#2015-08-0613:01cmdrdatsawesome, thanks! simple_smile#2015-08-0613:01cflemingThe bug is fixed in the next build.#2015-08-0613:01cmdrdatsyou can add arbitrary other projects to the window there?#2015-08-0613:01cmdrdatswithout using checkouts#2015-08-0613:01cflemingGenerally that’s only a good idea if they’re part of the same conceptual project.#2015-08-0613:02cmdrdatsye, I'd use it for working on a main project and some deps#2015-08-0613:02cflemingBut yeah, you can do that. See https://cursiveclojure.com/userguide/leiningen.html for some info#2015-08-0613:03cmdrdatsfantastic, thanks simple_smile#2015-08-0613:03cflemingactually, the doc you probably want there is missing from that page, see https://github.com/cursiveclojure/cursive/issues/989#2015-08-0613:03cmdrdatsi kept having to ln -s in checkouts, quit intellij and come back#2015-08-0613:03cflemingHehe, no, it should all be picked up and just work.#2015-08-0613:03cmdrdatscool 😄#2015-08-0613:04cflemingNavigation etc will all work across the projects#2015-08-0613:04cmdrdatssimple_smile#2015-08-0613:10cmdrdatslove your work with cursive btw - do you have some kind of timeline you're working toward, re: making it a commercial product?#2015-08-0613:11cflemingThanks! Yeah, I’ll be charging for it soon. I’m at the stage of waiting on banks for payment systems, and waiting on lawyers for licence agreements.#2015-08-0613:11cmdrdatsah, good#2015-08-0613:11cflemingSo: within a couple of months sort of soon.#2015-08-0613:12cmdrdatsIt's a mammoth thing you've pulled off, I can't imagine it's sustainable unless you start getting paid for it proper soon#2015-08-0613:12cflemingYeah, it’s been a ton of work. But money isn’t the main limiting factor at the moment, except in that if I had tons of it I could hire more people simple_smile#2015-08-0613:12cmdrdatshehe - that would be neat#2015-08-0613:13cflemingThe main limitation is just time to work on it, and that’s mostly limited by my daughter 😉#2015-08-0613:13cmdrdatshehe, well - that's the good kind of limitation 😄#2015-08-0613:13cmdrdatskids grow up too fast to skimp on spending time with them#2015-08-0613:14cflemingExactly. If I were young and single Cursive would be at version 7 by now, rather than still in beta#2015-08-0613:14cmdrdatshaha - or maybe it would have failed, because you wouldn't have been as deliberate about the bits you added#2015-08-0613:15cflemingHehe, that’s entirely possible too!#2015-08-0613:16cmdrdats(I have many burning wrecks in my past...)#2015-08-0613:18cmdrdatswhat bit are you focussing on at the moment?#2015-08-0613:19cflemingMostly on getting things ready for selling Cursive, so payments etc and brushing up the website etc.#2015-08-0613:19cflemingLots of boring time consuming bits.#2015-08-0613:19cmdrdatsah, cool simple_smile#2015-08-0613:19cmdrdatsye, that stuff always wastes way too much time 😕#2015-08-0613:20cflemingI’m also planning to add a test runner soon and expand the test support (Midje, cljs.test etc)#2015-08-0613:20cflemingAnd right now I’m investigating re-vamping the lein support, which is pretty painful for all concerned.#2015-08-0613:20cmdrdatsnice simple_smile#2015-08-0613:21cmdrdatswanting to get boot in there? or is that a bit of a non-goal?#2015-08-0613:21cflemingIt’s definitely a goal but a tricky one. I’m actually interested in using boot to build Cursive itself.#2015-08-0613:21cmdrdatswow, that sounds like a project and a half#2015-08-0613:21cmdrdatsis cursive written in clojure?#2015-08-0613:22cflemingUnfortunately boot requires Java 7 but I have to support Java 6. So I need to run it out of process which is tricky to make fast.#2015-08-0613:22cmdrdatsah#2015-08-0613:22cflemingMostly, yeah - there’s a bunch that has to be written in Java for startup time issues, but all the interesting bits are Clojure#2015-08-0613:23cflemingI’m planning to migrate the bits that are required to be Java to Kotlin to make that a bit more palatable#2015-08-0613:24cmdrdatsawesome simple_smile would it be easy to expose a clojure repl into the actual intellij process?#2015-08-0613:25cmdrdatswould love to poke around with intellij plugins, but I'm not particularly interested in mucking around in more java, if I can help it#2015-08-0613:26cflemingYeah, I have that planned - in fact, there already is one which I use, but it’s not much use without the Cursive APIs which are not public yet.#2015-08-0613:27cflemingThere’s already an IntelliJ plugin to allow the IDE to be tweaked using Groovy. I’m planning to use the ideas and perhaps some of the code but using Clojure.#2015-08-0613:27cmdrdatsneat simple_smile#2015-08-0613:28cflemingThe extension API will mostly at first be about allowing resolution support for libs to be added.#2015-08-0613:28cflemingSo people can add support for libs that they write or use.#2015-08-0613:28cflemingBut IDE tweakability is on the list too.#2015-08-0613:32cmdrdatshaha, so people can tweak their own frankcursive#2015-08-0613:32cmdrdatsfrankencursive*#2015-08-0613:34cflemingcursivemacs#2015-08-0613:34cflemingahem#2015-08-0613:38cmdrdatshahaha#2015-08-0613:38cmdrdatscursivespacemacs#2015-08-0614:25potetmI just joined the channel, so this convo may have already happened. Is anyone else having a problem resolving symbols inside of an extend-type form?#2015-08-0614:28potetmi.e.
(extend-type A
  IDoThings
  (-do-things [{:keys [a b c] :as this}]
    ;; cannot resolve a, b, c, or this here
  ))
#2015-08-0614:40cfleming@potetm: I think that should work, although it’s possible that Cursive isn’t checking for destructuring there.#2015-08-0614:41cflemingHmm, no, it looks like it should be.#2015-08-0614:41potetm@cfleming: That appears to be the case. If there is no destructuring, it appears to work.#2015-08-0614:41cflemingIs this in CLJS or CLJ?#2015-08-0614:41potetmclj#2015-08-0614:41potetmHowever, if one of the arguments are destructured, it doesn’t work.#2015-08-0614:42potetmOh wait, just noticed one more step to repro.#2015-08-0614:43potetmI have two protocols I’m implementing in the same extend-type. I’m in the second when it doesn’t work.#2015-08-0614:43potetmThe first appears to work correctly.#2015-08-0614:44cflemingThere’s something about that form it doesn’t like - I can reproduce it with just that one.#2015-08-0614:46cflemingSo this works for me:
(extend-type String
  Runnable
  (run [{:keys [a b c] :as this}]
    ;; cannot resolve a, b, c, or this here
    a b c
    ))
#2015-08-0614:46cflemingI think the problem is perhaps that the method is incorrect for the protocol? Is that possible?#2015-08-0614:47potetmLemmie triple check that real quick. I usually rely on cursive to tell me if I got it right 😉#2015-08-0614:48cflemingHaha, I wouldn’t rely on that in this case, there’s no validation for that at the moment 😉#2015-08-0614:48potetmhaha that’s funny. Good to know#2015-08-0614:48cflemingExcept that resolution will frequently break if the method is invalid.#2015-08-0614:51potetmRight. That must be what I noticed. I thought I noticed something that would tip me off.
#2015-08-0614:51potetmThe tool is just too good now.#2015-08-0614:52potetmOkay, there’s a full test case. I believe I got my p’s and q’s in order.#2015-08-0614:53cflemingLooks good, thanks - I’ll take a look at that now.#2015-08-0614:53cflemingWell, looks bad, rather.#2015-08-0614:56cflemingActually, I just tried that and it works for me.#2015-08-0614:57cfleming@potetm: What doesn’t work for me is the completion, but the resolution once I type the symbol in does work.#2015-08-0614:57potetmAh yes. Correct.#2015-08-0614:58potetmWord, meanings, important…. right.#2015-08-0614:58cflemingHehe#2015-08-0614:58potetmRight completion doesn’t work in those cases.#2015-08-0614:58cflemingOk, great, thanks for the test case - I’ll fix that.#2015-08-0614:58potetmThanks man!#2015-08-0614:59cflemingAnd in fact, it’s still broken without the destructuring.#2015-08-0615:00potetmYeah, there are times when it appears to work for me. But I’ve not figured out the rhyme or reason.#2015-08-0615:00potetmMaybe it’s when the protocol is in another namespace?#2015-08-0615:01cflemingNo, because in that test case they’re in the same one.#2015-08-0615:01cfleminghttps://github.com/cursiveclojure/cursive/issues/1005, anyway.#2015-08-0615:07potetmYeah, this is weird. I definitely have a block of code where it works. (The protocol in that example is from another namespace.) But it’s production code. I can’t get a test case working.#2015-08-0615:07potetmAaaaand the prod code doesn’t work anymore either.#2015-08-0615:08potetmAlright, I have nothing to add. All done here.#2015-08-0615:11cfleming@potetm: Hehe, don’t worry, I’ll be able to track it down from that repro case.#2015-08-1015:48cfleming@potetm: That bug is hideous, I can’t believe I’d never noticed that before.#2015-08-1015:49potetmHaha. Yeah it’s pretty annoying. Is it bad to fix, or just bad to deal with?#2015-08-1015:49cflemingBoth, sadly.#2015-08-1015:50cflemingActually, it’s probably ok to fix - time will tell.#2015-08-1015:50potetmThe worst.#2015-08-1015:50cflemingIt’s not a one-line change, put it that way.#2015-08-1016:15cfleming@potetm: Ok, I fixed it, so clearly I was being a little dramatic#2015-08-1016:15cflemingIn my defence, I had to touch 8 files to do so.#2015-08-1016:22potetmawesome simple_smile You’re the man.#2015-08-1016:51cflemingActually, I lied, I fixed some other related bug simple_smile#2015-08-1016:51cflemingBut I’ll fix that one shortly, release hopefully later today.#2015-08-1021:45cflemingCursive 0.1.60 is out, fixing a few miscellaneous issues: https://cursiveclojure.com/eap.html#2015-08-1021:58danielcompton@cfleming: is there any way to hot swap plugins so you don’t need to close the editor#2015-08-1022:23cfleming@danielcompton: No.#2015-08-1022:23danielcomptondidn’t think so#2015-08-1112:43stHi, how can I specify leiningen profile when executing "run tests in current NS in REPL" ? dev profile is used by default.#2015-08-1118:51danielcompton@st that’s not supported yet https://github.com/cursiveclojure/cursive/issues/212#2015-08-1120:20cfleming@st that should be coming very soon though - I’m working on the change as part of a bigger one at the moment#2015-08-1123:29st@cfleming: @danielcompton thanks for your answers. Gotta be patient then ;-)#2015-08-1204:38danielcomptonIs this the intended indentation for reader conditionals?#2015-08-1204:40danielcomptonThere doesn’t seem to be a way to define #?(:clj (:import [rethinkdb.core Connection])), it always gets split onto two lines#2015-08-1208:30cfleming@danielcompton: It’s not intended, no - there are some quirks in ns formatting left over from a long time ago, but I’d have to look at why that’s happening.#2015-08-1208:30cflemingCan you file a bug for that please?#2015-08-1208:38danielcompton@cfleming: which of the 3 cljc formatting examples do you want bug reports for?#2015-08-1208:38danielcomptonall of them?#2015-08-1211:36cfleming@danielcompton: One issue with the 3 cases would be good, thanks.#2015-08-1307:39danielcomptonHow can we share cursive code styles in a project?#2015-08-1310:21cflemingFile->Export settings, or there’s a plugin which I think is now bundled which does it.#2015-08-1407:51danielcompton@cfleming: I was meaning how can we set config for a particular project so everybody’s editor picks up the code style automatically. Like .editorconfig, but for Clojure styles. I’m guessing it could be one particular file in .idea/ that I could commit in git?#2015-08-1422:30misha@cfleming: Colin, thank you for cursive#2015-08-1612:23cfleming@danielcompton: You can make the code style a project style and check it in. In your code style setup, make sure “share” is selected, you’ll then get a codeStyles folder in your .idea#2015-08-1612:24cfleming@misha: No problem, thanks! I’m glad you’re enjoying it.#2015-08-1614:39caskolkmI used added the follow lein-generate to my boot profile: https://github.com/boot-clj/boot/wiki/For-Cursive-Users Loading the generated project.clj causes: Don't know how to create ISeq from: clojure.lang.Keyword: Don't know how to create ISeq from: clojure.lang.Keyword#2015-08-1614:40caskolkmAnybody knows how to fix this?#2015-08-1617:58meow@caskolkm: It would be at least possible to help you if you posted the resulting project.clj file.#2015-08-1619:09cfleming@caskolkm: And the whole stacktrace would be helpful too - you should be able to find it in Help->Show log in Finder/Explorer#2015-08-1619:34caskolkm@meow:
#2015-08-1619:35caskolkm
(defproject
  boot-project
  "0.1.0-SNAPSHOT"
  :dependencies
  [[adzerk/boot-cljs "0.0-3308-0" :scope "test"]
   [adzerk/boot-cljs-repl "0.1.10-SNAPSHOT" :scope "test"]
   [adzerk/boot-reload "0.3.2-SNAPSHOT" :scope "test"]
   [danielsz/boot-environ "0.0.3" :scope "test"]
   [crisptrutski/boot-cljs-test "0.1.0-SNAPSHOT" :scope "test"]
   [org.clojure/clojurescript "0.0-3308"]
   [org.clojure/clojure "1.7.0"]
   [org.clojars.akiel/async-error "0.1"]
   [funcool/catacumba "0.5.0" :exclusions [[org.slf4j/slf4j-simple]]]
   [environ "1.0.0" :exclusions [org.clojure/clojure]]
   [org.danielsz/system "0.1.8"]
   [aleph "0.4.0" :exclusions [org.clojure/clojure]]
   [enlive "1.1.5"]
   [bouncer "0.3.3" :exclusions [[org.clojure/clojurescript]]]
   [joda-time "2.8.1"]
   [commons-codec "1.10"]
   [com.cemerick/piggieback "0.2.1"]
   [org.clojure/tools.nrepl "0.2.10"]
   [com.datomic/datomic-pro
    "0.9.5201"
    :exclusions
    [[org.slf4j/slf4j-log4j12]
     [org.slf4j/slf4j-nop]
     [org.apache.httpcomponents/httpclient]]]
   [io.rkn/conformity "0.3.5"]
   [org.clojure/tools.logging
    "0.3.1"
    :exclusions
    [org.clojure/clojure]]
   [ch.qos.logback/logback-classic "1.1.3"]
   [buddy "0.6.0" :exclusions [org.clojure/clojure]]
   [ring/ring-codec "1.0.0"]
   [cljsjs/aui "5.9.0-alpha002" :scope "provided"]
   [cljsjs/aui-experimental "5.9.0-alpha002" :scope "provided"]
   [cljs-ajax
    "0.3.13"
    :scope
    "provided"
    :exclusions
    [clj-time org.clojure/core.async]]
   [secretary "1.2.3" :scope "provided"]
   [re-frame
    "0.4.1"
    :exclusions
    [[org.clojure/clojure] [org.clojure/clojurescript]]
    :scope
    "provided"]]
  :source-paths
  ["src/cljs" "src/cljc" "src/clj"])
#2015-08-1619:36caskolkm@cfleming:
Don't know how to create ISeq from: clojure.lang.Keyword
java.lang.IllegalArgumentException: Don't know how to create ISeq from: clojure.lang.Keyword
	at clojure.lang.RT.seqFrom(RT.java:528)
	at clojure.lang.RT.seq(RT.java:509)
	at clojure.lang.RT.keys(RT.java:585)
	at clojure.core$keys.invoke(core.clj:1488)
	at leiningen.core.utils$map_vals.doInvoke(utils.clj:115)
	at clojure.lang.RestFn.invoke(RestFn.java:442)
	at leiningen.core.user$fn__11013.invoke(user.clj:68)
	at clojure.lang.AFn.applyToHelper(AFn.java:154)
	at clojure.lang.AFn.applyTo(AFn.java:144)
	at clojure.core$apply.invoke(core.clj:630)
	at clojure.core$memoize$fn__5479.doInvoke(core.clj:6082)
	at clojure.lang.RestFn.invoke(RestFn.java:408)
	at leiningen.core.user$fn__11016.invoke(user.clj:85)
	at clojure.lang.AFn.applyToHelper(AFn.java:152)
	at clojure.lang.AFn.applyTo(AFn.java:144)
	at clojure.core$apply.invoke(core.clj:630)
	at clojure.core$memoize$fn__5479.doInvoke(core.clj:6082)
	at clojure.lang.RestFn.invoke(RestFn.java:397)
	at leiningen.core.project$read_profiles.invoke(project.clj:654)
	at leiningen.core.project$project_with_profiles.invoke(project.clj:798)
	at cursive.leiningen$read_project.invoke(leiningen.clj:79)
	at cursive.leiningen$load_project.invoke(leiningen.clj:86)
#2015-08-1619:39caskolkm@meow: looks like the project file is ok..#2015-08-1620:02meow@caskolkm: actually, those nested exclusions don't seem right :exclusions [[org.slf4j/slf4j-simple]] and such#2015-08-1620:05caskolkmBoot does not warn about it?#2015-08-1620:07meow@caskolkm: keep in mind that the way we are using boot for this is really a bit of a hack, and I'm just guessing at what might be going on.#2015-08-1620:07meowso, boot is great, and so is cursive#2015-08-1620:07meowso we have hacked boot to have it create a project.clj file for use with cursive#2015-08-1620:08meowcursive expects the type of file commonly used by leinengen#2015-08-1620:08caskolkmI know #2015-08-1620:09meowI'm suspecting that in this case boot might be more forgiving of the nested exclusions than lein is, and cursive doesn't expect it#2015-08-1620:09meowwell, lein doesn't expect it and cursive is using lein#2015-08-1620:09meowor I'm totally off-base#2015-08-1620:10caskolkmHow does leiningen suspect nested exclusions? #2015-08-1620:11caskolkmI don't think it is completely different then boot#2015-08-1620:12caskolkmI will look at it tomorrow#2015-08-1620:21meow@caskolkm: I'm totally off-base. I just looked at the output of lein help sample and your file looks fine. Little by little I'm being forced to learn Leinengen... simple_smile#2015-08-1620:21meowsorry for the wild guess - I should know better#2015-08-1620:22meowhopefully @cfleming will have a more intelligent response for you#2015-08-1709:00cfleming@caskolkm: Can you use that file with lein? If you do a lein show-profiles or something does that work?#2015-08-1709:06caskolkmlein show-profiles gives the same error: Don't know how to create ISeq from: clojure.lang.Keyword#2015-08-1709:06caskolkm@cfleming#2015-08-1709:07cfleming@caskolkm: Ok, so it’s a bug in lein-generate then.#2015-08-1709:07cflemingUnfortunately from that error message it’s difficult to work out what’s wrong with the file.#2015-08-1709:08cflemingI don’t have the lein code in front of me right now, later I’ll look to see if I can figure it out from the stacktrace.#2015-08-1710:56cfleming@caskolkm: Can you post your profiles.clj? According to that stacktrace, the problem is actually there.#2015-08-1711:00caskolkm@cfleming: an empty file :P;)#2015-08-1711:00caskolkm😉#2015-08-1711:00cfleming@caskolkm: So it exists but is empty?#2015-08-1711:02caskolkmremoving it will fix it#2015-08-1711:02caskolkmi had a profiles.clj but i removed everything to debug simple_smile#2015-08-1711:03cfleming@caskolkm: Ok, try that, I can run show-profiles with that project.clj with no problem.#2015-08-1908:40pupenocfleming: I think it would be useful when you are automatically selecting the enclosing form, to have a middle step between single expression in a hashmap and whole hashmap: to select the current pair in the hashmap. What do you think?#2015-08-1908:41cfleming@pupeno: Yes, I’m planning to do this. In the last couple of releases Cursive now understands these groupings, so you can move map entries (and let bindings, and similar things) up and down together. It makes sense to use those for selection expansion too.#2015-08-1908:42pupenoDo you want me to submit a request to github?#2015-08-1909:54cfleming@pupeno: Actually I think there’s an issue that’s been open forever, but I can’t find it right now. Go ahead and file another, and I’ll mark one or the other as a duplicate if I ever find it.#2015-08-1910:15danielcomptonWhat’s the story with Retina Mac OS X and IntelliJ? Is it working well now?#2015-08-1910:16caskolkm@danielcompton: works fine here!#2015-08-1910:17danielcompton@caskolkm: which JDK do you use?#2015-08-1910:17cflemingIt works ok with JDK 6 as long as you’re lucky and don’t get bitten by Yosemite bugs, and it might work ok with the bundled JDK if you’re lucky and don’t get bitten by a slew of other bugs.#2015-08-1910:18cfleming@danielcompton: I recommend starting with JDK6, and only changing if any Yosemite bugs you hit are too annoying.#2015-08-1910:19cfleming(assuming you’re running Yosemite, if not you’re golden)#2015-08-1910:36pupenohttps://github.com/cursiveclojure/cursive/issues/1022#2015-08-1910:37cfleming@pupeno: Thanks!#2015-08-1911:53meowGot a problem with a project where one of my dependencies is a local git fork of Devcards that I want to work with so that I don't have to go through the install process if I change something in my fork of Devcards. So in my project that uses Devcards I have :source-paths ["src" "../../devcards/src"] which works fine as far as running my project using lein figwheel but Cursive is not happy with the project and when I try to refresh Leiningen I'm getting an error:
The file 'C:\Users\Patrick\code\decomplect\ive\..\..\devcards\src' is not under content entry root 'C:/Users/Patrick/code/decomplect/ive'
Is there a way to work around this?
#2015-08-1911:56cfleming@meow: Sadly, no, this is a problem with a few things in Cursive, there’s an IntelliJ issue about it which I can’t find right now.#2015-08-1911:56cflemingWould lein checkouts work for you? Those are supported in Cursive.#2015-08-1911:59meow@cfleming: I can live with it the way it is now - it won't keep me from working on the project. Just wanted to see if there was something I was overlooking that would make it work. Thanks.#2015-08-1912:00cfleming@meow: Ok - if they’ll work for you, I think checkouts is probably the best solution, they’re designed for exactly this case. It should be trivial to set up I think.#2015-08-1912:02meow@cfleming: Cool. simple_smile#2015-08-2113:08jstaffansAnyone else having problems opening Leiningen project.clj files all of a sudden? No implementation of method: :make-reader of protocol: #' found for class: nil#2015-08-2113:10cfleming@jstaffans: I just replied to your issue, I think you must have something in your profiles causing that#2015-08-2113:11cflemingI can’t reproduce#2015-08-2113:11jstaffansthanks, I should have asked you here first simple_smile#2015-08-2113:12cflemingHehe, no worries - there are a few issues about that leiningen-version problem#2015-08-2113:12cflemingBut none have ever been critical enough to warrant investigation - the solution right now is “don’t do that” simple_smile#2015-08-2113:12cflemingI’d be interested to know what’s causing it, though#2015-08-2113:14cfleming@jstaffans: See https://github.com/cursiveclojure/cursive/issues/968#2015-08-2113:21jstaffansmy guess is there's a problem with the (rather arcane) read-eval syntax: https://github.com/technomancy/leiningen/blob/master/doc/PROFILES.md#dynamic-eval#2015-08-2519:36cigitiaCursive Clojure can refactor-rename keywords (which is amazing). Is there a way to rename the namespaces in namespace-qualified keywords too?#2015-08-2609:37cfleming@cigitia: You’d like to rename the alias, you mean?#2015-08-2609:37cflemingYou can rename the alias, but IIRC that won’t work from the keyword itself - I’ll see about fixing that.#2015-08-2620:30cigitia@cfleming: Ah, no, I meant the namespace of a regular keyword. For instance, when I attempt to rename :foo.bam/bar, it only allows me to rename the bar part, not the foo.bam part.#2015-08-2620:31cigitia…At least, from what I can tell.#2015-08-2620:32shaunxcodeis there a way to make cursive show the ns you are in when using the repl?#2015-08-2620:32shaunxcodeI mean it shows it in the "title" of the repl but that is not... standard (what ever that means for repl ux hah)#2015-08-2620:33shaunxcodeI would like the => prompt to show the ns each time something happens#2015-08-2621:03cfleming@shaunxcode: There isn’t right now, no. The issue is that the => prompt isn’t shown in the editor window where you type, but in the output pane.#2015-08-2621:04shaunxcodeyeah I would be happy with the output pane even showing the ns prefixing the => though#2015-08-2621:05cflemingOk, that’s probably pretty easy, although it’ll get repeated a lot.#2015-08-2621:05shaunxcodethat would be fine - I want that even as I had an issue where I had changed ns and scrolling up could not tell which results were from which til I Found the (in-ns ...) command in the history etc.#2015-08-2621:06shaunxcodeI mean just making it a togglable thing in preferences would make me happy if others find it noisy#2015-08-2621:06cflemingOk, I can add a flag for that. Can you file an issue?#2015-08-2621:06shaunxcodefor sure - github?#2015-08-2621:06cflemingYeah, please#2015-08-2621:08shaunxcodehttps://github.com/cursiveclojure/cursive/issues/1038 (hopefully description makes sense)#2015-08-2621:09cflemingLooks great, thanks.#2015-08-2621:09cflemingI guess in the case of executing an in-ns, it should probably show the name of the new ns, not the old one.#2015-08-2720:06audaxionanyone have experience running a luminusweb template in cursive with the sassc plugin? i keep getting an error that sassc can’t be found, even though when i run lein repl from the command line it works fine#2015-08-2720:06audaxionOS 10.11#2015-08-2721:29cfleming@audaxion: What’s the error you’re receiving?#2015-08-2721:29audaxionno such file for sassc#2015-08-2721:30cflemingHow do you configure where it should find sassc?#2015-08-2721:30audaxionit’s on my PATH#2015-08-2721:30audaxionwhen i run lein repl from the command line it works fine#2015-08-2721:31cflemingYeah, the problem is that Cursive runs lein in-process, so it probably doesn’t see PATH.#2015-08-2721:31cflemingIs this the one? https://github.com/aew/lein-sassc#2015-08-2721:32audaxionhttps://github.com/apribase/lein-sassc#2015-08-2721:35cflemingHmm, there’s no way to configure it with an absolute path or anything#2015-08-2721:36cflemingI can’t think of an easy way of fixing that without patching the plugin, sorry#2015-08-2721:37audaxionno worries#2015-08-2721:37audaxionthanks anyway#2015-08-2722:09danielcompton@audaxion: you could run lein repl from the terminal and then connect to it as a remote REPl from Cursive#2015-08-2722:09audaxionyeah that was my workaround#2015-08-2722:10danielcompton@cfleming: is there a way to script this automatically as a run config? (I know you get another JVM)#2015-08-2722:10cflemingNo, there isn’t right now - that’s a good idea though.#2015-08-2723:49danielcomptonhttps://github.com/cursiveclojure/cursive/issues/1039#2015-08-2801:13andrewhr@cfleming: out of curiosity: eval top form understands that comment forms must be ignored. It's a edge case done by Cursive? Feels so natural!#2015-08-2807:46cfleming@andrewhr: Yeah, I implemented that#2015-08-2813:55rauhMy module settings about which dir is a source/test/resource dir is reset every time I start Cursive#2015-08-2813:55cfleming@rauh: Are you using lein?#2015-08-2813:55rauhYes#2015-08-2813:55cflemingYou’ll need to configure them in your project.clj#2015-08-2813:57rauhOh 😞, is there a way to just set it separately?#2015-08-2813:57rauhI have all my leiningen settings in profiles#2015-08-2813:57cflemingNo, I’m afraid not. The IntelliJ Maven plugin works the same way. The idea is that a module built from an external model should be totally defined in that model.#2015-08-2813:58cflemingWhy do you not want to add things like :source-paths?#2015-08-2813:59rauhBecause then my classpath is all wrong#2015-08-2813:59rauhSince I'm using both, CLJS + CLJ in my project#2015-08-2813:59rauhBut I'll just specify them all and then overwrite them somehow. Though now my fighwheel startup script has all the clojure source files in its classpath#2015-08-2814:00cflemingUgh, I really need to fix that.#2015-08-2814:01cflemingCan’t you add the :source-paths to your profiles too? Which classpath is wrong - the one generated by Cursive?#2015-08-2814:01rauhYeah a leiningen profile can either (recursively) merge or replace any config key#2015-08-2814:02rauhI guess it's not a big deal since I have to require-macros any .clj files in clojurescript anyways#2015-08-2814:03rauhThough, editing the project structure and editing it does rewrite the .iml file and it then gets reset after restarting cursive. I'm not sure if you're in charge of that dialog or if it's IntelliJ but I'd suggest a big warning that editing them will not persist#2015-08-2814:04cflemingGood idea, I’ll see if I can implement that - the Maven plugin may have something I can steal. It’s tricky since that file can be modified in many ways but I can probably generically listen to changes to it.#2015-08-2814:10rauhAlso, I notice dev-resource and resources directory is in the "source" category instead of the "resource" category#2015-08-2814:28rauhNow I have another problem: Cursive can't resolve anything out of clojure.core like ns or defn. Though sending it to the repl works fine, how did I mess that up?#2015-08-2814:29cflemingDo you have a Clojure jar in your external dependencies list in the project view?#2015-08-2814:30rauhyes#2015-08-2814:31rauhHold on, no#2015-08-2814:33rauhI def. have one in my :dependencies vector (under "no profile")#2015-08-2814:34cflemingOk, so somehow the dependency isn’t getting picked up.#2015-08-2814:34cflemingIf you manually refresh does that fix it?#2015-08-2814:34cflemingIn the lein project window?#2015-08-2814:34cflemingI can’t think of anything that Cursive would do to prevent that - it just calls out to lein for that functionality#2015-08-2814:38rauhI added it manually (from the libraries) but it's gone after a restart#2015-08-2814:38rauhall other libraries are there. Strange#2015-08-2814:39cflemingYeah, the libs are rewritten to - again, the idea is that they should be configured in project.clj.#2015-08-2814:39cflemingAre you able to share your project.clj?#2015-08-2814:39cflemingOr send it to me privately?#2015-08-2814:40rauhI'll do some more digging, then I can share it yes#2015-08-2814:40cflemingBTW, WRT the resources thing, I can’t remember what the issue was there, but they have to be source folders in IntelliJ, because its semantics for resource folders are different to lein’s, and weirdness ensued.#2015-08-2814:41cflemingOk. Send it to me at <mailto:/cdn-cgi/l/email-protection|/cdn-cgi/l/email-protection> and I’ll take a look at it and see if I can reproduce the problems you’re seeing.#2015-08-2814:45rauhLooks like having ANY :exclusions causes this for me. Making it [] and it's clojure is in there#2015-08-2814:47rauhAND having a checkouts directory#2015-08-2814:48rauhWithout checkouts or without :exclusions it works. Strange#2015-08-2814:49cflemingThat is really strange.#2015-08-2814:49rauhCan you reproduce?#2015-08-2814:50cflemingI haven’t tried - I’m in the middle of something, I’ll try it in a bit.#2015-08-2814:50rauhOk no rush, FWIW I have (only) prismatic/schema git clone'd in the ./checkouts/#2015-08-2814:51cflemingYou have it cloned rather than symlinked?#2015-08-2814:51rauhthen include :dependenciese [... [prismatic/schema "1.0.0-SNAPSHOT"] ..]#2015-08-2814:51rauhyeah, do I have to symlink it?#2015-08-2814:51cflemingOk - and where do you put the exclusion?#2015-08-2814:52rauhIn my project.clj.#2015-08-2814:52cflemingCheckouts were designed to be symlinked IIRC, but I have no idea if copying it there breaks things.#2015-08-2814:52cflemingRight, but what is the exclusion you’re adding?#2015-08-2814:52rauhoh, it's instaparse#2015-08-2814:52rauhbut I can add anything and it will break#2015-08-2814:53cflemingSo in instaparse, you’re excluding Clojure?#2015-08-2814:53rauhtried tools.reader and tools.nrepl#2015-08-2814:53cflemingCan you paste the dependency with the exclusion you’re using, and I’ll try that.#2015-08-2814:54rauhSymlinking it doesn't fix it 😞#2015-08-2821:54meow@cfleming: if I type letfn followed by a tab I get this autocomplete text:
(letfn [(name) [args]
            )])
#2015-08-2821:54meowWhich is wrong - the extra right paren after name#2015-08-2821:55meowOr I'm doing something wrong. simple_smile#2015-08-2907:13cfleming@meow: You’re right, the template text is wrong - you can see it in Settings->Editor->Live Templates#2015-08-2913:52rauhFeature suggestion: Scan the doc string of the function for any keyword occurence and suggest/autocomplete them when entering : somewhere when calling the function#2015-08-2914:56cfleming+1 from me too#2015-08-2914:57cfleming@rauh: Can you file an issue for that so it doesn’t get lost?#2015-08-2914:57rauhWill do#2015-08-2914:57cflemingNote that Cursive should autocomplete keywords that have been seen anywhere in the project anyway, so most likely you have an example somewhere.#2015-08-2914:58cflemingAlthough I’ve found that when I first create an example it often takes a while to update the indexes the first time.#2015-08-2914:58rauhYes the autocomplete is very very useful. I have just noticed it how it magically suggested :hierarchy (which I always misspell)#2015-08-2914:58cflemingHeh nice#2015-08-2914:59cflemingIt does some nice things with namespaced keywords too#2015-08-2915:04rauhhttps://github.com/cursiveclojure/cursive/issues/1043#2015-08-2915:05cflemingThanks.#2015-08-2916:27potetmAutocompleting strings in general would be super nice. We do some interop with AWS libs, and they use a lot of maps that are string->string. We decided to use their string->string format when we make our calls (as opposed to mapping keywords to strings in our wrappers), and the only regret I have about it is the fact that I don’t get autocomplete on keys of the map in cursive.#2015-08-2916:27potetmhttp://img2.wikia.nocookie.net/__cb20140304223324/glee/images/2/2c/Sad_panda.jpg#2015-08-2916:28cfleming@potetm: How would Cursive know what the autocompletions of those strings should be?#2015-08-2916:28cflemingFrom the doc, or something?#2015-08-2916:28potetmOther usages, same as keywords.#2015-08-2916:28potetmWe use the same maps over and over pretty much. Just change the right hand side of the map occasionally.#2015-08-2916:28cflemingThe problem with that is that there are lots of strings in the project that you might not want that for.#2015-08-2916:29cflemingPerhaps I could index strings which only have a symbol-looking thing inside them.#2015-08-2916:29potetmTrue story. Maybe just for strings in literals?#2015-08-2916:29potetmOr that, yeah.#2015-08-2916:29cflemingAnd then only offer completions for strings where that is true.#2015-08-2916:29potetmstrings in collection literals, that is#2015-08-2916:30cflemingI think you want the symbol-looking string thing, because then it’ll work for assoc etc#2015-08-2916:30potetmYeah, that would be perfect. Sounds hard to me, but that’s pretty much what I want.#2015-08-2916:30potetmRight.#2015-08-2916:30potetmGood call.#2015-08-2916:30cflemingIssue please simple_smile#2015-08-2916:30potetm10 4 simple_smile#2015-08-2916:43potetmhttps://github.com/cursiveclojure/cursive/issues/1046#2015-08-2916:44cflemingNice, thanks!#2015-08-2916:44potetmMy pleasure. Thank you!#2015-08-3010:49tapI tried to start a repl on Clojure project but I got this error
Exception in thread "main" java.io.FileNotFoundException: Could not locate cljsbuild/compiler__init.class or cljsbuild/compiler.clj on classpath., compiling:(/Users/tap/Library/Caches/IdeaIC14/tmp/form-init7188868106629976839.clj:1:107)
	at clojure.lang.Compiler.load(Compiler.java:7239)
	at clojure.lang.Compiler.loadFile(Compiler.java:7165)
	at clojure.main$load_script.invoke(main.clj:275)
	at clojure.main$init_opt.invoke(main.clj:280)
	at clojure.main$initialize.invoke(main.clj:308)
	at clojure.main$null_opt.invoke(main.clj:343)
	at clojure.main$main.doInvoke(main.clj:421)
	at clojure.lang.RestFn.invoke(RestFn.java:421)
	at clojure.lang.Var.invoke(Var.java:383)
	at clojure.lang.AFn.applyToHelper(AFn.java:156)
	at clojure.lang.Var.applyTo(Var.java:700)
	at clojure.main.main(main.java:37)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:497)
	at com.intellij.rt.execution.application.AppMain.main(AppMain.java:140)
Caused by: java.io.FileNotFoundException: Could not locate cljsbuild/compiler__init.class or cljsbuild/compiler.clj on classpath.
	at clojure.lang.RT.load(RT.java:449)
	at clojure.lang.RT.load(RT.java:412)
	at clojure.core$load$fn__5448.invoke(core.clj:5866)
	at clojure.core$load.doInvoke(core.clj:5865)
	at clojure.lang.RestFn.invoke(RestFn.java:408)
	at clojure.core$load_one.invoke(core.clj:5671)
	at clojure.core$load_lib$fn__5397.invoke(core.clj:5711)
	at clojure.core$load_lib.doInvoke(core.clj:5710)
	at clojure.lang.RestFn.applyTo(RestFn.java:142)
	at clojure.core$apply.invoke(core.clj:632)
	at clojure.core$load_libs.doInvoke(core.clj:5749)
	at clojure.lang.RestFn.applyTo(RestFn.java:137)
	at clojure.core$apply.invoke(core.clj:632)
	at clojure.core$require.doInvoke(core.clj:5832)
	at clojure.lang.RestFn.invoke(RestFn.java:436)
	at user$eval7.invoke(form-init7188868106629976839.clj:1)
	at clojure.lang.Compiler.eval(Compiler.java:6782)
	at clojure.lang.Compiler.eval(Compiler.java:6771)
	at clojure.lang.Compiler.load(Compiler.java:7227)
	... 16 more

Process finished with exit code 1
Exception starting REPL: java.lang.InterruptedException
This project doesn’t related to ClojureScript at all, but the previous project I was working on is a ClojureScript project. Any idea what have I done wrongly? Note: $ lein repl in command line starts the repl fine
#2015-08-3010:53tapI found the fix. Invalidate cache and restart intellij. Thanks#2015-08-3021:56Joe R. Smithis there a way to manually invoke the indentation options intellij helper menu?#2015-08-3021:57Joe R. SmithI want to tell cursive to indent a “defsomething” a certain way, but clicking on the defsomething doesn’t show me the light bulb.#2015-08-3021:58cfleming@solussd: Not right now, sorry, I need to make the indentation options editable in the settings pane.#2015-08-3021:58Joe R. Smithany file I can edit? simple_smile#2015-08-3021:58cflemingThe lightbulb is usually reliable though, does your defsomething resolve? Can you navigate to it?#2015-08-3021:59Joe R. Smithyes#2015-08-3021:59cflemingAnd you have the caret inside a usage of defsomething?#2015-08-3021:59cflemingNot the definition?#2015-08-3021:59Joe R. Smithyes#2015-08-3022:00Joe R. SmithI also have it suggesting (in a blue popup) to import something#2015-08-3022:00Joe R. Smithmaybe that is preventing the lightbulb?#2015-08-3022:00cflemingIt’s suggesting to import the defsomething, or something else?#2015-08-3022:00Joe R. Smithsomething else#2015-08-3022:00cflemingHmm, that might prevent it, yeah#2015-08-3022:00cflemingI’m not sure.#2015-08-3022:01Joe R. Smithis there a way to tell it to stop suggesting the import?#2015-08-3022:01Joe R. Smiththe things it is suggesting to import are declared with my defsomething, so cursive doesn’t see them as defs#2015-08-3022:02cflemingIn terms of editing files - is your code style set to be project specific?#2015-08-3022:02cflemingSadly, there’s not a good solution for that right now either, sorry#2015-08-3022:02cflemingYou can exclude the package of the thing it’s trying to import, but that may not be what you want.#2015-08-3022:03cflemingi.e. is your code style scheme “Project”?#2015-08-3022:06Joe R. Smithit’s not “Project"#2015-08-3022:06cflemingOk, then that requires a little spelunking to find the file - one sec#2015-08-3022:06cflemingWhich OS?#2015-08-3022:06Joe R. SmithOSX#2015-08-3022:06Joe R. Smithrunning eap 15, if that matters#2015-08-3022:07cflemingOk, you probably want to quit IntelliJ since it caches a lot of the settings#2015-08-3022:07cflemingThen look in ~/Library/Preferences/IntelliJIdea15/codestyles/#2015-08-3022:08cflemingFind the file corresponding to the code style you’re currently using#2015-08-3022:08cflemingYou’ll see a block that looks like this:
<ClojureCodeStyleSettings>{
  :compojure.core/defroutes :only-indent
  :eway-test.store/with-transaction 1
  :hiccup.core/html :only-indent
  :xodus-test.core/with-transaction 1
}</ClojureCodeStyleSettings>
#2015-08-3022:09cflemingModify as required simple_smile#2015-08-3022:10Joe R. Smiththank you!!#2015-08-3119:33jeffh-fpHad to click Switch REPL Namespace to current file#2015-08-3119:34jeffh-fpI guess that’s not the default...#2015-08-3119:35jeffh-fpok thanks everyone! 😝#2015-09-0312:17pupenoI just created a lein plug in, opened with cursive, and the indentation seems all wrong: https://i.imgur.com/TY7gcFP.png Any ideas what’s going on here?#2015-09-0316:56cfleming@pupeno: The problem looks like your project has no Clojure jar attached#2015-09-0316:56pupenocfleming: in lein plugins you are not supposed to specify clojure as a dependency. Might that be it?#2015-09-0316:57cflemingYes, could be - I’ve never attempted to make a lein plugin in Cursive.#2015-09-0316:57cflemingYou could manually attach a Clojure jar to your project.#2015-09-0316:57pupenoHow do you it?#2015-09-0317:01cflemingProject Structure->Modules->(your module)->Dependencies->+->Jars or directories and select a Clojure jar somewhere, for example in your .m2#2015-09-0321:01pupenocfleming: it worked, thank you.#2015-09-0409:19danielcompton@pupeno: you could add a Clojure dependency in project.clj but set :scope :provided ?#2015-09-0409:56jelleaIs it possible to add form parameters in this list? I would like to add boot’s deftask as seen on the right simple_smile https://jelle.io/1illF36#2015-09-0422:53telis there a way to get autoformatting to hard wrap my docstrings?#2015-09-0422:55telturns out fill paragraph works some of the time#2015-09-0422:55meow@tel: Edit -> Fill Paragraph, which I have assigned to Alt+F#2015-09-0422:56teloh, huh, it seems to work most of the time now that I’ve keybound it#2015-09-0422:56telthanks @meow
#2015-09-0422:56telsimple_smile#2015-09-0422:56meownp simple_smile#2015-09-0502:37telIs there a way to teach cursive that a macro I made establishes a binding?#2015-09-0502:37telthat it’s a "`let`-like" macro#2015-09-0608:41ricardoContinuing from the Twitter licensing thread from hell, regarding this concern: https://twitter.com/CursiveClojure/status/640443240802418688#2015-09-0608:42ricardoIf you follow a similar approach of yearly subscriptions where the user gets to keep the software for the year they paid for, doesn’t that solve the problem? I’d only expect support if I’m currently paying, meaning at most you’d need to support your last 12 months of releases.#2015-09-0608:45cflemingThe problem is that each of the releases in those twelve months (N in my previous tweet) has to work with as many versions of IntelliJ as people are using (the M in that tweet above)#2015-09-0608:45cflemingWith a pure subscription model for both, M and N are both one, and my life is good simple_smile#2015-09-0608:47cflemingActually, I think I got M and N mixed up in that tweet - what I wanted to say was that if JetBrains have a rolling update model but licenses become perpetual after a user has paid 12 months, then users can be permanently running any arbitrary version of IntelliJ.#2015-09-0608:49cflemingAnd it won’t just be v12, v13 or v14 as it is now, but September 15, 2015 build a12bef94#2015-09-0608:49ricardoNot necessarily. Even if there’s a pure subscription model, I don’t expect everyone will upgrade to the last update right away. You will still get support requests from someone who is on IDEA from 3 months ago and can’t update because of “reasons” (say, it breaks something for them).#2015-09-0608:50cflemingI have to wait a bit before making a decision on this because JetBrains have not announced whether their release model will change - I expect it will, since the licensing change would make much less sense without that.#2015-09-0608:51ricardoI guess my point is… even if they go full subscription and rolling updates, I would not assume everyone who jumps in upgrades in lockstep. I’d still expect you’ll need to deal with supporting a menagerie of versions.#2015-09-0608:55cflemingRight, but if it’s full sub then everyone will presumably upgrade within, say, 30-60 days.#2015-09-0608:56cflemingI have to assume they put some thought into how the API versioning would work for plugin authors, but they have a history of neglecting us somewhat, so who knows.#2015-09-0608:56cflemingI’m not optimistic this will make my life easier, put it that way!#2015-09-0608:58cflemingGot to go catch a flight sorry, back tomorrow.#2015-09-0616:13meikemertschHello simple_smile My clojure mentor introduced me to Cursive for my first clojure project. Slowly it grows and now I stumbled over a missing feature in Cursive. We wonder if it is already somewhere in the backlog: When I want to move some namespace(s) to a different/new package, Cursive does not yet help me. I have to do all the renaming by hand. Especially since renaming does not allow including parts with "."#2015-09-0616:13meikemertschIs that planned for anywhere in the future?#2015-09-0616:15meikemertschBtw: Thanks for developing Cursive. It's pretty useful for me simple_smile#2015-09-0621:30rauh@meikemertsch: Right click on your source file then choose Refactor - Rename. That should do it#2015-09-0700:19cfleming@meikemertsch: Right, Cursive will only help with renaming the last part right now.#2015-09-0700:19cflemingThat’s because renaming anything else is actually a move operation and is much more complicated.#2015-09-0700:19cflemingIt’s definitely on my list to fix.#2015-09-0701:31cflemingSo I received some confirmation that their release model will not change significantly, at least in the short to medium term.#2015-09-0701:31cflemingWhich is good news for me.#2015-09-0701:32cfleming@ricardo: There was also this on the Cursive mailing list: https://cursiveclojure.com/archive/1434.html#1444 (as a counterpoint)#2015-09-0701:33cflemingI haven’t had time to reply to it yet.#2015-09-0704:01danielcomptonI’m in favour of the infinite version number#2015-09-0704:01danielcomptonI think it’s worked pretty well for Chrome#2015-09-0706:17meikemertsch@rauh: Nope, sorry, that is exactly what does not work. As I said, renaming does not allow parts with a ".". But Colin's answer was good enough simple_smile I'll wait happily.#2015-09-0706:18meikemertsch@cfleming: Thanks simple_smile#2015-09-0706:27ricardo@cfleming: Not exactly counterpoint, just people feeling differently about the possibility of the tool going away if they stop paying.#2015-09-0706:28ricardoIt’s not like I expect my point of view to be the only one. simple_smile#2015-09-0706:32cfleming@ricardo: Sure, I didn’t think you did simple_smile#2015-09-0706:33cflemingI also think he over-states the case for having to support old versions - I have no problem saying any version older than a year basically has no support, which is more or less true of JetBrains too.#2015-09-0706:33cflemingExcept in needing to make sure old builds stay working for some reasonable amount of time.#2015-09-0706:34cfleming(which is a problem JetBrains don’t have since they’re not maintaining compatibility with an underlying platform)#2015-09-0706:37ricardoHmm. I wonder about that. As a Cursive customer, I don’t think I would have a problem if Cursive build X was guaranteed to work only with IDEA build X’. Others may, though, assuming: - They have a valid Cursive update subscription, - Their IDEA license has expired, they get to keep it but they can’t update#2015-09-0706:38ricardoAlthough I’m not sure the out-of-sync subscription period case is any different from having a valid Cursive subscription, but not being able to update your IDEA license because of other reasons (such as it breaking a different plugin they rely on).#2015-09-0706:40ricardoMeaning, it’s a problem that I’d consider out of your hands.#2015-09-0706:43cflemingThat’s good to know - I’d like to minimise that, though, or at least support some reasonable range of IntelliJ versions.#2015-09-0706:44cflemingI was thinking more of the case where the user has a perpetual license to an older version of Cursive and wants to upgrade IntelliJ, but I don’t have a problem saying they’ll need to upgrade Cursive then.#2015-09-0706:46ricardoYeah. I expect software to keep working in the state that it was when I paid for it. Forward compatibility is an extra, not a requirement.#2015-09-0706:48ricardoAfter all, if you release Cursive for IDEA 17, I have no reason to expect it’s also Cursive for IDEA 18 and 19.#2015-09-0706:49ricardoVMWare is a good example there. I think in most cases you have to upgrade you Fusion license if you want to upgrade your OSX host.#2015-09-0718:14cfleming@kernelp4nic: I’ll look into whether it would be possible to configure those in a way that wouldn’t interfere with the extension api later.#2015-09-0718:15kernelp4nic@cfleming: thanks! simple_smile#2015-09-1004:22danielcompton@cfleming: If I have my Code Styles set to Project, where do custom indentation settings go?#2015-09-1004:22cfleming@danielcompton: Do you mean in which file?#2015-09-1004:23danielcomptonYeah?#2015-09-1004:23danielcomptonI don’t see anything in codeStyleSettings.xml#2015-09-1004:24cfleming@danielcompton: In .idea/codeStyleSettings.xml you should see a <ClojureCodeStyleSettings> block#2015-09-1004:40danielcomptonI see it, but it only has:
<ClojureCodeStyleSettings>{
  :cursive.formatting/align-binding-forms true
  :cursive.formatting/comment-align-column 0
  :cursive.formatting/imports-use-vectors true
}</ClojureCodeStyleSettings>
#2015-09-1004:41danielcomptonIt doesn’t have my custom symbol indentations#2015-09-1005:25cflemingIf you add a new indentation, and switch away from IntelliJ and back again (to ensure it persists the changes), you don’t see it added?#2015-09-1010:10danielcompton@cfleming: the issue was I had two projects open, and was formatting the sub (checkout) project and looking at it’s codestylesettings, but the changes were applied to the main project#2015-09-1010:11danielcomptonThey show up in the main project#2015-09-1011:48cflemingAh, ok - that’s two lein projects within one IntelliJ project, right?#2015-09-1020:32danielcompton@cfleming: yeah exactly #2015-09-1020:33cfleming@danielcompton: Right, IntelliJ only stores the config in one place for a single (IntelliJ) project.#2015-09-1022:06danielcomptonWhat do the different indentation parameters mean?#2015-09-1022:41telMy intuitive understanding is that it counts how many parameters will have their indentation position ignored before computing the indent level#2015-09-1022:42telso setting it to 1 replicates let indentation#2015-09-1022:42teland I’ve never had to set it to anything else simple_smile#2015-09-1022:55meowI've changed several things to Indent so that they indent 2 spaces rather than lining up way to the right - can't think of what, specifically, atm#2015-09-1022:56meowI'm not a big fan of stuff lined up way on the right, in general, especially when trying to keep code within 80 chars#2015-09-1022:57meowIn general that setting is a bit of a mystery to me and I just worked it out by trial-and-error but would love an expert description of how it works#2015-09-1100:21danielcomptonThe docs don’t really cover what it exactly does https://cursiveclojure.com/userguide/formatting.html#2015-09-1110:27cflemingI’ll update the doc with how that works.#2015-09-1110:32cflemingFor macro forms, there are two blocks that are aligned - the parameters to the macro and then the macro body.#2015-09-1110:33cflemingThat number in the dropdown is the number of parameters which will be aligned before assuming that the rest is the body.#2015-09-1518:33gravOh dear, seems IDEA has begun inserting exotic characters instead of using the keyboard shortcuts that I’ve defined. Eg. alt+d yields ð#2015-09-1518:33gravAny clues as to why? I’ve tried toggling structural editing, to no avail#2015-09-1519:42cfleming@grav: It’s a JDK issue. Are you on a Mac?#2015-09-1519:43cflemingHave you just upgraded IntelliJ, or the JDK it runs on?#2015-09-1519:46gravI just upgraded to osx 10.11#2015-09-1519:47cflemingHmm#2015-09-1519:47gravBut I did so on two machines, and only saw this problem on one#2015-09-1519:47cflemingIt’s some JDK/OS interaction, definitely. Which JDK are you using to run IntelliJ? IntelliJ IDEA->About IntelliJ IDEA#2015-09-1519:48gravWonder why I couldn't find anything on Google about it, if it's not a new issue#2015-09-1519:49cfleminghttps://github.com/cursiveclojure/cursive/issues/962#2015-09-1519:50cflemingOk. If you switch to JDK 6 that fixes it.#2015-09-1519:50cflemingThe Apple JDK.#2015-09-1519:50cflemingApparently 1.8u60 fixes it, but AFAIK that’s not out yet.#2015-09-1519:51gravThe JRE 1.6 right? I think I need the JDK 1.8 for cljs simple_smile#2015-09-1519:51cflemingNo, that’s just the JDK you use to run IntelliJ itself. It doesn’t affect the JDK you configure for your projects.#2015-09-1519:52gravAh ok. So if I just install the one from Apple, which one will IDEA use?#2015-09-1519:52gravShould I uninstall something?#2015-09-1519:52cflemingNo, you shouldn’t need to uninstall anything.#2015-09-1519:53cflemingI think you already have JDK6 installed anyway, it’s required for IntelliJ even if you use other JDKs IIRC.#2015-09-1519:53gravSeems oracle has a jdk-8u60#2015-09-1519:53gravhttp://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html#2015-09-1519:53cfleminghttps://intellij-support.jetbrains.com/hc/en-us/articles/206827547-Selecting-the-JDK-version-the-IDE-will-run-under#2015-09-1519:55cflemingOk, nice. Note that the Oracle JDK has pretty horrible font rendering. JetBrains also has a bundled JDK but I don’t know if that’s on u60 yet. I’m also not sure which version they bundle with 14 - v15 has more recent updates I think.#2015-09-1519:56cflemingSee here too: https://github.com/cursiveclojure/cursive/issues/1033#2015-09-1519:56cflemingI’ll write up a doc about this, the JDK situation on OSX is a total mess.#2015-09-1519:57cflemingActually, looking at that second issue, it looks like it’s now possible to run IntelliJ without JDK6 installed - maybe that’s what happened to you.#2015-09-1519:57cflemingTry installing the JDK6 he links to.#2015-09-1519:57gravok. I’ll try u60 first and see if that works#2015-09-1519:59gravu60 fixed it. you’re right the font rendering is a bit off#2015-09-1519:59cflemingOk. Do try JDK6 at some point too, I think your eyes will thank you simple_smile#2015-09-1519:59gravhaha, true simple_smile at least you have confirmation that both 8u60 and jdk6 fix the issues.#2015-09-1519:59gravAnd thanks a lot for the help simple_smile#2015-09-1520:03cflemingNo problem!#2015-09-1520:03cflemingThe proper solution, sooner or later, will be JetBrains’ custom JDK. It still doesn’t work well for me, but does for many people - it seems to be hardware dependent.#2015-09-1520:06gravok. that’s a pretty sad situation. I also experienced some text rendering and blinking problems related to the JDK when I used AppCode at some point. Hope their custom JDK fixes it across their products#2015-09-1520:12danielcomptonI’m on JDK 6, and the Alt+key doesn’t work there for me#2015-09-1520:12danielcomptonI think you need to be on 8u60 or higher for that#2015-09-1520:14grav@danielcompton: works fine on jdk 6 for me#2015-09-1520:14danielcomptonLucky you simple_smile#2015-09-1520:15grav😉#2015-09-1521:18cfleming@danielcompton: Weird, everyone else I’ve suggested it to has found that JDK6 fixes that problem.#2015-09-1713:05pupenoIs it possible to have a shortcut add #_ to the current form?#2015-09-1713:30rauh@pupeno: I created a ticket for that: https://github.com/cursiveclojure/cursive/issues/1047#2015-09-1717:00jeffh-fpTrying to set up Cursive on a different machine and I’m getting:
Starting nREPL server...
/Library/Java/JavaVirtualMachines/jdk1.8.0_60.jdk/Contents/Home/bin/java -Didea.launcher.port=7536 "-Didea.launcher.bin.path=/Applications/IntelliJ IDEA 14.app/Contents/bin" -Dfile.encoding=UTF-8 -classpath "/Library/Java/JavaVirtualMachines/jdk1.8.0_60.jdk/Contents/Home/lib/ant-blah blah blahs/jdk1.8.0_60.jdk/Contents/Home/jre/lib/ext/zipfs.jar:/Users/jhoelter/Library/Application Support/IntelliJIdea14/clojure-plugin/lib/tools.nrepl-0.2.6.jar:/Applications/IntelliJ IDEA 14.app/Contents/lib/idea_rt.jar" com.intellij.rt.execution.application.AppMain clojure.main -i /Users/jhoelter/Library/Caches/IntelliJIdea14/tmp/form-init1195440279455688077.clj
Exception in thread "main" java.lang.ClassNotFoundException: clojure.main
Do I need to manually install the clojure JAR for Cursive to work?
#2015-09-1717:04jeffh-fpthat error is happening when I start the REPL#2015-09-1717:05jeffh-fpI try to tell it to use nREPL but it keeps going back to “Use clojure.main in normal JVM process"#2015-09-1717:35jeffh-fpand I fixed it … when I opened the project.clj file is said “Leiningen project not registered” so I clicked that, recreated the local REPL, and now I’m good#2015-09-1818:20afhammadtrying to install cursive on a freshly installed intellij idea CE, when i find it in browse repositories and click install, it shows me a downloading progress bar and completes, but nothing happens after that and I still see the install button. on OS X Yosemite#2015-09-1821:46cfleming@afhammad: That does happen from time to time, and I’ve never managed to work out what’s going to since I can never reproduce it.#2015-09-1821:47afhammad@cfleming: I managed to get it installed by downloading the Jars instead#2015-09-1821:47cfleming@afhammad: The easiest workaround is to manually download the plugin and install it from disk as described here: https://cursiveclojure.com/userguide/#2015-09-1821:47cflemingAh perfect, that simple_smile#2015-09-1821:47afhammad👍#2015-09-1822:08afhammadit seems cursive comes with rainbow parens, how do I turn them on?#2015-09-1822:11cflemingSettings->Languages & Frameworks->Clojure#2015-09-1822:12cflemingIn the settings page you can also just search for “rainbow"#2015-09-1822:12cflemingWhich is a useful thing to know for finding config in general#2015-09-1822:18afhammadawesome thanks#2015-09-1907:16ricardo@cfleming: Odd, I have a project for which Cursive doesn’t seem to be refreshing dependences/references unless I close and reload IDEA.#2015-09-1907:17ricardoStill on 0.1.62 and 14.1.4#2015-09-1907:50seantempestaAnyone using ambly with cursive? I’m trying to get the repl to connect to the simulator but it just hangs on “Searching for devices…"#2015-09-1907:57ricardo@seantempesta: I am not right now, but was aiming to look into that in the near future. Please write back with your findings.#2015-09-1908:03seantempesta@ricardo: Sure. And please do the same in case I can’t figure it out. simple_smile#2015-09-1909:00ricardoWill do.#2015-09-1913:46potetmThe difference between those two JetBrains press releases is hilarious: Version 1.0 > Introducing JetBrains Toolbox, easier access to your coding tools, more control and flexibility, and a lower entry price. Version 1.1 > We believe such a model is more sustainable in the long run and will allow us to continue making great tools for you.#2015-09-1913:50potetmI also recall the original pricing page had a bunch of random numbers crossed out, as if it were some kind of sale, but it was impossible for me to tell what the heck they were trying to convey. The new version is: existing/new -> monthly/annual billing -> prices#2015-09-1913:52potetmWhen marketing takes over...#2015-09-1920:41cfleming@potetm: I wish 1.1 had been the version they’d opened with, it would have avoided a lot of drama.#2015-09-1920:42cfleming@seantempesta: It might be worth asking in #C03S1L9DN. mfikes (Ambly author) is a Cursive user.#2015-09-1920:43cfleming@ricardo: That’s very odd. Do you get any error message in the log when you hit refresh?#2015-09-2006:34ricardo@cfleming: Let me isolate in which cases it’s exactly happening.#2015-09-2006:38ricardo@potetm @cfleming: Yeah, definitely they should have opened with it, but it wasn’t just marketing taking over writing the copy - this one is a reworked model.#2015-09-2006:39ricardoI expect there was some echo chambering going on with the original one. ”We like pure subscriptions, couple customers have asked us about it, therefore everyone will love it”.#2015-09-2006:39ricardoI very much like the new approach.#2015-09-2006:43ricardoI hadn’t even considered the budget freeze issue they mention. Talking to a few corporate customers before the original announcement would probably have helped them highlight that one.#2015-09-2006:45ricardo@cfleming: How do you feel about the permanent license being the one for when someone’s subscription started? Looks like this would extend your necessary version support window.#2015-09-2006:47ricardoIt’s not entirely clear if these “versions available” will be major releases, like they’re doing now, or just some continuous update. I expect the major release approach negates that issue.#2015-09-2012:55pupenoHow can I have IntelliJ re-load the list of “external libraries” according to project.clj?#2015-09-2013:02darwin@pupeno: I just quit IntelliJ and open it again.#2015-09-2013:02pupeno@darwin: yeah, I do that, but I had some things running in intellij that I didn’t want to lose.#2015-09-2013:34danielcompton@pupeno: run Refresh Leiningen Projects#2015-09-2013:34danielcomptonI use Command+Shift+A to bring up the command box#2015-09-2013:35danielcomptonThat will reload any changes to your Lein config#2015-09-2014:40simax99When I use the refactoring extract variable on the s-expression (utils/get-current-location). Cursive asks if I want to replace all three occurrences which I accept. It then proceeds to add the let binding outside the function definition, which doesn’t seem correct. I use extract variable in other functions and it behaves as I would expect, often offering choices of where the binding should be placed. (defn ^:export init [] (dispatch [:initialise-db]) (when (or (= (utils/get-current-location) "") (= (utils/get-current-location) "#/")) (utils/set-hash! "#/employees")) (println (str "Current loc: " (utils/get-current-location))) (hook-browser-navigation!) (mount-root)) After extract variable refactoring (let [value (utils/get-current-location)] (defn ^:export init [] (dispatch [:initialise-db]) (when (or (= value "") (= value "#/")) (utils/set-hash! "#/employees")) (println (str "Current loc: " value)) (hook-browser-navigation!) (mount-root))) I’m using Cursive version: 0.1.62 on IntelliJ version 142.4859.6 on a Mac#2015-09-2022:27cfleming@simax99: Yeah, that’s a bug due to the fact that Cursive isn’t yet aware of which forms are in an implicit do-body (the defn body, in this case). That will be coming soon.#2015-09-2022:27cflemingCurrently it has to find a single enclosing form, which it sometimes does wrong.#2015-09-2022:32cfleming@simax99: I added your example to https://github.com/cursiveclojure/cursive/issues/1044#2015-09-2022:36cfleming@darwin: @pupeno: There’s also a button in the Leiningen toolwindow to refresh dependencies.#2015-09-2023:08cfleming@ricardo: Yeah, for the moment their plan is to maintain major version releases: https://devnet.jetbrains.com/thread/472538#2015-09-2023:08cflemingSo after all the drama this hopefully won’t affect me too much.#2015-09-2023:15danielcompton@cfleming: it could mean you need to support older versions of IntelliJ for longer? Because if someone’s license lapses they drop back to the version of 1 year ago. Although you’re already supporting older versions so maybe not a big change#2015-09-2023:16cfleming@danielcompton: Yeah, I’ll probably just have the same policy as now, i.e. two major version support#2015-09-2023:17cflemingIf someone is on an ancient IntelliJ they may need to upgrade to use Cursive, and similarly they may need to upgrade Cursive if they upgrade IntelliJ.#2015-09-2023:18cflemingI’m hopefully going to provide a PR for IntelliJ v15 which will allow me to switch functionality based on the IntelliJ version, which should make that more tractable.#2015-09-2023:18danielcomptonPR to Jetbrains?#2015-09-2023:18cflemingYeah#2015-09-2023:19cflemingIntelliJ is OSS, after all simple_smile#2015-09-2023:19cflemingI actually have a couple planned.#2015-09-2023:19danielcomptonCould you do anything with custom reader conditionals?#2015-09-2023:19cflemingMaybe, but I’d rather not simple_smile#2015-09-2023:19cflemingFirstly I probably need to switch Java code too.#2015-09-2023:20cflemingThat would be a sure way to improve the reader conditional support though.#2015-09-2023:21cflemingIt’s actually an interesting idea, I hadn’t considered that, I probably shouldn’t say no too quickly.#2015-09-2023:22cflemingNot sure I could handle Rich telling me “I told you so”, though.#2015-09-2023:30danielcomptonsimple_smile#2015-09-2023:32cflemingActually, it wouldn’t work since I AOT#2015-09-2023:32cflemingI’d end up AOTing multiple versions, but I still need IntelliJ support to switch between them.#2015-09-2108:15ricardo@cfleming: Sounds good.#2015-09-2422:28afhammadI think messed something up when setting up a project on cursive and now somehow have the files in the project root listed twice, both inside and outside the root. Is there any way to exclude files from a project? Deleting them doesn’t help since it deletes the actual file. Screenshot: https://www.dropbox.com/s/o1jzlbyni74c190/Screenshot%202015-09-24%2023.29.11.png?dl=0#2015-09-2422:30cfleming@afhammad: Looks like your module might have two content roots, or something similar.#2015-09-2422:30cflemingOne solution is just to import your project again, and confirm when it asks if you want to overwrite your existing files.#2015-09-2422:33afhammadThat didnt work, but i just noticed what the problem is, I imported the project from a symbolic link pointing to the folder#2015-09-2422:34afhammadimporting directly from the folder fixed it#2015-09-2422:34cflemingOh, interesting#2015-09-2422:34cflemingI can see how that might be confusing simple_smile#2015-09-2422:35afhammadindeed#2015-09-2507:38danielcompton@cfleming: how hard is it likely to be to hook into the Karma test runner for IntelliJ? Or the JUnit one for clj. I'm thinking of taking a crack at it#2015-09-2517:57jstaffansis there a way to get e.g. println or clojure.pprint/pprint output in the REPL to be as nicely syntax-highlighted as REPL return values ?#2015-09-2521:28cfleming@jstaffans: Not right now unfortunately, but I’m planning to add this soon, along with auto-pprinting of return values if desired.#2015-09-2521:55jstaffans@cfleming: aight, looking forward to that!#2015-09-2706:47afhammadCan anyone recommend a decent color scheme for intellij?#2015-09-2706:48danielcompton@afhammad: I like Solarized Dark#2015-09-2707:42afhammad@danielcompton: thanks i’ll try it out#2015-09-2707:44afhammadCan cursive learn about my macro bindings, or at least not highlight them as “cannot be resolved”?#2015-09-2707:52danielcompton@afhammad: not in the general case yet https://github.com/cursiveclojure/cursive/issues/147#2015-09-2707:55afhammadah, thanks#2015-09-2715:37meikemertsch@afhammad: I'm using https://github.com/Misophistful/borealis-cursive-theme as color scheme and like it a lot as it helps me greatly keeping track of my parenthesis. James, who wrote it, is also in this channel in case something either can be improved or if problems pop up.#2015-09-2715:39meikemertschWell, you just discussed the question that I was about to ask. Hope that this gets a nice fix in the future simple_smile#2015-09-2719:29afhammad@meikemertsch: nice, this one is similar to the Lighttable one, which i quite like.#2015-09-2719:43meikemertsch@afhammad: yes. James also made one for Lighttable and I can't see differences. #2015-09-2719:43meikemertschOr did you mean the original lighttable one?#2015-09-2719:43afhammadoriginal#2015-09-2719:44afhammadah i see he actually has one identical to lighttable#2015-09-2719:44meikemertsch:) Just incase you like borealis, you can have it on lighttable, too ;)#2015-09-2719:45afhammad👍#2015-09-2719:46meikemertsch:) I'm still a bloody beginner and getting the brackets right is incredibly helpful. Therefore borealis is my choice#2015-09-2719:47afhammadyeh it helps keep you sane#2015-09-2719:47meikemertschEspecially when you are searching the readon why something does not work as expected ;)#2015-09-2805:13meikemertschS/readon/reason#2015-09-2807:17james@afhammad @meikemertsch: There are actually some subtle differences between the LT and Cursive versions of Borealis, though it’s very easy to miss them. simple_smile For the Cursive version, I slightly lowed the contrast between the background and text colours, with the goal to be easier on the eyes during longer coding sessions.#2015-09-2807:23afhammadjames: yeh I noticed that when comparing the two, does the job though, thanks for sharing#2015-09-2807:24james@afhammad: You’re welcome.#2015-09-2812:54afhammadAnyone know if there’s an intellij sass/scss syntax highlighter/plugin?#2015-10-0702:03cflemingCursive 0.1.63 is out, fixes some bugs and improves a few things too.#2015-10-0703:20potetm@cfleming: Man, that sucks about esc.#2015-10-0703:21cflemingYeah. All is not lost, I’m going to hack IdeaVim and add an extension point, and send a PR.#2015-10-0703:21cflemingIf he’s not interested I’ll just run a fork.#2015-10-0703:21potetmHaha nice!#2015-10-0703:22cflemingI mean, it’s a reasonable use case. This is also broken in anything else using a toolwindow (Python console, SQL console etc)#2015-10-0703:23potetmRight. I can’t imagine why they wouldn’t take something that just adds an extension point.#2015-10-0703:23potetmEspecially for something they acknowledge is a bit of a pain point on their main page.#2015-10-0703:24cflemingYeah. We’ll see how that works out for me simple_smile#2015-10-0703:29danielcompton> I can’t imagine why they wouldn’t take something that just adds an extension point. famous last words#2015-10-0703:30danielcomptonThe experience for upgrading plugins is still poor in IntelliJ 15 😞#2015-10-0703:31cflemingYeah, that is one sucky part of their API#2015-10-0703:31danielcomptonand the one that every plugin has to use simple_smile#2015-10-0703:32danielcomptonyou buried the lede on 63. Loving the new icons!#2015-10-0703:35cflemingNice, I didn’t have time to come up with one for CLJC or EDN#2015-10-0707:18simax99I just updated to Cursive 0.1.63 on IntelliJ EAP 15 Community edition build: IC-142.5239 (on Windows) and now IntelliJ doesn't seem to know about Clojure any more . All the syntax colouring has disappeared. Cursive is still ticked in the plugin section. I've restarted IntelliJ a couple of times - to no avail. Anyone know what I did wrong?#2015-10-0707:59danielcompton@simax99: have you tried uninstalling the plugin and reinstalling it?#2015-10-0708:04simax99I tried ticking then unticking in the plugins section. But not uninstalling I'll try that now.#2015-10-0708:20simax99@danielcompton Ok, I uninstalled cursive. Then reinstalled it, everything went as expected. When I go back to plugins - cursive is not in the list. Re-started IntelliJ - still no joy, cursive still not listed in plugins. Went through the process several times - still not there. Any other suggestions greatly received simple_smile#2015-10-0708:21cfleming@simax99: That’s very strange.#2015-10-0708:21cflemingIn case of problems, the safest way to install is to download the zip and install from disk.#2015-10-0708:22simax99@cfleming, yeh - I've never had a problem, updated cursive and IntelliJ many times - no problem.#2015-10-0708:22cflemingGrab https://cursiveclojure.com/cursive-15-0.1.63.zip and then Settings-&gt;Plugins-&gt;Install from Disk#2015-10-0708:22cflemingEvery so often it fails, and I’ve never worked out why since I can never reproduce it.#2015-10-0708:22simax99@cfleming will do, I'll report back#2015-10-0708:23cfleming@simax99: Thanks. If you then get basic things not resolving, the first thing to try is File-&gt;Invalidate caches and restart#2015-10-0708:24cflemingThe indexes get borked from time to time, often when upgrading for some reason. That forces a rebuild.#2015-10-0708:27simax99@cfleming Perfect - everything's back again - thanks for your help - and for Cursive, it just keeps getting better and better. simple_smile#2015-10-0708:28cfleming@simax99: Awesome, thanks for letting me know. Glad you’re liking Cursive, too!#2015-10-0708:28cflemingI’m hoping to fix all this upgrading nonsense sometime soon.#2015-10-0914:49pupenoI’m noticing I’m having trouble making out the blue parens in rainbow parens when using the darcula theme.#2015-10-0915:18simax99@pupeno You probably already know, but you can set the color of the rainbow parens in preferences/editor/colors & fonts/clojure#2015-10-0915:20pupeno@simax99: no, I wasn’t aware of it. Thanks simple_smile#2015-10-1011:47pupenoHow do I manually specify the Clojure version when cursive fails to recognize it?#2015-10-1013:30meikemertsch@pupeno: Isn’t that by defining it in your project.clj like :dependencies [[org.clojure/clojure "1.7.0”]] ?#2015-10-1013:37pupenomeikemertsch: sometimes you don’t want to do that and there’s another way of causing Cursive to figure it out.#2015-10-1013:38meikemertschsimple_smile I’m looking forward to be enlightened simple_smile#2015-10-1014:38meikemertschsimple_smile I updated to the latest Cursive version and was expecting trouble after seeing the discussion from three days ago, but it went flawless simple_smile#2015-10-1019:45cfleming@pupeno: If you’re using Leiningen, Cursive will always use the version specified by lein#2015-10-1019:47cfleming@meikemertsch: Great! Those sorts of problems happen occasionally, I’m not sure why since I’ve never managed to reproduce them.#2015-10-1111:47pupenoI got the latest cursive and I like the clj vs cljs distinction.#2015-10-1121:27cfleming@pupeno: Thanks! I don’t have a nice icon for CLJC or EDN yet.#2015-10-1121:28pupenomaybe CLJC should be half a clj icon and half a cljs icon.#2015-10-1309:45stijn@cfleming: is it possible that https://github.com/cursiveclojure/cursive/issues/626 has something to do with checkout dependencies that have :exclusions [org.clojure/clojure] in their project? I'm seeing the same problem as andrew but with clojure core#2015-10-1309:46stijnOnce I add it to modules it finds clojure core properly#2015-10-1309:48stijnit's hard to reproduce in an existing project though, but creating a new leiningen project and adding a checkout (in this case https://github.com/juxt/yada) seems to do it every time#2015-10-1319:42cfleming@stijn: That might be, actually. Someone reported a bug where projects that use checkouts and exclusions don’t get Clojure added to their deps for some reason.#2015-10-1319:43cflemingI’ve reproduced his case and it’s fixed with the new lein integration, which should be out soon.#2015-10-1401:37danielcomptonCursive lein integration - coming soon ™#2015-10-1401:37danielcomptonsimple_smile#2015-10-1401:42cflemingIt would have been sooner, but I’ve had some truly crazy errors.#2015-10-1401:42cflemingTurns out that IntelliJ 15 bundles Clojure 1.6.0 - who knew?#2015-10-1401:52danielcomptonwhaat?#2015-10-1401:52cfleming@danielcompton: True story#2015-10-1401:52danielcomptonare they running some Clojure code in there?#2015-10-1401:52cflemingWhich means that Clojure 1.6.0 is on the boot classpath#2015-10-1401:53cfleming@danielcompton: There was some talk a while ago of an IDE scripting panel#2015-10-1401:54cflemingI don’t know if it’s related to that.#2015-10-1502:50bbss@cfleming: I have been using cursive for a while now and love it. But I've now run in to a bug I think. might have started at one of the more recent EAP builds. I noticed my debug configurations don't use the most recent project.clj file and now see that I don't have the "Synchronize leinigen project" pre launch step. Any idea if there is something I missed?#2015-10-1502:52cfleming@bbss: The pre launch step is still there, it’s just not enabled by default.#2015-10-1502:53cflemingSo you can re-add it if required.#2015-10-1502:53cflemingWhat sort of debug configurations do you mean?#2015-10-1502:54bbssI am trying to launch figwheel like done here: https://github.com/bhauman/lein-figwheel/wiki/Running-figwheel-in-a-Cursive-Clojure-REPL#2015-10-1502:54bbssActually right now doing it with this way, also figwheel but different script: https://github.com/omcljs/om/wiki/Components%2C-Identity-%26-Normalization#2015-10-1502:56cflemingOk, and it’s not picking up changes to your project.clj?#2015-10-1502:56bbssYes#2015-10-1502:57bbssIs it supposed to be there?#2015-10-1502:57cflemingWhen you make changes there, they are not synced to your project automatically. You need to either run the action Refresh Leiningen Projects, or hit the refresh button in the leiningen toolwindow after making changes.#2015-10-1502:58cfleming@bbss: Yes, it is.#2015-10-1502:58cflemingHmm#2015-10-1502:58cflemingI’ll check why that’s not working.#2015-10-1502:59cfleming@bbss would you mind filing an issue for that?#2015-10-1503:00bbssOkay I will later today#2015-10-1503:00cflemingThanks, I’ll look to fix that for the next build.#2015-10-1503:01bbssI've hit the refresh leinigen projects button but it doesn't seem to work#2015-10-1503:02cflemingSo you’ve added a new dependency to your project?#2015-10-1503:03cfleming@bbss: Once you’ve hit the refresh button and it’s finished syncing, open Project Structure (Cmd-;), and check Modules->(your module)->Dependencies and check whether the new dependency shows up there.#2015-10-1503:05bbss@cfleming: It does show up#2015-10-1503:06cfleming@bbss: So if you stop and restart your REPL process, it should then have that dependency on the classpath.#2015-10-1503:06cflemingYour Unnamed REPL config in that screenshot, is that a local or remote one?#2015-10-1503:07bbssLocal#2015-10-1503:08cflemingOk, sorry, I hadn’t read the second link you sent. So you’re actually running a local REPL using Leiningen?#2015-10-1503:09bbssI have tried both, but it seems fixed!#2015-10-1503:09bbssDon't have the pre launch step though#2015-10-1503:10cflemingOk. That should still work, but you don’t need it if you’re running with lein.
#2015-10-1503:10cflemingThis is because the lein REPL reads the project.clj from disk to build the classpath every time you run it.#2015-10-1503:11bbssI am doing the bottom option of run via clojure.main in normal jvm#2015-10-1503:11cflemingOk, in that case you do want it.#2015-10-1503:12cflemingIf you can file that issue, I’ll check why that’s not working and fix it. In the meantime, manually syncing after changes should work.#2015-10-1503:12bbssYeah I'll file an issue. Thanks!#2015-10-1503:13cflemingNo worries, sorry for the hassle!#2015-10-1503:14bbssNo problem, still have to learn more about what is going on under the hood anyway, so this is kind of hassle is educational as I am rather new to the JVM and clojure.#2015-10-1503:16cflemingI also need to write up how the classpath calculation works for the various different REPL types, since it’s very confusing.#2015-10-1503:19bbssThat would be interesting.#2015-10-1503:21cflemingHere’s the executive summary:#2015-10-1503:21cflemingFor the Run nREPL with lein option, Leiningen always calculates the classpath and IntelliJ really has nothing to do with it. In theory this should be exactly what you get with lein itself.#2015-10-1503:22cflemingSo for that you don’t need the Sync before-run task, since lein always reads the file from disk and IntelliJ should save it automatically on run.#2015-10-1503:23cflemingThe other two options use the classpath for the selected module as calculated by IntelliJ, i.e. based on the source paths and attached libraries.#2015-10-1503:24cflemingThe synchronisation of the lein project (either by refreshing the project or importing a new one) basically reads that info from lein and tries to replicate it into the IntelliJ project, creating libs for the dependencies and so on.#2015-10-1503:25cflemingSo this is generally more or less the same classpath as lein will calculate, but it’s an imperfect process and it might get screwed up by lein middleware or other craziness.#2015-10-1503:25cflemingI’m going to release a new lein integration soon which should make that process better.#2015-10-1503:26cflemingSo for those two options, if you modify project.clj and re-run your process without syncing first, you will not get your new deps.#2015-10-1503:27cfleming@bbss: ^^#2015-10-1503:27bbssGot it simple_smile#2015-10-1503:56bbssHmm there is still something funky going on. When I run in the command line: lein run -m clojure.main script/repl.clj Everything works as expected. But when I do refresh to the project and run it with the clojure.main in normal JVM option I get an old version of React.#2015-10-1504:11danielcompton@bbss: that sounds like a caching issue?#2015-10-1504:13bbssYes, but where would that cache be?#2015-10-1504:16bbss@danielcompton: any maven cache perhaps? I only know lein clean but that only seems to clear target and the js output directory#2015-10-1507:45cfleming@bbss: You can check the command line generated for your run config - it’s the first line output in the REPL window. The versions there should always correspond to the versions you see in the Project Structure view.#2015-10-1507:57cflemingAnd the versions you see in the Project Structure view should correspond to your project.clj after doing a sync.#2015-10-1509:51bbss@cfleming I don't have react as a direct dependency, some of the other deps do, but with lein deps :tree none of them has such a low version.#2015-10-1509:53bbssI found it on the classpath you mentioned though!#2015-10-1510:00bbssAnd also in the project structure. What decides which dependencies are there? Not just lein right?#2015-10-1510:09bbssSuccess! simple_smile Compilation failed after removing the old react via the project structure view but adding exclusions for two conflicting projects that both needed react and refreshing lein projects seems to have done the trick simple_smile#2015-10-1510:10bbssGreat, some fun hacking awaiting me tonight 😄#2015-10-1515:14stijn@cfleming: Java exception breakpoints is soooo good. simple_smile Thank you!#2015-10-1515:17stijncombined with inline variable values it decreases debug time on NullPointerExceptions with 95%#2015-10-1520:32cfleming@stijn: Glad it’s helping! Yeah, the exception breakpoints are my most-used debugging feature, they’re great.#2015-10-1612:18bbss@cfleming: would you still like me to file an issue on the synchronize lein projects option not being available in the launch configurations? If so where can I do so?#2015-10-1620:49cfleming@bbss: Yes please, you can file them here: https://github.com/cursiveclojure/cursive/issues#2015-10-1620:49cflemingI looked at it a bit yesterday but it’s tricky, it’s a very confusing API#2015-10-1703:32bbssOkay, done.#2015-10-1703:33cfleming@bbss: Thanks!#2015-10-1703:34bbssWelcome, I can provide any additional info if needed.#2015-10-1810:27pupenoIs there a way to tell cursive that some file is defining some symbols as functions? Some functions in the cljs-ajax are defined in a weird way and Cursive keeps marking them as undefined functions.#2015-10-1819:51danielcompton@pupeno: thats being tracked in https://github.com/cursiveclojure/cursive/issues/147#2015-10-2003:34emperorcezarI'm very new to clojure and cursive. I'm going through living clojure and started a project. I added [org.clojure/core.async "0.1.346.0-17112a-alpha"] to my dependancies and in my core.clj I put :require [clojure.core.async :as async] for my namespace. That ends up being highlighted and says "clojure.core.async cannot be resolved". Is there something I need to do to get cursive to see new libraries I add?#2015-10-2003:35cfleming@emperorcezar: Yes, you need to open your Leiningen toolwindow (View-&gt;Tool Windows-&gt;Leiningen, or from the toolwindow bar on the right of your screen) and hit the refresh button.#2015-10-2003:36cflemingYou’ll need to restart your REPL after doing that if you have one running, too.#2015-10-2003:36emperorcezar@cfleming: Awesome. Thanks!#2015-10-2010:13dsapoetraHi guys, i want to share my problem with datomic and cursive-intelliJ#2015-10-2010:16dsapoetrai use cursive 0.1.63 , intelliJ 14.1.4 , Java 1.8.0_40 , i think there's something wrong in cursive or intelliJ when it comes to datomic connect...#2015-10-2020:48cfleming@dsapoetra: I’m not sure, I know a lot of people use datomic with Cursive#2015-10-2020:49cflemingIt’s hard to know what’s going on without knowing more about that failure - can you print *e?#2015-10-2101:53thosmos@dsapoetra: I'm using that same set of tools and datomic interaction is working for me#2015-10-2101:57thosmos@cfleming: I have a project with two modules: om (from git) and myapp (both clj and cljs). Is it possible to run my app in a debug REPL such that the debugger uses the CLJ code from the om module instead of from maven?#2015-10-2101:58thosmosor rather so that I can set a breakpoint in the om code?#2015-10-2101:58cfleming@dsapoetra: I don’t, sorry - it looks like Datomic is having some problem, but I have no idea what it could be.#2015-10-2101:59cfleming@thosmos: You should be able to break in the om code. When you say “instead of from Maven”, what do you mean?#2015-10-2101:59dsapoetra@cfleming: ouch... thank you anyway.....#2015-10-2102:00cfleming@dsapoetra: I know that a lot of people use Datomic with Cursive, so AFAIK there’s nothing fundamental about the Cursive REPL that would make that not work.#2015-10-2102:01dsapoetra@cfleming: ok... sorry for problem...#2015-10-2102:01thosmoswell, I mean that om is in the project.clj file for my app and the default is for intellij to look up that dep in maven. I tried putting the local module in my app's dependencies above that maven dep, but it's not seeing it.#2015-10-2102:01cfleming@thosmos: Ah, I see. I think what you want is to use lein checkouts.#2015-10-2102:02thosmosoh ok, so instead of using intellij's native dependency ordering?#2015-10-2102:02cfleminghttps://github.com/technomancy/leiningen/blob/master/doc/TUTORIAL.md#checkout-dependencies#2015-10-2102:03cflemingYeah, if you set up a checkout Cursive will import the project accordingly, create a module for Om and attach it to the project#2015-10-2102:03cfleming@dsapoetra: One thing to check is that your classpath is the same when running on the command line and in Cursive#2015-10-2102:03cflemingIn Cursive you can see that in the first line that’s printed when the REPL starts.#2015-10-2102:06thosmosand what about debugging breakpoints? Will I be able to set them and step through code in both modules?#2015-10-2102:10cfleming@thosmos: You should be able to, yes.#2015-10-2115:51akielhi - how can I specify a leiningen profile to use in a REPL? I like to use a profile different from dev.#2015-10-2121:02cfleming@akiel: That’s actually supported in the next build, which will hopefully be out today.#2015-10-2207:05akiel@cfleming: thanks#2015-10-2207:07kidpollolaunch the profile on terminal and then do a remote connection on cursive#2015-10-2207:08kidpolloworks like a charm#2015-10-2207:09akiel@kidpollo: yes you are right, remote repl should work. but I will just wait for the internal thing.#2015-10-2208:08cfleming@akiel: @kidpollo: That’s fixed on 0.1.64, out now#2015-10-2208:09cflemingHere’s the details on the 0.1.64 release, tons of fixes: https://cursiveclojure.com/archive/1485.html#2015-10-2210:52akiel@cfleming: thanks a lot - it works for me#2015-10-2216:36rauhI keep getting '1.8' is bad configured when running a repl with clojure.main. thoughts?#2015-10-2216:37rauhAlso, I'd love to see an even more general way to start a repl. So instead of only allowing to specify profiles I'd love to be able to just pass any argument to leiningen. My fighweel repl would be: lein with-profile +dev-cljs run -m clojure.main scripts/figwheel-cljs-repl.clj#2015-10-2300:45sashtonis cursive able to find definitions for a protocol?#2015-10-2301:04sashtonha, nevermind. i forgot to refer to the protocol in my ns#2015-10-2317:39chicoxyzzygot defn highlighted with message defn cannot be resolve. how to fix it?#2015-10-2317:43chicoxyzzyhttps://github.com/cursiveclojure/cursive/issues/337#issuecomment-52542679 <- answer is here#2015-10-2320:20shaun-mahood@cfleming: Are you planning to ever add ClojureCLR support to Cursive, or is that a complete non-goal? Planning to dive into it in a pretty big way soon and just curious if it's in any of your long term plans.#2015-10-2323:23cfleming@shaun-mahood: That’s very unlikely, sadly. Cursive relies heavily on the Java support built into IntelliJ, and IntelliJ provides no such CLR support. I could implement it, but it would be a huge amount of work.#2015-10-2323:24cflemingAnd realistically almost no-one uses ClojureCLR, at the moment at least.#2015-10-2323:27cfleming@rauh: Is that 1.8 error still a problem for you?#2015-10-2404:44shaun-mahood@cfleming: That's the answer I expected, and I think it's probably the best one actually. Even the Visual Studio add-in for ClojureCLR looks pretty much dead in the water, but I think inferior-lisp mode might work pretty well for it. Gives me a reason to go back to learning Emacs again, since Cursive took away any reason to do that for Clojure or CLJS as far as I can tell. Seems like the only real world use of ClojureCLR at this point is Arcadia.#2015-10-2408:15rauh@cfleming: Yes it is.#2015-10-2408:43cfleming@shaun-mahood: Right, Arcadia is pretty much it, as far as I can tell. I’m sure inferior-lisp will work fine for it, though, or Sublime or whatever.#2015-10-2408:43cfleming@rauh: Can you send the exact error message?#2015-10-2409:05rauh11:04:53 AM Error running figwheel: '1.8' is bad configured (fighweel is the name of my config)#2015-10-2409:05rauh"Use clojure.main in normal JVM process", then scripts/figwheel-cljs-repl.clj as "Parameters"#2015-10-2421:39cfleming@rauh: I’m assuming 1.8 is the SDK. If you look at the SDK in the project structure view, are there any warnings about it? If you create a new SDK and try using that, does that fix it?#2015-10-2506:57rauh@cfleming: No, no warnings/errros in the project structure.#2015-10-2510:08cfleming@rauh: Does creating a new SDK help?#2015-10-2510:09cfleming@rauh: Any errors in the log? Help->Show log in...#2015-10-2510:09cflemingIf not, could you send a screenshot of the error?#2015-10-2510:50rauh@cfleming: 1) Yes, just installed 1.7 and it gives me a different error (though that might be my config problem) 2) Tons of errors in the log but I've always had those. Though, starting the REPL config doesn't produce new errors there. 3) I can def. send a screenshot.#2015-10-2611:38thedavidmeisterhey, any reason why emacs tab would not work?#2015-10-2612:08simax99The update plugin in IntelliJ messed up again. Where can I download the latest cursive plugin (0.1.67) so I can install it manually?#2015-10-2612:33tordSee the "Manually installing Cursive" section here: https://cursiveclojure.com/userguide/#2015-10-2612:43sashtonis there a way to get cursive test runners to use 'pjstadig/humane-test-output'? The only output i see from 'run tests in current NS in REPL' is:
Loading test/clj/handler_test.clj... done
Running handler-test/my-test
Ran 1 test containing 1 assertion.
1 failure, 0 errors.
#2015-10-2612:45sashtonbut when i use (run-tests) in the same NS, I see the expected output:
FAIL in (my-test) (handler_test.clj:103)
expected: [1 2]
  actual: [2 3]
    diff: - [1 2]
          + [2 3]
#2015-10-2612:46sashtonmy project.clj:
:dependencies [[pjstadig/humane-test-output "0.7.0"]]
:injections [(require 'pjstadig.humane-test-output)
                                (pjstadig.humane-test-output/activate!)]
#2015-10-2613:16simax99@tord Thanks for the link. Plugin now working correctly again.#2015-10-2615:48micahUpgraded to Cursive 0.1.67 this morning. When I run a lein task, it creates a background task “Calculating task classpath” that never ends. Never gets to my task 😢.#2015-10-2615:49micahAnyone seen this and know what’s wrong?#2015-10-2615:58ricardoI have not @micah, sorry.#2015-10-2616:20micahThanks anyway @ricardo#2015-10-2617:01micahALT-UP (form selection) seems broken too#2015-10-2617:16micahUm… nm. My key bindings had been changed.#2015-10-2618:52cfleming@micah: Any exceptions in your log when running that task?#2015-10-2618:52micah@cfleming: nope. I’m afraid not.#2015-10-2618:53cflemingWhat’s the task you’re running?#2015-10-2618:53micahIt’s only when I run the ‘spec’ task which is a plugin.#2015-10-2618:53cflemingOk#2015-10-2618:53cfleming@micah: is there an OSS project I can try to reproduce with? specl itself?#2015-10-2618:54micahthe ‘pdo’ plugin doesn’t run inside cursive tasks either… maybe it’s plugins that are the problem.#2015-10-2618:54micahI can make one…#2015-10-2618:55cflemingThat would be great, thanks.#2015-10-2618:55cflemingPlugins should work, I’ve been testing with a bunch of them, but the new integration is a big change so perhaps these do something differently.#2015-10-2618:56micahstandby… am preparing OSS project with .idea checked in.#2015-10-2618:56cflemingI’ve got to go get the family ready, but if you could send a repro project I’ll look at it this morning.#2015-10-2618:57cflemingPerfect, thanks.#2015-10-2619:12micahNo rush… found a workaround.#2015-10-2619:12micahhttps://github.com/slagyr/ant_sparring.git#2015-10-2619:12micahThat repo should be ready to go. I did a fresh checkout and confirmed it exhibits the problems.#2015-10-2619:13micahspec (locked) - starts the “Calculating task classpath” background taks that never ends.#2015-10-2619:15micahspec (blank) - completes but doesn’t show any output. It should.#2015-10-2619:16micahspec (unrolled - working) - is my workaround.#2015-10-2619:16micahThe spec tasks is defined here: https://github.com/slagyr/speclj/blob/master/src/leiningen/spec.clj#2015-10-2623:20cfleming@sashton: Normally for running tests interactively, the best thing to do is to click on the failure icon in the gutter, and Cursive will show a visual diff of the expected and actual values.#2015-10-2623:21cflemingI’ve heard that it may not interact well with humane-test-output though, so if you find that doesn’t work, try disabling that.#2015-10-2623:37cfleming@micah: Thanks, I’ll give that a go#2015-10-2700:04cfleming@micah: So the problem is that the plugin is messing with :eval-in - I’ll see if I can find a fix for that.#2015-10-2700:56cfleming@micah: I do get all the test output, which looks correct as far as I can tell.#2015-10-2709:09stijn@cfleming: with 0.1.67 a dependency like yada:1.0.0-20150903.093751-9 is not being picked up#2015-10-2709:09stijnis this related to https://github.com/cursiveclojure/cursive/issues/1113?#2015-10-2709:09cfleming@stijn: Possibly - that looks like a concrete version of a snapshot dep, right?#2015-10-2709:09cflemingDo you have an explicit dependency on that version?#2015-10-2709:10stijnanything in the tree under that dependency neither#2015-10-2709:10stijnthe repl does run however, but the editor doesn't recognize the symbols#2015-10-2709:11stijn@cfleming: yes, an explicit dependency#2015-10-2709:11cflemingIf you change it to yada:1.0.0-SNAPSHOT, I believe it should work. Is there a reason you’re depending on an explicit version of a snapshot?#2015-10-2709:11stijnno reason, i'll try that#2015-10-2709:13stijnthat fixes it yes#2015-10-2709:13stijnthe reason was that I was switching between checkouts and a released snapshot earlier#2015-10-2709:14cfleming@stijn: Interesting use case though, I can imagine that you might want to pin to a specific snapshot version.#2015-10-2709:15cflemingCould you file an issue for that, and I’ll fix it when I get a moment?#2015-10-2709:15stijnokay, will do#2015-10-2709:17cflemingI’m not entirely sure how I’ll fix that one, since it’s tricky to support both -SNAPSHOT versions and the explicit ones.#2015-10-2714:34micah@cfleming: With the -a flag (auto run), speclj will stay alive re-run any specs affected by file changes. What’s the fix? Is it in the script you pasted?#2015-10-2714:35micah@cfleming: Also, as I try to debug this, I get a Cursive error every time I “lein install” speclj: java.io.EOFException: Unexpected end of ZLIB input stream, compiling:(leiningen/spec.clj:49:7) I have to restart InstalliJ to get passed this.#2015-10-2719:25danielcomptonAh, I was running into this issue with snapshot dependencies the other day too, but I thought I was doing something wrong#2015-10-2719:26danielcomptonIt’s fairly common for us to pin a snapshot dep, especially in the CLJS world where things move so quickly#2015-10-2721:17cfleming@danielcompton: Yeah, that makes sense. I’ll see if I can do something sensible with that case.#2015-10-2721:18danielcomptonwhat makes it a special case?#2015-10-2721:18danielcomptonIsn’t it just a normal dependency?#2015-10-2721:18cfleming@micah: Ah, that makes sense. The fix is a code fix, I’ll send you a dev build to play with shortly. Are you on IntelliJ 14.1?#2015-10-2721:18micahYup!#2015-10-2721:20cfleming@danielcompton: The problem is when you have a snapshot dep brought from a repository. The deps come back with two versions, the “resolved version”, which is the -20150903.093751-9 one, or the “base version” which is the -SNAPSHOT one.#2015-10-2721:21cflemingThe project.clj will only have one of those two versions specified, and it looks like I really have to try to match both to the dependencies which come back.#2015-10-2721:22cflemingIt gets tricky when you have snapshot deps which depend on other snapshots, especially if some are pinned and some are not.#2015-10-2721:22danielcomptonyep that was the situation I was in#2015-10-2721:22danielcomptonI had a lein plugin snapshot, depending on a clojure lib snapshot#2015-10-2721:22cflemingRight.#2015-10-2721:22danielcomptonI was trying to pin both of them. I gave up in the end#2015-10-2721:23cflemingSo that case was the case I fixed on the weekend, because when you depend on -SNAPSHOT, aether (lower-case, the Clojure one) returns the resolved version, and Cursive didn’t match them correctly.#2015-10-2721:24cflemingBut I’ll have to fancy up the matching to handle both cases.#2015-10-2817:35viesti@cfleming: I’ll try providing sample project.clj related to the NPE, but might seem that it’s related to Leiningen checkouts#2015-10-2817:54viestihmm, now cannot get it to reproduce 😞#2015-10-2820:34cfleming@viesti: Ok, I’ll look at the trace this morning and see if I can figure out what might provoke it.#2015-10-3102:03thosmosit'd be cool if there was a way to detect when an arbitrary file changes, and trigger some tasks based on that. I'd like to be able to trigger "boot lein-generate" and reload the lein project only when the build.boot file changes. is this possible already?#2015-10-3102:12thosmosoh right of course there's a file watchers plugin for that sort of thing#2015-11-0123:27cfleming@stijn: I’ve fixed the explicit snapshot problem for the next build, but in the process I noticed something - lein itself doesn’t honour the explicit snapshot version.#2015-11-0123:28cflemingIf you do a lein classpath, you’ll see that the jar it actually depends on uses the x.y.z-SNAPSHOT format, which means it’ll always use the latest snapshot anyway.#2015-11-0123:28cflemingEven though lein deps :tree shows you the full explicit version.#2015-11-0208:38viesti@cfleming: seems that I don’t get the npe problem any longer with a checkouts project, might have gotten fixed in the latest release simple_smile#2015-11-0208:42cfleming@viesti: Great, I fixed a ton of problems with that release#2015-11-0209:20stijn@cfleming: hmm yes, that I didn't know. I looked at the dependency tree.#2015-11-0210:03cfleming@stijn: As far as I can tell, no one knew that#2015-11-0210:04cflemingI can’t believe no-one noticed it before, but as far as I can tell that’s the case.#2015-11-0210:06cfleming@thosmos: BTW I’d be interested in experience reports with the file watchers plugin - is it useful?#2015-11-0213:47sashtonwhile trying to use the latest version of Cursive (0.1.68), it tries to download Leiningen 2.5.3 during startup. Due to my setup/network, that's not possible for me. I can manually download the lein jar and put it where it needs to be. Can I install it manually for Cursive?#2015-11-0219:19cfleming@sashton: Yes, Cursive will use lein from the same place lein itself does, ~/.lein/self-installs.#2015-11-0219:20cflemingSo if you have the 2.5.3 jar there, Cursive will pick it up.#2015-11-0219:56sashton@cfleming haha, I had tried that earlier without success, but I just realized I added it to my cygwin home/.lein directory, but cursive is using my Windows home/.lein directory.#2015-11-0219:57sashtonThat makes sense, I just hadn't thought it all the way through#2015-11-0220:10cflemingAh, ok - it uses the user.home system property, which lein uses too so I assume it should use the same location.#2015-11-0220:10cflemingIf you do a lein self-install it should show up in the right place.#2015-11-0220:11cfleming@sashton: ^^#2015-11-0221:11stuartsierra@cfleming: Did you ever get a chance to test my fix to http://dev.clojure.org/jira/browse/CLASSPATH-7 in Cursive?#2015-11-0221:35cfleming@stuartsierra: I didn’t sorry, I’ll try to test that today.#2015-11-0221:36cfleming@stuartsierra: In the end I managed to work around it by overriding dynapath’s default to seal URLClassLoader, so I could use them for all the loaders in the hierarchy. I still think that’s a good change to make, though.#2015-11-0221:52stuartsierra@cfleming: thanks#2015-11-0301:36thosmos@cfleming: The FileWatchers plugin only enables calling to the commandline, not internal tasks like your "reload lein project" Also it's a bit arcane for configuring. But it does enable me to run "lein generate" after build.boot changes. Then once your project watcher feature arrives, that'll save needing to manually refresh the projects.#2015-11-0301:37cfleming@thosmos: Ok, thanks. Sounds like there’s some scope for improvement there then.#2015-11-0305:09nodenameJust installed on Ubuntu and I'm getting lots of unresolveds, such as defn, atom, etc. What have I screwed up?#2015-11-0305:17nodename(even function parameters are being marked as "cannot be resolved"!)#2015-11-0308:04cfleming@nodename: Things to try: File-&gt;Invalidate caches and restart (sometimes indexes get funky), and check that you have a clojure jar in your dependencies (External Libraries in the project view).#2015-11-0308:04cflemingOr is this CLJS code?#2015-11-0308:07nodenameIt's CLJ, a project that behaves normally in Cursive on my Mac#2015-11-0308:07nodenameAha, nothing under External Libraries, what to do?#2015-11-0308:08cflemingAssuming you’re using Lein, check that your project (or projects) is registered in the Leiningen toolwindow.#2015-11-0308:08cflemingIf they don’t appear there, then right click the project.clj and select “Add as Leiningen project"#2015-11-0308:09nodename"There are no Leiningen projects to display"#2015-11-0308:09cflemingOk, adding that should fix it.#2015-11-0308:09nodenameand restart perhaps?#2015-11-0308:10nodenameAh, it took a bit but it fixed it#2015-11-0308:10nodenameThanks!#2015-11-0308:10cflemingOk, great!#2015-11-0310:21pupenoI’d love if Cursive could run Figwheel with a very nice REPL, such as ClojureRepl. That would be a great dev environment. I bet I’m not the only one and this is already in the issue tracker.#2015-11-0310:22cfleming@pupeno: Yeah, that’s definitely on my list for soon after the conj#2015-11-0310:24pupenoAlthough, I heard figwheel can now run inside a clojure app, so you don’t need to run it as a separate process, which would also be something I’d like to leverage.#2015-11-0311:11cfleming@pupeno: How do you mean?#2015-11-0313:36akielDoes Cursive work in IDEA 15?#2015-11-0316:01launchpadakiel: Yes, there’s a different repository url for it that you’ll have to add.#2015-11-0316:04akiellaunchpad: thanks#2015-11-0407:44ricardoAny killer IDEA 15 features for Cursive so far?#2015-11-0410:24cfleming@ricardo: Not really, no. There’s some new debugger functionality that I should be able to take advantage of, but haven’t yet.#2015-11-0410:55ricardo@cfleming: Cool, thanks.#2015-11-0410:56ricardoTheir new CVS integration features look useful. I’ll wait until I’ve decided if I’m going just for IDEA or the whole shebang, though.#2015-11-0411:05grav@cfleming: any news on the clojurescript side of debugging? simple_smile#2015-11-0420:45cfleming@grav: It’s definitely on the list, but the list is more of an enormous pile right now simple_smile#2015-11-0500:41cfleming@stuartsierra: Sorry, I’ve been tied up with urgent things, but I haven’t forgotten I need to verify your fix.#2015-11-0508:10ricardo@cfleming: Very purty.#2015-11-0508:12cfleming@ricardo: It should be really fast too, so there’s really no reason not to have it enabled.#2015-11-0508:12cflemingHopefully people won’t need soft wrap now, which is dog slow#2015-11-0508:27ricardoI didn’t get to demo Cursive at that FP meet up, since we didn’t have time to get into code, but people were pleasantly surprised to hear there’s good tooling.#2015-11-0508:27cflemingOh cool#2015-11-0508:27ricardoIncluding a comment of “but that usually comes after widespread enterprise adoption…”. So you’re ahead of the curve there.#2015-11-0508:28cflemingI’m hoping that Cursive will help that happen!#2015-11-0508:28cflemingI think Cursive is actually an important piece of driving Clojure adoption.#2015-11-0508:29ricardoI agree.#2015-11-0508:29ricardoI had to re-tool the talk at the last minute, when I realized more attendees knew little about Clojure other than it was as LISP-like.#2015-11-0508:29ricardoThe language by itself is threatening enough as it is.#2015-11-0508:30cflemingYeah, no doubt. At some point I’ll get some time to finish the standalone, and have a more friendly getting started experience. I’d like to integrate exercism and/or 4clojure, and I’d like something like a typing tutor for paredit.#2015-11-0512:10snowellThat just makes me bummed that I haven’t been able to get the in-IDE REPL working#2015-11-0512:10snowellBecause I want the purtyness#2015-11-0513:04stuartsierra@cfleming: No worries, thanks for keeping up with it.#2015-11-0521:27cfleming@snowell: What’s the issue with the in-IDE REPL? Is that for CLJS?#2015-11-0612:21snowell@cfleming: I just haven’t been able to figure out how to get anything to show up in the REPL window. I click REPL and all I get is this:#2015-11-0612:22snowellUgh. Then I click the very obvious “play” looking button and something starts up#2015-11-0612:24snowellIt still doesn’t work then, but shows an exception that makes sense#2015-11-0612:25snowellIs there a name for the phenomenon when you figure out how to do something immediately after you ask somebody? simple_smile#2015-11-0615:39launchpad@kestrel7: I had that problem when I first updated and didn’t remove the cursive plugin and repository for idea14. Have you removed that and added the new repo for 15?#2015-11-0615:54kestrel7@launchpad: that solved my problem - thanks!#2015-11-0616:29launchpadYou’re welcome!#2015-11-0618:39shaun-mahood@cfleming: Loving the new output formatting!#2015-11-0618:40cfleming@shaun-mahood: Great!#2015-11-0708:52stijnhi @cfleming: is it intended that when you type the name of a protocol e.g. TestProtocol and let cursive do an auto-fix on the unresolved symbol that it generates
(:import (some.namespace TestProtocol))
instead of
(:require [some.namespace TestProtocol])
#2015-11-0708:52stijnthe former will import the interface instead#2015-11-0719:19colin.yates@snowell: it’s called “talking to the duck” http://www.rubberduckdebugging.com simple_smile#2015-11-0721:00cfleming@colin.yates: @snowell: See https://sites.google.com/site/codeconsultantplugin/#2015-11-0721:00cfleming@stijn: No, there’s an issue about that I believe.#2015-11-0721:05stijn@cfleming: ok, I searched for it, but couldn't find it#2015-11-0721:18colin.yates@cfleming: ha - when I worked for SpringSource (actually before they became SpringSource and were still called interface21) we discussed building a ‘consultant in a box’ which eventually turned into the Eclipse Tooling. Thanks for bringing back that nightmare simple_smile.#2015-11-0721:20colin.yatesactually - that does remind me pleasantly of the inbuilt code inspections that IntelliJ offers - they do know how to do tooling, at least on the surface. Maybe Colin could talk about what it’s like behind the scenes….#2015-11-0800:20lfn3Is there a way of getting cursive to treat with def* (e.g. om’s defui) forms like def/defn forms in terms of formatting and var declaration?#2015-11-0800:21cfleming@lfn3: Not right now, sorry, but I’m going to add that soon, for simple cases at least.#2015-11-0800:21cflemingI’m also going to add explicit support for Om Next ASAP#2015-11-0800:23lfn3Ok. Cool. That’s one of the only things that bugs me about cursive, is the occasional formatter fighting I have to do.#2015-11-0800:23cflemingYeah, that and the resolution can be annoying depending on the libraries you’re using.#2015-11-0800:25lfn3Agreed. Is this: https://github.com/cursiveclojure/cursive/issues/147 the issue I should be paying attention to re this?#2015-11-0800:26cflemingYeah, that’s the best catch-all issue for this.#2015-11-0800:26cflemingBasically I’m planning to allow you to say “these forms act like def or let"#2015-11-0800:28lfn3Yeah that sounds good to me. On a per project basis or globally or…?#2015-11-0800:30cflemingGlobally, I think. That config will be the same for those forms in all projects I think, right?#2015-11-0800:32lfn3Yeah. So long as the names are fully qualified to an upstream jar then you shouldn’t ever see stuff clashing. I presume that’s possible, of course.#2015-11-0800:32cflemingYeah, everything in Cursive is keyed off the FQN#2015-11-0800:33lfn3If it’s a global setting it would be really easy to provide a big shared list of these.#2015-11-0800:34lfn3Or even for individual projects to supply the bits they have.#2015-11-0800:34cflemingRight. Cursive actually sends back some anonymous usage stats if you haven’t turned that off (basically Cursive version, IntelliJ version and OS). I’m planning to send these lists back as part of this, so I can prioritise which support needs adding based on actual usage, plus I can ship a combined list with Cursive.#2015-11-0800:36lfn3I’ll let you get back to it, but thanks.#2015-11-0800:37cflemingNo worries. I’m busy right now getting ready for the conj, but I’d like to do this right after that.#2015-11-0800:37cflemingSo within a couple of weeks, hopefully.#2015-11-0800:39lfn3Cool. If you need anyone to dogfood it for you, I’m happy to take a swing at it. I spend most of my time in a codebase that features lots of custom def macros#2015-11-0800:49cflemingThanks, sounds good. So are these mostly (defwhatever <a symbol> …), or are there more complex things? Do they often allow docstrings, for example?#2015-11-0800:54cfleming@lfn3: ^^#2015-11-0800:54lfn3There are more complex things, yeah.#2015-11-0800:55lfn3One of them takes a vector as an arg prior to the symbol it defines.#2015-11-0800:56cflemingOk, I won’t be able to handle that with this proposed change, that will require the extension API. I guess this is an in-house macro, not from a public project?#2015-11-0800:56lfn3Yeah, in house.#2015-11-0800:56cflemingOk#2015-11-0800:57lfn3Would your planned solution use the symbol immediately following the function as the name?#2015-11-0800:59cflemingRight, and potentially a string after it as a docstring.#2015-11-0801:02cflemingThe internal API allows you to do pretty much anything, but I still haven’t open sourced that, too busy unfortunately.#2015-11-0801:03lfn3Understandable. The volume of github issues alone seems kinda staggering for one person to deal with.#2015-11-0801:03lfn3Let alone actually writing code.#2015-11-0801:04cflemingYeah. Currently at least I have more closed than open, so I’m winning, I guess simple_smile#2015-11-0801:05lfn3Any day where you manage to actually do what you planned is a win imo.#2015-11-0801:06lfn3Maybe that’s just because of my love-hate relationship with yak shaving though.#2015-11-0801:06cflemingEveryone loves a good shave.#2015-11-0801:08lfn3Even the yak?#2015-11-0801:21cflemingI hadn’t considered that.#2015-11-0902:10cflemingHi everyone, I’ve just posted the details on the Cursive licencing and pricing model: https://cursiveclojure.com/archive/1564.html#2015-11-0903:32shaun-mahoodThat model is perfect as far as I'm concerned. Thanks for having the free version for personal hacking, it will make it way easier to get new people into Clojure. How far off are you from letting us give you money?#2015-11-0904:21cfleming@shaun-mahood: Thanks Shaun! I’m hoping that will be very soon (like a couple of weeks).#2015-11-0909:45stijn@cfleming: I can live with both the current model and the future one with a subscription. I like the eap / stable delivery scheme too.#2015-11-0909:48cfleming@stijn: Great, thanks! Yeah, a lot of people like the current model where they get changes as soon as possible, but some people will probably only want stable builds.#2015-11-0909:48stijnand $199 for company license seems reasonable
#2015-11-0909:49stijnIf I understand the IntelliJ model correctly, that would mean $100 yearly afterwards?#2015-11-0909:49stijn(i've only ever used the community edition)#2015-11-0909:50cflemingYeah, that's what JetBrains used to charge for PyCharm before moving to subscription licensing. It’s difficult to compare since the market for Clojure is much smaller (they have 500k users of PyCharm), but on the other hand they also have a team of 12 working on it.#2015-11-0909:51cflemingIf you upgrade a year after purchasing, it’ll cost $100, right. I’ve changed their model slightly so upgrading gets a bit more expensive over time, so if you upgrade after two years it’ll cost $150#2015-11-0909:52cflemingBut you’ll get a year’s worth of features you didn’t have previously.#2015-11-0909:52stijnmakes sense#2015-11-0915:09jaenTrying to start learning structural editing. Is there any Cursive deafult binding cheat sheet somewhere or do I have to make my own?#2015-11-0917:37bhoggardI would love to know that too!#2015-11-0919:30cfleming@jaen: @bhoggard: Some options are here: https://cursiveclojure.com/archive/1293.html#2015-11-0919:34bhoggardThanks!#2015-11-0920:17jaenNice, thanks!#2015-11-1009:40ikitommihi. any news on supporting your own macro definitions for Cursive?#2015-11-1009:44cfleming@ikitommi: So I’ve changed my mind and am going to try to add functionality so that you’ll be able to say “this form works like def” or “this form works like let”. And of course I’m still working towards the full extension API but have been very busy.#2015-11-1009:50ikitommicool, looking forward to those.#2015-11-1009:50cfleming@ikitommi: How much of your use case would be covered by those basic cases?#2015-11-1010:50ikitomminot sure, if they work as I think, maybe 80%#2015-11-1010:52ikitommibut I guess it woudn’t work with this: http://www.slideshare.net/metosin/clojure-inreallife-17102014/11?src=clipshare <— the :fields produce let’s to the body of the macro.#2015-11-1010:59ikitommibtw, that’s a business rule “you can’t build a building over 150m tall, unless it’s special building like a sauna”#2015-11-1019:27cfleming@ikitommi: Yeah, you’d need the extension API for that one.#2015-11-1019:28cflemingNow I’m curious what a 150m tall sauna looks like.#2015-11-1121:32gravIs there a way to get syntax support for js interop in clojurescript?#2015-11-1121:34graveg removing warnings and even getting completion on stuff like
(let [ctx (js/AudioContext.)]
  (prn (.-currentTime ctx)))
#2015-11-1122:36cfleming@grav: No, I’ve been meaning to turn those warnings off, because it’s very difficult to correctly resolve js interop.#2015-11-1122:36cflemingI’m also planning to improve it, but it’s quite difficult to do well.#2015-11-1122:37grav@cfleming: removing warnings is probably good enough. They’re quite attention-seeking 😉#2015-11-1122:37cflemingHehe yeah#2015-11-1122:38cflemingI’m planning to try to implement inference like Tern, but that’ll take a while to get to.#2015-11-1122:38cflemingCursive does it now for Java interop though.#2015-11-1122:38gravthat’d be cool!#2015-11-1122:39gravWould interop with externs be any help?#2015-11-1122:39cflemingYeah, that’ll be required, I think.#2015-11-1122:39cflemingCurrently my JS parsing is pretty ghetto.#2015-11-1122:40cflemingRather, I use Rhino to parse, but the analysis is pretty ghetto.#2015-11-1122:40gravie pragmatic? 😉#2015-11-1122:42gravit’s not a killer through. I try creating a namespace for each js api that I’m interop’ing with. So it’s only those certain namespaces that are ‘lighting up’ 😉#2015-11-1122:43cflemingPragmatic is a much more polite way to put it.#2015-11-1122:43cflemingOk#2015-11-1122:44cflemingI’ll take a look when I can, but I’m busy getting ready for conj right now.#2015-11-1122:45gravcool!#2015-11-1207:50rauhWhen evaling a form, is there a way to pretty print it instead of having it all on one line?#2015-11-1208:42cfleming@rauh: It should appear as it appears in the actual source, right?#2015-11-1208:43cflemingAre you talking about evaling from an editor or from the REPL editor?#2015-11-1208:45rauh@cfleming: I guess I shoul've clarified what I meant with "it": I mean the result of evaling an expression. It's nicely highlighted but the entire data structure is on one line and sometimes hard to read.#2015-11-1208:46rauhI mean from the editor window. I actually never work straight on the repl prompt#2015-11-1209:01cfleming@rauh: As of 0.1.69, the results should be pretty printed, see: https://twitter.com/CursiveClojure/status/662111643430588416#2015-11-1209:01cflemingIs that what you’re after?#2015-11-1209:01rauhYes! Now I have to figure out why I have 0.1.67#2015-11-1209:02rauhDo I have to upgrade IntelliJ to get the latest?#2015-11-1209:02cflemingYou can go to Settings-&gt;Plugins-&gt;Browse Repositories-&gt;Your Cursive repo and select the plugin there, there’ll be an update button.#2015-11-1209:02cflemingNo#2015-11-1209:03rauhAh ok, Thanks!#2015-11-1209:06rauh@cfleming: Wow, looks fantastic. You're always a step ahead. simple_smile#2015-11-1209:06cfleming@rauh: In this case, only just!#2015-11-1209:06rauhCan't wait for the parinfer!#2015-11-1209:06cflemingIt’s my favourite change in a while though#2015-11-1209:07cflemingYeah, that too and some REPL usability coming down the pipeline, I really want to get to https://github.com/cursiveclojure/cursive/issues/85#2015-11-1209:07cflemingAnd better CLJS REPLs#2015-11-1309:57sgerguriI keep running into this weird bug in Cursive - increasing the version number of a dependency does not make Cursive aware of it. It can't see the newer dependency and will insist on using the old one.#2015-11-1309:58sgerguriWhat's worse is that when I finally do manage to convince Cursive to use the newer version (through manual editing of the project's .iml file) it will still start any REPL sessions with the old dependency.#2015-11-1309:58sgerguriThis is happening on the latest IDEA 14.1 with the latest Cursive plugin.#2015-11-1309:59cfleming@sgerguri: You need to refresh the dependencies after editing your project file.#2015-11-1310:00cflemingYou can do it in the leiningen toolwindow (refresh button) or by executing the “Refresh Leiningen Projects” action from Cmd-Shift-A#2015-11-1310:01sgerguriThat did not help. 😕#2015-11-1310:01sgerguriEditor is picking the new version up just fine, but REPL is still being started with the old version.#2015-11-1310:02cflemingSo if you look at the project structure view, you see the new version added to the module, right?#2015-11-1310:02cflemingCmd-; on mac, at least#2015-11-1310:02cflemingLook at the module view, then check the dependencies of your module.#2015-11-1310:03sgerguriYes - I see it there, in the latest version.#2015-11-1310:03cflemingOk. What sort of REPL are you running?#2015-11-1310:03sgerguriInterestingly, the Project view lists both versions in the 'External Libraries' tree.#2015-11-1310:03cflemingDo you have multiple modules in your project?#2015-11-1310:03sgergurinREPL with Leiningen, with the correct project#2015-11-1310:04cflemingOk, and in the classpath, it’s definitely picking up the wrong version? You can see that by unfolding the first line in the REPL window.#2015-11-1310:04sgerguriYes I do, and that's another bug - if I remove them they'll be added eventually automatically when I restart the IDE.#2015-11-1310:05sgerguriAlthough to be fair that sounds more like a bug in IDEA rather than the plugin itself.#2015-11-1310:05cflemingThat’s not a bug#2015-11-1310:05cflemingYou’re talking about manually modifying the module file, right?#2015-11-1310:07sgerguriIt's picking up the right version, which is strange.#2015-11-1310:08cflemingThat doesn’t sound strange simple_smile#2015-11-1310:08sgerguriBut it's clearly complaining about an import in a ns that uses a function from it.]#2015-11-1310:08sgerguriAnd the function is there.#2015-11-1310:08sgerguriOr maybe I'm just dumb.#2015-11-1310:08cflemingWhat does the import look like?#2015-11-1310:08sgergurirequire with multiple refers#2015-11-1310:08sgerguriIt's complaining about one of those.#2015-11-1310:09sgerguriI can click through it to its definition, so it should be correct, no typo etc.#2015-11-1310:09cflemingCan you send a screenshot of the require?#2015-11-1310:10sgerguriRe. module file - either through the Project view, or through project settings.#2015-11-1310:11cflemingIf you modify the module file, those changes will be overwritten the next time the Lein project is synced (opening your project, manually refreshing etc)#2015-11-1310:11cflemingThe Maven integration works the same way.#2015-11-1310:11cflemingThe idea is your module should reflect what is in the project.clj, and Cursive will make it like that every time.#2015-11-1310:12sgerguri^ That's the require line. Everything except delete-item! works.#2015-11-1310:13sgerguriAlthough like I said, delete-item! can be clicked through to its definition from here. And it's using the download deps for that.#2015-11-1310:13cflemingAnd if you click to delete-item!, you can … right. What does its definition look like?#2015-11-1310:14sgerguriRe. modules - I was referring to other Clojure projects that I have merely added as 'new modules from existing sources'.#2015-11-1310:14sgerguriI may be missing sth but I can't see anything in project.clj that would refer to them.#2015-11-1310:15cflemingSo you add them as modules, and later they disappear?#2015-11-1310:16sgerguriI add them as modules, but cannot remove them permanently - they'll be added back the next time I restart the IDE.#2015-11-1310:16cflemingAre they leiningen modules?#2015-11-1310:16sgerguriYes, all of them#2015-11-1310:17sgerguri^^ That's the clicked-through fn that I'm referring to.#2015-11-1310:17sgerguriIt's on a yellow tab, so that's a dependency.#2015-11-1310:17cflemingOk, then you have to delete them from the leiningen toolwindow. Select the project, and remove it from there. It’ll ask if you want to remove the associated module, say “yes"#2015-11-1310:18cflemingI’m not sure if I can catch the deletion of a module in IntelliJ and remove the lein part automatically.#2015-11-1310:20sgerguriAh, that seems to have worked. It's a bit quirky, since normally I interact with the Project view so I'd like to remove it from there, but as long as there's a reliable way of doing it it's ok.#2015-11-1310:21sgerguriThat hasn't changed anything about delete-item! though. simple_smile#2015-11-1310:21cflemingNo, that’s weird. So what do you see - Cursive says it can’t be resolved?#2015-11-1310:21sgerguriIt gives me CompilerException in the REPL.#2015-11-1310:22sgerguriWhen I load the ns, that is.#2015-11-1310:22cflemingOh.#2015-11-1310:22cflemingDoes it work using lein repl?#2015-11-1310:22cflemingCursive should be doing basically exactly the same thing.#2015-11-1310:23cflemingi.e. it delegates all that to lein.#2015-11-1310:24sgerguriIt doesn't. Glad to see the problem is elsewhere (likely between the keyboard and the chair).#2015-11-1310:24cflemingPhew#2015-11-1310:24cflemingsimple_smile#2015-11-1310:24sgerguriWell, sorry about the false alarm!#2015-11-1310:24cflemingNo worries, glad it’s working. Or at least, it’s not working in a consistent way.#2015-11-1310:24sgerguriyeah simple_smile#2015-11-1522:40jmmkHow do I get a CLJS repl running in cursive? I don't need any reloading into a browser, I just want to be able to evaluate code for library development#2015-11-1522:40cfleming@jmmk: So you don’t want figwheel?#2015-11-1522:41cflemingIf you do, the best instructions are here: https://github.com/bhauman/lein-figwheel/wiki/Running-figwheel-in-a-Cursive-Clojure-REPL#2015-11-1522:41jmmkFigwheel seems to not want to run unless connected to a browser#2015-11-1522:41cflemingIf not, the best bet is to follow the Quick Start: https://github.com/clojure/clojurescript/wiki/Quick-Start#2015-11-1522:42jmmkI could make a dev html that just serves the JS I guess just to get figwheel repl to work?#2015-11-1522:42cflemingOnce you’ve done that and you have the REPL working, you can then create a REPL config in Cursive which automates starting it.#2015-11-1522:42cflemingThe option you want there is the clojure.main REPL.#2015-11-1522:42cflemingSorry, I’ve been meaning to document this but haven’t yet.#2015-11-1522:47jmmk@cfleming: node repl seems to be working, thanks#2015-11-1522:48cflemingGreat!#2015-11-1602:19lfn3@cfleming: hey so question. Is the test runner in cursive implemented as a clojure.test reporter?#2015-11-1602:20cfleming@lfn3: More or less, with a bunch of extra monkey patching#2015-11-1602:20lfn3Cool, that was what I suspected. Thanks!#2015-11-1602:40danielcompton@lfn3: what, is there a test runner?#2015-11-1602:40danielcomptonwhen did that happen?#2015-11-1602:40lfn3Repl > Run tests in current ns#2015-11-1602:40lfn3It’s pretty neat#2015-11-1602:41danielcomptonClojure only?#2015-11-1602:41danielcomptonoh that test runner#2015-11-1602:43lfn3💡 I actually found out about it from Josh at the test.check meetup a while ago.#2015-11-1602:43danielcomptonI thought you meant something like#2015-11-1602:44danielcomptonhttp://tatiyants.com/wp-content/uploads/2014/04/intellij_13_running_karma_jasmine_tests.png#2015-11-1602:46lfn3That’s pretty neat. Doesn’t seem like there’s a huge gap between that and what we’ve got at the moment...#2015-11-1602:47lfn3At least in terms of the reporting bit.#2015-11-1603:43cfleming@danielcompton: @lfn3: That’s on the cards for soon - I’ve done a bunch of investigation, it’s pretty easy for the basic case. It’s harder for an autorunner unfortunately (i.e. re-run tests on save).#2015-11-1603:44cflemingThe holy grail of course is something like http://wallabyjs.com#2015-11-1603:46danielcomptonDid you end up talking with them?#2015-11-1603:46lfn3This is gonna show my dirty m$ history, but I’ve had exposure to http://www.ncrunch.net/ which is pretty svelte imo.#2015-11-1603:46danielcomptonI imagine you could use it with ClojureScript pretty well, as they support sourcemaps#2015-11-1603:47danielcompton@lfn3: I’m so sorry#2015-11-1603:48danielcomptonhttps://github.com/wallabyjs/public/issues/337#2015-11-1603:48lfn3Maybe one day I’ll be able to atone for all the classes I created.#2015-11-1603:53lfn3@danielcompton: http://wallabyjs.com/docs/config/compilers.html#writing-a-custom-compiler seems to suggest it’s possible...#2015-11-1604:56cfleming@lfn3: Nice, NCrunch is made in Auckland#2015-11-1604:56cflemingSame idea, basically#2015-11-1615:03markmandelWh00ps, just realised I wasn't in here!#2015-11-1618:30tony.kay@cfleming: Nice job on your talk. Also, thanks for finally agreeing to take our (collective) money...Cursive makes life better.#2015-11-1620:13cfleming@tony.kay: Thanks on both counts - I’m glad Cursive improves life!#2015-11-1707:57rauhTiny bug I found: [:,] where , is the cursor, then pressing CTRL-W "Extend selection" will select the entire file. If somebody can confirm I can create a Github Bug report.#2015-11-1709:20thosmosenjoyed your talk, @cfleming#2015-11-1711:26sgerguriIs that normal?#2015-11-1711:27sgerguriIt keeps highlighting the var whenever it holds a string. If I change this to an integer, for example, it goes away.#2015-11-1712:10rauh@sgerguri: that's the problem with many (def.... ) forms that define a var#2015-11-1712:10rauhso it's the problem of the defonce here#2015-11-1712:11sgerguriThe macro works just fine, it's the IDE that's confused.#2015-11-1712:11rauhYeah I agree.#2015-11-1712:44cfleming@sgerguri: Defonce should be supported, I’ll take a look#2015-11-1712:45cfleming@thosmos: Thanks! Are you here at the conj?#2015-11-1712:45cfleming@rauh: I haven’t reproduced, but feel free to file an issue anyway#2015-11-1714:57rauhSo I'm evaling a file and getting an exception somewhere (in my code). Printing the exception won't give me much helpful details though. I just tells me the form that threw the error. What am I missing?#2015-11-1721:11roelofHello, is it possible to extend the lein task list so I can also work with for example eastwood which needs to be lein eastwood ?#2015-11-1806:17thosmos@cfleming I wish I was at the conj. Maybe next year, or Clojure/West since I'm in Cali. I watched your talk on ClojureTV#2015-11-1814:34roelofanyone here ?#2015-11-1814:35cjmurphyMe!#2015-11-1814:35roelofare you a cursive user ??#2015-11-1814:36cjmurphyYes - I recommended it to you in the beginners area I believe.#2015-11-1814:37cjmurphyI've used IntelliJ for a very long time - as a Java programmer - where it works perfectly.#2015-11-1814:37roelofoke, I have a wierd problem. On the clojure mailing list I have asked how I can ask some custom action to the clojure actions screen#2015-11-1814:38roelofnow Colin says add it to the run menu with run -> edit configuration#2015-11-1814:38roelofSo I did that and add eastwood to the arguments of default - leiningen#2015-11-1814:39roelofbut still no choice for eastwood when I choose run -> run#2015-11-1814:39cjmurphyHmm - I used that for running Java programs.#2015-11-1814:39cjmurphyYou could run anything with a main from there.#2015-11-1814:40roelofoke , I do not know if eastwood which is a lein plugin has a main#2015-11-1814:40cjmurphyIt is for running source code, usually the code you are developing.#2015-11-1814:40roelofoke, maybe Colin has misunderstood me#2015-11-1814:40cjmurphyTo save pain use tools for only what they are good at.#2015-11-1814:41roelofI try that eastwood is for looking if I do not make wierd mistakes#2015-11-1814:41cjmurphyConfiguration is the worse thing in the world.#2015-11-1814:41roelof????#2015-11-1814:42cjmurphyI need to see what eastwood is I guess ...#2015-11-1814:43roelofhttps://github.com/jonase/eastwood#2015-11-1814:43cjmurphyYes linter.#2015-11-1814:44roelofcorrect#2015-11-1814:45cjmurphyClojure gives bad error messages but Cursive is not too bad.#2015-11-1814:45cjmurphyHas anyone one else coupled eastwood with Cursive?#2015-11-1814:46roelofI do not know#2015-11-1814:47cjmurphyI'm just saying you might not need it.#2015-11-1814:48roelofHow can I then best look if my clojure code can be made better#2015-11-1814:49roelofI thougt eastwood and kibit could help me with that ?#2015-11-1814:49cjmurphyIn my experience I did the 4clojure koans. When you get one right you get to look at all the other answers from other people.#2015-11-1814:50cjmurphyI picked other people who had completed even the hard ones.#2015-11-1814:50roelofoke#2015-11-1814:51cjmurphyThere are many paths to choose from, but configuration is not really 'learning'...#2015-11-1814:55roelofnope, but I still think that these tools can help me with the learning#2015-11-1814:57roelofcjmurphy: but thanks for the help#2015-11-1814:58cjmurphyNo worries.#2015-11-1815:25cfleming@roelof: When you open Run->Edit Configurations, do you see the Eastwood configuration you created on the left hand side, above the Defaults section?#2015-11-1815:31roelofcfleming: nope, I only see then the core applications and a defaults section#2015-11-1815:33roelofI only added eastwood on the defaults -> leiningen section#2015-11-1815:45roelofcfleming: Do I have to do more then ?#2015-11-1815:58roelofcfleming: found it. I have to use the + sign and add it#2015-11-1816:24roelofbummer, for eastwood, kibit or bikeshed needs bash so no luck on windows 😞#2015-11-1816:41roelofbikeshed needs sh so I delete it from my projects.cli and everything works fine#2015-11-1820:21roelofwhere can I disable the Rainbow parenthenses#2015-11-1820:32tony.kayAnyone have an idea how to make doc strings for AOT libraries (like Datomic)? It would be nice if we could have a way to make docstrings work by creating a community resource that can be associated with these. I get really tired of hitting "show docs" in the IDE and seeing nothing helpful.#2015-11-1820:35grav@roelof: Open Preferences and search for rainbow.#2015-11-1820:35roelofthanks#2015-11-1901:44cfleming@tony.kay: Only a fairly ghetto solution for this right now sorry, see https://github.com/cursiveclojure/cursive/issues/38#issuecomment-26373091 and https://github.com/cursiveclojure/cursive/issues/708#issuecomment-83769578#2015-11-1901:44cflemingI’m planning a better semi-automatic solution for this soon.#2015-11-1904:08tony.kay@cfleming: Ah, ok, thanks! Ghetto is better than nothing#2015-11-1917:11roelofAnyone a idea what is here the problem :#2015-11-1918:42snowell@roelof slurp is looking either in src/core_functions (alongside core.clj) or resources/, and the file lives in neither place#2015-11-1918:43snowellEither change filename to an absolute path, or a correct relative path#2015-11-1918:45roelofoke#2015-11-1918:46roelofI moved it into resources but the same error message#2015-11-1918:48snowellTry a relative path#2015-11-1918:48snowell(slurp “../../../resources/suspects.csv)#2015-11-1918:49snowellOr just put the absolute path, since I’m sure this isn’t a production application 😄#2015-11-1918:58dmi3yHi guys. I noticed that with the latest Cursive version, REPL takes an order of magnitude longer to start. It says it’s calculating classpath. Subjectively, the REPL start used to be way faster before for the same project. Has anyone else noticed that?#2015-11-1918:58roelofthe relative path does not work#2015-11-1919:01roelofalso the absolute path : (slurp "c://Users/rwobb/IdeaProjects/resources/suspects.csv")#2015-11-1919:05snowell@roelof That’s not the absolute path. It doesn’t have the project directory in it. You’re getting a FileNotFoundException, so the file isn’t where you’re telling slurp to look#2015-11-1919:06roelofoke, I will change it#2015-11-1919:10roelofthanks, changed it to (slurp "c://Users/rwobb/IdeaProjects/core_functions/resources/suspects.csv") worked#2015-11-1919:43cflemingBTW it’s been brought to my attention that the use of the word “ghetto” to imply something that’s not of good quality can sound pretty offensive, in particular in the US. My apologies, it doesn’t have the same connotation where I’m from and I certainly didn’t intend anything like that.#2015-11-1919:46cfleming@dmi3y: A few people have commented that it seems to take longer to start, but I’ve timed it at least on my machine and the time is generally the same. It’s actually calling the same code (in a slightly different way, admittedly), so I don’t think there should be a big difference.#2015-11-1919:47cfleming@dmi3y: But if you’re literally seeing an order of magnitude difference then that sounds like a bug.#2015-11-1919:48cflemingWhat I think usually happens is that your attention is drawn to it by the progress bar, and additionally that now happens before the REPL window is opened, which makes it feel longer till anything happens.#2015-11-1919:48dmi3yIt could be, yes simple_smile#2015-11-1919:49dmi3y@cfleming: I’ll time it against a previous version of Cursive on which I think it was faster.#2015-11-1919:50cfleming@dmi3y: Thanks. I’d be very interested to know your results.#2015-11-1919:51cflemingI’m actually considering a change which would cache the REPL classpath in case nothing has changed, but that can only be done when there are no snapshots involved.#2015-11-1919:51cflemingThat would make subsequent startups very fast, though.#2015-11-1919:52dmi3ySounds cool!#2015-11-2008:28rauhI somehow removed the "double shift" command which launches a general search (files,commands etc) in a little box. I can't find it. Does anybody know what it's called so I can bind it again?#2015-11-2008:48cfleming@rauh: It’s called Search Everywhere IIRC#2015-11-2008:56rauh@cfleming: Hmm strange, I assigned it a several keys but it's not coming up. Thanks though. I'll have to restart the IDE later maybe#2015-11-2008:57cflemingI actually just tried it and it’s not working for me either. I never use it though.#2015-11-2008:58cflemingAh, yes, it does, just not from decompiled class files, weirdly.#2015-11-2009:07grav@cfleming: In a Cljs-project f I checkout a revision that has different dependencies, I have to issue refresh Leningen projects command to get Figwheel to notice the new dependencies (in addition to restarting Figwheel). It seems to have been a problem since IDEA 15. Is that a Figwheel issue, or could it be Cursive?#2015-11-2009:09cfleming@grav: That’s weird. You won’t need to refresh, since that only affects the libs synced to IntelliJ, which Figwheel doesn’t know about. What I suspect is that IntelliJ hasn’t flushed the files to disk. Does File-&gt;Save All instead of refreshing work?#2015-11-2009:09gravI’ll try it out right now. Brb#2015-11-2009:10cflemingThinking about it, that would be weird since git should write the files, they’re not cached by IntelliJ.#2015-11-2009:10cflemingWorth testing though.#2015-11-2009:12grav@cfleming: no, File -> Save all doesn’t do the trick.#2015-11-2009:12gravRefresh Lein Projs does.#2015-11-2009:13gravI can try and come up with a minimal example#2015-11-2009:13cfleming@grav: Ok. Could you file an issue with details about what you’re doing, and I’ll … that would be great, thanks.#2015-11-2009:13gravWill do simple_smile#2015-11-2012:52rauhPSA: A couple days ago I complained about not having proper "Caused by" Stacktraces in Cursive. Turns out it was this: http://yellerapp.com/posts/2015-05-11-clojure-no-stacktrace.html#2015-11-2021:45jaenThis probably is not Cursive's fault, but I just want to make sure to eliminate that variable. What does exactly happen when I do Load this file in REPL and then Switch REPL NS to current file? I've had a vexing error when I tried to connect with jdbc and it reported no driver. If I don't change ns it works.#2015-11-2023:11cfleming@jaen: Load this file in REPL loads the current file using load-file. Prior to doing that, it calculates the namespace dependencies of that file, and if any of them are out of date (have been modified since the last load) they will be loaded first, in dependency order.#2015-11-2023:11cfleming@jaen: Switch REPL NS to current file just does an in-ns.#2015-11-2023:21bherrmann6:19:51 PM IllegalAccessError: com/intellij/execution/impl/MyDiffContainer When I try an execute a leiningen debug configuation#2015-11-2023:21bherrmannusing 15.0.2 CE with latest cursive.#2015-11-2023:22bherrmanntried to access class com.intellij.execution.impl.MyDiffContainer from class cursive.runner.console.ConsoleViewImpl java.lang.IllegalAccessError: tried to access class com.intellij.execution.impl.MyDiffContainer from class cursive.runner.console.ConsoleViewImpl#2015-11-2023:22cfleming@bherrmann: Can you send the whole stacktrace?#2015-11-2023:23bherrmannyes, in here or via another way?#2015-11-2023:23cflemingProbably best to file an issue: https://github.com/cursiveclojure/cursive/issues/new#2015-11-2023:23bherrmannk#2015-11-2023:23cflemingThanks#2015-11-2109:27jaen@cfleming: thanks; maybe the issue is how I don't understand what exactly load-file and in-ns does then.#2015-11-2109:47jaenTHough that reminds me of one thing I've been meaning to ask. The debugger sometimes hangs for me when it's collecting data for watches or when I eval expressions. Any suspect for that?#2015-11-2221:11ikitommihi. Cursive seems to understand potemkin/import-vars nicely, thanks for it. Is there a way to be able to write a macro, that generates code having potemkin/import-vars to import stuff based on the macro args? Works on the repl, but cursive doesn’t understand those. Would require a custom extension? Is there a future date I can write those myself for my custom libs?#2015-11-2221:12cfleming@ikitommi: Yes, that would require a custom extension.#2015-11-2221:13cflemingI’m working on getting things ready for a release for the next week or so, and after that I’m going to look at the extension API again using my work from the conj.#2015-11-2221:16ikitommi@cfleming: thanks. will postpone my macroventures and do something else meanwhile.#2015-11-2403:01danielcomptonOpening a clojure project from the command line with idea . used to create a new Clojure module, but it doesn’t seem to anymore?#2015-11-2413:32jaenOut of curiosity - recent discussion in #C03RZGPG3 made me wonder if there's any chance to support having some sort of tooltips for schema.core/defn that could explain the nominal schema inline? That is, if you have (defn function :- ReturnSchema [argument :- ArgumentSchema] ...) you could hover over the name and get it explained.#2015-11-2417:08tbrookeI watched a guy on Emacs and he was evaluating functions and the value would return in the editor beside the function - as far as I know Cursive can’t do this - I thought this was cool but not necessary#2015-11-2421:32cfleming@jaen: Oops, I replied over there, I’m reading out of order#2015-11-2421:32cflemingBut yeah, issue welcome for that.#2015-11-2421:32cfleming@tbrooke: Yeah, there’s nothing like that yet, but it is planned.#2015-11-2421:44cfleming@tbrooke: At some point I’d like to have LightTable-style in-editor eval, but that requires interaction from the IntelliJ editors. It’s there at the moment as you can see in the debugger, but only supports results on a single line. I’d hoped the improvements to that would make it into v15 but it looks like they didn’t.#2015-11-2421:57jaen@cfleming: sure, I'll make an issue for that later#2015-11-2422:11jaen@cfleming: is this clear enough description of that? https://github.com/cursiveclojure/cursive/issues/1175#2015-11-2422:12cfleming@jaen: Yes, that’s great, thanks. It’s a tricky problem, I’ll think about that.#2015-11-2422:13cflemingOne thing I didn’t demo at the conj was that the grammars are now displayed in the doc popup#2015-11-2422:13cflemingThey’re tricky to follow by eye, though - I’m still not sure what the best way to display them is.#2015-11-2422:17jaenIs that in 0.170? I'm not sure I'm seeing that.#2015-11-2422:17cflemingNo, what I demoed at the conj isn’t in the public version of Cursive yet#2015-11-2422:17cflemingI didn’t have enough time to get it polished, it’ll be in there soon.#2015-11-2422:18jaenGotcha. Cursive is still pretty awesome as-is. First thing that convinced me IDEs may not suck.#2015-11-2422:18cflemingThanks! Glad to be convincing simple_smile#2015-11-2422:19cflemingLots more nice things coming, too.#2015-11-2422:22jaenGood to hear. Now I just have to start earning money again so I can compensate the awesome work you did P ;#2015-11-2422:22jaenIf not for Cursive debugger I might have put Clojure to the wayside again#2015-11-2422:23cflemingYeah, it helps a lot. I haven’t had time to investigate, but v15 might allow me to do expression-level debugging instead of line-level.#2015-11-2422:23jaenThat sounds nice
#2015-11-2422:24jaenWhich reminds me, using remote debugger with JDPA sometimes starts being unresponsive when I evaluate something on a breakpoint. Is there any way to investigate what's causing it?#2015-11-2422:31cflemingI’m not sure - the debugger is sometimes really slow in general, and I’m not sure how to investigate it.#2015-11-2422:31cflemingI suspect it’s because Clojure generates so many classes, but I’m only speculating.#2015-11-2422:37jaenI see. It's a bit vexing to be deprived of the debugger when it decides it won't be evaling, since it's one of the shiny things in Cursive. I hoped that maybe there would be some way to maybe help in debugging this.#2015-11-2422:37jaenBut i's probably all very non-trivial#2015-11-2422:37cflemingThe debugger is definitely non-trivial.#2015-11-2422:37cflemingAdditionally, most of the functionality is provided by IntelliJ and I don’t pretend to understand it.#2015-11-2422:38cflemingI need to talk to the JetBrains debugger team about it.#2015-11-2422:42jaenYeah, hopefully they have some insight where to at the very least start looking, it would be cool to get it even more reliable. It's already come a long way since it was first introduced, I remember it being quite finicky back then.#2015-11-2422:43cflemingYeah, initially it barely worked at all.#2015-11-2422:43cflemingEspecially evaluation#2015-11-2515:08roelofhello, does anyone has explanation why in this koan https://github.com/functional-koans/clojure-koans/blob/master/src/koans/23_meta.clj . Cursive says that Giant cannot be resolved in line 13#2015-11-2515:13Alex Miller (Clojure team)that looks like a typo to me and it should be lower-case giants#2015-11-2515:14roelofI do not think so. if I do that part in a lein repl I see a answer#2015-11-2515:15Alex Miller (Clojure team)well, I guess it depends on the intent of the koans writer in this case. hard for me to say for sure.#2015-11-2515:16roelofI tried other ide like lightable and that one has no problems with it#2015-11-2515:16Alex Miller (Clojure team)I think the reason you are probably seeing different things is because meditations is a macro that is delaying evaluation and that will confuse some editor environments#2015-11-2515:17roelofthat can be#2015-11-2515:17Alex Miller (Clojure team)the "Giants" in that line is a symbol, which you notice is quoted in line 5#2015-11-2515:17roelofI know Light table says my solution is wrong where a lein repl says it true#2015-11-2515:18Alex Miller (Clojure team)what was your solution?#2015-11-2515:18roelofyep, that is quoted in line 5 is correct#2015-11-2515:19roelofmy solution is this one : (= {:division "West"} (meta '^{:division "West"} Giants))#2015-11-2515:19roeloflein repl says then true#2015-11-2515:20Alex Miller (Clojure team)I certainly think that is the intent of the koan :)#2015-11-2515:21roelofbut till now no ide can handle it right 😞#2015-11-2515:21roelofLT says this is false and Cursive cannot resolve the Giant part#2015-11-2515:23roelofhe, when I quote the Giants part , I can do run -> run and see no error message#2015-11-2515:23roelofonly also no messages from the unsolved koans#2015-11-2515:25Alex Miller (Clojure team)I think it's confusing at a glance why this works - the reader macro ^{:division "West"} is being applied to the symbol after it Giants and then quoting (prior to that whole thing) is being applied to avoid evaluation of Giants, which is an undefined symbol#2015-11-2515:26Alex Miller (Clojure team)I suspect Cursive is seeing the (undefined) symbol without properly accounting for the context of the quote prior to the reader macro somehow#2015-11-2515:27Alex Miller (Clojure team)not sure about LT#2015-11-2515:27jaen@roelof: understanding macros is hard, so Cursive can't understand any and all macro. Did you try just evaluating even though Cursive says it can't resolve the symbol? It's just a warning that Curisve can't find it in the index (because it can't understand any and all macro), but I think you can run it anyway if you know it's correct.#2015-11-2515:28roelofoke#2015-11-2515:28roelofwith the same trick LT has still problems#2015-11-2515:31roelofThanks all#2015-11-2606:12roelofanyone seen my mail on the cursive list on the same matter#2015-11-2608:08cfleming@roelof: Yes, but I haven’t had time to look at it yet#2015-11-2608:09roelofoke, no problem#2015-11-2608:09roelofFound also the message back in the archives#2015-11-2608:12roelof@cfleming: Take time to look , I rather see a good solution and wait for some days then a not working one now#2015-11-2609:08cfleming@roelof: The issue is that Cursive doesn’t understand with-meta properly#2015-11-2609:08cflemingCursive’s warning is a false positive - your code will work fine#2015-11-2609:10cflemingActually, I’m not sure that is the problem - I think the issue might be that the quote doesn’t cover the metadata properly#2015-11-2609:10cflemingI’ll have to take a look, but Cursive’s warning is incorrect there.#2015-11-2609:38roelofI notice when I do a ' before the Gaint I do not see any error#2015-11-2609:51roelofin both cases the outcome is that my answer is the good one , so im happy#2015-11-2609:52roelofIf I can help you, just ask#2015-11-2614:07rauh@cfleming: Debugging: I'm getting a ...FormatError: Illegal field name "next_0.8".... My (let [next-0.8 ... seems to be the cause of it. I think the . should be mangled? (Edit: Renaming the local binding and it works)#2015-11-2614:20rauhSubmitted: https://github.com/cursiveclojure/cursive/issues/1177#2015-11-2614:38roelofwhy do I get a symbol some not found here : (some #{2 7 6} [5 6 7 8])) when I send this to a repl in cursive ?#2015-11-2618:16roelofmake a clean lein project and everything works fine#2015-11-2709:06joriHi, Cursive is unable to resolve core stuff like defn-, let... referenced from cljs and cljc any hints on what to do?#2015-11-2709:06joriStuff that resolves: defn, ns, identical?, some?, reset!...#2015-11-2709:06joriStuff that does not resolve: defn-, let, declare, when, cond, defmulti...#2015-11-2709:07joriI have tried this: https://github.com/cursiveclojure/cursive/issues/626#issuecomment-121412089#2015-11-2709:07joriI have the latest Cursive (0.1.71), clojurescript 1.7.170, clojure 1.7#2015-11-2709:08cfleming@jori: You’ve tried invalidating the caches?#2015-11-2709:09joriyes#2015-11-2709:10cflemingOk, if you open Project Structure (Cmd-; on OSX), open your module and look at its dependencies#2015-11-2709:10cflemingDoes it have both Clojure and ClojureScript added as dependencies?#2015-11-2709:12jorionly clojurescript actually#2015-11-2709:13jorino, actually, it's there#2015-11-2709:14cflemingOk, and the versions look like you’re expecting?#2015-11-2709:15joriyes the versions are correct#2015-11-2709:16cflemingHmm#2015-11-2709:16cflemingThe resolution fails from cljs as well right, not just cljc?#2015-11-2709:16jorithere are multiple versions (older ones grayed out)#2015-11-2709:16joriyes#2015-11-2709:16cflemingOh#2015-11-2709:16cflemingThat’s not good#2015-11-2709:16cflemingSelect the older ones and remove them, and see if that helps#2015-11-2709:17cflemingPerhaps the new lein integration is not correctly removing old versions.#2015-11-2709:21joriOk, I removed all old clojure and clojurescript jars, and invalidated caches#2015-11-2709:21jorisame situation still#2015-11-2709:21joridid not fix it.#2015-11-2709:22joriI'll try removing all the greyed out jars#2015-11-2709:24cflemingOk#2015-11-2709:25cflemingHas this just started happening on a project that has previously worked?#2015-11-2709:26joriyes, this is new#2015-11-2709:27joriI would guess that it started inside the last few weeks.#2015-11-2709:27jori(I've been working mostly clj side lately, so I can't pin it to an exact cursive upgrade)#2015-11-2709:28cflemingOk.#2015-11-2709:28cflemingDoes your project have multiple modules? Does it happen in all of them?#2015-11-2709:29jorijust one module#2015-11-2709:29joriMy colleague on the same codebase and has the same issue, and he has also upgraded to the latest cursive version a few weeks ago.#2015-11-2709:30cflemingOk, so if you’re both seeing the same thing then it’s not some temporary thing like corrupt indexes.#2015-11-2709:31cflemingI guess this is not an open source project, right?#2015-11-2709:32joriyeah, not an open source project#2015-11-2709:34joriI added a new cljc file lately, that is referenced from both clj and cljs... might that cause some confusion?#2015-11-2709:35cflemingCan you DM me a screenshot of your Project Structure view, with the Modules tab open and the Dependencies tab within that?#2015-11-2709:35joriok#2015-11-2709:35cflemingMaybe, the cljc support is still a little flakey, but it shouldn’t affect files other than cljc I think.#2015-11-2710:59danielgrosseIs there a way, to create cljs files when creating a new namespace?#2015-11-2711:05cfleming@danielgrosse: Yes, when you use the “New namespace” dialog, there’s a dropdown to select the type of file.#2015-11-2711:05cflemingYou can use the up/down arrow keys to switch it without using the mouse.#2015-11-2711:50danielgrosseThank you#2015-11-2916:28roelofHow can I take care that all the d are resolved : https://www.refheap.com/112185#2015-11-2921:51cfleming@roelof: Datomic is tricky for Cursive to support because it doesn’t ship source code. See https://github.com/cursiveclojure/cursive/issues/38#issuecomment-26373091 and https://github.com/cursiveclojure/cursive/issues/708#issuecomment-83769578 for a workaround.#2015-11-2921:51cflemingI’m planning a better solution for this at some point soon.#2015-11-3000:40mishahello @cfleming, I am having a trouble with lein projects in IDEA14CE + cursive 0.1.71: I do: 1. lein new dude 2. launch idea 3. add dude as a new project 4. right click on project.cljs, add as lein project 5. cmd+; to open project settings 6. set project SDK to java8 7. set "src" as source folder 8 .set "test" as test folder 9. open project.clj ==> defproject symbol is recognized (not highlighted) 10. open src/dude/core.clj ==>`ns`, defn, println symbols are highlighted as unresolved.
idea 14.0.1 CE
cursive 0.1.71

$ lein -v
Leiningen 2.5.3 on Java 1.8.0_31 Java HotSpot(TM) 64-Bit Server VM

#project.cljs deps:
[[org.clojure/clojure "1.7.0"]]
Would you have any idea what the cause might be? It might have started after update to cursive 0.1.70 from 68 or 69. After that update REPL configurations stopped working on existing project, spitting out Error creating JavaParameters alert. But I cannot confirm that update is the actual cause.
#2015-11-3000:42cflemingHi @misha, sorry you’re having trouble. You shouldn’t need to do most of those steps, opening the lein project after lein new whatever should add the lein project and set up src and test folders.#2015-11-3000:43mishathat was true. but now - the way I described - is the only way it sort of accepts new project as the actual clojure project#2015-11-3000:44mishaand "sort of" - is because of those unrecognized symbols in the core ns#2015-11-3000:45cflemingSee here: https://cursiveclojure.com/archive/1567.html#1615 for a possible solution to the JavaParameters issue.#2015-11-3000:45mishaif I do
idea -> new project -> select project.clj
idea wraps it in a temp_project$324234 folder with the only project.clj file in it
#2015-11-3000:47misha@cfleming: I'll try cleaning up java sdk paths. but I think i;d be rather weird, if it'd fix the "new project" setup issue. thanks#2015-11-3000:47cfleming@misha: No, I don’t think it’ll fix that.#2015-11-3000:48cflemingCan you reproduce the issue (i.e. import a simple lein new project) and then send your log? Help-&gt;Show log in Finder/Explorer#2015-11-3000:48cflemingWhich OS are you on, BTW?#2015-11-3000:48mishabut I have a strong feeling, that it is a result of my whole setup getting somehow corrupted#2015-11-3000:49cflemingIt does sound like that, but I’m not sure what the exact problem could be - it sounds very strange.#2015-11-3000:49mishayosemite 10.10.5 (14F27)#2015-11-3000:49cflemingFeel free to DM me your log, or mail it to <mailto:/cdn-cgi/l/email-protection|/cdn-cgi/l/email-protection>, whichever is easier.#2015-11-3000:52misha
lein new colin
idea -> import project
pick colin
import from existing sources
select lein projects
==> `unable to proceed: nothing found to import`
#2015-11-3000:54misha
back
create from existing sources
next, next
==> log
#2015-11-3001:27mishaok, if anyone is interested, the solution to the issue above I went with is: "update to IDEA 15" : )#2015-11-3006:11cjmurphyWhen I turtle around the editor using the [Cntl <-] and [Cntl ->] keys I expect the 'Cntl' part of the action to be jumping the cursor past whatever bit of syntax I am at. It is usual for Clojure names to be-like-this. Just one [Cntl <-|->] ought to do the trick - ought to get me past the whole of a name-with-plenty-of-hyphens. Should I raise an issue for speedier editing?#2015-11-3014:18jaenIs there any way to specify an alternate maven repository path?#2015-11-3020:01cfleming@cjmurphy: What you probably want to do is bind those keys to Structural Move Forward/Backward. That should jump over Clojure units.#2015-11-3020:01cfleming@jaen: For lein, you mean?#2015-11-3020:02cfleming@jaen: Cursive just invokes lein, so if you configure the repo in your project.clj it will be picked up.#2015-11-3020:03jaenI'm using boot actually. Maybe I'll explain my exact use case - basically I'm using a docker container to develop in, I mount both the code inside and the .m2 folder, so the project sees it under ~/.m2 but from outside in Cursive this will be a different directory.#2015-11-3020:04jaenSo I'm wondering if there's some way to specify for Cursive to look for sources for indexing there?#2015-11-3020:05cflemingHmm, I don’t think so, no. Since Cursive just invokes lein, you’d have to be able to tell lein to do this somehow. One option would be to use :local-repo, which would cache artifacts relative to the project. A bit messy but it might work.#2015-11-3020:06cfleming(while you’re using boot, I assume you’re using the hack of generating a project.clj)#2015-11-3020:06cjmurphyOkay will do. I 'think' I remember a time when IDEA did not understand camelCase for Java variables, but these days normal Java variables are jumped over without any need for key rebinding. So I thought would be good if it worked like that out of the box for Clojure code too.#2015-11-3020:07cfleming@cjmurphy: Yeah, I think the structural movement should do what you want. Try it out, and if it’s not let me know here or file an issue.#2015-11-3020:09cfleming@cjmurphy: One thing that you may or may not expect is that it’ll jump over a whole list if it’s the next thing in the way.#2015-11-3020:10jaen@cfleming: yep, generated project.clj hack. So basically if I emit this attribute - https://github.com/technomancy/leiningen/blob/master/sample.project.clj#L119 - in the generated project.clj Cursive should just understand that and should look in my docker cache instead of ~/.m2, yes?#2015-11-3020:10cfleming@jaen: Well, it will look in the local-m2 directory inside your project.#2015-11-3020:12cjmurphyIDEA -> file -> Settings -> Keymap -> Clojure Keybindings#2015-11-3020:12cjmurphyI don't see the word 'Structural' there.#2015-11-3020:13cfleming@cjmurphy: Try Settings->Keymap, and then searching for Move Forward/Move Backward#2015-11-3020:18jaen@cfleming: yup, the paths appear to point to the docker cache directory now that I added this key; thanks!#2015-11-3020:19cfleming@jaen: Nice!#2015-11-3020:27cjmurphyThose re-bindings take over some other keys and the editor becomes a pretty big 'jumper' (for instance right across parens, from '( all the way to ')). I think this will be better however. Was annoying to have to slam so many right keys just to get past a-name, esp when coming from Java where I think variables are jumped over OOTB.#2015-11-3020:46cfleming@cjmurphy: You shouldn’t have to worry about conflicts - Cursive will use its actions when editing Clojure, but the other actions will continue to work in other contexts (i.e. Java)#2015-12-0110:32squestHi all! I’m running a test that runs all tests in all test namespaces, but now I don’t know how to find in which namespace(s) the failure is simple_smile how can I do this in Cursive?#2015-12-0112:22ricardoHey @cfleming, just wanted to give you props for Cursive having better refactoring support than Swift 2 gets on either AppCode (limited, it seems) or XCode (none).#2015-12-0112:26ricardo@squest: Not sure I understand the question. Are you using clojure.test? Don’t you get the name of the namespace/test on the report?#2015-12-0112:29squest@ricardo: yes I am, and that’s the problem, this is my first time using clojure.test in Cursive, and I don’t know how to get the report when I’m running ‘Run all tests in this namespace’… the problem is I do that in a namespace that runs other tests in all namespaces#2015-12-0112:33ricardo@squest: Have you seen this? https://cursiveclojure.com/userguide/testing.html Don’t you get the failures shown like that?#2015-12-0112:35ricardoI’m assuming you mean running them by Tools > REPL > Run tests in current NS in REPL#2015-12-0112:38squest@ricardo: yes I did, and the problem is that I have an ugly function in one test namespace that runs all other test (I’m using ss-component, so I need to start the system)… now the report is just “runs 32 tests with 240 assertions…” and no mention of which tests that produced them#2015-12-0112:38ricardoAcknowledged. Haven’t run into the single-ugly-function scenario myself, sorry.#2015-12-0112:38squestI guess it’s my test problem then and nothing to do with Cursive#2015-12-0112:39squestThanks anyway @ricardo#2015-12-0112:41ricardoNo prob.#2015-12-0114:20pupenoHello.#2015-12-0114:20pupenoI’m going to be representing Cursive at a panel in Clojure Exchange.#2015-12-0114:21pupenoFor that I need to make a 1 minute video showing the killer features of it. Any recommendations? @cfleming?#2015-12-0118:27roelofhow to solve this one : Could not find template compojure on the classpath.#2015-12-0118:28roelofI tried to make a new app with as template compojure as the book web development with clojure says#2015-12-0118:32roelofalso chancing it to compojure-app does not work , i stil see almost the same error message#2015-12-0121:30cfleming@ricardo: Thanks! I’m hoping to improve the refactoring considerably soon.#2015-12-0121:31cfleming@squest: So you have one is test that calls a bunch of functions that perform other tests?#2015-12-0121:32cfleming@pupeno: That sounds great, thanks for representing Cursive! Let me make a list and get back to you.#2015-12-0121:33squest@cfleming: no, it’s a function that calls all my tests, I did it because I need use-fixtures to start/stop system before all tests run#2015-12-0121:34cfleming@roelof: That doesn’t sound like a Cursive problem, it sounds like your app is not set up correctly. If you believe it is a Cursive problem, can you send a reproduction step (i.e. I created a new app with this command) and I’ll look at it.#2015-12-0121:34cfleming@squest: Hmm, I see. I use fixtures in the Cursive tests, but I set up and tear down the environment in each namespace.#2015-12-0121:36cfleming@squest: Could you make a small project with two test nses showing how you’re doing it, and I’ll investigate to see if there’s a way to make it work?#2015-12-0121:36cflemingThat’s assuming your project isn’t OSS and I can just look at it, of course.#2015-12-0121:38squest@cfleming: Well, I could do that I suppose, but will probably do this tomorrow since it’s already 4 am my time now simple_smile#2015-12-0121:39cfleming@squest: No rush, it will take me some time to look at it properly anyway, unless it has an easy solution. Whenever you’re ready simple_smile#2015-12-0121:41squest@cfleming: OK… Thanks!#2015-12-0122:20roelof@cfleming: Start up Cursive then choose for a leiningen project and press next. In the next screen give the project a name and enter in template compure-app. Then press finisch#2015-12-0122:29cfleming@roelof: When I do that I actually get an error: Could not find template compojure-app on the classpath.#2015-12-0122:31cflemingIt looks like there’s some problem creating leiningen projects from templates.#2015-12-0122:32cfleming@roelof: Do you see that error?#2015-12-0122:34roelof@cfleming: yes, I see that error#2015-12-0122:34cflemingOk, then the problem I think is that the project is not created properly.#2015-12-0122:34cflemingI’ll investigate that.#2015-12-0122:35roelofoke, im going to sleep it's almost midnight here#2015-12-0122:36cflemingOk#2015-12-0123:53pupeno@cfleming: the video was due earlier today, so I went with this: https://carouselapps.wistia.com/medias/2b1h8hg80n#2015-12-0123:56cfleming@pupeno: Looks great! How did you record the video?#2015-12-0200:04cfleming@roelof: That bug is fixed in the next release.#2015-12-0200:08pupenocfleming: using screenflow. I’m really liking it. Much better for my workflow than quicktime/imove/final cut pro#2015-12-0200:08pupenoI made a few videos with it: https://carouselapps.wistia.com/projects/3bcul8yrir#2015-12-0200:08cflemingYeah, I see a lot of people recommending it#2015-12-0200:09cflemingNice, I’ll take a look#2015-12-0200:14pupenoThe tour of Ninja Tools will be officially published tomorrow in our web site (https://carouselapps.com)#2015-12-0200:23cflemingThat looks really interesting, I’ll try to make some time to watch it.#2015-12-0201:57balduncle@cfleming: if I’m attempting to start my own company and I’m the only one in the company is it acceptable to purchase an individual license or should I go with commercial?#2015-12-0201:58cfleming@balduncle: An individual one is ok in those circumstances, as long as it’s not the company paying for it. Often people buy licences for IntelliJ and the like when they’re the only one in their office using it - that’s fine as long as the company doesn’t pay.#2015-12-0201:59cflemingObviously if the company is just you, it’s kind of moot whose money it is simple_smile#2015-12-0201:59baldunclesimple_smile Okay. Thanks.#2015-12-0203:26danielcompton@cfleming: Jetbrains have the same policy, is that actually enforceable, or is that just what they’d prefer you to do?#2015-12-0203:27cfleming@danielcompton: Well, for some value of enforceable - it’s violating the terms of the EULA if you don’t do that.#2015-12-0203:27cflemingWhich legally means you can’t use the software.#2015-12-0203:27cflemingBut there’s no technical means to validate compliance, no.#2015-12-0203:28danielcomptonsure, I wondered if you could put those kinds of terms in a EULA#2015-12-0203:28danielcomptonI guess you can put whatever you like in there#2015-12-0203:29cflemingYup, they have it in theirs and I’ve put it in mine.#2015-12-0203:29cflemingYeah, whether it’s legally enforceable in all jurisdictions is another matter.#2015-12-0203:29cflemingBut my approach is basically “please don’t do that”.#2015-12-0203:30danielcomptonis there a copy of the cursive license somewhere?#2015-12-0203:30cflemingNot yet, there will be when the 1.0 is out. It’s getting a final review right now.#2015-12-0203:30cflemingI hope.#2015-12-0206:06roelof@cfleming: thanks, any idea when the next release will be ?#2015-12-0207:43cfleming@roelof: Probably Friday. In the meantime, the workaround would be to create the project on the command line and import it.#2015-12-0208:01roelofoke, no problem, This project do not have a dead-line so I can wait#2015-12-0208:02roelofThen I could spend more time with 4clojure and the brave book#2015-12-0214:37squest@cfleming: Hi Colin, I’ve been thinking about what you said last night re: setup and tear-down the environment in each ns, I think that’s the way I should go… so I think I will refactor my tests around this idea. It’s much better way anyway, since this way things will be simpler and much easier to simulate only certain parts of the app.#2015-12-0214:37squestThanks for the idea#2015-12-0215:04jaenIs not being able to set breakpoints inside protocol methods a limitation the can be lifted in the future, or?#2015-12-0215:17timgilbertI've been trying out https://shaunlebron.github.io/parinfer/ in Atom and I really like it. Any chance this could be implemented for Cursive (by @cfleming or somebody else)?#2015-12-0215:53ericstewart@timgilbert: I see that there is a ticket already for parinfer functionality and some discussion there: https://github.com/cursiveclojure/cursive/issues/1155#2015-12-0216:01timgilbertOh, cool. Didn't realize there was a github tracker for Clojure. Thanks!#2015-12-0318:34tony.kay@cfleming: OMG...I just jumped to a thing that is defined by Om defui! Not sure when that started working, but love it. Thanks!#2015-12-0318:41rarous@cfleming: Hi Colin, do you have any update about WebStorm support?#2015-12-0318:44roelof@tony.kay: what is Om defui ? I know Om#2015-12-0318:44tony.kayOm next#2015-12-0318:44tony.kaydefui is the new macro for making UI components#2015-12-0318:44roelofoke, thanks#2015-12-0318:45roelofAny tutorial for Om next avaible then ? specially for a super beginner in Om ?#2015-12-0318:45tony.kayfunny you should ask that. I'm actively building one.#2015-12-0318:51roelofoke, I will look at it#2015-12-0318:51roelofand hopefully I learn a lot#2015-12-0318:52cfleming@tony.kay: That was added in the last build - glad you’re liking it!#2015-12-0318:53cfleming@rarous: No, I’ll ping JetBrains and see if they can give me an update.#2015-12-0318:59cfleming@timgilbert: I’m definitely planning to try parinfer soon. It’s one of the most commented issues so I’ll get to it as soon as I get over my current hump.#2015-12-0319:13timgilbertFantastic!#2015-12-0319:26rarous@cfleming: thanks simple_smile#2015-12-0323:35kennyHow do you connect to a boot cljs repl in the REPL pane?#2015-12-0323:43cfleming@kenny: That’s a good question actually, I’m not sure. You could ask in #C053K90BR, I know there are Cursive users in there.#2015-12-0323:44cflemingI’m not sure what the state of the art is, I haven’t implemented native boot support in Cursive yet.#2015-12-0408:20jaen@kenny: you don't really connect to boot cljs repl. You connect to boot's clj repl and then run (adzerk.boot-cljs-repl/start-repl) from there and it switches the current repl to talk to the browser.#2015-12-0408:22jaen(things defined/refered from build.boot are visible from boot.user namespace boot cljs repl starts in, so you can define a convenience function that calls that and/or refer that var)#2015-12-0412:08rauhMinor annoyance: I keep getting a reflection warning for printStackTrace whenever I print a stacktrace#2015-12-0413:09cjmurphyIt would also be ideal if, when cursor is positioned at the end of a hyphenated name-like-this, Cntl Backspace removed the whole thing in one go. Similar to the turtling issue (now fixed but only with key re-binding).#2015-12-0414:44Alex Miller (Clojure team)@rauh: why not just use the pst function?#2015-12-0414:44Alex Miller (Clojure team)https://clojuredocs.org/clojure.repl/pst#2015-12-0415:33roelof@cjmurphy: do you get a message when there is a new version of cursive ?#2015-12-0415:49cjmurphy@roelof I get nagged about new versions of IDEA. I'm not exactly sure what happens with plugins. I'm still on 14.1.5 of IDEA.#2015-12-0415:52roelofoke, I work on 15.0.1#2015-12-0415:53roelofI ask because you said that one of these days a new version of cursive will come out and I hope my template problem is solved#2015-12-0416:00rauh@alexmiller: It's when I use Cursive's own Print last exception function that I get the reflection warning.#2015-12-0416:01cjmurphyI did once try to get a REPL from within Cursive but gave up after an out of memory error. I can get a lein repl going from a windows console easily enough. On my 'to do list' is to have a REPL that comes up and is already in a particular namespace (where I do the 4 Clojure Koans). Items in my 'to do list' are sometimes represented as SO questions: https://stackoverflow.com/questions/33982533/clojure-boot-repl-in-a-particular-namespace#2015-12-0416:28Alex Miller (Clojure team)@rauh: gotcha, thx!#2015-12-0419:48kenny@jaen: I run cljs-repl and then boot repl -c and (start-repl) in the REPL. When I open the REPL pane in IntelliJ it is still Clojure. I can tell this by executing (+ 1 "1"). This would work in cljs and show a warning but in Clojure I just get a ClassCastException.#2015-12-0419:50jaenHm, interesting, I'll have to re-check, but I'm pretty sure Cursive was smart enough to change to cljs repl automatically#2015-12-0419:50kennyIs there some sort of configuration setting I need to set?#2015-12-0419:50jaenNone that I know of#2015-12-0419:51jaenIt Just Worked™ for me#2015-12-0419:51kennyWhere are you running boot repl?#2015-12-0419:54jaen
(deftask dev []

  (comp
    (watch)
    ...
    (bcr/cljs-repl)
    (bc/cljs ...)
    ...)

(defn cljs-repl! []
  (bcr/start-repl))
#2015-12-0419:54jaenAre the relevant parts of my build.boot#2015-12-0419:54jaenThen I just boot dev from a terminal.#2015-12-0419:55danielcompton@roelof: I think IntelliJ checks in the backgrounds for updates to plugins #2015-12-0419:55jaenAnd I have a remote REPL type run config added#2015-12-0419:55jaenWith Use Leiningen nREPL port selected#2015-12-0419:55jaenI run that#2015-12-0419:55jaenIt connects to the boot running in console#2015-12-0419:55jaenI type (cljs-repl!) there#2015-12-0419:56jaenAnd it just works#2015-12-0419:56jaenCursive recognizes it as a cljs REPL type automagically.#2015-12-0419:56jaenJust make sure it does connect#2015-12-0419:56jaenAnd you have a browser tab open on your cljs application#2015-12-0419:56jaen
Clojure 1.7.0
(cljs-repl!)
<< started Weasel server on ws://127.0.0.1:37381 >>
<< waiting for client to connect ... Connection is ws://localhost:37381
Writing boot_cljs_repl.cljs...
 connected! >>
To quit, type: :cljs/quit
=> nil
#2015-12-0419:57jaenIs how the Cursive REPL pane should look after connecting.#2015-12-0419:59kennyYou run the remote REPL first?#2015-12-0419:59kennyIf I run it first I just get
Error connecting to 127.0.0.1:37478 - class java.net.ConnectException: Connection refused
#2015-12-0419:59jaenYes, I run it first.#2015-12-0420:00jaenHm, interesting.#2015-12-0420:00kennyNothing is running - no boot repl, or cljs build.#2015-12-0420:01jaenOne thing off the top of my head that might cause it is you have a wrong .nrepl-port file generated.#2015-12-0420:01jaenAre you sure you are running only one REPL server?#2015-12-0420:01jaenErrors like those happened to me if I ran something that overwrote the file#2015-12-0420:03kennyCurrently only java process is IntelliJ#2015-12-0420:03jaenHm, interesting. Can you pastebin your build.boot and printscreen your run configurations?#2015-12-0420:04jaenI'm 100% positive this should work.#2015-12-0420:04kennybuild.boot https://pastebin.com/g0pfqBtH#2015-12-0420:06kennyRun configs: https://imgur.com/MrsH16j#2015-12-0420:09kennyI can do this: boot dev, boot repl -c, (cljs-repl) and I get a cljs-repl in the console but not in the REPL pane.#2015-12-0420:09jaenHm, honestly stumped, this looks good : |#2015-12-0420:10jaenAnother thing I remembered about such errors.#2015-12-0420:10jaenAre you 100% positively sure you are running the same project in Intellij and in the terminal?#2015-12-0420:10kennyYes. I am using the terminal inside IntelliJ#2015-12-0420:11jaenHmpfh. Can you try a normal terminal just to be sure?#2015-12-0420:11kennySure#2015-12-0420:11jaenI've never tried the one inside Intellij, so not sure if that may influence something.#2015-12-0420:13kennyWhat URL do I connect to in the browser? When running boot dev it does not serve my project.#2015-12-0420:14jaenAh, right, then do copy over your serve task into the comp.#2015-12-0420:14jaenI glossed over that, sorry.#2015-12-0420:17kennyStuck at:
started Weasel server on  >>
<< waiting for client to connect ... Connection is 
Writing boot_cljs_repl.cljs...
#2015-12-0420:20jaenTry reloading the tab#2015-12-0420:20jaenThat usually helps if it doesn't connect right away#2015-12-0420:26kennyI can get the cljs repl in the console but it just wont connect in the REPL panel.#2015-12-0420:33jaenWell, I suppose that's something to bring up in #C053K90BR; what I described always worked for me with boot+Cursive.#2015-12-0420:34jaenI think boot hanging at Writing boot_cljs_repl.cljs... meant something, but can't remember what it was.#2015-12-0420:34kennyHere is a screencast of what is happening: https://youtu.be/5rA_wP7PZEI#2015-12-0420:41jaen@kenny: but it looks like it's working#2015-12-0420:41jaenWhat's the problem?#2015-12-0420:42kennyIt is not a cljs repl in the cursive REPL panel.#2015-12-0420:42jaenAh#2015-12-0420:42jaenBut you're not doing#2015-12-0420:42jaen(start-repl) in Cursive REPL pane as well#2015-12-0420:43jaenOnly in the terminal
#2015-12-0420:43kennyRighttt#2015-12-0420:43kennyYeah that did it. Thank you! There should be better documentation on that simple_smile#2015-12-0420:45jaenHah, I suppose there could be. I don't remember it being that much of a problem to get it working for me, but I agree you have to figure it out looking at a few separate things, which is less than ideal.#2015-12-0420:47jaen@kenny: by the by, I suggest you add
[org.clojure/clojure "1.7.0" :scope "provided"] ; or whichever version you're using
[org.clojure/clojurescript "1.7.170"]
should probably solve the version conflicts.
#2015-12-0420:47jaenI remember this might cause some problems#2015-12-0420:49kennyDefinitely got rid of some of them simple_smile#2015-12-0420:51jaenMost of those are from clojurescript compiler; not sure about those that you have left, but it's usually a good idea to be clean of those if possible. I've had some code break due to that once.#2015-12-0420:51jaenAnyway, glad the issue with REPL is solved.#2015-12-0420:59kennySame! They are all warnings and I haven't had a problem with them yet. Probably worth investing some time to figure them out though.#2015-12-0511:35roelof@cjmurphy: Still the same error messag here when I want to use the compjure-app template#2015-12-0511:35roelof
12:32:47 Dependency resolution error
         Error synchronising guestbook:
         Failed to collect dependencies for [#object[org.sonatype.aether.graph.Dependency 0xdbaeb2 "compujure-app:lein-template:jar:RELEASE (compile)"]]
12:32:47 Leiningen aborted: exit code 1: Could not find template compujure-app on the classpath.
 (show balloon)
12:32:47 Error creating project: No project file found 
#2015-12-0517:56cjmurphy@roelof#2015-12-0518:03cjmurphyCompojure is difficult to spell correctly - perhaps that's part of the problem. I've never used it. I recommend developing your app 'client-side-only' for the time being - just use an atom for state. Also your post does not seem to be related to Cursive in any way!#2015-12-0518:16roelofoke, thanks#2015-12-0519:34cfleming@roelof: That should be fixed in the latest build, 0.1.72, out now#2015-12-0520:03roelofEverything works well. I was a typo from me#2015-12-0703:45josh.hilldoes anyone know how to prevent cursive from re-opening last projects (Intellij15)#2015-12-0703:47josh.hill~/Library/Preferences/IntelliJIdea15/options/recentProjects.xml simple_smile#2015-12-0704:11danielcompton@josh.hill: close the projects before you quite IntelliJ#2015-12-0704:11josh.hill@danielcompton: intellij had crashed and each attempt to open froze it#2015-12-0704:12josh.hillremoving the offending project from recentProjects.xml fixed it#2015-12-0720:10roelofWhen I make a new configuration with ring server I see a message that ring is not a task . How to solve this ?#2015-12-0720:29cfleming@roelof: I need more information. What sort of configuration? Where do you see the message? What is the exact message that you’re seeing?#2015-12-0720:53roelofI did make a new leiningen from run -> Edit configuration. There I add ring server at the arguments and press apply and oke. I see this message
"C:\Program Files\Java\jdk1.8.0_60\bin\java" -Dfile.encoding=UTF-8 -Dmaven.wagon.http.ssl.easy=false -Dmaven.wagon.rto=10000 -Didea.launcher.port=7532 "-Didea.launcher.bin.path=C:\Program Files (x86)\JetBrains\IntelliJ IDEA Community Edition 15.0.1\bin" -classpath "C:\Users\rwobb\.lein\self-installs\leiningen-2.5.3-standalone.jar;C:\Program Files (x86)\JetBrains\IntelliJ IDEA Community Edition 15.0.1\lib\idea_rt.jar" com.intellij.rt.execution.application.AppMain clojure.main -m leiningen.core.main ring server
'ring' is not a task. See 'lein help'.

Did you mean this?
         run

Process finished with exit code 1
#2015-12-0720:54roelofI see on it the output screen of make#2015-12-0720:54roelofSorry , I forget to say I do this on a blank project made with the template luminus#2015-12-0720:55roelofWhen I do lein dep from the leiningen screen nothing change#2015-12-0720:55roelof@cfleming: enough info ?#2015-12-0720:57cfleming@roelof: Does lein ring server work on the command line in that project directory?#2015-12-0721:06cflemingIf it does, let me know the command you used to create the project and I’ll try to reproduce here.#2015-12-0721:13roelofI did it from the file -> new Project. Leiningen and on the next screen I added luminus as template and gave it the name hipstr. I try to follow the web Essentials clojure book#2015-12-0721:14roelofwhen I do lein ring server from the prompt I see the same error#2015-12-0721:38cfleming@roelof: If you get the same error from the prompt, then your project is not set up to use ring.#2015-12-0721:39cflemingI don’t know why that would be, but it’s not a Cursive specific problem.#2015-12-0721:39cflemingGenerally, if you have an issue with lein, it’s a good idea to check whether lein on the command line has the same problem.#2015-12-0721:39cflemingIf it does, it’s not an issue with Cursive, it’s either a lein bug or a problem in your project.#2015-12-0721:40roelofoke, I ask for help on the clojure channel#2015-12-0721:40roelofthanks for the help#2015-12-0721:40cflemingNo problem#2015-12-0821:59noonianI’m a total IntelliJ/Cursive noob. Is it possible to define custom indentation for macros used in cljs files (specifically om.next/defui)?#2015-12-0822:00cfleming@noonian: which version of Cursive are you on? Very recent versions support defui and indent it correctly.#2015-12-0822:01cflemingYou can see that in Settings->Plugins#2015-12-0822:01noonian@cfleming: I’m on 0.1.72-15, just installed IDEA 15 CE and the non development version of cursive#2015-12-0822:02cflemingInteresting, how are you seeing defui indented? Can you send a screenshot?#2015-12-0822:03noonianWell, I just opened a file that was already indented correctly, but emacs tab is treating it like a normal function it looks like#2015-12-0822:03noonianbut yea, 1 sec#2015-12-0822:04cflemingHmm, ok, there’s sometimes a difference between what reformatting the file does and what emacs tab does, which is annoying. There’s a bug there somewhere I haven’t managed to find.#2015-12-0822:05noonianHow can I test normal indentation? hitting enter form the top line puts the cursor at the same spot as emacs tab indents it to#2015-12-0822:05cflemingOk, see how defui is highlighted in yellow? That means that Cursive can’t resolve it, which means that it doesn’t know what the form is and it won’t indent it properly (or do anything else with it either).#2015-12-0822:05cflemingHow did you set this project up?#2015-12-0822:06noonianI was trying to follow the “Importing an existing Leiningen project” instructions#2015-12-0822:06cflemingOk, can you open your leiningen toolwindow (View->Toolwindows->Leiningen) and see if your project is registered there?#2015-12-0822:07cflemingIf it isn’t, find the project.clj in the project window, right click, add as leiningen project.#2015-12-0822:07noonianyes it is, and an om snapshot is also registered, maybe because I have a symlink in checkouts of my lein project?#2015-12-0822:07noonianmaybe thats messing it up#2015-12-0822:09cflemingCould be, could you try removing the snapshot for a moment to see if that helps?#2015-12-0822:09nooniank, removed the snapshots and restarted, hey its working now!#2015-12-0822:09cflemingRemove the symlink, and then hit the refresh button in the lein toolwindow.#2015-12-0822:09cflemingOk.#2015-12-0822:09noonian@cfleming: thanks for your help!#2015-12-0822:12cfleming@noonian: No worries, sorry for the hassle. I’ve filed https://github.com/cursiveclojure/cursive/issues/1188 so I don’t forget about it.#2015-12-0822:12cflemingI’ll link to the log here when it appears.#2015-12-0822:14noonianOk, well I added back the checkouts and symlink and restarted and its still working so it may have been my system initializing or something or possibly because I had the checkout when I created the project from existing sources.#2015-12-0822:31cfleming@noonian: Bizarre. I’ll look at that issue and see if I can reproduce, if not I’ll put it down to planet alignment.#2015-12-0822:31noonianhehe, sounds good#2015-12-0823:57rantingbobIs that generally the process by the way. I have a feature request, pretty minor I think (it might not be). Do we post them on GitHub?#2015-12-0900:00cfleming@rantingbob: Feel free to rant here initially, and if there isn’t already a feature request then either you or I can add an issue.#2015-12-0900:00rantingbobSo...I have one thing that keeps making me want to go back to Sublime (I'm a newbie).#2015-12-0900:01rantingbobI'd ilke ther eto be a shortcut to switch to the repl, and a shortcut to switch between panels when you have two files open at once#2015-12-0900:01rantingbobNow...heres the thing...I don't know if that's an IntelliJ limitation#2015-12-0900:01rantingbobor...have the REPL always have a single shortcut in the switcher#2015-12-0900:02rantingbobI know it probably seems daft#2015-12-0900:04jaenWell, there's a ctrl+tab switcher, but I've found it fairly annoying.#2015-12-0900:05rantingbobSame...the repl tends to move, it won't swap files in two panels properly, and tends to open files I've recently closed if I just hit it without paying attention. In Sublime I'd just Cmd-1, Cmd-2 etc. or CMD-Arrow or what have you to quick switch#2015-12-0900:06rantingbobAs I say though...it's IntelliJ functionality, so I don't know that it's really Cursives job to fix it.#2015-12-0900:09jaenLike I said, I agree - it's not the most ergonomic thing ever and a shortcut for switching between a buffer and REPL could certainly be useful.#2015-12-0900:09cfleming@rantingbob: When you’re talking about panels, you’re talking about tabs in the REPL toolwindow?#2015-12-0900:10rantingbobsorry, panels wasn't the right word, buffers would have been a better choice#2015-12-0900:10cflemingOr tabs in the editor?#2015-12-0900:10rantingbobtabs in the editor#2015-12-0900:10rantingboba button to quick swap from the repl to the editor and vice versa#2015-12-0900:10cflemingSo ESC will always get you from the REPL back to the editor.#2015-12-0900:11cflemingIf you have a number assigned to the REPL toolwindow, Cmd-<number> will jump to the REPL, but that bit is not ideal.#2015-12-0900:11rantingboband ideally better switching behaviour between editor buffers, so if you have two side by side you can swap between them using them more reliably#2015-12-0900:11rantingbobThat would be fine...but the number in the switcher seems to change#2015-12-0900:11cflemingNo, I’m talking about the numbers assigned to the toolwindows. This is for jumping to the REPL.#2015-12-0900:11cflemingThere are two issues here - getting to the REPL and back, and getting between editors.#2015-12-0900:12rantingbobOhhh...see, this is where my noob is showing#2015-12-0900:12cflemingLet’s do the REPL first.#2015-12-0900:12cflemingSo, ESC always brings you back to the editor from the REPL.#2015-12-0900:12rantingboband cmd-num will get you to the repl#2015-12-0900:12rantingbobIs there a default for num?#2015-12-0900:13cflemingIf you go to View->Toolwindows, you’ll see the numbers assigned to the toolwindows. If there isn’t one assigned to the REPL toolwindow, you can assign it one in Settings->Keymap.#2015-12-0900:14cflemingThis command is not ideal, because it behaves slightly differently depending on whether the REPL toolwindow is currently open or not.#2015-12-0900:14cflemingI’m planning to add a new command which will, from an editor, open the REPL toolwindow, jump to it and focus the REPL editor.#2015-12-0900:15cflemingOne thing several people have requested is to be able to jump to the REPL output pane to cut and paste from there without the mouse.#2015-12-0900:15rantingbobThat sounds perfect, but thank you in the meantime#2015-12-0900:15cflemingSo this new command would jump to the REPL if you’re in an editor, and then toggle from the REPL editor to the REPL output.#2015-12-0900:15jaen@cfleming: oh, you can pin letters in ctrl+tab? Good to know.#2015-12-0900:15cflemingAnd ESC would always take you back to the editor.#2015-12-0900:15cflemingNow: editor tabs.#2015-12-0900:16cflemingSee Window->Editor Tabs for the various commands that are available there.#2015-12-0900:16cflemingHowever, see https://cursiveclojure.com/userguide/ui.html for my recommendation.#2015-12-0900:17cflemingJust get rid of the tabs altogether, your life will be better simple_smile#2015-12-0900:17rantingbobSo the thing that I actually want you're already working on, and the rest I just didn't know cos noob 😉 Thank you for your patience#2015-12-0900:17cflemingCmd-E shows recent files#2015-12-0900:17rantingbobI know this is probably not the done thing...but#2015-12-0900:17rantingbobWhen you eventually ship Cursive as it's own thing...if you think that's what the UI should be...you should ship it like that#2015-12-0900:18rantingbobI think anyway#2015-12-0900:18cflemingWell, it’s controversial - for total newbies, the toolwindows etc can actually help to find things.#2015-12-0900:19cflemingPlus I can’t reconfigure people’s UI for them in IntelliJ. When I make a standalone IDE, I’ll have more control there, and I can ask the user at first launch what they want.#2015-12-0900:19cflemingWhich will also fix the nightmare that is keybindings.#2015-12-0900:19rantingbobFor the record, I do mean when ou ship the standalone IDE#2015-12-0900:19cflemingBTW I also have some sublime-like keybindings submitted by a user if you’re interested.#2015-12-0900:19cflemingJust got them the other day, I haven’t had time to publish them yet.#2015-12-0900:19rantingbobTBH, I'm pretty comfortable with your keybindings#2015-12-0900:20cflemingOk, cool.#2015-12-0900:20rantingbobits mostly just switching betwen buffers (I like to have tests and code open side-by-side)#2015-12-0900:20rantingboband I want to be able to quick switch to the repl#2015-12-0900:20rantingbobthat's about it#2015-12-0900:20rantingbobI don't know enough Clojure to really stress anything else in the system simple_smile#2015-12-0900:21cflemingOk. Try those options, and let me know if you’re still having problems.#2015-12-0900:21rantingbobCool. Thank you.#2015-12-0900:21rantingbobOh, I also watched your video on using grammars to improve Clojure errors. It was very interesting.#2015-12-0900:21cflemingThanks!#2015-12-0900:22cflemingWith a bit of luck some or all of that might make it into Clojure proper.#2015-12-0900:22rantingbobIs it in discussion? Or are you hinting that you're already implementing it 😉#2015-12-0900:24cflemingWell, there’s interest but I haven’t had time to work up anything more than a basic demo, so don’t hold your breath.#2015-12-0900:24cflemingAnd it’s actually quite hard, and might not even be feasible - lots more investigation required.#2015-12-0900:25rantingbobI can't even begin to imagine#2015-12-0900:28jaen@cfleming: so if I understood right if I set key for Other -> REPL in Settings->Keymap it should be reflected in the ctrl+tab switcher?#2015-12-0901:06danielcompton@rantingbob: are you thinking about https://stackoverflow.com/questions/25667005/how-to-switch-only-between-editor-windows-not-tabs-in-split-mode#2015-12-0901:07rantingbobI am...thank you#2015-12-0901:22cfleming@jaen: I’m not sure about the ctrl-tab switcher, but if you set it to, say, CMD-9, then you can just use that key to jump right to the REPL.#2015-12-0910:27jaenRight, it doesn't seem to.#2015-12-0910:29jaen@cfleming: I've just started getting stack overflow when trying to open one file in my project. Does this stacktrace tell you anything? - https://gist.github.com/jaen/0b732825ae6f4262b870#2015-12-0910:31jaenI can't open it in Cursive due to that#2015-12-0910:38jaenI think this might have been caused by having a (defrecrod Repository ...) and referring a protocol of the same name from another namespace.#2015-12-0910:38jaenThis probably caused it to loop while trying to resolve the symbol#2015-12-0917:50hlshipHas anyone been seeing an oddness in IntelliJ where modal dialogs don't respond to mouse clicks? This started fairly recently. I've tried disabling virtually every plugin and it still seems to be happening. I don't see anything in the idea.log. Kind of at a loss.#2015-12-0917:51hlshipFortunately, key presses still work, so IntelliJ is trying to make me break my mouse addiction.#2015-12-0919:04danielcomptonIs there a way to search all of my dependencies code?#2015-12-0919:05danielcomptonAh yes, search with custom scope Project And Libraries#2015-12-0920:11cfleming@jaen: Could be - if you file an issue I’ll take a look.#2015-12-0920:11cfleming@hlship: I haven’t seen that, no. You’re on v15 now, right?#2015-12-0920:13jaen@cfleming: sure, if I can reproduce that with a minimal test case later I'll file an issue. That would probably be more convenient for you than getting the whole project as-is.#2015-12-0920:13cfleming@jaen: Sure, but if the project is publicly visible that’s fine too, as long as I know which file to open.#2015-12-0920:14jaenI could make it publicly visible I guess, they ain't gonna fail me for that, I think. Give me a second.#2015-12-0920:21jaen@cfleming: made it public for you to see. That's the offending line - https://gitlab.com/jaen/thesis-code/blob/cursive-issue/src/scrabble/backend/components/repository.clj#L23#2015-12-0920:21jaenif it's changed to a namespaced form repository/Repository everything's in order. When I remove the namespace part - stack overflow.#2015-12-0920:22cfleming@jaen: Ok, thanks, I’ll try to take a look today.#2015-12-0920:23jaen@cfleming: I don't remember if asked about that before or not, but is not being able to debug protocol method bodies a fundamental limitation or something that can be fixed?#2015-12-0920:24cflemingOh - actually, I think you may have asked that and I ignored you - sorry#2015-12-0920:24cflemingThe issue is that it’s difficult-to-impossible for Cursive to determine for a particular piece of code, which class it’s associated with.#2015-12-0920:25cflemingJDI assumes that you’ll be able to know this and uses the class in a lot of its APIs.#2015-12-0920:25cflemingCurrently the only thing I can do is use the namespace, and say “the class is one of my.funky.ns.*"#2015-12-0920:26cflemingThe issue there is that classes defined using reify et al don’t match that pattern. I suspect it’s probably fixable, but I haven’t looked into it yet.#2015-12-0920:26cflemingAn issue would be welcome for that too.#2015-12-0920:29jaenI assume defrecord with protocols falls under et all then, yes? Sure, I'll file an issue when I have time. It's not a super urgent thing after all, was just curious what was the underlying cause of it not working.#2015-12-0920:29cflemingYeah, it’s because of the way that the classes are generated.#2015-12-0920:30cflemingmy.funky.ns/my-fn generates a class my.funky.ns$my-fn IIRC, whereas my.funky.ns.MyRecord generates a class with exactly that name.#2015-12-0920:31cflemingI think the debugger searches for my.funky.ns$*, which doesn’t catch records etc#2015-12-0920:31cflemingIf I drop the $, my.funky.ns* would catch my.funky.ns_we_dont_want#2015-12-0920:33jaenYeah, I can see the problem#2015-12-0920:35hlship@cfleming: still on 14.1, maybe time to upgrade#2015-12-0920:39jaen@cfleming: since I'm not sure if you use but, and the repo doesn't include the generated project.clj I've put it in a gist for your ceonvenience - https://gist.github.com/jaen/a5ea75889d9cd362a00a#2015-12-0920:40cfleming@jaen: Oh right it’s a boot project, right?#2015-12-0920:42jaenYes#2015-12-0923:06cfleming@jaen: https://github.com/cursiveclojure/cursive/issues/1190, I’ve cloned that repo if you want to make it private again.#2015-12-0923:12jaen@cfleming: thanks! Let me know if you need anything more.#2015-12-1003:02rantingbob@cfleming: Thanks for the advice yesterday by the way....on another question...is there a way to get the repl to launch when you connect to a project?#2015-12-1003:05cfleming@rantingbob: You mean to start it automatically? No, there isn’t right now.#2015-12-1003:05rantingbobI noticed that I'm repeating the same actions at every launch. Open REPL window, launch repl.#2015-12-1003:07cflemingYeah, I can see that. Issue welcome!#2015-12-1003:08cfleming(one thing - launching the REPL will open the window)#2015-12-1003:08rantingbobNoted. Thank you#2015-12-1003:09rantingbobI'm wondering if there is an instance when people wouldn't first launch a repl when they launch...or if its so common it should probably be default behaviour. As I said yesterday, I don't really know CLojure well enough to be representative. I'm still very much a learner#2015-12-1003:29danielcompton@rantingbob: IntelliJ tends to be doing a lot of work when it starts up, so adding a REPL in there would be slow#2015-12-1003:31rantingbob@danielcompton: Is it really that different though....as I say, I'm launching it as soon as I open the project anyway. As long as the GUI remains responsive and you get some feedback (repl window opens says connecting or some such) does it matter?#2015-12-1003:32rantingbobCurrently there is a minor inconvenience so as to appear faster at launch...or thats how I currently see it#2015-12-1003:32danielcomptonI see what you mean, I have it bound to Command+R so it’s not really a big deal in practice#2015-12-1003:32rantingbobThe REPL window, or the run config?#2015-12-1003:34danielcomptonAnd there’s lots of times when you want an external REPL/no REPL,e.t.c.#2015-12-1003:34danielcomptonRun config, which opens the REPL too#2015-12-1003:34rantingbobThat I don't doubt, as I said above...I'm so very new to Clojure I might be spouting nonsense#2015-12-1007:36timgilbertHey, quick bug report: I upgraded one of my machines from IntelliJ 14 to 15, and it prompted me to install Cursive for .clj files, but it seemed to pick up the intellij-14 version of Cursive. Once I added the intellij-15 repository per https://cursiveclojure.com/userguide/ I was able to install the 15 version of cursive and then everything worked fine. I’m AFK for a bit but I’ll check in later#2015-12-1009:13cfleming@stijn: Yeah, I’m working on that#2015-12-1009:13stijnokay simple_smile#2015-12-1009:13sveriHi, I just installed intellij 15 and registered cursive with a non-commercial license. Now whenever want to enable that license the OK button never get's active, but there is no error showen either.#2015-12-1009:14stijn@cfleming: the rest of the registration process went smoothly#2015-12-1009:14cflemingYou can ignore it for now because the new update is at the JetBrains repo, see: https://cursive-ide.com/articles/cursive-1.0.html#2015-12-1009:14cfleming@sveri: Yes, someone else reported that too - I’ll investigate.#2015-12-1009:15cflemingYou can use the 30-day eval period for now and enter the licence later when I get that sorted out.#2015-12-1009:15sveri@cfleming: Ok, thank you very much simple_smile#2015-12-1009:15cflemingJust in case anyone didn’t notice, Cursive 1.0 is out!#2015-12-1009:15cflemingAll details are here: https://cursive-ide.com/articles/cursive-1.0.html#2015-12-1009:16cflemingPlease read that, there are some important changes to where things live.#2015-12-1009:16stijnCongratulations! simple_smile#2015-12-1009:16cflemingThanks @stijn!#2015-12-1009:16cflemingIt’s been a ton of work to get that all done.#2015-12-1009:17cfleming@sveri: Which OS are you on?#2015-12-1009:17sveriWindows 7#2015-12-1009:17sveri64bit if that matters#2015-12-1009:18sverijdk 8: Java(TM) SE Runtime Environment (build 1.8.0_65-b17)#2015-12-1009:22nikolap@cfleming: congrats on the release! I have the same issue as @sveri with my commercial license (Debian unstable, OpenJDK Runtime Environment (build 1.8.0_66-internal-b01)).#2015-12-1009:23nikolapI've opted into the evaluation period for now, but if there's anything I can do to help debug this, let me know.#2015-12-1009:23cfleming@nikolap: Thanks!#2015-12-1009:23cflemingThanks, I will - I’ll take a look at that now.#2015-12-1009:24nikolap(it seems it properly detects the license -- if I remove a single character anywhere, it says "Invalid Licence Certificate", but the OK button stays disabled no matter what)#2015-12-1009:26cfleming@nikolap: Which version of IntelliJ are you running?#2015-12-1009:26nikolap@cfleming: Community v15.0.1#2015-12-1009:26sverisame for me#2015-12-1009:27cflemingOk, I have a theory about the problem, I’ll make a dev build now, if one of you could test it that would be great.#2015-12-1009:28nikolapthat just means installing the plugin from disk, right? I'll gladly do that.#2015-12-1009:38cfleming@nikolap: Right - could you grab http://colinfleming.net/licence/cursive-1.0.0-15.zip and see if that works better?#2015-12-1009:38cflemingSettings-&gt;Plugins-&gt;Install from Disk#2015-12-1009:40cfleming@sveri: You could try that too if you’re keen#2015-12-1009:40nikolap@cfleming: yep, the OK button is enabled now!#2015-12-1009:40nikolapshould I register with this version then?#2015-12-1009:40cflemingOnce you have it installed, you… oh great#2015-12-1009:40cflemingYeah#2015-12-1009:40sveri@cfleming: works for me!#2015-12-1009:40cflemingThis is exactly the same as the other build just with that bug fixed.#2015-12-1009:40cflemingNice, thanks guys#2015-12-1009:40sverithanks for the quick fix#2015-12-1009:40cflemingLooks like I’d better do a build with this.#2015-12-1009:41sveriyea, more ppl will find that one surely#2015-12-1009:41cflemingNo doubt.#2015-12-1009:42nikolap@cfleming: despite installing this from disk, I'll keep getting automatic updates from the channel, right?#2015-12-1009:43cfleming@nikolap: Yes, you will.#2015-12-1009:43nikolapamazing. I've successfully activated the license it seems simple_smile thanks for the quick fix!#2015-12-1009:43cflemingNo problem, thanks for the help!#2015-12-1009:44puzzlerAny advantage to using IntelliJ Ultimate edition vs Community edition if I'm only using it for Cursive?#2015-12-1009:45cfleming@puzzler: No, the main advantage would be if you were working with web tech as well, JS/HTML etc#2015-12-1009:45cflemingIf it’s just clj/cljs, it’s the same.#2015-12-1009:45cfleming(and Java/XML etc)#2015-12-1009:50puzzlerSo the additional JS/HTML support doesn't really alter the clojurescript experience?#2015-12-1009:52cfleming@puzzler: No, Cursive has its own JS indexing support which doesn’t rely on the JetBrains JS support#2015-12-1009:52cflemingIf you’re editing JS it doesn’t help you, but if you’re only consuming JS from CLJS there’s basically no difference.#2015-12-1010:23cflemingI just pushed 1.1.0, which should fix the ok button problem.#2015-12-1010:35d-t-wCongrats colin. Is the start of turning Nelson into a tech hub?#2015-12-1010:41cfleming@d-t-w: Thanks! I’ll be opening my own Facebook style office before you know it.#2015-12-1010:46sveri@cfleming: It's nice that there is a non commercial license available. Is that something that you decided or did Jetbrains decide to do so?#2015-12-1010:47cfleming@sveri: No, I’m totally unaffiliated with JetBrains. I’d like Cursive to be widely available for things like OSS and academic work, hopefully not too many people will take advantage of it.#2015-12-1010:49sveriThank you, really. I just use it for closp and trying things out, never intended to make money out of it until now. So I really appreciate that move. And really, cursive is godsend for me, given the fact that emacs does everything well but being an editor 😄#2015-12-1010:49cflemingNo problem, I’m just glad that people enjoy using it and that more of them will be able to!#2015-12-1012:08jeremys@cfleming: Congrats on the 1.0 of cursive#2015-12-1012:08cflemingThanks @jeremys!#2015-12-1012:34jaju@cfleming: Congratulations! simple_smile#2015-12-1012:53roelof@cfleming: congrats#2015-12-1013:13sveri@cfleming: Not sure if this was your update or the fact that I installed the plugin from disk, but all of a sudden cursive seems to be broken, especially when trying to add a run configuration#2015-12-1013:13sveriThe screen is foobar and I see this exceptions in the log#2015-12-1017:04ricardoTime to join the release congrats chrous @cfleming I was just doing some Faraday tests on IntelliJ and it’s amazing how much the pretty printing helps.#2015-12-1017:12rantingbob@cfleming: Congrats on the release 😄 I hope its a roaring success#2015-12-1017:21markmandelFinally saw that Cursive went 1.0! Nice work @cfleming#2015-12-1019:12cflemingThanks everyone!#2015-12-1019:12cfleming@sveri: Lots going on, I’ll take a look at that in a bit.#2015-12-1019:29sveri@cfleming: thank you, take your time. I use a normal repl inbetween#2015-12-1020:20pupenoHello.#2015-12-1020:20pupenoDoes Cursive detect checkout libs now?#2015-12-1020:20danielcompton@pupeno: it has for a long time#2015-12-1020:20pupenoOh… I somehow didn’t trigger it before.#2015-12-1020:21danielcompton18 months +#2015-12-1021:50michaelrcfleming: i've been tracking changes in the eap page so far.. where would be the new location of the changelog now?#2015-12-1021:55cfleming@michaelr: Good question actually, I haven’t thought that through.#2015-12-1021:55cflemingI’ll get a changelog up somewhere.#2015-12-1021:55michaelrgreat#2015-12-1021:55michaelrthanks#2015-12-1218:36rantingbobI just saw the "Thread Form" function...very cool.#2015-12-1218:38rantingbobThough...it doesn't newline. I wonder if you couldn't use parinfer to fix that and get a bunch of birds with one (admittedly quite large) stone#2015-12-1221:36mishagood day/night, what is the status of cursive's support for prismatic/schema? I found this (resolved) issue https://github.com/cursive-ide/cursive/issues/319 but am getting s/defrecord cannot be resolved:
; [prismatic/schema "1.0.4"]
;...
  (:require
    [schema.core :as s])) ;; .clj

(s/defrecord StampedNames ;; basically from schema tutorial page
  [date :- Long
   names :- [s/Str]])

;; idea 15.0.1
;; cursive 1.1.0-15

;; repl:
(in-ns 'model.core)
(->StampedNames 1000000 "yo")
=> #model.core.StampedNames{:date 1000000, :names "yo"}
Am I doing it wrong? thank you. cc @cfleming
#2015-12-1313:23meowSo, I upgraded to the latest release of Cursive and sent off for a non-commercial license, got an email receipt from Paddle for that, but haven't gotten the actual license information. It's been more than a few minutes, and I checked my spam folder. What next?#2015-12-1313:48meow@cfleming: Nothing urgent about this. I took the 30-day trial option. But when you get some time perhaps you could look into this? Thanks. simple_smile#2015-12-1314:10roelof@meow: still no licence. For me both came on on the same time#2015-12-1314:48meow@roelof: Yeah, I only got the receipt.#2015-12-1314:51roelofwierd#2015-12-1320:27cfleming@meow: In your case it looks like a problem with quote escaping, I’ll fix that up and send it out.#2015-12-1320:27cfleming@misha: If s/defrecord itself is not being resolved, that probably means that you need to refresh your dependencies after adding schema to your project.clj.#2015-12-1320:28cfleming@misha: View-&gt;Tool Windows-&gt;Leiningen, then hit the refresh button#2015-12-1320:46meow@cfleming: thank you much, sir. simple_smile#2015-12-1320:47meowI'm just happy to be able to spend my day in a great tool like Cursive.#2015-12-1320:47misha@cfleming: it works, it is just a highlight issue. Is it a result of not having source code?#2015-12-1320:48cfleming@meow: Great, thanks simple_smile#2015-12-1320:49cfleming@misha: If you open File-&gt;Project Structure and select “Modules” and then your module and look at its dependencies, is Schema there?#2015-12-1320:50mishayes#2015-12-1320:50misha@cfleming: autocomplete does not work in file context for such libs either, but does within a repl. maybe there is a way to get hints on available lib functions list from the repl, if it is active?#2015-12-1320:51cfleming@misha: That’s strange. Which version of Schema are you using?#2015-12-1320:51cflemingIs this project anywhere I can look at it?#2015-12-1320:51misha[prismatic/schema "1.0.4"] - the latest as of yesterday#2015-12-1320:52mishano. but it is pretty much empty: - lein new foo - add prismatic to project.clj - require in main ns ==> any schema fn (schema/Str, etc.) is highlighted as unresolved#2015-12-1320:52cflemingOk, I’ll try that, thanks#2015-12-1320:53mishaidea 15.0.1, cursive 1.1.0-15#2015-12-1320:54mishalein new foo - is a library template, if this matters. Leiningen 2.5.3 on Java 1.8.0_31 Java HotSpot(TM) 64-Bit Server VM thank you.#2015-12-1410:36cfleming@sveri: That new exception you’re seeing with the stacktrace you posted above, could you zip that project up (including the .idea directory) and send it to me? Is it confidential?#2015-12-1410:37cflemingSomeone else has been seeing the same problem but can’t share their project (it’s their work project)#2015-12-1410:52sveri@cfleming: Sorry, I was impatient, uninstalled all my intellij instances and reinstalled everything in the latest version. That error did not happen again since then.#2015-12-1410:54cfleming@sveri: Bummer 😞#2015-12-1410:56sveriHm, I forgot, I made a backup of the intellij config files in my home folder#2015-12-1410:56sveriAnd the project did not matter, it occured on everyone, once it was broken#2015-12-1410:57sveriwould that help you?
#2015-12-1410:57sveri@cfleming:#2015-12-1410:58cfleming@sveri: Yes, definitely, thanks#2015-12-1411:00sveri@cfleming: It's 360 MB, I upload it to my server and send you a link when it's done#2015-12-1411:00cfleming@sveri: It’s 360 MB?!?!#2015-12-1411:00cflemingWhich folder is this?#2015-12-1411:00sveriUhm, yes#2015-12-1411:01sveri.IdeaIC15#2015-12-1411:01cflemingWow.#2015-12-1411:01cflemingOk, send it over, I’ll take a look simple_smile#2015-12-1411:01cflemingI’m not sure I’ll be able to reproduce with it, but it’s worth a try to fix that issue.#2015-12-1411:01cflemingYou’re on Windows, right?#2015-12-1411:07sveriExactly#2015-12-1413:00sveri@cfleming: You can download the folder here: http://sveri.de:5678/sonstiges/#2015-12-1413:00sveriI assume it is so large because I kept the history of some versions#2015-12-1419:14cfleming@sveri: Great, thanks!#2015-12-1420:23rantingbobDoes cursive watch files/ns to fire off tests, or does it only fire off tests with the shortcut?#2015-12-1502:17danielcompton@rantingbob: you need to use the shortcut#2015-12-1508:32mostr@cjmurphy: regarding this one https://clojurians.slack.com/archives/general/p1450167976001842 (“delete” key), it breaks parens balance, right? So both parens need to be removed separately?#2015-12-1508:33cjmurphyYes it stuffs everything up so I quickly go to the other paren and do the same.#2015-12-1508:34cjmurphyI suspect it is wrong headed to be in such a situation, but it happens often for me. A video of seeing someone edit as they are supposed to would help us.#2015-12-1508:36mostryeah, I learn most of the Cursive “incantations” by watching some videos of people playing with it, sadly there is not much of it around#2015-12-1508:37cjmurphyBut I suspect it would not be nearly as impressive as the same edits being done in emacs#2015-12-1508:38cjmurphyIt should become better over the next few years. My current fav winge is with Cntl Backspace.#2015-12-1508:39mostrEmacs… will learn how to use it properly one day, but jumping into both Clojure and Emacs at the same time is just asking for troubles I guess simple_smile#2015-12-1508:41cjmurphyI never will. Maybe some vim editor, but most likely stick with Cursive, because those others will never give you proper IDE context that is higher level than just text, that I am so used to from Java.#2015-12-1508:43jaenFor deleting parens without unbalacing the forms, you can splice, I think.#2015-12-1508:43jaenI think it's Alt+S by default.#2015-12-1508:44mostrTrue, I do Scala on daily basis (coming for Java in the past) and just yesterday I had to add some java stuff to clojure project (it was easier to code stuff using lib I had to use in java: builders, factories etc.). With IntelliJ + Cursive I just have all things in one place, no matter if I work on java/scala/js/clojure file at the moment.#2015-12-1508:44cjmurphyAlt S just takes me the the VCS menu.#2015-12-1508:46mostrAlt S gives me polish language-specific character Ś 😄, but will try - thanks for hint @jaen#2015-12-1508:46cjmurphyCtrl + ; - Splice#2015-12-1508:47cjmurphyHmm - that didn't work either, got from: http://kamituel.tumblr.com/post/82370141336/intellij-shortcuts-including-cursive#2015-12-1508:49sveriWhat's worse, none of the default keybindings work on windows with a different keyboard layout (I use neo). I never took the time to define my own except for the surroundings#2015-12-1508:49jaen@mostr: Well, right alt also gives me ś (gotta love Polish keyboard layout, I can easily write things like ß™®©–ðþ with just my alt, Window's not as nice), I was talking about left alt.#2015-12-1508:50jaenBut I guess maybe it was a keybinding I didn't have by default#2015-12-1508:50jaenAnd set it up by myself#2015-12-1508:50jaenSo you'd have to set the shortcut up for yourself#2015-12-1508:52cjmurphyCntl Del will delete one of them. Easier than highlighting.#2015-12-1508:53jaenI suppose, but splice should do what you want, that is remove both parens from around the current form, without unbalancing.#2015-12-1508:54mostryep! splice works as @jaen says#2015-12-1508:54mostr:thumbsup:#2015-12-1508:54mostrone more win today simple_smile#2015-12-1508:58sveriHm, but splice only deletes the parens. Would be nice if something deleted the whole expression#2015-12-1509:08jaenKill sexp?#2015-12-1509:08jaenDidn't use it yet, but looking at the internet it seems to do just that.#2015-12-1509:09jaenActually, just tried, seems to work as advertised.#2015-12-1509:09sveriHm, I have to try out some more#2015-12-1509:10jaenBut dang, the default shortcut is under meta. Not helpful with xmonad at all ; d#2015-12-1512:33mostr@cjmurphy @jaen looks like Raise is the command we look for (well… the name might have suggested it) to delete redundant parens pair. David has just dropped this hint on #C03RZGPG1. Now I need to discover “practical” differences in usages of Splice/Raise simple_smile#2015-12-1512:34jaenYeah, I've noticed. Splice is a bit like * (splat) in Ruby, or {:tag :a, :attrs {:href "/cdn-cgi/l/email-protection", :class "__cf_email__", :data-cfemail "522c12"}, :content ("[email protected]")} (unquote splice) in Clojure macros - it explodes the form into the surrounding form.#2015-12-1512:34jaenRaise seems to replace the surrounding form with the form you're raising#2015-12-1512:34jaenso#2015-12-1512:37jaen
(comp
  (a "c" :d) ; cursor before this form
  (b 2 3))
with splice will result in
comp
(a "c" :d)
(b 2 3)
but with raise it will result in
(a "c" :d)
#2015-12-1512:37jaenconversely if you move the cursor inside that form, before a#2015-12-1512:37jaenWith splice you'll get#2015-12-1512:37jaen
(comp
  a "c" :d ; cursor inside this form
  (b 2 3))
#2015-12-1512:38jaenBut with raise - just a.#2015-12-1512:40jaenSo it depends entirely on what you want to accomplish.#2015-12-1512:40jaenRaise behaviour is maybe a bit more confusing at first.#2015-12-1512:58mostr:thumbsup:#2015-12-1516:11sveri@cfleming: Hi, are you here? I have that weird error again#2015-12-1518:06meow@cfleming: Just a ping to let you know that if you resent my license key I still haven't received the email. Unless it was the "RUSSIAN beauties looking for love!" one with the blinking hearts.#2015-12-1518:53rantingbob@meow: Don#2015-12-1518:53rantingbob@meow: Don't judge, @cfleming was merely declaring his undying love 😛#2015-12-1518:59meowSeriously, I haven't looked in my spam folder in forever so I was surprised to see so many blinking gifs - does that work?#2015-12-1519:34timgilbertIn my experience after a brief period of initial infatuation, the love fades into a sort of humdrum comfortability#2015-12-1520:44danielcomptonKibit uses core.logic rules, they might be similar to Cursive’s PEG?#2015-12-1520:57dmi3yAnyone here using Cursive with ClojureScript? Would appreciate any help on how to start Node.js REPL in Cursive.#2015-12-1520:58cfleming@dmi3y: There’s no built-in REPL for CLJS right now. In general, I think the current best practice is to use a quickstart-type REPL using the clojure.main REPL type.#2015-12-1520:59cfleming@dmi3y: Have you looked at https://github.com/clojure/clojurescript/wiki/Quick-Start?#2015-12-1520:59dmi3y@cfleming: yup, I can do this, thought there’s a way to connect to it from Cursive since it exposes a port.#2015-12-1521:00cflemingIf it uses nREPL, you can connect to it using a Remote REPL config#2015-12-1521:03dmi3ySadly, ClojureScript REPL for node.js doesn’t seem to be using nREPL#2015-12-1521:03cflemingHmm - so when you say it exposes a port, what sort of port is it?#2015-12-1521:05cfleming@meow: Sorry, I was busy moving house yesterday, I’ll get you your licence soon.#2015-12-1521:06cflemingBut feel free to forward that other mail over. I love the blinking hearts.#2015-12-1521:06dmi3y@cfleming: it’s a TCP port, right now it’s 56177#2015-12-1521:07dmi3yapparently, there’s https://github.com/cemerick/piggieback, which should serve as a bridge between nREPL and ClojureScript REPL#2015-12-1521:13cfleming@dmi3y: Yes, you can use piggieback, but it’s a bit of a house of cards and I would try to use a bare REPL if you can.#2015-12-1521:15dmi3y@cfleming: Agree, I’m trying to figure out how to do that without piggieback. Remote repl doesn’t connect to the remote port exposed by clojurescript repl started as described in ClojureScript getting started guide ...#2015-12-1603:26wilkerluciohello people, I have a question: when I paste multiline strings into a string, cursive converts the line breaks to \n, this is good for single line strings but when editing multiline strings it's a bit of pain, is there a way to disable this so when I paste it keeps the line breaks?#2015-12-1604:08cfleming@wilkerlucio: I think Paste Simple will do that.#2015-12-1604:09wilkerluciocool, that works simple_smile#2015-12-1606:30tony.kay@dmi3y: See above for instructions on using node for REPL.#2015-12-1607:24dmi3yawesome, thanks @tony.kay#2015-12-1616:54settingheadanyone has issues with debugging component based workflow on cursive? i can’t seem to get the breakpoints to work#2015-12-1619:44cfleming@settinghead: The most likely problem is that currently breakpoints don’t work inside deftype or defrecord method bodies.#2015-12-1619:44cflemingThis is an annoying limitation of the way Clojure compiles its classes.#2015-12-1619:45settingheadah that’s good to know#2015-12-1619:45cflemingAnd the very limited ways that JDI allows you to search for them.#2015-12-1619:45cflemingBreakpoints inside functions that you call from those methods work fine.#2015-12-1620:00Alex Miller (Clojure team)@cfleming: is that something clojure could do better?#2015-12-1620:00Alex Miller (Clojure team)like are you missing line info in those or something?#2015-12-1623:03cfleming@alexmiller: maybe. It’s a tricky issue. The problem is that it’s essentially impossible to identify in Clojure what the classname for a particular line of code (or expression, in general) is.#2015-12-1623:03cflemingWhen you set a breakpoint in JDI, you need to set it at a line in a class.#2015-12-1623:04cflemingInstead of a class, you can use a “limited regular expression” to identify potential classes that JDI should check the breakpoint for.#2015-12-1623:04cflemingWhere “limited regular expression” means one of *name or name*#2015-12-1623:04cflemingSo#2015-12-1623:05cflemingWhen someone sets a breakpoint in a namespace, the best I can do is to match on munged_ns.name$*, which catches all functions in that ns.#2015-12-1623:06cflemingHowever that doesn’t catch records or types in that ns, which are named like munged_ns.name.Record#2015-12-1623:06cflemingThe problem is if I match on munged_ns.name* then I’ll also get munged_ns.name_2 et al#2015-12-1623:07cflemingI haven’t done another pass over the debugger since working out what the problem was, so I’m not sure if I can set up multiple filters, or manually filter things afterwards, or other hacks.#2015-12-1623:09cflemingThe problem with manually filtering afterwards is that munged_ns.name* or even munged_ns.name.* will match all classes in the package hierarchy under that point.#2015-12-1623:10cflemingBut I may be able to filter on munged_ns.name$*` and then all the names of classes defined in that ns explicitly, or something.#2015-12-1623:11cflemingI suspect (but I don’t actually know) that this filtering may be why debugging in Clojure is so much slower than in Java.#2015-12-1623:21Alex Miller (Clojure team)sounds tricky :)#2015-12-1700:02cfleming@alexmiller: Yup simple_smile#2015-12-1715:17wildermuthnWhen for whatever reason there is an inbalance between brackets or parens, what’s the best option for rebalancing?#2015-12-1715:17wildermuthnI love this IDE, but right now paredit is killing me. In Vim I’d just turn it off for a second.#2015-12-1715:21tordThere is a button for switching structural editing on/off in the lower right hand side of the Cursive window.#2015-12-1715:30cjmurphyDN said the following commands are mandatory for him: Raise, Splice, Split, Sexpr aware kill.#2015-12-1715:30cjmurphyThey help with various paren problems. You can look up what keys they are.#2015-12-1716:50conanSo this Cursive business is totally banging. So is figwheel. I've tried before to make them play nicely, but have always got too bored/frustrated and given up. Now when I'm doing frontend work, I end up just using the console repl, which is pony compared to an IDE one. Is there an easy(ish) way to do figwheel in Cursive that I've missed?#2015-12-1716:52jaenI've only know how to do boot clojurescript REPL, but doesn't figwheel let you run a nREPL server?#2015-12-1716:52jaenAt least this here seems suggest so - https://github.com/bhauman/lein-figwheel#figwheel-server-side-configuration - with :nrepl-port option.#2015-12-1716:53conanyeah it runs an nrepl server, but then i have to connect to it and it's a pain to restart (which it requires often). Essentially I want to stop running figwheel in a console.#2015-12-1716:54jaenHave you seen this then? https://github.com/bhauman/lein-figwheel/wiki/Running-figwheel-in-a-Cursive-Clojure-REPL#2015-12-1717:03conani have, that's the guide i usually try to make work, and is what i'm trying to avoid. I don't want to go adding files and changing config that will annoy the emacs-toting reviewer of my pull request! I'm looking for a way to run an existing project using figwheel in cursive without changing code in the project; of course i'm happy to change my local leiningen profiles. Part of what I want here is to make it easy for designers in my team to fire up a project locally and start editing without having to know how the build system works or how to use a terminal. Thanks very much for taking a look into it, but I guess for now the answer is "not quite, it's still a bit tricky"!#2015-12-1721:34cfleming@wildermuthn: @tord: You can also bind the “Toggle Structural Editing” action to a key if you do it a lot.#2015-12-1721:36cfleming@conan: How do the emacs-toting heathen users on your project connect to Figwheel?#2015-12-1722:34polymeris@conan: cursive has an option to connect to remote repls... what's wrong with that? That's what I use to connect to the figwheel nREPL anyways, and then go
(use 'figwheel-sidecar.repl-api)
(cljs-repl)
#2015-12-1723:00conanWe all use it from the terminal#2015-12-1723:01conanThe problem is that figwheel needs restarting often. Having to do the connection dance is a pain, especially for people that don't know how to use the terminal#2015-12-1723:02conanI'd much prefer just pressing the restart button in the cursive repl #2015-12-1723:52cfleming@conan: I’m actually planning a built-in CLJS REPL type in Cursive, with the option to start Figwheel. That should do the trick, but obviously I have to implement it first.#2015-12-2020:18tordOne of my main annoyances in IntelliJ is the extremely wide margins to the left of any code buffer. The only way I have found to hide those margins is to enable "distraction free mode" from the view menu. Unfortunately, this also hides the Cursive REPL. Has anyone found a way to keep the REPL visible in distraction free mode, or some other way to disable the margins?#2015-12-2020:47simax99Anybody else experiencing this? I open the REPL tool window and I can use the keyboard shortcut cmd+shift left arrow to make the REPL tool window wider and cmd+shift right arrow to make it narrower. However, If I then run a Cursive REPL as described here https://cursive-ide.com/userguide/repl.html I can no longer use the keyboard shortcuts to alter the size of the REPL tool window. Any ideas?#2015-12-2021:13cfleming@tord: There are some issues relating to this, https://youtrack.jetbrains.com/issue/IDEA-145837 and https://youtrack.jetbrains.com/issue/IDEA-134555, but they’re complaining about wide margins in distraction free mode.#2015-12-2021:14cfleming@tord: Are you talking about the gutter area? Could you provide a screenshot showing what you mean?#2015-12-2021:14cfleming@simax99: That sounds odd, let me try it.#2015-12-2022:01tord@cfleming: Yes, looks like "gutter area" is the technical term. I want it to go away, or at least not be so ridiculously wide.#2015-12-2022:38cfleming@tord: Looks like https://stackoverflow.com/questions/19881380/in-intellij-idea-how-can-i-hide-the-bar-in-the-left-of-the-text-editor is probably as good as you can get, although that answer is a little old now.#2015-12-2022:39cfleming@tord: You can search for “gutter” in the settings to see all relevant settings.#2015-12-2115:00tord@cfleming: Not sure exactly how I did it, but after playing around with the settings I somehow managed to keep the REPL visible in distraction free mode. Thanks!#2015-12-2117:18tbrooke@tord let me know if you figure out how you did it - I live in distraction free and it annoys me too#2015-12-2121:45cfleming@tord: @tbrooke: Looks like you can open the toolwindow with the keyboard shortcut, at least#2015-12-2211:41pupenoSince I upgraded to IntelliJ 15 and Cursive 1, I’m having trouble opening projects. Some projects cause IntelliJ to freeze for long enough that I end up killing it.#2015-12-2211:42pupenoThis is one of the projects having an issue: https://github.com/carouselapps/to-jdbc-uri#2015-12-2212:23ricardoHey @cfleming, is there a way to start a Cursive repl with a profile yet? https://cursive-ide.com/archive/1466.html#2015-12-2212:24ricardoOh, I think I found it.#2015-12-2212:25ricardoNevermind, didn’t realize that had made it in.#2015-12-2212:37simax99Will cursive still work with IntelliJ 16 EAP Community edition?#2015-12-2213:13snowellI’m seeing a very helpful error: Error running REPL: Error creating JavaParameters#2015-12-2213:13snowellWhen trying to start a REPL. Anybody seen/fixed this before?#2015-12-2213:16snowellGuess I should mention: IntelliJ CE 15, Cursive 1.1.0-15#2015-12-2213:23snowellWell, I switched over to an nREPL configuration, and that seems to have done the trick. So…yay?#2015-12-2213:27snowellI should say, nREPL in normal JVM process. I still can’t get the Leiningen REPL to start, and that seems like the one I’d want in order to require things from my namespaces. So I guess I rescind my yay#2015-12-2218:52snowellAnybody have any advice to fix this? Google leads me to exactly one result, which doesn’t seem to help#2015-12-2219:43sanderis there a tutorial for how to debug cljs-in-node, like https://twitter.com/CursiveIDE/status/629767602575933441 ?#2015-12-2221:42cfleming@pupeno: Hmm, that’s not good. When does the freeze happen?#2015-12-2221:43cfleming@ricardo: Yeah, that came in with the recent lein re-vamp. You can also choose which profiles are used to sync deps in the lein toolwindow.#2015-12-2221:43cfleming@simax99: I don’t think so, but I’m going to start work on that soon.#2015-12-2221:44cfleming@snowell: Sorry, that error message sucks, I know. It generally means that you don’t have an SDK set up for your project.#2015-12-2221:44cflemingI need to look into that since it used to have a better warning, I’m not sure what changed.#2015-12-2221:46cfleming@sander: Not as far as I know, sorry - I’ve never actually done that myself.#2015-12-2221:46sanderok will try sometime simple_smile#2015-12-2221:48cflemingI suspect that you’d need to run node with the --remote-debugging-port=port option, and then connect the IntelliJ JS debugger to it.#2015-12-2221:48cflemingNote that that’s an Ultimate feature, it’s not available in Community edition.#2015-12-2222:15simax99@cfleming: thanks for answering the question re: IntelliJ 16. Did you manage to take a look at https://clojurians.slack.com/archives/cursive/p1450644434001192#2015-12-2222:16cfleming@simax99: I didn’t sorry, I’ll try to look at it today#2015-12-2223:01pupeno@cfleming: when opening the project.#2015-12-2223:02cfleming@pupeno: And the whole UI freezes? What actually happens?#2015-12-2223:03pupeno@cfleming: I get the spinning wheel of death and I have to kill IntelliJ.#2015-12-2223:03pupeno@cfleming: sorry, I have to go, I was just passing by. You can clone the repo, it’s all in there, all the intellij files. I’m happy to provide more info tomorrow, although we are 10 timezones away, so, it can get annoying.#2015-12-2223:04cfleming@pupeno: Ok, I’ll try to reproduce with that repo, thanks.#2015-12-2223:21pupeno@cfleming: at some point, the markdown plug in was causing some issues, but I’m not sure if that’s the case.#2015-12-2223:22cfleming@pupeno: Yes, there are occasionally problems with plugins that do things they shouldn’t according to the threading model at startup. If I can’t reproduce, I might need to get a thread dump from you.#2015-12-2308:07pupeno@cfleming: I disabled the markdown plugin and that seemed to help, so, it may have nothing to do with Cursive.#2015-12-2309:14moizsjis this currently the most up to date resource available for learning to debug with cursive? https://www.youtube.com/watch?v=ql77RwhcCK0#2015-12-2309:55cfleming@moizsj: Unfortunately yes, I haven’t written any doc for this yet#2015-12-2309:56cfleming@moizsj: Some of the IntelliJ doc is helpful too. It doesn’t all work for Clojure (smart step in, for example) and some of it is Java specific, but much of it applies. See http://blog.jetbrains.com/idea/2013/08/30-days-with-intellij-idea-debugger/#2015-12-2310:25moizsjThanks Colin#2015-12-2312:26snowell@cfleming Thanks for the response, however even after ensuring that I have an SDK set up (was 1.7; I moved to 1.8) it’s still spitting out the same Error creating JavaParameters#2015-12-2502:02polymerisWhy does cursive say a (in both cases) cannot be resolved here:
(defn f []
  (def a 1)
  a)
Is it a bug or is it really not resolved? (I am relatively new to clojure)
#2015-12-2502:03polymerisIf I replace defn f [] with do, cursive does not complain. I thought defns had an implicit do?#2015-12-2505:42cfleming@polymeris: Cursive is technically incorrect here (since the language does support what you’re doing) but it’s strongly discouraged.#2015-12-2505:43cflemingdef always creates a new top-level var in the namespace, which is almost certainly not what you want.#2015-12-2505:43cflemingYou probably want:
(defn f []
  (let [a 1]
    a))
#2015-12-2505:44cfleminglet creates local bindings, def creates global ones.#2015-12-2505:44cflemingNote that the var for a will be created when f is called, not compiled.#2015-12-2511:07jaenHmm, is there any way to tell Cursive that I want completion in my build.boot file? It complains it's outside source root, but I would have to make my whole project a source root so it would be under one, and that's not really an option. Is there something that could be done, or is it a limitation of Cursive and/or IntelliJ?#2015-12-2515:56onetom@jaen: im just learning intellij (by going thru all the video tutorials under https://www.jetbrains.com/idea/documentation/), but i also hit this issue... 😕 i guess the best u can do is to move out the logic from build.boot under you source path, but if u r just writing some #!/usr/bin/env boot script then it's not an option...#2015-12-2516:37onetomI was reading these issues but it's still not very clear what is the current recommendation to deal with symbols defined by macros? https://github.com/cursive-ide/cursive/issues/1058 https://github.com/cursive-ide/cursive/issues/147 https://github.com/cursive-ide/cursive/labels/Macros One of the commenters mentioned that he is maintaining a gigantic (declare) somewhere in their source to deal with this but im not sure what does he mean by it. Where should I put that declare? Does he actually means multiple declares across various files? Can I somewhere specify which macros are defining symbols? (in a language facet maybe?) https://github.com/cursive-ide/cursive/issues/147#issuecomment-54643461#2015-12-2517:02onetomCan I at least have tab completion for words which are already in the file/project? For example I've already have adi/insert! and adi/select all over my code base... I feel like Sublimes hyper-dumb auto-completion is more practical 😕#2015-12-2517:14jaenDoesn't the usual completion (it should show by default, if not then try ctrl+space) work?#2015-12-2517:49polymerisThanks, @cfleming... I was trying to have a local binding that is resolved at compile time (a "constant").#2015-12-2518:12onetom@jaen: nope... it doesnt suggest me unresolved symbols 😞#2015-12-2518:13jaenAh, yeah, I can see how that could be annoying#2015-12-2518:16onetomneither datomic.api/q, nor adi/select are resolvable. that's kindof the meat of the application... 😕#2015-12-2518:20onetomhaving so many positives renders this whole "highlight unresolvable symbols" functionality useless... i hope it wont interfere too much with other functionality based on static analysis#2015-12-2518:20onetomah and of course the => of midje are also highlighted...#2015-12-2519:24cfleming@onetom: See https://github.com/cursive-ide/cursive/issues/38#issuecomment-26373091 and https://github.com/cursive-ide/cursive/issues/708#issuecomment-83769578 for a workaround for datomic#2015-12-2519:25cfleming@onetom: What’s the adi namespace you’re referencing there?#2015-12-2519:26cfleming@jaen: I’ll add a fix for the build.boot file, so at least Cursive doesn’t complain about it being outside source roots.#2015-12-2519:27jaen@cfleming: would completion work then or would that only hide the warning?#2015-12-2519:27cfleming@jaen: That would only hide the warning. I need to investigate what’s required for proper boot file support.#2015-12-2519:28onetom@cfleming: https://github.com/zcaudate/adi but it has the usual issue; generates a bunch of similar functions with macros...#2015-12-2519:29jaenI see. I thought there would be some way to let it resolve the vars as if was a normal Clojure source.#2015-12-2519:29onetom@cfleming: I found the 1st link about datomic but not the 2nd. thx, looking into it.#2015-12-2519:30onetom+1 for boot support simple_smile#2015-12-2519:30cfleming@jaen: I hope there will be, but I’m not sure how the indexing will work for files which are not under source roots.#2015-12-2519:30cflemingYeah, I want to get it in there because I’d like to try building Cursive with boot.#2015-12-2519:30cflemingIt’s a big job though probably.#2015-12-2519:32jaenRight, I imagine getting it right is a bigger undertaking and the "generate project.clj" hack works more than well enough.#2015-12-2519:32onetomwhat's your main motivation for switching to boot?#2015-12-2519:32jaenI just hoped there would be some relatively easy way into ticking IntelliJ that build.boot is a Clojure source.#2015-12-2519:33jaenBut if it requires more proper work, then I'll just have to wait#2015-12-2519:35onetom@jaen:
cd src; ln -s ../build.boot
and edit it from there 😉 seems to work for me
#2015-12-2519:36jaenOkay, that's one way to do it xD#2015-12-2519:36onetomthough set-env! deftask with-pre-wrap are all not resolvable. how would u solve that?#2015-12-2519:38jaenI guess that makes sense, since boot.core is use 'd by boot when evaluating that file (or at least, it does something equivalent to that)#2015-12-2519:39jaenSo Cursive would have to be aware of that.#2015-12-2519:39jaenSince requires are idempotent in Clojure then maybe (require 'boot.core) would work, but that sounds iffy.#2015-12-2520:10cfleming@onetom: Currently I use Ant, and I don’t want to switch to lein. I’d like to use boot for Cursive because I like it conceptually and I’d like to understand how it works better in order to implement good support for it.#2016-12-2810:19simax99Hey @cfleming I presume you still didn’t get a chance to try this yet. https://clojurians.slack.com/archives/cursive/p1450644434001192. Sorry to keep asking. I just mention it again in case you’d forgotten.#2016-12-2811:07onetom@simax99: which intellij version r u using? i was just working w 15.0.2 in the past few days and i had no issues w resizing#2016-12-2811:22simax99@onetom: Resizing is fine with keyboard when I open the REPL window. But when I actually run a Run/Debug configuration I lose the ability to resize with the keyboard. It’s very odd.#2016-12-2812:19onetomr u on a mac and trying the resize with cmd-shift-left-right? im using the mac os x 10.5+ layout combined w the cursive clojure keymap and it does work even after i've connected to a repl, though im trying a remote repl.#2016-12-2813:00simax99Yes, mac os x 10.11.2 + cursive clojure keymap but with a local repl. AFAICR same happens on my Windows 10 setup at work as well.#2016-12-2813:15moizsji am trying to set the cursive bindings (after setting intellij's keybindings to Eclipse (mac) ), i get an error saying current keymap cannot be modified#2016-12-2813:16moizsjanybody know how to work around the above issue?#2016-12-2813:20moizsjok, figured it out. first make a copy, this allows it to be modified#2016-12-2820:41wilkerlucioguys, I had an accident here, I was working in a project on IntelliJ that I hand't started the git repository, then I started the git, add some files, checked that some was wrong, I was wanting just to remove the files from the cache, but I did a git reset --hard, which removed all the files... I wonder if IntelliJ has some cache that I could restore the files from#2016-12-2820:42wilkerluciodo you know if there is a way for me to recover this? intellij has any sort of internal cache?#2016-12-2820:47cjmurphyR.Click -> Local History -> Show History#2016-12-2820:49wilkerlucioit says Nothing Here =/#2016-12-2820:53cjmurphyHmm - sorry that's the only way I know into an IntelliJ cache of any sort. The other things would be OS specific, looking at last night's backup etc. Or re-creating your work yourself as you will be quicker at it this time.#2016-12-2820:54wilkerlucioyeah, I guess I'll have to rewrite#2016-12-2820:54cjmurphy😞#2016-12-2823:08cfleming@wilkerlucio: local history on the containing directory?#2016-12-2823:10wilkerluciowasnt working, I think the git reset really removed all#2016-12-2823:11wilkerlucioat least getting it back was faster than I expected, the project is more progressed now than before the issue#2016-12-2823:55yuris@simax99: I noticed that same resizing weirdness long ago. It's more weird for me (maybe for you too) If I click on the Tools icon on the top right corner of the REPL window, where you have the Resize menu, and don't do anything else, just click on that wheel, then all of a sudden Ctrl-Shift-Left and Right start working. It annoys the hell out of me, since I'm keyboard centric. I never raised an issue since I'm quite sure it's an IJ quirk.#2016-12-2910:19simax99@yuris: Yes, you’re absolutely right, Clicking on the Tools icon does indeed re-instate the keyboard short-cuts. Thanks for letting me know. At least I can get the keyboard behaviour back. The lines between IntelliJ and Cursive are quite blurred, it’s difficult to know where the responsibility lies. @cfleming did say he would take a look but he’s a busy guy and has either forgotten or just not had time yet. I’ll maybe try and raise an issue with JetBrains and see if they come up with anything. Thanks again. I’ve raised an issue with JetBrains here https://intellij-support.jetbrains.com/hc/en-us/requests/85405#2016-12-2917:37simax99@yuris: @cfleming JetBrains seem to be suggesting the resize Tool window problem is with Cursive. https://intellij-support.jetbrains.com/hc/en-us/requests/85405#2016-12-2923:22cfleming@simax99: Sorry, I’m on holiday with the family at the moment and only working sporadically#2016-12-2923:22cfleming@simax99: I can’ t see that page, it tells me page not found#2016-12-3003:14yuris@simax99: Neither can I, maybe it's private to you?#2016-12-3008:11simax99@cfleming: @yuris Perhaps the page is private to me. I didn’t realise. Not much to see really, JetBrains investigated the issue and they seem to think the problem lies with Cursive throwing some exception that is visible in the IntelliJ log file I sent them. @cfleming it’s not urgent we have a work around. This was JFYI. Enjoy your holiday:simple_smile:#2016-12-3015:38meowI recently upgraded to version 15.0.2 and when I did so I decided to make use of the integrated VCS for Github instead of going to Github desktop like I had been doing and I just want to say how nice it is to make my commits inside IDEA. I know this isn't really a Cursive thing, but the combination of Cursive plus easy commits is just a real pleasure to work with all day long.#2016-12-3015:40meow@cfleming: Just want to let you know how much I appreciate all the time and effort that you have put into Cursive. I can't imagine doing Clojure without it.#2016-12-3015:41meowActually, its Cursive + REPL + easy git commits == winning combination for me#2016-12-3015:42meowplus refactoring#2016-12-3015:42meowsimple_smile#2016-12-3016:28simax99@meow: My list is even longer than that. Cursive + REPL + easy git commits + VCS local history + Debugger + Figwheel … you get the picture. So much awesome stuff simple_smile#2016-12-3016:30meowFigwheel is awesome. I've yet to use the Debugger. Probably should give it a try one of these days.#2016-12-3016:31meowIn fact, I'm staring at a completely useless CompilerException java.lang.NullPointerException message right now.#2016-12-3016:32simax99You should give it a whirl. Breakpoints, stepping through code line by line, inspecting the content of vars the works...#2016-12-3016:33meowRunning unit tests inside Cursive should also be on the list.#2016-12-3016:35simax99Oh yes, so it should. I started using Expectations which is neat. Colin has it on his (very long) list of even more cool stuff to integrate Expectations into Cursive along side clojure.test.#2016-12-3016:35simax99Colin did a presentation on the debugger that you can watch here https://www.youtube.com/watch?v=ql77RwhcCK0#2016-12-3016:36meow@simax99: Thank you. I'll watch that sometime soon.#2016-12-3018:03timgilbertHi all, is there a good way to get Cursive to pick up on new dependencies I added to project.clj short of restarting it?#2016-12-3018:03timgilbertI tried synchronize but that doesn’t seem to do it#2016-12-3019:01grav@timgilbert: You can do Refresh Leiningen Projects (the “recycle” icon in the Leiningen tool window)#2016-12-3019:03timgilbertHmm… how do I get there?#2016-12-3019:03timgilbertOh, I see, on the right side#2016-12-3019:03timgilbertAwesome, that worked great! Thanks!#2016-12-3019:26cfleming@simax99: Can you send me the log you sent to JetBrains?#2016-12-3019:31cfleming@meow: @simax99: Thanks! I think that one of the unsung heroes of IntelliJ is the diffing, and how it’s integrated into the VCS - I love it. Top tip - from the commit dialog you can view the diffs with Cmd-D to revise the changes before committing, and when you do it from there you can step through all the files and type your commit message at the same time while you see what you changed.#2016-12-3019:43meow@cfleming: yeah, I discovered that Cmd-D goes through all of the files - very nice indeed#2016-12-3019:45simax99@cfleming: realised why you couldn’t get to the issue I filed on their support system. Their support system seems to be completely broken at the moment.#2016-12-3023:35cfleming@simax99: Thanks. I think they’re passing the buck TBH, there are some Cursive exceptions in that second log but they’re completely unrelated to what you’re seeing, and they’re not in the first log you sent after reproducing the problem (in fact, that one contains no exceptions at all).#2016-01-0216:13tony.kayAnyone able to get the “run test under caret” working with a cljs repl?#2016-01-0219:34cfleming@tony.kay: sadly, that doesn't work for cljs yet#2016-01-0219:35cflemingI'm hoping it will soon#2016-01-0221:10tony.kay@cfleming: oh, ok. Thanks!#2016-01-0304:12yuris@simax99 @cfleming: Hi guys following the REPL window resizing keyboard problem, just noticed something. If I open a REPL window before starting a REPL session, the keyboard shortcuts work. When I start a REPL session in this window, the shortcuts still work up until the moment when the message "Connecting to local nREPL server..." is issued. At that point, the resize shortcuts stop working, and only clicking on the Tools icon reinstates them. It also seems that stopping/restarting REPL or closing/opening REPL window no longer have any effect on the shortcuts until the project is closed. (Windows 10, IJ 15, but I think I observed this behavior on Win 8.1 and IJ 14 IIRC)#2016-01-0310:54simax99@yuris: @cfleming Ticket logged with JetBrains support https://youtrack.jetbrains.com/issue/IDEA-149936 re: REPL tool window resize problem. Lets see what they come up with.#2016-01-0319:35meowI'm editing a defrecord using Cursive and it is failing to resolve any methods with dashes or bangs! Is this a known issue? Here is my code:
(defrecord FaceMesh [face-set]
  IPolygonMesh
  (faces [m] (:face-set m))
  (edges [m] (or (:edge-set m) (keys (:edge-faces-map m)) (mm/edge-set m)))
  (verts [m] (or (:vert-set m) (keys (:vert-npfs-map m)) (mm/vert-set m)))
  (assoc-edge-faces-map [m] (mm/assoc-edge-faces-map m))
  (assoc-face-area-map [m] (mm/assoc-face-area-map m))
  (assoc-face-circ-map [m] (mm/assoc-face-circ-map m))
  (assoc-face-dist-map [m point] (mm/assoc-face-dist-map m point))
  (assoc-vert-npfs-map [m] (mm/assoc-vert-npfs-map m))
  (centroid [m] (mm/centroid m))
  (edge-faces-map [m] (or (:edge-faces-map m) (mm/edge-faces-map m)))
  (face-color-map [m] (:face-color-map m))
  (face-normal-map [m] (or (:face-normal-map m) (mm/face-normal-map m)))
  (scale [m factor] (mx/scale (vec (mp/verts m)) factor) m)
  (scale! [m factor] (mx/scale! (vec (mp/verts m)) factor) m)
  (vert-faces-map [m] (or (:vert-faces-map m) (mm/vert-faces-map m)))
  (vert-normal-map [m] (or (:vert-normal-map m) (mm/vert-normal-map m)))
  (vert-npfs-map [m] (or (:vert-npfs-map m) (mm/vert-npfs-map m))))
#2016-01-0319:36meowIt also fails to resolve any arguments for the methods that have dashes or bangs.#2016-01-0319:37meowSo lots of highlighted code in this file. Note that the code works just fine. It's only Cursive that is confused.#2016-01-0320:03jaenHmm, I have (-get-event-handlers [this] ...) in my defrecord and it is resolved properly, so maybe something else is up?#2016-01-0320:04jaenAt least in so far as it is not highlighted as an unknown symbol, ctrl+click doesn't navigate to the protocol (that might be intentional though I suppose).#2016-01-0320:27meow@jaen: It's strange. I haven't written that many defrecords before so this is the first time I've seen this.#2016-01-0320:47cfleming@meow: That should work fine, I’ll check this later on.#2016-01-0320:57meow@cfleming: Yeah, it isn't causing me any real problems - just kind of annoying. No hurry.#2016-01-0415:30simax99I see there's a section on the boot wiki for Cursive users. Is anybody using boot with Cursive? If so, how's it been? Any problems? I'm liking the look of https://github.com/magomimmo/modern-cljs second edition and thinking of giving the tutorials a try.#2016-01-0418:08meowI use boot with Cursive, sure.#2016-01-0418:09meowI haven't updated my boot stuff in a while so I'm not on the latest.#2016-01-0418:10meowUnless things have changed, basically cursive does not understand boot so you need to create a minimal project.clj file in the Lein style that cursive knows how to work with. There is a boot utility that can create said file from a boot project.#2016-01-0418:10meowIt's a hack, but a simple and useful one. Not much of a hassle.#2016-01-0418:13meowAnd its a decent compromise. Cursive just needs to know what code you depend on and lein is a monolithic approach so they go together well. Boot is much more composition oriented and very flexible so boot scripts can be combined in a wide variety of ways that could easily confuse the heck out of cursive. So just create a project.clj file that contains every dependency you need to please cursive. I like to just keep things simple.#2016-01-0418:14meow@simax99: ^ a bit of a late reply but all the same... simple_smile#2016-01-0418:57simax99@meow: Thanks for the tips. To me it seems there is just less “magic” with boot. You can see exactly whats going on. Looking forward to giving at spin.#2016-01-0419:17meow@simax99: Yeah, I just started using clojure about 8 months ago and boot was out there and looked like a good design so I learned boot fairly well and then just enough of Lein that I can get things done. You definitely have to understand boot at a conceptual level and there was a learning curve for me, partly due to not having enough experience with clojure or even functional programming. Fortunately, I have to say that the boot folks are super, super helpful and supportive. If you run into any snags with boot be sure to reach out on the #C053K90BR channel and you will definitely get the help you need.#2016-01-0419:19meowLeiningen is also a great tool, I should add. And since lein and boot come at things from opposite ends of the spectrum they both have a place in your tool set.#2016-01-0502:49bplatzI've found the setting in cursive to align let values, can the same be done for (cond ...)?#2016-01-0502:50cfleming@bplatz: Not yet, although I think there’s an issue to allow that.#2016-01-0502:51bplatzGreat... thanks for the speedy support. simple_smile#2016-01-0509:12dsouthIs there a command to switch focus to the REPL?#2016-01-0509:18dsouthOK, looks like it’s a quick access number keymap#2016-01-0515:17snowell@cfleming: Sorry to keep bugging you on this, but I’m still getting the “Error running REPL: Error creating JavaParameters” error despite having a Project SDK set up (of java 1.7.0_79, FWIW). This only happens when running the “Run nREPL with Leiningen” configuration, which I want to do so I can :require my namespaces. Any advice?#2016-01-0516:45akielIs there a way to show inline errors for cljs in a cljc file?#2016-01-0601:18cfleming@snowell: Sorry about the delay - do you see that error in your log? Help-&gt;Show Log in Finder/Explorer#2016-01-0601:20cfleming@snowell: One other thing to check - the project SDK can be overridden at the module level. Can you check in File-&gt;Project Structure-&gt;Modules-&gt;[your module]-&gt;Dependencies and check that the Module SDK is set to delegate to the Project SDK?#2016-01-0601:38cfleming@akiel: What sort of errors would you like to see?#2016-01-0601:51akiel@cfleming: Just the same as for clojure. Unknown symbols and such. I see this for explicit cljs blocks already but the common blocks default to clojure. I just want to switch into a cljs default mode.#2016-01-0601:51cfleming@akiel: Ah, I see.#2016-01-0601:52cflemingThe cljc support is on my list to get some serious love soon, I’ll look into that.
#2016-01-0601:52cflemingIt would actually be nice to have a preview mode which shows what the file should look like in one language or the other.#2016-01-0612:32snowell@cfleming: No error is appearing in idea.log, just in the Event Log window in the IDE. Also, the module is (unfortunately) delegating to the Project SDK. If there is anything else I could send to help, please let me know!#2016-01-0612:34snowellIt’s not the biggest deal, as I can make the regular nREPL work, or just have a lein repl running in a terminal window. At this point it’s just the desire to know what’s going on. Also, no need to apologize for any delay. An 18hr time difference will do that 😄#2016-01-0719:03hlshipSo, I'm on IntelliJ 15 EAP and things are mostly working fine.#2016-01-0719:03hlshipBut I have an issue where I hit ^J to get documentation of a symbol, and the popup window is always huge.#2016-01-0719:06hlshipAnd doesn't dismiss correctly via keyboard shortcut.#2016-01-0719:20hlshipI've changed the window to be pinned and docked, otherwise it is too distracting. Is this a Cursive issue or IntelliJ?#2016-01-0721:39cfleming@hlship: I’m not sure, I’ve not seen that. I’m on 15.0.2 and the popup window seems ok. Is it the same size for other languages (e.g Java)?#2016-01-0723:31hlship@cfleming: Haven't coded Java in a while ...#2016-01-0723:32cfleming@hlship: Anything else will do, html, css#2016-01-0723:32cflemingAnything you can get the doc on#2016-01-0723:34hlshipNope, not Cursive based per-se. Getting the same useless behavior for HTML elements in a .html, for example.#2016-01-0723:35hlshipBut in 14, it works how I'd expect; ^J raises a floating window, remembers its size from before, and ESC will dismiss the window.#2016-01-0723:35hlship(I'm keeping a 14 around just for these comparisons).#2016-01-0800:58hlshipMaybe I should try 16? Is Cursive ready for 16?#2016-01-0800:59cflemingIt’s not yet, no. I’m hoping to do this soon, several people have asked for it.#2016-01-0805:11timgilbertFWIW, I get a regular-sized popup window on ^J and can dismiss it with ESC#2016-01-0805:11timgilbertThat’s running on Idea 15.0.2#2016-01-0913:36denikI experience odd caching for cljs in intellij w/ Cursive. Each time I do a lein clean or remove/add a dependency I have to restart the editor for changes to take effect. Does anyone know how to avoid this?#2016-01-0913:51meow@denik: are you refreshing your lein project in cursive when you change dependencies?#2016-01-0913:52denik@meow: yeah I tried that#2016-01-0913:53denikalong with all the other load/refresh options accessible throgh cmd + shift + A#2016-01-0913:53meowwhat I do is hover over the icon on the bottom left corner to get the menu, select lein, hit the blue arrow/circle button#2016-01-0913:54meowI never do cmd + shift + A#2016-01-0913:54meownot sure what that is, let me look#2016-01-0913:55denik“refresh leiningen projects"#2016-01-0913:55denikIt’s the same as through cmd + shift + A#2016-01-0913:55denikyou don’t experience issues when adding/removing deps#2016-01-0913:56meownope#2016-01-0913:56meowcan you pull up the lein project display - then you can drill down into it and see what dependencies cursive is pulling in#2016-01-0913:57meowI use a bare minimum project.clj file for cursive and use boot for anything needed beyond that#2016-01-0913:58meowany time I change deps I just refresh the lein project#2016-01-0913:58meowalways works fine#2016-01-0913:58meownever have to do lein clean#2016-01-0913:58meoware you doing clj or cljs#2016-01-0914:00meowlately I'm just doing straight clj + nREPL so my setup is simple#2016-01-0916:54sveri@denik: @meow I have a setup with clj / cljs and cljc libs, everything works fine for me when I refresh the leiningen project in intellij. No matter if via CTRL+Shift+A or the leiningen window#2016-01-0916:57denik@sveri so say you add a dep, then you refresh projects and finally restart the REPL and requiring your new dep is no problem? #2016-01-0916:58sveriyes#2016-01-0916:58sveriI dont need to restart the repl for this#2016-01-0916:58sveriI can as well just refresh it and cursive knows about it#2016-01-0916:58sverithe repl and cursive are separate here#2016-01-0917:03meow@denik: did you try drilling down into the dependency tree in the lein window to see if your newly added dependency appears there?#2016-01-0917:04meowit should, and does for me#2016-01-0917:05meowif it doesn't, you've got an issue and someone can help track it down. Maybe a path issue, I don't know. But you need to provide more context. What you are getting is not expected.#2016-01-0917:09sveriThere is also the option to invalidate the caches and restart, this helps me most of the time I have weird errors. A few times I had to delete the .IdeaIC15 folder completely in %HOME% to get rid of weird issues. This of course deletes your whole configuration, so be careful with that.#2016-01-0917:43denik@meow yep it's in there. Okay thanks @sveri #2016-01-0921:19cfleming@denik: That should definitely work if you’re using “refresh lein projects"#2016-01-0921:19cflemingDoes invalidate caches and restart help? The indexes can occasionally get funky.#2016-01-0921:29denikRestart helps but it's an issue I run into constantly. #2016-01-0921:30denik@cfleming is there a way to set default REPL config for CLJS and CLJ. currently I'm setting the each time a new project is loaded.#2016-01-0921:32cfleming@denik: That’s annoying. If it’s possible, could you create a small repro case which shows the issue in your install (`lein new <whatever>`, add something to project.clj, refresh doesn’t add it) and I’ll try to reproduce it here.#2016-01-0921:33cfleming@denik: Do you mean to set the type of a particular REPL? It should auto-switch when your REPL is converted from CLJ to CLJS - how do you start your CLJS REPLs?#2016-01-0921:34denikWith my om projects I run it through Clojure main with a figwheel script #2016-01-0921:35denikEven adding the REPL. So far I've had to add a REPL config to each project though they all use the same settings#2016-01-0921:35cflemingAh, right - I’m planning to fix that one next week.#2016-01-0921:36cflemingNew lein projects will get a default REPL run config added by default.#2016-01-0921:38denikOk thanks#2016-01-1117:09tordIn a function argument list, if I refer to some earlier argument in the list at some later point in the list, Cursive marks it as undefined. Is this a bug?#2016-01-1117:09tordHere's an example:#2016-01-1117:09tord
(defn foo [a & {:keys [b] :or {b (first a)}}]
  [a b])
#2016-01-1117:09tordThe a in (first a) is marked as undefined.#2016-01-1117:23meowprobably#2016-01-1117:23meowI tend not to get that complex with inline destructing of args like that#2016-01-1117:24meowso I haven't run into that one#2016-01-1117:26meowmoving :or to (let [b (or (b (first a))] should fix that, but I'm guessing that's not how you want to write that code#2016-01-1120:43Alex Miller (Clojure team)I think you are in the area of "undefined" wrt ordering and you shouldn't do that#2016-01-1120:46jaenOh, Clojure doesn't guarantee left-to-right evaluation of function arguments?#2016-01-1120:54Alex Miller (Clojure team)no, related to destructuring#2016-01-1120:56Alex Miller (Clojure team)destructuring is a macro, so order of evaluation is up to the macro#2016-01-1120:57Alex Miller (Clojure team)there are known issues with relying on the ordering of binding in :or for example - the :or definition is an (unordered) map, so each :or binding might be evaluated in any ordering (and this ordering has changed between releases in the past)#2016-01-1120:58Alex Miller (Clojure team)the assumption here is that the sequential outer destructuring binds a prior to the associative destructuring bindings in :or#2016-01-1121:00meow@alexmiller: that's good to know#2016-01-1121:00jaenOh I see, that makes sense. But in this case isn't the a outside of the map destructuring clause so the order should be defined?#2016-01-1121:00meowso my advice does apply#2016-01-1121:01Alex Miller (Clojure team)@jaen: that's true, I'm really just thinking through this as I type#2016-01-1121:01Alex Miller (Clojure team)it does seem to work at the repl, I'm just trying to convince myself that Clojure would guarantee that it should#2016-01-1121:02meowit does look like it should work#2016-01-1121:02meownot sure I would write it that way, but it should work#2016-01-1121:04cflemingI added explicit code for handling some of the tricky :or cases, but I might have missed that one. I actually didn’t realise that the values of :or could refer to other parameters.#2016-01-1121:04cflemingLike @alexmiller says, it sounds like a recipe for ordering confusion#2016-01-1121:05cflemingBut I’m assuming that all the :or clauses are evaluated after the actual parameters are bound.#2016-01-1121:05Alex Miller (Clojure team)I think that code is making an assumption about how defn works that is not guaranteed by any docs or reference material#2016-01-1121:06Alex Miller (Clojure team)which does not mean it doesn't work now or for an arbitrary period of time, but also means it could stop working at some future point#2016-01-1121:07jaenHmm, well#2016-01-1121:07spiedendoes anyone know how to use the “configure indentation” intention action?#2016-01-1121:07jaenI at least would assume that defn argument vector being, you know, a vector#2016-01-1121:07jaenGuarantees ordering.#2016-01-1121:07spiedenseems like it should let you configure additional symbols to be indented like e.g. defn, ec.#2016-01-1121:07spiedenetc#2016-01-1121:08spieden.. but it has no discernible effect on formatting when i use it#2016-01-1121:09meowwhat is contained in an argument vector#2016-01-1121:10meowor is it a parameter vector#2016-01-1121:11Alex Miller (Clojure team)@jaen: I'd say the vector guarantees that the incoming arguments are maintained in order. it does not necessarily mean that defn binds the incoming arguments to the parameters in order (although that's a reasonable assumption)#2016-01-1121:11cfleming@spieden: It does. Place the caret on the head symbol of the form you’d like to change indentation for. From the popup, select the option that corresponds to the formatting you need.#2016-01-1121:12cfleming@spieden: That specific instance of the form will be reformatted right away, others will need to be reformatted explicitly.#2016-01-1121:13Alex Miller (Clojure team)@jaen: for example, the defn macro implementation could pair up parameters and arguments in an (unordered) map and then let bind them in arbitrary order#2016-01-1121:13jaen@alexmiller: hmm... if I understand you correctly - given Clojure has strict evaluation what you mean is that, before calling a function, the arguments are evaluated left to right in the order of the argument vector, but the order compiler resolves binding names might not be sequential nonetheless, even though they are defined in a vector?#2016-01-1121:15Alex Miller (Clojure team)@jaen yes, essentially - those are two separate things - the vector in a defn is just syntax defined by the defn macro - it's up to defn how it's interpreted#2016-01-1121:15spieden@cfleming: am i missing something?#2016-01-1121:15spieden(i expected :bye to be two spaces in)#2016-01-1121:15cfleming@spieden: What’s the indentation you’re trying to achieve?#2016-01-1121:15cflemingOk, in that case you want either 1, or “Only indent"#2016-01-1121:16spiedenoohh#2016-01-1121:16cflemingI really need to put an explanation of how this works in the doc, sorry 😞#2016-01-1121:16cflemingHere goes:#2016-01-1121:16spiedenah the unit is level not spaces!#2016-01-1121:16cflemingUmm, no simple_smile#2016-01-1121:16spiedenmaybe just a label on the field#2016-01-1121:16cflemingOne sec#2016-01-1121:16cflemingHere’s how this works:#2016-01-1121:16spiedenhmm, setting it to 1 gave me what i expected#2016-01-1121:17cflemingThe fact that the indent is two spaces is set separately in Settings-&gt;Editor-&gt;Code Style-&gt;Clojure-&gt;Indent#2016-01-1121:18cflemingCursive indents forms assuming that you have a head symbol, some number of parameters, and then some number of body forms#2016-01-1121:19spiedenah, so the unit is number of parameters?#2016-01-1121:19cflemingSo the head symbol gets no indentation, then the parameters are all aligned, then the body forms are all just indented from the parent.#2016-01-1121:19cflemingCorrect.#2016-01-1121:19spiedenperfect, thanks#2016-01-1121:19cflemingSo that is the number of forms after the head form which will be aligned.#2016-01-1121:20jaen@alexmiller: gotcha; though I must say it might be somewhat confusing for the programmer given that vectors in Clojure imply ordering.#2016-01-1121:20cfleming@spieden: To get a feel for it, play around with (foo :a :c :d :e :f)#2016-01-1121:20cflemingwhoops, damn emoticons#2016-01-1121:20spieden@cfleming: makes total sense now — i should have experimented more#2016-01-1121:21cflemingNo worries, it needs some explanation in the doc, for sure, and probably in the popup too#2016-01-1121:21spiedenmaking a huge difference already!#2016-01-1121:34meow@cfleming: careful how you talk about my little emoticon buddies - they have feelings too, you know#2016-01-1121:35meowand reactji performance art is hard work for them#2016-01-1121:35meowbe gentle#2016-01-1121:37meow@jaen @alexmiller looking at it slightly differently, one could argue that this should be explicitly considered bad coding and no guarantees made as to the order of binding of args to params#2016-01-1121:37meowjust to emphasize the distinction#2016-01-1121:38meowwhoops, I said that wrong#2016-01-1121:38jaenI disagree. I can agree that {a :a b :b :or {a b b a}} is certainly bad coding, because maps don't guarantee ordering. But a vector?#2016-01-1121:38meowthe vector does guarantee the order of binding of arg to params, but not evaluation of params in the :or destructing#2016-01-1121:39jaenWell, if you say > vector does guarantee the order of binding of arg to params then [a & {:keys [b] :or {b (first a)}}] is valid according to that. a is ordered before the destructuring map.#2016-01-1121:41jaenThe thing Alex is trying to point out that there can be an abstraction leak of an implementation detail here - if the macro implementation is using a map (which are unordered) to store the parameter names, not a vector, it will break that guarantee.#2016-01-1121:41meowI don't like overly complex destructing in the param def but I'm not sure I can win this argument.#2016-01-1121:42jaenOh sure, I agree overtly complex destructuring is bad, it quickly starts becoming less readable than having a let in the body and destructuring there#2016-01-1121:42jaenBut it's not an excuse for imprecise semantics either.#2016-01-1121:42meowagree 100%#2016-01-1121:43meowI used to have an annoying friend that had a habit of saying "I agree with you 100% but..."#2016-01-1121:43jaen: D#2016-01-1121:43meowand he was serious#2016-01-1121:43meowclueless jerk#2016-01-1121:44jaenThat's imprecise semantics right there ;' )#2016-01-1121:44meowsimple_smile#2016-01-1122:20Alex Miller (Clojure team)@jaen: fwiw, I agree with you that your expectation is reasonable, and that it shouldn't be ambiguous :)#2016-01-1122:27Alex Miller (Clojure team)destructuring is actually implemented in clojure.core/destructure - a fn that rewrites into the bindings for a let#2016-01-1122:29Alex Miller (Clojure team)so this example would be invoked with something like (destructure '[[a & {:keys [b] :or {b (first a)}}] [[1]]]) where the data being bound is [[1]]#2016-01-1122:30Alex Miller (Clojure team)the result (re-formatted a bit) is the binding part of a let:#2016-01-1122:30Alex Miller (Clojure team)
[vec__21 [[1]]
 a (clojure.core/nth vec__21 0 nil)
 map__22 (clojure.core/nthnext vec__21 1)
 map__22 (if (clojure.core/seq? map__22)
           (clojure.lang.PersistentHashMap/create (clojure.core/seq map__22))
           map__22)
 b (clojure.core/get map__22 :b (first a))]
#2016-01-1122:31Alex Miller (Clojure team)and it's clear that this happens in-order such that a is available for the :or destructuring#2016-01-1122:34Alex Miller (Clojure team)while I maintain that nothing exists in the Clojure docs to guarantee this behavior, I think given the extensive use of this code both inside and outside Clojure, I think it's highly unlikely we would alter this aspect of the implementation#2016-01-1122:36Alex Miller (Clojure team)I'm going to file a ticket to clarify this stuff and add tests related to :or (which do not exist)#2016-01-1122:37jaenYeah, would be nice to document the fact that vector destructuring is sequential so that it is part of the language spec.#2016-01-1122:40meow@alexmiller: you rock!#2016-01-1122:42meow@jaen: so do you simple_smile#2016-01-1122:42meow❤️#2016-01-1122:42jaenNah, I'm just obnoxious xD#2016-01-1122:43meowas I aged it mellowed into sarcasm#2016-01-1122:45jaenYeah, at 26 it's probably just annoying : V But at least we do get a doc improvement out of that.#2016-01-1122:46Alex Miller (Clojure team)there is really a cluster of problems (mostly around :or) that would be nice to clear up (both in docs and in implementation)#2016-01-1122:51cfleming@alexmiller: Anything that makes the semantics of this clearer is great by me!#2016-01-1123:26Alex Miller (Clojure team)@jaen I created a ticket for this specific issue at http://dev.clojure.org/jira/browse/CLJ-1881 and a thing that groups a bunch of other tickets at http://dev.clojure.org/display/design/Destructuring+cleanup#2016-01-1123:28jaenNice : )#2016-01-1203:35cfleming@alexmiller: Thanks, I should go through the issues on that page and see what Cursive does with them. Looks like some good material for errors and inspections there.#2016-01-1203:43meowhow can we integrate Cursive with the new chat app#2016-01-1203:43meowhttps://hackpad.com/collection/wnikaeBENEE#2016-01-1203:59cfleming@meow: Step 1: Define a protocol simple_smile#2016-01-1204:01meowhang on, I just peed in my pjs#2016-01-1418:34jcromartiehello#2016-01-1418:34jcromartieI've been struck by the "Error creating JavaParameters" REPL startup error.#2016-01-1418:34jcromartieNot sure why. Not sure where to find more log output or anything like that.#2016-01-1418:35jcromartieI've got a multi-module project with many large modules#2016-01-1418:37jcromartieand checkout dependencies in one "top-level" module#2016-01-1418:37jcromartiedo I not need checkout dependencies when using Cursive?#2016-01-1418:40jcromartieI've got some cider-nrepl stuff in my .lein/profiles.clj that I've just removed, trying that...#2016-01-1418:41jcromartieinteresting... Failed to collect dependencies for [#object[org.sonatype.aether.graph.Dependency 0x7b33a95b "org.clojure:clojure:jar:1.7.0 (compile)"]#2016-01-1418:43jcromartiethis error is just for some of my modules, not all of them#2016-01-1418:43jcromartieI can start up a REPL for most of the library-style modules#2016-01-1418:59snowell@jcromartie: When Colin was helping me with the same issue, he pointed me to the Module settings. Make sure that it has an SDK set to “Project SDK” and that said SDK is a valid one#2016-01-1418:59snowellGranted, that didn’t fix my issue, but maybe it’ll help yours 😄#2016-01-1419:05jcromartiehaha, ok, I'll give it a look#2016-01-1419:05jcromartiedid you ever fix yours?#2016-01-1419:06jcromartieI saw you pop up in logs of this channel#2016-01-1419:06jcromartieand with no answers 😞#2016-01-1419:06hugesandwichNot sure if I should ask this here, but does anyone run figwheel directly from Intellij/Cursive using the instructions here - https://github.com/bhauman/lein-figwheel/wiki/Running-figwheel-in-a-Cursive-Clojure-REPL#2016-01-1419:08hugesandwichI'm able to get things working, but not sure what people are doing to deal with lein profile merging. I obviously could pass a config map of whatever settings I want for figwheel or create a figwheel.edn file, but neither sounds great as the complexity of my project.clj expands. Rather, I really just want to pass in a merged profile like running lein figwheel, but that doesn't play as well with cursive - among other things, I need to use a remote nrepl connection (did this in the past) in that case unless I'm missing something.#2016-01-1419:08jcromartiejust a guess, but could it be a run configuration?#2016-01-1419:11hugesandwichSo in other words, everything works great with lein figwheel since it merges my profiles correctly, but per the docs, this doesn't happen if you run it via a clojure script to make it play nice with cursive. I haven't ever done much with merging lein profiles via code, only at the command prompt. Just wondering if someone here is using cursive + figwheel and has a better workflow than duplicating configuration in project.clj. In general, I'd like to move away from the remote nrepl approach.#2016-01-1419:32snowell@jcromartie: No solution yet, but it’s not the end of the world, so I’ve gotten by with the regular nREPL external to the project#2016-01-1419:51jcromartiehm#2016-01-1419:51jcromartieso, "lein repl :headless" in the terminal?#2016-01-1419:51jcromartiethen connect from Cursive?#2016-01-1419:54jcromartiethat works#2016-01-1420:30snowellOr just edit the REPL configuration and check “Use nREPL in normal JVM process” instead of “Run nREPL with Leiningen"#2016-01-1421:22cfleming@jcromartie: @snowell: I’ll try to look at this today.#2016-01-1421:23cflemingI’ll probably need to add some logging and send someone a dev build, since that error comes back from IntelliJ#2016-01-1422:12cfleming@ikitommi: I’ll look into adding support for that.#2016-01-1502:57cfleming@jcromartie: @snowell: I have a feeling I’ve asked this before, but could you check after seeing this error if it appears in your log? From what I can tell, it should do. Help-&gt;Show log in Finder/Explorer#2016-01-1503:02cfleming@hugesandwich: I’ll check with bhauman what the best plan is here.#2016-01-1503:19hugesandwich@cfleming talked to bhauman, I guess his reasoning was write code if you must using leiningen.core, otherwise just use a figwheel specific config and deal with it#2016-01-1503:22hugesandwichthanks and if anyone including yourself has a better ClojureScript workflow that integrates well with the Cursive repl, let me know. For now, I'm just using a repl.clj and sticking my config under the main :figwheel key. Alternatively, I could create a figwheel.edn or inject something into (start-figwheel!). Don't have the time to invest in mucking around with lein to do manual profile mergin with leiningen.core. I think it's either that or remote nrepl from my understanding if you want to use cursive + figwheel without copying some configuration in more complicated scenarios.#2016-01-1511:57snowell@cfleming: Sadly, nothing appears in the log. Not even so much as a line saying that REPL was trying to start up 😕#2016-01-1512:57jcromartiethanks @cfleming I'll check the logs next time#2016-01-1512:57jcromartieright now I'm using "lein repl :headless" and connecting with a remote REPL run config#2016-01-1521:01timgilbert@hugesandwich: I have got figwheel kind of working but I had to tweak the stuff in that web page a good deal#2016-01-1521:04timgilbertI had to reach into figwheel's internals, and I'm not sure if this still works, but... https://gist.github.com/timgilbert/92061473de229fbb94c8#2016-01-1521:05timgilbert...but basically I did the profile merging on my own and then passed it into figwheel's api#2016-01-1521:06timgilbertKind of annoying to set up the first time, but once it's there I don't really have to mess with it much#2016-01-1521:18jeremys@hugesandwich: @timgilbert Hey guys, I was experimenting with the same issues (figwheel-sidecar from nrepl that doesn’t merges profiles). My solution was to use a figwheel.edn file that I slurp in project.clj#2016-01-1521:20jeremysit’s working for me even if it feels a bit too hacky...#2016-01-1521:22timgilbertHmm, yeah, looks like we've both got pretty much the same solution with different implementations, basically maintaining a profile-merged version of the build list#2016-01-1521:23jeremysyep#2016-01-1521:23timgilbertEach is kind of awful and hacky in its own special way. 😉#2016-01-1521:23jeremyslol I guess so#2016-01-1521:24timgilbertYour way isn't dependent on the figwheel internals, but my way doesn't put transactional code in project.clj#2016-01-1521:24jeremysexactly#2016-01-1521:26jeremysIn my case I can just start-figwheel!#2016-01-1521:26timgilbertI've been meaning to investigate boot for my cljs project anyhow, it seems like kind of a better fit for how my builds work#2016-01-1521:28jeremysit might I need leiningen to more easily deploy on heroku and I need lein profiles so that uberjar doesn’t build every cljsbuild config I have#2016-01-1521:43jeremysby the way I just realized, don’t try my stuff, it doesn’t work when using lein doo#2016-01-1813:13moizsjis cursive not supposed to suggest auto completion for required namespaces? Its working in the repl but not in the editor. Is this expected or am I doing something wrong?#2016-01-1813:14moizsj(ns feedagg.core (:require [feedparser-clj.core :as fp]) (:gen-class)) (fp/)#2016-01-1813:14moizsjI expect suggestion after the forward slash in the code abive#2016-01-1813:14moizsj*above#2016-01-1813:35moizsjI realized this is because the lib I am using does not include source. Is there a Cursive option to pull source? If not, whats the best way to attach the source? (assuming I have it)#2016-01-1813:36moizsjI dont see the lib under 'External Libraries'. Even though its declared as a dependency in my project.clj#2016-01-1813:38moizsj@cfleming: do you have any suggestions for attaching sources?#2016-01-1813:40sveri@moizsj: Did you refresh the leiningen project? leiningen automatically pulls the source#2016-01-1813:43moizsj@sveri: I just did an "invalidate cache and restart". Everything looks ok now. The lib appears in "External Libraries" and auto complete works too#2016-01-1813:43moizsj@sveri whats the right way to do this?#2016-01-1813:43sveriDepends on what is broken#2016-01-1813:44sveriTheoretically it should be enough to press CTRL+Shift+A, search for "refresh leiningen project" and execute this.#2016-01-1813:44moizsjsay I add a new dep to my project.clj, what should i do to make sure its picked up by cursive?#2016-01-1813:44moizsjok#2016-01-1813:44sveriSometimes however things break for cursive / intellij, this is when I do a "invalidate and restart" too#2016-01-1813:44sveriAfter adding a new lib to project.clj see my first suggestion. It works 99% of the time simple_smile#2016-01-1813:45moizsj@sveri: thanks, I'll try it next time I add a dep.#2016-01-1813:45sveriIf you have REPl running already you will have to restart that one too after adding a library to project.clj#2016-01-1818:16hugesandwich@jeremys: sorry, was away on business/family stuff so didn't see your message until now regarding lein profiles and figwheel. I tried something similar and not happy with it (hence my mention of figwheel.edn) but hey it works. It's either that for me or connecting via remote nrepl, but that's marked as to be depr, not to mention the usual "meh" with remote connections.#2016-01-1818:22hugesandwichStupid question to anyone - is there is a simple way to cntrl-c in a cursive repl (using run nrepl with lein) with intellij? For example when you've screwed up doing something with core.async and you're blocking your repl. I felt like I did this when I was using 14 but was using different keybindings. I upgraded to 15 and switched to emacs key bindings and can't remember where/if this option ever existed in a cursive repl. Using slime with emacs, I could cntrl-c twice. Works no problem on the same code from nrepl/emacs, and obviously restarting the repl works, but the point is to avoid that.#2016-01-1818:24hugesandwichI tried binding interrupt, but that didn't work. FYI, I know you can just use the toolbar, but I'm looking for the keybinding.#2016-01-1820:20jeremys@hugesandwich: no worries#2016-01-1821:52cfleming@moizsj: Does the lib in question provide a source artifact?#2016-01-1821:53cfleming@sveri: Actually, lein doesn’t allow pulling source artifacts at all. Cursive does, but it requires some black magic and is really only designed for Java deps.#2016-01-1821:54cflemingYou don’t tend to notice this since 99% of Clojure deps are distributed as source.#2016-01-1821:57cfleming@hugesandwich: Ugh, sorry, it looks like interrupt can’t be bound, it’s hard coded to the toolbar. I’ll separate that out so it can have a key bound do it.#2016-01-1901:16hugesandwich@cfleming Thanks so much. I thought I was missing something. Binding this would be great for repl sessions, much appreciated.#2016-01-1904:36moizsj@cfleming the lib I'm using (https://clojars.org/org.clojars.scsibug/feedparser-clj) does not appear to have source in its jar (checked in my .m2). So howz cursive able to show the source? And where's the source being stored? (assuming its pulling from somewhere). Is there a way to control this behaviour (say force a source pull for a specific lib etc)#2016-01-1904:38cfleming@moizsj:
Archive:  /Users/colin/Downloads/feedparser-clj-0.4.0.jar
  Length     Date   Time    Name
 --------    ----   ----    ----
      106  05-30-12 18:05   META-INF/MANIFEST.MF
     1890  05-30-12 18:05   META-INF/maven/org.clojars.scsibug/feedparser-clj/pom.xml
      109  05-30-12 18:05   META-INF/maven/org.clojars.scsibug/feedparser-clj/pom.properties
     2086  05-30-12 18:05   feedparser_clj/core$_main.class
     1959  05-30-12 18:05   feedparser_clj/core$loading__4784__auto__.class
     1494  05-30-12 18:05   feedparser_clj/core$make_category.class
     1480  05-30-12 18:05   feedparser_clj/core$make_content.class
     1597  05-30-12 18:05   feedparser_clj/core$make_enclosure.class
     3392  05-30-12 18:05   feedparser_clj/core$make_entry.class
     3800  05-30-12 18:05   feedparser_clj/core$make_feed.class
     1714  05-30-12 18:05   feedparser_clj/core$make_image.class
     1936  05-30-12 18:05   feedparser_clj/core$make_link.class
     1590  05-30-12 18:05   feedparser_clj/core$make_person.class
     1611  05-30-12 18:05   feedparser_clj/core$parse_feed.class
     1176  05-30-12 18:05   feedparser_clj/core$parse_internal.class
     1799  05-30-12 18:05   feedparser_clj/core.class
    11305  05-30-12 18:05   feedparser_clj/core__init.class
      270  05-30-12 17:54   project.clj
     4144  02-29-12 20:21   feedparser_clj/core.clj
 --------                   -------
    43458                   19 files
#2016-01-1904:38cflemingIt does contain the source file: feedparser_clj/core.clj#2016-01-1904:44cflemingYou can tell where it is by navigating to the source, and then using Navigate-&gt;Select in… and choosing Project View#2016-01-1905:05moizsjok..sorry i missed that. So supposing the source wasnt in there, would Cursive have done something abt it? Automatically attempt to search the source artifact in clojars and pull it down?#2016-01-1907:58cfleming@moizsj: No, this is tricky in Clojure. Cursive used to go out automatically but it was extremely slow because 99% of artifacts don’t have source artifacts.#2016-01-1907:59cflemingThere’s no good way to tell if a dep has them, so Cursive would always go out for a bunch of things that were never there.#2016-01-1907:59cflemingNow this only really works well for Java libs - the first time you navigate to a class you’ll get the option to attach the source to it.#2016-01-2013:53bplatzI've run into an updated project.clj not loading the updated dependencies in cursive's "External Libraries". This is after performing a lein clean and lein deps (at the terminal, not in cursive). Is this a known problem or is it possible I have something else messed up in my project(s)?#2016-01-2013:54bplatzThis results in when I do a CLJS build in cursive the old dependency shows up, but when doing the build from the command line all is fine.#2016-01-2015:41james@cfleming: Is there any news about support for inline REPL results? Before you’ve said that you’re waiting for JetBrains to add better support for in-editor pop-up widgets, so I was wondering if there has there been any progress in that area with IDEA 16?#2016-01-2015:52timgilbert@bplatz: not sure this will help you, but I usually need to go to the leiningen tab on the right side of intellij and hit the "refresh" button to pick up new library dependencies#2016-01-2015:59hugesandwich@bplatz I've had this same problem as well. Restarting IntelliJ seems to be the only fix for me most of the time. Also for some reason in IntelliJ 14 this would happen to me when somehow lein would get disassociated with intellij. On restart, it would ask me to restore the association. I haven't seen it happen in IntelliJ 15/since I updated cursive last, but I'm still having problems picking up new dependencies even with a refresh on project.clj, repl stop/start, etc. I'm on OSX latest and I think I've had the problem on my other linux work machine as well.#2016-01-2020:32cfleming@bplatz: @hugesandwich: Is this always with CLJS deps? I’ve never seen it, but I only use CLJS for testing. Does it happen with particular deps or randomly for all deps?#2016-01-2020:32cfleming@james: Sadly, nothing changed in v15 on that front. I was planning to do the work myself and send them a PR, but I never got time.#2016-01-2020:35cfleming@bplatz: You mention a problem when you do a CLJS build in Cursive, but Cursive doesn’t provide any CLJS build functionality. How exactly does the problem manifest?#2016-01-2020:39bplatzI've only noticed it with cljs. I run a repl script, clojure.main. #2016-01-2020:40bplatzBut if you open up the External Libraries you see the old versions there. Restarting does fix it. #2016-01-2020:41bplatzRunning the same script from a terminal window does build correctly, only when it is run from inside IntelliJ does it still include the old dependency versions. #2016-01-2020:42cfleming@bplatz: Ok, and refreshing in the leiningen toolwindow doesn’t help?#2016-01-2021:28james@cfleming: and nothing in v16 EAP either?#2016-01-2021:31cfleming@james: I haven’t checked that yet#2016-01-2021:31cflemingI actually spoke to the JetBrains guy responsible for it, I’ll check with him.#2016-01-2022:23bplatz@cfleming: I need to try the refresh, I think I tried it the first time it happened but I can't recall. I'll give it a shot next time I can reproduce it and let you know. #2016-01-2022:24cfleming@bplatz: Thanks - I believe that should work, and it’s definitely a bug if it doesn’t. Note that you’ll need to restart your REPL too.#2016-01-2100:56hugesandwich@cfleming i've seen it both with clj and cljs dependencies before in v14 (older version of cursive), but since going to v15 the other day, I've been working on cljs 95% of the time so haven't noticed anything in clj yet. I'll try to test more tomorrow when I get a chance.#2016-01-2108:00moizsj@cfleming: I wish to change the color used by the Cursive REPL when it prints exceptions messages (in Darcula). I thought changing the color of error output under 'Console Colors' would do it. Also tried 'error' under Log Console. But dint have any effect. Which setting should I be modifying? Thanks!#2016-01-2219:53hugesandwich@cfleming Getting back to you as promised - just added clj dependency and after a repl restart, seems like there are no issues which makes sense. Tried refresh on the lein project.clj file, project tree, and toolbar. Everything seems OK, but I am still randomly getting strange behavior with cljs dependencies following the same process. Lein itself seems OK grabbing new dependencies for cljs so I know it's not a mistake in project.clj, only Cursive is not seeing the change. Cursive doesn't resolve/autocomplete anything until a restart of intellij. Anyway, I'll try to get you more details the next time it happens since so far I'm not the only one with this issue.#2016-01-2221:07cfleming@hugesandwich: Thanks. So when you get this problem with cljs deps, here are some things to check after refreshing the project: 1. do the deps appear in the External Dependencies section at the bottom of the project view? 2. In File-&gt;Project Structure-&gt;[your module]-&gt;Dependencies, are the libraries attached to your module? 3. In File-&gt;Project Structure-&gt;[dependency library] does it have any content in the pane on the right hand side?#2016-01-2221:14cfleming@hugesandwich: Actually, I just searched the issues because I dimly remembered something like this (I just have too many issues). I found https://github.com/cursive-ide/cursive/issues/1056 which might be relevant. Unfortunately I didn’t copy the relevant conversation, and the IRC lazybot has been down for ages now.#2016-01-2221:15cflemingBut IIRC (and based on the title) this was in larger multi-module projects, and the ClojureScript version was different in different modules for the same project. It’s not quite what you’re describing since IIRC this gave problems indexing core cljs forms, but I thought I’d mention it as a possibility.#2016-01-2320:07gerredWorking on getting used to Cursive...if I end up with extra surrounds, how do I lift my expression out of it?#2016-01-2322:11danielcompton@gerred: splice sexp. I've bound it to Option S#2016-01-2322:12danielcomptonThat removes the surrounds though, might not be quite what you want. #2016-01-2323:37gerred@danielcompton: Maybe. Sometimes I get caught with ((expr)) with Cursive and with structural editing on it's hard to get out of it.#2016-01-2323:38gerredbiggest pain with paredit-style editing thus far is getting tangled up in things like that.#2016-01-2323:38danielcompton Yep splice sexp will be what you're after#2016-01-2323:39gerredperfect.#2016-01-2323:39danielcomptonThis is a good reference http://pub.gajendra.net/src/paredit-refcard.pdf#2016-01-2409:24cfleming@gerred: Raise will also do what you want there#2016-01-2409:24cflemingDepending on where your caret is#2016-01-2508:47thosmos@cfleming: just bought a personal license but am getting an invalid license error#2016-01-2509:04cfleming@thosmos: Does your licence certificate have a blank line in it, between the #00xxxx line and the the hex part?#2016-01-2509:05cflemingAnd you’re copying the whole thing, including the BEGIN LICENCE and END LICENCE lines?#2016-01-2509:20thosmosyes and yes (just DM'd you)#2016-01-2510:19joriHi, I'm adding a clojure component to a biggish java multimodule project. I was hoping that the Java modules that the clojure component depends on would be compiled and added to the classpath when I run the clojure repl. This does not happen. Is this a feature request, a bug, or a user error?#2016-01-2516:58polymerisHi. Relatively new to both idea & cursive. What config files do you recommend including in .gitignore?#2016-01-2517:01polymerisMaybe it's easiest to just ignore everything idea-related#2016-01-2517:10imre@polymeris: check out https://github.com/github/gitignore#2016-01-2517:11imreI usually mix and match from what's there#2016-01-2517:13timgilbert@polymeris: as far as Idea-specific things, I've got .idea and *.iml in mine#2016-01-2517:16polymeristhanks, @imre. There is some stuff, e.g. .idea/replstate.xml that is in none of those files, but seems like a good starting point
#2016-01-2517:16polymerisYeah, that might be the simples, @timgilbert. Just means everyone has to setup their own project. No big deal.#2016-01-2517:32imre@polymeris check out the general folder - editor-specific files are there#2016-01-2517:32imreThere's one for all jetbrains ides#2016-01-2517:34polymerisYup. But it suggests either ignoring everything idea-related or some specific files (commented), which do not include cursive files.#2016-01-2517:34polymerisI think I'll just go with the ignore everything option.#2016-01-2517:34imrePretty much the entire .idea folder can be ignored#2016-01-2517:35imreAnd it probably should#2016-01-2517:35polymeris(Where everything = *.iml & .idea)#2016-01-2517:35imreYeah#2016-01-2518:43cfleming.iml can be ignored if you’re using Leiningen since they’ll be regenerated on every sync (i.e. project open)#2016-01-2518:44cflemingI check in everything in .idea except workspace.xml and replstate.xml#2016-01-2518:45cfleming@polymeris @imre: In teams this can sometimes be annoying since the config files can change depending on the plugins each dev has installed.#2016-01-2518:56imre@cfleming @polymeris I try not checking in anything editor-specific. There's a chance others will use a completely different env, or that I will be working on a project from different machines with different configs even#2016-01-2519:24sveri@cfleming: @polymeris I agree with what @imre said. I consider it good practice to only commit source files. Especially editor related files should be kept out of source control.#2016-01-2614:18imre@cfleming: are there any features planned where you would be able to tell Cursive that a certain form - creates vars in some context - is a custom threading macro#2016-01-2620:14hugesandwich@cfleming Might have found an issue, but I assume there's probably an existing issue I couldn't find - I had a file with an unclosed namespace declaration (unmatched opening paren, i.e. no closing paren). Tried to open the file and got a stackoverflow error every time, even after multiple restarts. I messed around and traced it to a deftype statement. Seems like it happens even when the file is open as long as there are 2 or more protocols on the deftype. With one, it doesn't seem to happen. I closed the parens by opening the file in another editor and fixing the mistake, and all is well again. I'm guessing Cursive is causing this since it only happens when the plugin is active and I am assuming you do some parsing when loading the file. I'm on Intellij15, OSX. I've only seen this happen with a namespace, not with unclosed functions or other s-expressions.#2016-01-2622:22puzzlerI'm really struggling to get a figwheel repl running in cursive using a luminus template as the starting point. I followed the steps here: https://github.com/bhauman/lein-figwheel/wiki/Running-figwheel-in-a-Cursive-Clojure-REPL but the figwheel server doesn't see the built clojurescript (which luminus comes configured to put in target/cljsbuild), presumably because figwheel doesn't do leiningen profile merging, so it is ignoring all the luminus project.clj settings and just using the default resources/public directory. Anyone else have any luck getting this working?#2016-01-2622:32cfleming@puzzler: There was some discussion the other day, see https://clojurians.slack.com/archives/cursive/p1452798389001629#2016-01-2622:34cflemingI haven’t tried it myself, but I’m planning to soon to document this since it’s a struggle for a lot of people I think. I don’t use CLJS myself so I’m still not sure of all the required possible configs.#2016-01-2622:34cflemingI’m planning to make a built-in CLJS REPL type which will hopefully do all this automatically.#2016-01-2622:52cfleming@imre: Yes, both of those are planned. The full solution is an API that people will be able to use to add support for macro forms with a public repo which everyone can contribute to.#2016-01-2622:53cfleming@imre: I’m planning a workaround until I get that done, which will allow simply saying: this form defines a var like def, this is a binding form like let, or this is a threading form like ->.#2016-01-2622:53cflemingThat’ll probably be an 80% solution.#2016-01-2706:25meowI'm on a borrowed Windows 10 laptop about to install IntelliJ/Cursive, do I need to install git first?#2016-01-2706:40meowNevermind: https://www.jetbrains.com/idea/help/using-git-integration.html#2016-01-2707:13moizsjDoes cursive support private repos? I mean can it handle lein dependencies coming from a private repo?#2016-01-2707:40puzzlerSpeaking of git support, it seems to me that IntelliJ doesn't store the ignore file information, entered through its git interface, in .gitignore. Anyone else encountered this? If I'm right, where is it storing that information?#2016-01-2707:48danielcompton@puzzler: not too sure on your point, though on a tangent, I like the .ignore plugin#2016-01-2707:50meowThe GitHub integration is fantastic.#2016-01-2707:51meow@danielcompton: I'll have to install that .ignore plugin.#2016-01-2708:39cfleming@moizsj: How are your private repos accessed? Cursive should support this, although there’s an issue with the s3 private wagon which I haven’t had time to look at.#2016-01-2708:40cflemingCursive basically just delegates to lein, so it should all work, modulo the fact that Cursive does a lot of classloader magic to invoke lein so plugins are occasionally funky#2016-01-2708:42cfleming@puzzler: I must admit I’ve never tried that, I just use .gitignore directly. I’ll check tomorrow.#2016-01-2708:49moizsj@cfleming: we do use s3 wagon private. I actually did lein deps from outside cursive and then hit refresh in Cursive, and everything seems ok. But I dont know if it would've worked if I hadnt done lein deps first. What sort of issues should I expect with s3 wagon private? And what are the workarounds if any?#2016-01-2708:50cfleming@moizsj: lein deps on the command line is usually the best workaround since then the artifacts will be cached in your m2 repo. That may not work correctly if you’re using snapshots though, it may try to contact the repo every time then depending on the configuration.#2016-01-2708:51cfleming@moizsj: https://github.com/cursive-ide/cursive/issues/1064#2016-01-2708:51cflemingI haven’t investigated that one.#2016-01-2708:52moizsj@cfleming: thx, the workaround seems easy to deal with. While I have you here, is Cursive's inability to resolve symbols coming defonce or other macros a known issue?#2016-01-2708:53moizsj*coming from#2016-01-2708:54cfleming@moizsj: Yes, it is. defonce should work though, I saw the issue about that but haven’t had time to look at it. The reference issue for macros is https://github.com/cursive-ide/cursive/issues/147#2016-01-2708:55imre@cfleming: good to know the feature is being looked at#2016-01-2708:55cfleming@imre: Yes, that’s really the #1 outstanding thing in Cursive#2016-01-2708:55imreit would be nice to also be able to define these on the project level#2016-01-2708:56imrein addition to some central repo#2016-01-2708:56cflemingUnfortunately the full fix is complicated, which is why I still haven’t released it a year and a half later.#2016-01-2708:56cflemingYes, that will be required for in-house macros in private projects.#2016-01-2708:56imreyeah, I'm sure it's not as simple as I might imagine#2016-01-2708:56moizsjdefonce isnt working (its also dynamic)#2016-01-2709:02cfleming@moizsj: BTW you asked about the error output colour in the REPL - I think it’s under Console Colours-&gt;Error Output#2016-01-2709:02cflemingLet me know if that doesn’t work.#2016-01-2709:03moizsj@cfleming: Thanks I'll double check but I think i tried that. Abt the defonce, something like this does not work (defonce ^:dynamic some-str "test")#2016-01-2709:07moizsj@cfleming: checked it, does not have any affect#2016-01-2709:07cfleming@moizsj: That’s weird.#2016-01-2709:08cflemingI’ll try to take a look tomorrow#2016-01-2709:08moizsj@cfleming: sure, thanks!#2016-01-2709:12cfleming@moizsj: I’m pretty sure that’s the colour it uses. One thing you could try is changing the colour and restarting IntelliJ. It’s possible I look the colour up once and store it in a static variable, rather than looking it up each time.#2016-01-2709:12cfleming(which I shouldn’t do, obviously)#2016-01-2709:15moizsj@cfleming: yup thats what it was, works after restart#2016-01-2709:15cflemingOk, great, at least there’s a workaround#2016-01-2709:16moizsj@cfleming: thanks a bunch#2016-01-2709:16cfleming@moizsj: No problem!#2016-01-2716:39gerreddoes Cursive work pretty well with WebStorm? I have both, but if when doing web dev I can just stick with WebStorm that'd be pretty great.#2016-01-2717:43shaun-mahood@gerred: Do you mean using WebStorm instead of intelliJ?#2016-01-2717:47gerredexactly. #2016-01-2717:48gerredAre there any IntelliJ specific (projects, apis) features? The IntelliJ elixir plugin does, but I couldn't find anything in Cursive.#2016-01-2717:52shaun-mahoodAs far as I know it only works with IntelliJ#2016-01-2719:05hlshipI'm doing some more interesting things with ANSI escape codes; moving the cursor around to do some stuff. What are the odds of Cursive's output window handling save cursor position / cursor up / cursor horizontal absoluate / clear to end of line / restore cursor position (s A G K u, respectively)?#2016-01-2719:05hlshipEven the Terminal window does a lousy job on these. Looks great in Terminal.app, though.#2016-01-2721:41cfleming@gerred: Unfortunately Cursive doesn’t work in WebStorm right now, Cursive relies on the Java support in IntelliJ which isn’t present in WS. There’s some hope that it might in a soonish kind of timeframe, JetBrains have a project to modularise IntelliJ which will make the Java support into a normal plugin which could be installed in WebStorm, PyCharm etc.#2016-01-2721:42cfleming@hlship: If you file an issue I can look at it. I have some infrastructure around this now, but I’d have to look at the details of how they work.#2016-01-2721:45gerredah ha, that makes sense.#2016-01-2812:47mishagreetings! it's about cursive + figwheel repl again. after following https://github.com/bhauman/lein-figwheel/wiki/Running-figwheel-in-a-Cursive-Clojure-REPL I get expected REPL output:
Starting nREPL server...
/Library/Java/JavaVirtualMachines/jdk1.8.0_31.jdk/Contents/Home/bin/java -Didea.launcher.port=7533 "-Didea.launcher.bin.path=/Applications/IntelliJ IDEA 15 CE.app/Contents/bin" -Dfile.encoding=UTF-8 -classpath
...
Figwheel: Starting server at 
Figwheel: Watching build - mybuild
Compiling "resources/public/js/main.js" from ["src" "script"]...
Compile sources, elapsed time: 2344.571071 msecs
Successfully compiled "resources/public/js/main.js" in 3.12 seconds.
...
Prompt will show when Figwheel connects to your application
To quit, type: :cljs/quit
cljs.user=>
but repl input text area is unresponsive, and after 2-3 minutes repl prints out: for debug:
cljs.user=> No nREPL ack received
Disconnected from the target VM, address: '127.0.0.1:61979', transport: 'socket'

Process finished with exit code 255
for run:
cljs.user=> No nREPL ack received
Choose focus build for CLJS REPL (default) or quit > 
Process finished with exit code 137
#2016-01-2812:49mishadefault in "Choose focus build for CLJS REPL (default)" is a
:cljsbuild {:builds [{:id "default"...
#2016-01-2812:50mishaam I missing something basic? or is there a major issue with the setup? thanks#2016-01-2812:52imrehave you browsed to your web app from a browser?#2016-01-2812:54mishayes, otherwise cljs.user=> would not show up#2016-01-2812:54mishathen it dies out as expected (browser console):
Figwheel: socket connection established
utils.cljs:38 Figwheel: trying to open cljs reload socket
socket.cljs:53 WebSocket connection to '' failed: Error in connection establishment: net::ERR_CONNECTION_REFUSED
#2016-01-2812:56mishaI assume that something is wrong" above" figwheel, because it compiles stuff, page gets rendered, etc.#2016-01-2812:59mishahttps://github.com/cursive-ide/cursive/issues/842 suggests there might be a breakpoint, but I found none#2016-01-2813:01imreI'm so puzzled that my slack crashed#2016-01-2813:15misha! I messed up REPL settings lol. used use nREPL in normal JVM process instead of use clojure.main in normal JVM process -_-'#2016-01-2813:18mishaoh, the output just mirrors figwheel repl output, without built in pprint and syntax highlight harold#2016-01-2813:20mishabut autocomplete works. do recommend over plain figwheel repl#2016-01-2900:51cfleming@misha: Right, Figwheel does have an nREPL option but you have to configure it, and then start Figwheel and start the REPL in Cursive. IMO the clojure.main one is the best experience right now.#2016-01-2900:52cflemingI’m going to be making that a first-class citizen soon.#2016-01-2902:50cfleming@danielcompton: You can even create your own if you want to: Settings-&gt;Editor-&gt;Live Templates#2016-01-2902:50cflemingCheck the ones there for examples of how they work.#2016-01-2903:47shaun-mahoodOh that looks really useful - going to have to play with some live templates tomorrow,#2016-01-2908:34cfleming@james: So thinking about it, there actually might be a workaround for the inline evaluation thing.#2016-01-2908:37cflemingIt’ll probably be obvious that the result spans more than one line if it’s a map or whatever. I can show a shortened preview version on a single line, but what I can’t do easily is make that clickable or expandable.#2016-01-2908:38cflemingHowever what I can probably do is put a marker in the gutter, and also add a keyboard action for “Show full result for current line”. So you could pop it up by using the key or by clicking in the gutter.#2016-01-2908:38cflemingIt’s a little clunky, but it’s better than nothing.#2016-01-2908:42cflemingIt could possibly even pop up automatically if the result is multi-line, and when the popup is hidden you’d just see the single line again.#2016-01-2908:47doddeninoHi everyone!#2016-01-2908:59james@cfleming: That sounds like a great start.#2016-01-2909:01jamesWhen (if) JetBrains add support for better in-editor overlays, then hopefully it wouldn’t be a lot of work for you to move over to using the new approach.#2016-01-2909:12cfleming@james: Right, that’s what I’m thinking.#2016-01-2909:13cflemingI’ll investigate to see how I can get it looking.#2016-01-2909:14james@cfleming: I'm really looking forward to trying out what you come up with.#2016-01-2909:14cfleming@james: Cool, I have some things queued up but I’ll try to get to it soon, it’s a popular request.#2016-01-2909:18imre@cfleming: is there a place where you can set a keyboard shortcut to send a specific command to the repl no matter where in the source you are?#2016-01-2909:20cfleming@imre: I think what you’re after is https://github.com/cursive-ide/cursive/issues/85#2016-01-2909:21cfleming@imre: This is the second thing on my new-functionality list after parinfer.#2016-01-2909:21cflemingSo hopefully within a couple of weeks.#2016-01-2909:24imresounds great#2016-01-2909:24imreI found the run tests... commands very useful lately#2016-01-2909:24cflemingGreat, I really like how that works too.#2016-01-2909:24cflemingAre you using the visual diff for data structure results?#2016-01-2909:24imrebut couldn't find one that runs all the tests from all the ns#2016-01-2909:24cflemingI find that invaluable.#2016-01-2909:25imreyeah it's very handy#2016-01-2909:25cflemingThere isn’t one, yet - currently I just delegate that to lein or whatever you’re using.#2016-01-2909:25cflemingBut I’m planning an IntelliJ-style test runner.#2016-01-2909:25imregreat stuff#2016-01-2909:26imreif issue 85 is done, one could define a custom repl command to do it in the meantime#2016-01-2909:26cflemingYes, for sure.#2016-01-2909:26cflemingBut it’s nice having little green icons and bars simple_smile#2016-01-2909:27imreyep#2016-01-2909:27imreso far I'm having a wonderful experience with Cursive, been using it since early 2014, some excellent progress has been made#2016-01-2909:29cflemingGreat, I’m glad you’re enjoying it! I’m hoping to file off a lot of rough edges this year, and add some great new stuff too.#2016-01-2909:29cflemingEspecially for cljs, which needs a little love.#2016-01-2909:32imreyeah, the whole cljs ecosystem has a long way to go#2016-01-2909:32imreto catch up#2016-01-2909:33cflemingIt’s improving rapidly, though, and I think with some tooling in Cursive it’ll come pretty close.#2016-01-2909:33imrehopefully!#2016-01-2909:33cflemingMost of the pieces are there, they just need some polish.#2016-01-2909:34imrethe shite I had to go through to get proper unit testing was not pleasant#2016-01-2909:34imre(not talking about cursive ehre)#2016-01-2909:34cflemingYeah, that’s one of the things I really want to add - equivalent functionality to what Cursive offers for clojure.test#2016-01-2909:48imreI think the deeper problem right now is that there's no simple, out-of-the-box solution in cljs for lein test#2016-01-2909:48cflemingRight, doo seems to be the state of the art, but I’ve heard it’s finicky - I’ve never tried it myself#2016-01-2909:49imrethe only thing is doo doesn't support windows at all#2016-01-2909:50imreand although it sounds weird to develop clojure/script on windows, some people are stuck with it#2016-01-2909:50imreanyway#2016-01-2909:50imreI'll stop ranting simple_smile#2016-01-2909:51imreFYI I ended up using karma to run my cljs unit tests and I really like the karma vision#2016-01-2909:51doddeninoHey, not very in-topic, but is it normal for intellij's search everywhere (shift-shift) to give only exact matches?#2016-01-2909:52imreof being able to configure at runtime what engine and reporter to use#2016-01-2909:53cflemingRight, cljs tooling is complicated by the number of runtimes that have to be supported#2016-01-2909:54cfleming@doddenino: I’m actually not sure, I don’t use it much myself. More relevant to Cursive is that many Clojure elements aren’t found there (like namespaces)#2016-01-2910:12doddenino@cfleming I see, I'll check online later on as this is pretty much a show stopper for me 😞#2016-01-2918:28KamuelaWhat does it seem like the default indenting structure for Cursive/IntelliJ is? I’m noticing something like 8 spaces#2016-01-2918:34KamuelaAlso, what’d be the equivalent of terminal “lein ring server-headless"#2016-01-2919:10misha@kamuela: try to set Preferences -> Editor -> Code Style -> General tab -> "Default to Only indent" checkbox on#2016-01-2919:12Kamuela@misha: thanks, did the trick simple_smile#2016-01-2919:13mishawithout it (and maybe something else) indentation length depends on context, e.g. macros name:
(rum.core/defc some-component []
               [:h1 "yo"])
vs.:
(rum.core/defc some-component []
  [:h1 "yo"])
#2016-01-2919:14misha@kamuela: np#2016-01-2923:31KamuelaI noticed that cursive gets really angry if you try to remove parentheses. Am I doing it right by just copying and pasting out full forms?#2016-01-2923:31cfleming@kamuela: It’s probably structural editing messing with you, see https://cursive-ide.com/userguide/paredit.html#2016-01-3001:14Kamuela@cfleming: after reading that I agree with and understand the default settings #2016-01-3004:25polymerisis there a way to buy a cursive license without a credit card?#2016-01-3007:19cfleming@polymeris: Can you use PayPal?#2016-01-3009:03polymerisI'd have to check, @cfleming#2016-01-3009:03polymerisI have never used it, but I think it is now possible#2016-01-3009:21cfleming@polymeris: Ok, let me know. They’re the only two options I have right now, except for bank transfer that’s usually expensive because I live at the ends of the earth simple_smile#2016-01-3014:27Alex Miller (Clojure team)I've had some good luck using Transferwise for international payments (not all countries of course) - they offset currency exchange for transactions going in opposite directions to reduce costs#2016-01-3020:22danielcomptonhttps://stackoverflow.com/questions/35089323/running-clojure-project-in-cursive#2016-01-3020:22danielcomptonCurrencyfair is another similar service that my boss uses#2016-01-3020:46polymerisThanks#2016-01-3020:47polymerisI can't get paypal to work, yet... maybe I really do need to jump into the 21th 20th century, and finally get a credit card#2016-01-3108:45cfleming@alexmiller: @danielcompton: Thanks, I’ll take a look.#2016-01-3120:05KamuelaDo you lose anything in a Clojure context to use the community edition of IntelliJ?#2016-01-3120:11sveri@kamuela: Not that I know, there should be no difference#2016-02-0100:11danielcompton@kamuela: you can’t do your sweet sweet JSP programming with the community edition. Also, the JavaScript stuff isn’t in the Community Edition IIRC#2016-02-0100:44Kamuela@danielcompton: so cljs is off the table?#2016-02-0100:45danielcomptonnot off the table, but I don’t think you’ll get as nice interop. But I’ll let cfleming give you the official word on that, as I might be wrong. Webstorm has the JS stuff, so you might be able to use Cursive in Webstorm for CLJS stuff#2016-02-0101:18meowPretty sure Cursive doesn't work in Webstorm yet.#2016-02-0109:59cfleming@kamuela: @danielcompton: @meow: Right, Cursive doesn’t work in WebStorm yet, although I hope it might soon. But for Clojure and cljs there’s no difference between Community and Ultimate - Cursive doesn’t use the JS integration in IntelliJ at all.#2016-02-0110:03moizsj@cfleming: is there an existing issue related to the debugger where execution moves on only after hitting resume multiple times?#2016-02-0110:04cfleming@moizsj: I’m not sure if there’s an issue for it, but it’s a known quirk.#2016-02-0110:04cflemingIt’s because you get several executable statements on the same line.#2016-02-0110:04cflemingThat can also happen even though it doesn’t look like it in your code because of macroexpansion.#2016-02-0110:05cflemingDestructuring is a common cause of this, for example.#2016-02-0110:05moizsjah i see..so it moves on only after the underlying java statement have all been stepped over?#2016-02-0110:05cflemingI plan to investigate to see if I can stop that happening, but I haven’t done so yet, and it’s also not clear whether that would be desirable - if in your code you actually have multiple expressions per line you might want to stop there.#2016-02-0110:06cfleming@moizsj: Well, it’s bytecode rather than Java, but in essence yes#2016-02-0110:07cfleming@moizsj: If you don’t mind watching talks I spoke at Clojure/West about the debugger last year and talked about that and many other quirks of debugging Clojure#2016-02-0110:08moizsj@cfleming: will defintely revisit it. have seen it once but in a hurry. thanks!#2016-02-0110:23imreis anyone aware of a keyboard shortcut to extend selection to left or right, staying on the current structural editing level?#2016-02-0110:23imreso say I have the following structure:#2016-02-0110:24imre
{:foo    {:bar 1}
 :baz    {:quux 2}
 {:a :b} {:asdf 3}
#2016-02-0110:25imreand I position the caret onto :quux, extend selection thrice so {:quux 2} is selected#2016-02-0110:25imreand then I want to include :baz in the selection#2016-02-0110:25imrebut not anything else from the main map#2016-02-0110:26cfleming@imre: There isn’t one right now. You can use the “sticky selection”, which is sort of like the Emacs mark#2016-02-0110:26cflemingBut I’m planning to add a “extend selection to next/previous form”, which CCW has and a lot of people like.#2016-02-0110:26imregreat to hear that#2016-02-0110:27cflemingThat’s in the very-short queue#2016-02-0110:27imreI'll have a look at sticky but I assume it doesn't obey structural editing rules s#2016-02-0110:27cflemingWell, you can combine it with the structural movement.#2016-02-0110:28cflemingi.e. mark, move over right form#2016-02-0110:28cfleming“Toggle Sticky Selection” is the action#2016-02-0110:28imrejust tried that, it could be useful yeah#2016-02-0110:29imreI'll bind it to something and try#2016-02-0110:29cflemingBut the grow selection commands are what you really want, I think.#2016-02-0110:29cflemingAnd they’ll be more important once I implement extract method.#2016-02-0110:29imreyep#2016-02-0110:29imrethanks for that, Colin#2016-02-0110:29cflemingNo worries#2016-02-0114:21Kamuela@cfleming @danielcompton thank you both for letting me know#2016-02-0114:58imre@cfleming: that mark-and-go thing works nicely#2016-02-0211:38michael_at_sosupperHi all. Question. I have a very simple new file (ns whatever (:require [clojure.java.jdbc :as sql]) , and I'm not able to close the ns form with )#2016-02-0211:39michael_at_sosupperStructural editing I assume is preventing me, even though proper structure would have a closing ) for the ns form.#2016-02-0211:39michael_at_sosuppereven doing the shift/command/O is being silently denied#2016-02-0211:39val_waeselynck@michael_at_sosupper: bottom -right - look for Structural:On and click#2016-02-0211:40michael_at_sosupperRight, I could disable it. But why should I have to?#2016-02-0211:40val_waeselynckhmm maybe the parenthesis is matched further down the file ?#2016-02-0211:40michael_at_sosupperit's a new empty file#2016-02-0211:41val_waeselynckok#2016-02-0211:41val_waeselynckwell, no idea#2016-02-0211:41michael_at_sosupperit's either a bug, or some "feature" which I don't understand 😕#2016-02-0212:01imreyou probably have overwritten a ) with something else or copy-pasted (:require [clojure.java.jdbc :as sql] from another file?#2016-02-0213:38doddeninoA bit OT, but is IDEA ultimate license subscription only? Or can I pay for it once and use it forever without updates?#2016-02-0214:50rauhSo I'm staring an nREPL with "Run nREPL with Leiningen" and then do a load-file to start figwheel on top of it. Works except that I can't send any command at the REPL prompt. It just hangs. The browser never receives a websocket frame about it. The exact same procedure works at the command line. Thoughts? How do I start fighweel when I absolutely need to use leiningen profiles?#2016-02-0214:55imrewhat I did was I made the default project config how figwheel needed it and then created a :no-figwheel profile to nil out the details that only figwheel needs#2016-02-0214:55imrethat way whenever I don't need figwheel I can just run other lein tasks with that profile on#2016-02-0214:55imreugly but works#2016-02-0215:30rauh@imre: That's not a bad idea!#2016-02-0215:30rauhI might go that way. I'm currently trying the fighweel +nrepl way described in their wiki but nothing works at all...... ;(#2016-02-0215:31imreI think they have a section on their wiki specifically for Cursive users#2016-02-0215:31imrebut that goes through clojure.main#2016-02-0215:31imrenot nrepl#2016-02-0215:31imre😞#2016-02-0215:32rauhYeah I wish I could just specify ANY command and use that REPL.#2016-02-0215:38rauhUgh, just got it working. Piggieback middleware wasn't applied since I had an exception (wrong :main). Now it works and I only deal with remote nREPLs in Cursive. No more problems. fingers crossed#2016-02-0220:19simax99@cfleming: I don’t know if this is an IntelliJ problem or a Cursive one because I don’t know where one ends and the other starts. My problem is, I keep marking a directory (CLJC) as a source root in my project. I have CLJ and CLJS folders marked as source roots and when the project opens the icons for all 3 folders look fine but after I see “Synchronizing Leiningen projects” etc on the IntelliJ status bar the icon for CLJC folder reverts back to the standard folder icon - and it stops my project from building. I have to remember to Mark Directory as Sources Root every time I open the project. I had a poke around in the .iml file and noticed the following lines: <sourceFolder url="file://$MODULE_DIR$/src/clj" isTestSource="false" /> <sourceFolder url="file://$MODULE_DIR$/src/cljs" isTestSource="false" /> So I added another for my CLCJ folder <sourceFolder url="file://$MODULE_DIR$/src/cljc" isTestSource="false" /> But after the “Synchronizing Leiningen …..” stuff it keeps wiping that line out. I’m just guessing with .iml file stuff, I don’t know much about IntelliJ. Is this a Cursive issue or an IntelliJ one? I’m using IntelliJ 15.0.3 Community Edition. Cursive 1.1.0-15.#2016-02-0221:10cfleming@simax99: It’s not either, really. The idea is that when you manage your project with leiningen, when you sync Cursive will update all your config to match what’s specified in the project.clj. The Maven integration works the same way. So what you need to do is add that directory as a source directory in your project.clj, and Cursive will mark it as such when it syncs.#2016-02-0221:12cfleming@michael_at_sosupper: Yes, normally once the file gets unbalanced, you have to disable structural editing temporarily. Another workaround is just to cut and paste a closing paren where you need it.#2016-02-0221:13cflemingI’m assuming that your unbalanced parens are the result of a cut and paste - I’m planning functionality to make that harder to do.#2016-02-0221:14simax99@cfleming: Great, thanks that did the trick. So what does Mark as source root in IntelliJ mean. Does it relate to VCS?#2016-02-0221:16cfleming@simax99: No, it does what you’d expect, it’s just that it gets overwritten in managed projects (lein, maven etc). This is so that if your project.clj or pom changes (i.e. you remove something as a source root in that file) the changes will be correctly propagated to the project.#2016-02-0221:16cflemingIf your project were a plain IntelliJ project rather than a managed one, you’d use that to manually specify your sources.#2016-02-0221:17simax99@cfleming: Ah, ok. Thanks for the explanation. All good now.#2016-02-0405:04moizsjCursive hangs when I press option+Enter on Mac to auto-require the suggested require statement. Anybody else noticed this?#2016-02-0408:50cfleming@moizsj: No, no-one else has reported it, at least.#2016-02-0408:50cflemingDo you mean the whole UI freezes?#2016-02-0408:51moizsjyup, pretty much have to restart intellij#2016-02-0408:55cfleming@moizsj: IntelliJ should take some automatic thread dumps when that happens, can you check, and if there are any file an issue and attach them? https://intellij-support.jetbrains.com/hc/en-us/articles/206544899-Getting-a-thread-dump-when-IDE-hangs-and-doesn-t-respond#2016-02-0409:02moizsj@cfleming: yup found the thread dump#2016-02-0409:05moizsj@cfleming: https://github.com/cursive-ide/cursive/issues/1246#2016-02-0409:06cfleming@moizsj: Great, thanks.#2016-02-0409:56imrespeaking about freezes I had IntelliJ freeze on me sometimes when an expression in the repl returned a giant map#2016-02-0409:56imreif that's new I can try and get a thread dump as well#2016-02-0410:11cfleming@imre: Yes please.#2016-02-0410:16imreI seem to be unable to produce it now, maybe something has changed in the ide or the libs I'm using#2016-02-0410:16imreif I come across it again I'll let you know#2016-02-0410:16cflemingI fixed a bunch of stuff with the REPL a while back (like 3 months or so). That might have been it.#2016-02-0410:18imreyeah, most likely#2016-02-0410:18imregood to know simple_smile#2016-02-0418:49arijunwhat's the sop for making a project with boot in cursive?#2016-02-0418:50arijunshould I just make a build.boot and then run the task at https://github.com/boot-clj/boot/wiki/For-Cursive-Users#2016-02-0421:33cfleming@arijun: Yes, that’s as good as it gets right now unfortunately.#2016-02-0421:47arijunok#2016-02-0421:49arijunis there any way to get it to understand the build.boot? it says things like go-loop cannot be resolved, even though I have it required#2016-02-0421:51arijun(it also says that about boot's deftasks, but I assume there's nothing to be done about that)#2016-02-0423:07cfleming@arijun: Hmm, that’s probably because build.boot isn’t under a source root. What I do with Leiningen is just turn off all the warnings for project.clj, but with boot that would mean you’d get no code assistance either. Boot is tricky 😞#2016-02-0423:13jaen^ yep, the lack of code completion and having symbols coloured as unknown is certainly vexing.#2016-02-0423:13jaenOn the flipside - it forces you to move as much logic as you can outside of the build.boot file so you can get completion#2016-02-0423:14jaenAnd leave it only for task composition.#2016-02-0500:23ghufran@cfleming: Thank you for making such an awesome piece of software simple_smile#2016-02-0500:25cfleming@ghufran: No problem, I’m glad you’re enjoying it!#2016-02-0500:25cflemingThanks for letting me know, it’s always good to hear.#2016-02-0500:38arijunI'm trying to use boot to make quick command line tools, is there a better way of doing that?#2016-02-0500:41arijun@cfleming: I saw that at some point you had thought about moving cursive dev onto boot--is that no longer in the cards?#2016-02-0500:45cfleming@arijun: I was thinking about it. I’m actually going to investigate moving it to Gradle first, because IntelliJ have a really good Gradle plugin for IntelliJ plugin dev that would make my life much easier.#2016-02-0500:45cflemingI may be able to look at the implementation and port it to boot, but if I use Gradle I don’t have to do that.#2016-02-0500:49arijunBut you're forgetting the most important part--makine my life easier 😉#2016-02-0500:56cflemingHaha#2016-02-0500:56cflemingI don’t know how that slipped by me.#2016-02-0500:56cflemingI actually would prefer to use boot just from a dogfooding perspective - if I feel the pain, I’m more likely to fix it.#2016-02-0500:57cflemingBut I use a bunch of Kotlin code so I’d have to add support for that, as well as reimplementing all the plugin stuff.#2016-02-0500:57cflemingBut I don’t know how mature the Gradle support for Clojure is.#2016-02-0501:07arijunOh man it's terrible. I mean sure I've never used it or have any other reason to say that but if it convinces you to use boot...#2016-02-0501:08arijunAlso FYI cursive doesn't ask for a license on a new install for me.#2016-02-0501:08cflemingIt doesn’t? Which version are you running?#2016-02-0501:09arijun1.1.0-15, intellij v 15.0.3#2016-02-0501:10arijunOn a mac, but I remember it also not doing so on my windows 7 machine.#2016-02-0501:12cflemingThat’s bizarre. Do you have a Help->Register Cursive… menu item?#2016-02-0501:12cflemingAnd if you do, what happens if you click on it?#2016-02-0501:18arijunBelay that--I just hadn't opened a clojure project#2016-02-0501:18arijunsorry#2016-02-0501:18cflemingNo worries#2016-02-0508:11wildermuthnSometimes after changing dependencies (or branches with different dependencies), my cursive repl fails to load properly. I’m using figwheel. Anyone else run into something similar?#2016-02-0508:19wildermuthnFound the answer in the cursive wiki. Need to refresh lein via cursive when project.clj changes.#2016-02-0508:25meowYes.#2016-02-0508:26meowCursive has a wiki? Where is the wiki?#2016-02-0520:41cfleming@meow: It doesn’t, although it probably should. There are various Cursive-related pages in other wikis though, notably boot and CLJS#2016-02-0520:54meowyes, it should#2016-02-0619:36KamuelaIs the repl I get by Run->Repl with project.clj the same thing I'd get with lein repl?#2016-02-0620:58jdubie“Go To” -> “Test” is disabled for me. my setup is like this:
;; in src/shared/foo/bar.cljc
(defn foo [])

;; in test/shared/foo/bar_test.clj
(deftest foo …)
https://www.dropbox.com/s/8p4dhau8aflrcra/Screenshot%202016-02-06%2012.55.36.png?dl=0
#2016-02-0620:58jdubieShould goto work with cljc files? not sure what the problem is#2016-02-0708:19cfleming@kamuela: In theory yes, in practice there can be some subtle differences but these days it’s pretty much identical.#2016-02-0708:19cfleming@jdubie: Go to test doesn’t work for Clojure yet, sadly.#2016-02-0816:29paulspencerwilliamsHey, Cmd-Return is the Cursive keymap default for Execute current statement on Mac, but on my installation, this results in a carriage return as kind of expected. Am I missing something in keymap settings?#2016-02-0816:34arijunhave you set it in your keymap, or do you just see it in clojure keybindings?#2016-02-0817:46doddeninoHi! I'm trying follow om-next quick start with cursive and I have a couple of questions: 1) IDEA complains that my files are not under a source root 2) is there a recent guide on how to setup figwheel to work with cursive and om next?#2016-02-0817:50doddeninook, I've solved 1 😄#2016-02-0817:51doddeninoI'm following this https://github.com/bhauman/lein-figwheel/wiki/Running-figwheel-in-a-Cursive-Clojure-REPL for n.2, but idea gives me an error "Error creating JavaParameters"#2016-02-0818:03arijunperhaps #C0B22RS2Y might helpful on that front?#2016-02-0818:04paulspencerwilliams@arijun: I believe so, I copied the default OSX Keybindings to one named Clojure, and then applied Cursive keybinds to that...
#2016-02-0818:09paulspencerwilliamsThe apply isn’t enabled when I set cursive, but is when I set emacs? However, shift cmd f9 wraps with parens so must be working.#2016-02-0818:14arijunIf go to keymap, next to the search box there should be a magnifying glass with keys overlayed on it. You can enter your shortcut there and see what is taking it--I would guess it's Split line#2016-02-0818:20paulspencerwilliams@arijun: trying to find keymap. searching for keymap only brings up clojure keybindngs#2016-02-0818:21arijunit's not the parent of Clojure Keybindings?#2016-02-0818:21paulspencerwilliamsoh yeah! sorry#2016-02-0818:21paulspencerwilliamsyeah, split line#2016-02-0818:26paulspencerwilliamsSo I’ve removed the split line keybinding within editor. I’m presuming when I choose cmd+enter, it should execute the line in the repl?#2016-02-0818:28arijunTBH I'm not quite sure what "execute current statement" is supposed to do--it's greyed out as an option for me#2016-02-0818:29paulspencerwilliamsokay.#2016-02-0818:29paulspencerwilliamsother actions are working though simple_smile thanks#2016-02-0818:29arijunI usually use "send top form to REPL"#2016-02-0818:31arijunOh I figured out what it is--if you're in the REPL inside of a sexp, hitting enter will make a newline, but Execute current statement will always execute it.#2016-02-0818:46paulspencerwilliams@arijun: YES! That’s it. Thank you. I’ve been using cursive for a few months and brain has been the bottleneck rather than keys, and tonight I decided to learn some shortcuts#2016-02-0820:40paulspencerwilliams@arijun: cheers for help, flying along now using that command all the time - didnt know it existed :)#2016-02-0820:41arijunglad to help simple_smile#2016-02-0820:49cfleming@doddenino: That error normally means that you don’t have an SDK configured for your project. Open Project Structure and create one if required, that should fix that problem.#2016-02-0820:51cfleming@paulspencerwilliams: @arijun: That’s right, Execute current statement is only used in the REPL editor. Normally it wouldn’t be shown, but a few people wanted to customise the keybinding for it, which meant making it visible. Sorry for the confusion, I’ll think about a way to make that more obvious.#2016-02-0822:26doddenino@cfleming: thanks, I'll look into that!#2016-02-0904:48ghufranIs there a way to do ‘lein run’ from the leiningen tool window? It’s not a big deal, I can just open a terminal tool window and do it from there, but I wanted to check if there was a better way of doing it that I was missing somehow?#2016-02-0904:52cfleming@ghufran: No, there isn’t - I’m actually not sure why run isn’t in the task list (I inherited that from the previous lein plugin)#2016-02-0904:52cflemingYou can set up a run config, or use the terminal as you say.#2016-02-0904:52ghufran@cfleming: Thanks!#2016-02-0908:53doddenino@cflaming: that was the issue, thanks! I'm still not able to have the repl start correctly, but I'll manage somehow 😄#2016-02-0908:59cfleming@doddenino: I’m glad that helped, I’m going to get a better error message in there. What are the issues you’re having now?#2016-02-0909:00doddeninoThe config I'm basing on uses some removed figwheel methods#2016-02-0909:00cflemingBTW, anyone using Cursive with IdeaVim, feedback is very welcome here: https://github.com/cursive-ide/cursive/wiki/IdeaVim-issues#2016-02-0909:05doddeninoso it's not a cursive issue 😉#2016-02-1110:48raymcdermottI noticed that 16 EAP is out … I can’t see if it’s been asked before but when do you propose to support it?#2016-02-1110:50james@cfleming: Also, I was wondering if you have a timeline for the standalone version of Cursive?#2016-02-1117:10timgilbertSay, is there a setting or something that will let me see the full traceback when something I'm doing in the repl generates an exception?#2016-02-1117:46Yehonathan Sharvit@cfleming: In my project, I am using a macro named deftry to define functions. How can I make cursive aware of deftry?#2016-02-1119:07jcromartieI've got a strange situation where Cursive is trying to load files that are not on my classpath#2016-02-1119:07jcromartiewe have a demos/ directory, which is not on the classpath, with .clj files in it, and they are loaded form Gorilla REPL#2016-02-1119:09jcromartieand loading the .clj files in demos/ causes problems#2016-02-1119:10jcromartiemeaning it throws a compiler exception and I can't run tests#2016-02-1121:00hugesandwichIs there some issue existing already about syntax highlighting with alt! ? I'm seeing a binding marked as a syntax error (squiggle underlined), but evaling the code in the repl and running it works fine, just Cursive seems to think the syntax is wrong.#2016-02-1121:00hugesandwichhttps://clojuredocs.org/clojure.core.async/alt! - Try the code in these examples and you'll see it highlight the bindings inside the alt as an error#2016-02-1121:01hugesandwichmore specifically, it says "cannot be resolved"#2016-02-1121:40cfleming@raymcdermott: The next build should support v16#2016-02-1121:42cfleming@viebel: Right now there’s no good solution for that. I’m planning a workaround soon (marking certain forms as def-like or let-like), and a long-term solution (an API for adding full support for forms)#2016-02-1121:44cfleming@hugesandwich: That’s probably the same problem as @viebel’s - Cursive doesn’t automatically have support for macros which define new symbols. I’ll check those examples and add support for that.#2016-02-1121:53hugesandwichyeah it makes sense since alt! is using macros under the hood#2016-02-1121:53hugesandwichthanks!#2016-02-1122:04cfleming@jcromartie: is the demos/ directory a source root?#2016-02-1122:04jcromartieno, it isn't#2016-02-1122:04jcromartie@cfleming: it's intentionally outside of a source directory#2016-02-1122:05cfleming@jcromartie: Is the project something I can look at, or is it internal?#2016-02-1122:06cflemingBRB in 15#2016-02-1122:20jcromartieit's internal#2016-02-1122:20jcromartieno rush#2016-02-1122:21jcromartieI've got alternatives (running command-line REPL right now)#2016-02-1122:21cflemingSo using lein repl this doesn’t happen?#2016-02-1122:21jcromartieI think it has to do with transitive loading#2016-02-1122:21cflemingWhen are the files loaded?#2016-02-1122:21jcromartiewhen I execute "Run test under caret"#2016-02-1122:21jcromartiebut nothing should actually depend on this file...#2016-02-1122:21jcromartiethat's the strange part#2016-02-1122:22cflemingOk. Do your tests depend on that file?#2016-02-1122:22jcromartienothing does require it#2016-02-1122:22cflemingThat’s really weird.#2016-02-1122:22jcromartieyeah#2016-02-1122:22jcromartiehmm#2016-02-1122:22jcromartie./.idea/workspace.xml: <option value="$PROJECT_DIR$/dev-system/demos/sprint44.clj" />#2016-02-1122:22jcromartiefrom grep#2016-02-1122:22jcromartiefor the file in question#2016-02-1122:22cflemingGive me a moment, I can probably send you a diagnostic tool to help figure this out.#2016-02-1122:23jcromartiein <component name="IdeDocumentHistory"><option name="CHANGED_PATHS"><list>...#2016-02-1122:23cflemingThat just means you’ve had it open in the editor, I think. Which element in that XML is that option inside?#2016-02-1122:23cflemingRight, I think that means that it’s a file you’ve modified in an editor.#2016-02-1122:23jcromartieso, Cursive thinks it should load it for some reason, and that's the only place the file name shows up anywhere#2016-02-1122:24jcromartieI'd guess that's part of the puzzle#2016-02-1122:24jcromartiebut I turned off transitive loading the other day#2016-02-1122:24cflemingOk, give me a moment to check the code, and I’ll send you something to test this, hopefully in about half an hour.#2016-02-1122:24jcromartiebecause automatically loading files when running tests was causing failures due to defrecord dispatch problems#2016-02-1122:24jcromartiek#2016-02-1122:27cfleming@jcromartie: When you turned off transitive loading, did that fix the problem?#2016-02-1122:29cfleming@jcromartie: Also, which IntelliJ version are you running?#2016-02-1122:29jcromartie@cfleming: it helped earlier, but I'm not sure why it's loading a bunch of .clj files now#2016-02-1122:30jcromartieI'm not sure if "Run test under caret" might do something different#2016-02-1122:30jcromartiebut at least "Run tests in current NS" stopped loading .clj files automatically#2016-02-1122:34cflemingOuch, looking at the code, the test actions don’t obey the transitive loading flag.#2016-02-1122:35cflemingThat bug will affect both test actions (tests in ns, and test under caret)#2016-02-1122:35cflemingThat’s not good.#2016-02-1122:38cfleminghttps://github.com/cursive-ide/cursive/issues/1254#2016-02-1122:43cfleming@jcromartie: Which IntelliJ and Cursive versions are you running?#2016-02-1122:43jcromartielet me see...#2016-02-1122:45jcromartieIntelliJ 15.0.2#2016-02-1122:45jcromartieCursive 1.1.0-15#2016-02-1122:45cflemingThanks.#2016-02-1122:47jcromartieso the "run tests in current NS" action not loading deps might just be my imagination simple_smile#2016-02-1122:48jcromartiegotta run for now#2016-02-1122:48jcromartiethanks for the help#2016-02-1122:55yurisf#2016-02-1200:17cfleming@jcromartie: Those bugs will be fixed in the next build, along with some other related problems.#2016-02-1201:01jcromartie❤️#2016-02-1209:44akielIs there any interaction between the markdown support plugin and cursive? I get “nil language” errors when I have both plugins installed and have clojure marked fenced code blocks in my markdown files.#2016-02-1209:45cfleming@akiel: I’m not sure, I don’t know how the markdown plugin works. I’m not sure if it tries to use the language support from Cursive with blocks marked like that.#2016-02-1209:45imrethere are a few different markdown plugins, I use multimarkdown and it works without problems#2016-02-1209:45cflemingThat one’s commercial now, right?#2016-02-1209:47akiel@cfleming: should I open an issue? and/or should I submit the error? do you get thoose?#2016-02-1209:48cfleming@akiel: Do you have a stacktrace from that?#2016-02-1209:50akielyes#2016-02-1209:51cflemingCan you paste one here?#2016-02-1209:55akielHappens on README from this project: https://github.com/alexanderkiel/ring-hap#2016-02-1209:55cflemingThat’s very weird - it doesn’t mention anything about markdown there at all - it looks to me like it’s highlighting a normal Clojure file.#2016-02-1209:56cfleming@akiel: If you could file an issue with some repro steps that would be great, thanks.#2016-02-1209:56akielok#2016-02-1210:56bbssHow can I connect to a clojure 1.8 socket server repl with cursive?#2016-02-1210:57bbssI have tried the remote repl but that tries to connect but takes forever#2016-02-1211:03cfleming@bbss: Sadly, you can’t right now - I’ll be adding that shortly.#2016-02-1211:04cflemingThe current remote REPL only uses nREPL.#2016-02-1211:04bbssokay, good to know#2016-02-1211:05bbssI don't really know how to set nrepl up, I've find there are so many different libraries that all seem to solve some part of the repl experience, especially when combined with cljs#2016-02-1211:05cflemingYeah, I’m actually writing a design doc as we speak about how to try to simplify everything, especially WRT CLJS#2016-02-1211:06cflemingSo that’s going to get worked on very soon.#2016-02-1211:07bbssI see, right now I've opted to run figwheel and serve the index.html and compiled cljs from the server, I was thinking this might cause problems with cors but it doesn't pretty cool.#2016-02-1211:07bbssAnd running figwheel with cursive that is.#2016-02-1211:08cflemingHopefully once I’m done with this all that will be properly integrated and will Just Work reliably#2016-02-1211:08cflemingIncluding Figwheel#2016-02-1211:09bbssBut still having issues actually repling to the server. I am using nginx-clojure and run lein with-profile run embed which loads some wrap-reload development ring handler.#2016-02-1211:10bbssI expected that creating a run configuration with nrepl and embed lein profile would connect to the server. I do get a repl and can evaluate code, but I don't think it's actually connected to the server.#2016-02-1211:11bbssdo I maybe need to add something to the server to set-up an nrepl?#2016-02-1211:15cflemingI don’t know, sorry, I don’t know anything about nginx-clojure#2016-02-1211:15cflemingIf you can configure it to start an nrepl server you can connect to it with the remote option.#2016-02-1211:15cflemingYou can do that fairly easily with the bare nrepl library, but I don’t know anything about the nginx-clojure lifecycle#2016-02-1211:16cflemingI have to go, sorry - good luck!#2016-02-1211:16bbsscool, that worked!#2016-02-1211:16bbssthanks#2016-02-1217:08doddeninoIs there some sort of recommended keybindings for structural editing?#2016-02-1217:09imrecheck settings->keymap->cursive#2016-02-1217:10imrethere are a few presets there#2016-02-1217:18doddeninooh cool thanks! simple_smile#2016-02-1217:21imrenp#2016-02-1218:53jcromartieI have test results that are too big for tooltips#2016-02-1218:54alexisgallagherI am trying Cursive for the first time and getting a blizzard of "cannot be resolved" errors in the Code Inspections / General.#2016-02-1218:55alexisgallagherIs this b/c it's configured wrong, or are these known issues?#2016-02-1218:55alexisgallagherFor instance, I have "String cannot be resolved", where there's a type hint that a record's field is a String.#2016-02-1218:56alexisgallagherAlso, fully qualified Java method calls like "java.util.UUID/randomUUID cannot be resolved".#2016-02-1218:56alexisgallagherAm I doing it wrong, or is this all to be filed under the category of "Cursive is still a work in progress" ?#2016-02-1218:56jcromartieI don't think that's normal#2016-02-1218:57alexisgallagherOkay. Seemed like it must not be. Pretty basic stuff.#2016-02-1219:00alexisgallagherIs there any special setup I need to do for a project before importing it besides pointing at the project.clj? Any way to dig into why it's failing to resolve basic things?#2016-02-1219:02alexisgallagherOr do folks just shut off "General" Inspections and only use "Clojure" inspections ?#2016-02-1219:04jcromartieI didn't change those#2016-02-1219:05jcromartiewere you using IntelliJ for Java work before installing Cursive?#2016-02-1219:05jcromartieI just installed IntelliJ and Cursive and imported my projects#2016-02-1219:07alexisgallagherThat's what I did.#2016-02-1219:08alexisgallagherI'm noticing some of the cannot resolves are coming from functions in amazonica.aws.sqs, which builds those functions by reflection, so that makes sense. that still doesn't explain String, java.lang.String, and java.util.UUID/randomUUID don't resolve.#2016-02-1219:08alexisgallagherhmm.#2016-02-1219:09alexisgallagherThread/sleep cannot be resolved. Sigh.#2016-02-1219:09alexisgallagherThink I'll save this adventure for another day.#2016-02-1219:47jcromartie😞 sorry#2016-02-1219:47jcromartiethat's strange#2016-02-1220:43cflemingalexisgallagher: I have to run sorry, but a couple of things to check - I suspect your project doesn’t have an SDK. Open File->Project Structure and check that there under “Project”. That would explain the unresolved classes.#2016-02-1220:44cfleming@alexisgallagher: Unfortunately you’re right, the functions built via reflection won’t be resolved correctly.#2016-02-1220:44cflemingTake a look at the SDK, I bet that’s the problem with the classes.#2016-02-1220:44cflemingIf not, leave a note here and I’ll look later on when I can.#2016-02-1220:48alexisgallagher@cfleming: That fixed it. Thanks!#2016-02-1223:17cfleming@jcromartie: Yeah, I need to add a maximum size of some kind for the tooltips, or IntelliJ freaks out#2016-02-1223:30polymerisRefactor > rename seems not to work for refactoring e.g. ::foo to :foo#2016-02-1223:32polymerisIt's a bit confusing, too, because the field does not show the colon, and I don't know if I am supposed to enter it#2016-02-1300:44cfleming@polymeris: So actually there isn’t a very good way to do this right now. See https://github.com/cursive-ide/cursive/issues/1250 for a related problem.#2016-02-1300:45cflemingCurrently renaming only really works on the name part.#2016-02-1321:48oshyshkoDoes anyone know how to fix "Cannot load Clojure form into ClojureScript REPL" error that pops when you press "Send top for to REPL" shortcut to send CLJS to browser? (nREPL connected to Figwheel) https://dl.dropboxusercontent.com/u/3735337/clojure/intellij-cursive.png#2016-02-1322:33gerredany hope of bringing Parinfer to Cursive?#2016-02-1322:36solicode@gerred Seems like the next release should include it https://github.com/cursive-ide/cursive/issues/1155#2016-02-1322:36solicodeCan’t wait simple_smile#2016-02-1322:53gerredwoooohoo!#2016-02-1323:18lsentaHola, my Cursive REPL hangs after running a test file, what tools can I use to investigate/provide a meaningful ticket?#2016-02-1407:01cfleming@oshyshko: You have a Clojure file open, and it looks like you’re putting clojurescript code into it.#2016-02-1407:01cflemingYou need to create a cljs file and put your ClojureScript in there.#2016-02-1407:02cfleming@lsenta: Does the REPL hang, or IntelliJ itself?#2016-02-1409:03lsenta@cfleming: only the REPL#2016-02-1409:03lsentaI wrap the tests in a start luminus server / stop#2016-02-1409:04lsentaI think I found the issue, luminus calls shutdown-agents during the stop#2016-02-1409:13cfleming@lsenta: Does the same thing happen when using lein repl?#2016-02-1409:17oshyshko@cfleming: I've just retried with a .cljs file: the behaviour is exactly the same, I can attach to Figwheel via nRepl. After I do (cljs-repl), I can type directly into the REPL (and I see the browser executing my forms), however "Send top form to REPL" shortcut show that red error tooltip. Any ideas?#2016-02-1409:18cfleming@oshyshko: There’s a dropdown in the REPL toolbar which allows you to tell Cursive that the REPL is either clj or cljs. Set that to CLJS and it should work if you’re sending forms from a .cljs file.#2016-02-1409:24lsenta@cfleming How can I check that? I'm trying lein with-profile default,test repl but when I in-ns to my test module it's empty#2016-02-1409:24lsentaIt works fine with lein test-refresh for sure#2016-02-1409:25cfleming@lsenta: You probably have to require the test ns when using lein, Cursive will auto-load it for you.#2016-02-1409:28lsenta@cfleming Thanks, so yea it kills the REPL too#2016-02-1409:29lsentaI get a
SocketException The transport's socket appears to have lost its connection to the nREPL server
at the end of the tests
#2016-02-1409:33lsentaAfter changing the code, looks like shutdown-agents was the issue#2016-02-1409:46lsentaOpened a ticket in luminus, thanks for the help @cfleming !#2016-02-1411:56oshyshko@cfleming I've just double-checked that I am using [cljs] value for that dropbox. I am getting the red error (from my screenshot). Copy-and-pasting form directly into REPL text area works fine, sending from editor -- not working.#2016-02-1412:03oshyshko@cfleming could you possibly recommend me a step-by-step tutorial for setting Figwheel + Cursive + REPL, so I could follow it and figure out if I am doing anything wrong? Truth is, I discovered this problem with CLJS REPL over a year ago, it's still here and it is the only reason why I am still using La Clojure for CLJS development simple_smile#2016-02-1415:20cfleming@oshyshko: It looks like you have a test project you used to create that screenshot above. Could you put it on Github so I can reproduce what you’re seeing?#2016-02-1502:00oshyshko@cfleming: Here https://github.com/oshyshko/intellij-cursive-red-error also README.md contains steps to reproduce the bug#2016-02-1608:57stijnis it possible to show the output of failed tests in the repl (or in some other window) instead of inside a tooltip?#2016-02-1608:57stijnand if so, can we use humane test output? simple_smile#2016-02-1609:14stijnmaybe @cfleming knows? simple_smile#2016-02-1620:43cfleming@stijn: I’m going to be making a change soon so that the test output will also be shown in the REPL console as well as in the IDE#2016-02-1620:57stijnAh, nice! #2016-02-1620:58cfleming@stijn: What sort of output are you looking for? Have you seen the data structure diff view?#2016-02-1621:48denikCursive indents go-loop bindings differently depending on whether they’re in clj or cljs. How do I add cljs.core-async.macros/go-loop to code-style?#2016-02-1622:08cfleming@denik: see the bottom of https://cursive-ide.com/userguide/formatting.html#2016-02-1622:08cflemingI’ll add that as a default formatting case too, thanks.#2016-02-1622:14denikthat worked, thank you @cfleming#2016-02-1708:05stijn@cfleming: ha, I see in the docs now.#2016-02-1708:05stijnbut I don't see the 'show difference' link#2016-02-1708:06stijnit's basically an api compatibility test, firing of requests to 2 different instances to test backwards compatibillity, and (is (= old-response new-response)) is inside a doseq#2016-02-1708:07stijnso the test fails multiple times at the same line number#2016-02-1708:44cfleming@stijn: Check the tooltip over the gutter icon (on the left) showing the test failure status. That’s more recent than the doc, sadly.#2016-02-1708:44cflemingThat should show you “passed x times” and a series of failures you can click on.#2016-02-1708:48stijnnothing pops up if i 'hover' that icon#2016-02-1708:48stijnclicking sets a breakpoint#2016-02-1708:48cfleming@stijn: One sec#2016-02-1709:22stijncursive version is 1.1.0-15#2016-02-1709:26cfleming@stijn: Sorry, I’m having some problems with my project after upgrading Kotlin, trying to figure it out#2016-02-1709:26cflemingI’ll send a screenshot of what I see when I can get it running#2016-02-1709:30cfleming@stijn: sorry, I was mistaken, it’s the tooltip on the error marker in the editor you want:#2016-02-1709:31cflemingClicking on the gutter icon only works if there’s a single failure - it will jump right to the diff in that case.#2016-02-1710:26stijn@cfleming: well, the result is comparing 2 maps that are pretty big and I have quite some failures. The tooltip is kind of huge, it shows for a second and then disappears simple_smile#2016-02-1710:26stijni will try with less failing tests simple_smile#2016-02-1719:51arijun'Search REPL History' does not really work for me. If I press enter after after selecting it in the 'find action' search, it opens and closes immediately. If I click on it from that menu it will continue typing in whatever editor I had selected before.#2016-02-1719:53arijunThat's not the first issue I've had with 'Find Action'--it can find 'Barf Forwards' but no other barf or slurp#2016-02-1809:39cfleming@arijun: Does it work properly if you assign a key to it? That sounds like it might be a problem with the action popup.#2016-02-1815:25Petrus TheronSeeing some strange behaviour working on cljs file that could be Cursive or Boot. When I "Load file in REPL” from IntelliJ, I get errors from an older version of my file that lives in the out folder. I can eval forms directly and they work, but “Load file in REPL” seems to load the corresponding file in the out folder, that is old. Now, that could be that the file isn’t being updated, or that it’s loading the wrong file.#2016-02-1816:28arijun@cfleming: there is a key assigned to both the history and slurp commands. History works using the key but not find action#2016-02-1816:36arijunIs there a way to clear the input in the repl like ctrl-c will do for bash and ipython?#2016-02-1816:38imrectrl-a backspace#2016-02-1816:38imretroll#2016-02-1816:38imreat least that's the simplest I could find so far#2016-02-1900:44danielcomptonI’m having super weird behaviour on https://github.com/martinklepsch/s3-beam/commit/9f9ccd3abbdf78f10ef99c3703952b8cdeb0dad8, it seems like Cursive isn’t indexing any new code that I write, so I get lots of warnings for unused functions and vars#2016-02-1901:23cfleming@danielcompton: Have you tried invalidating your caches?#2016-02-1901:25cfleming@petrus: That might be caused by https://github.com/cursive-ide/cursive/issues/1255. You can probably fix that by excluding the out folder (right click in project view, mark directory as, excluded)#2016-02-1902:16danielcomptonThat seemed to fix it#2016-02-1902:17danielcomptonThanks#2016-02-1908:27Petrus Theronthanks, @cfleming. That fixed it simple_smile.#2016-02-1909:09doddeninoYesterday I was getting a java.io.FileNotFoundException for figwheel_sidecar in cursive repl, and the only way to fix it was calling lein repl from a terminal first. Everything worked fine afterwardsd#2016-02-2101:48cfleming@dmi3y: This is because Cursive works from source, and it’s difficult to expand macros during editing.#2016-02-2101:48cflemingSome fixes are on the way, one short-term patch and one longer-term definitive fix.#2016-02-2111:58seriogayes, it's known issue https://github.com/cursive-ide/cursive/issues/147#2016-02-2111:58seriogawaiting for improvements simple_smile#2016-02-2114:44dmi3yGot it, thanks @cfleming.#2016-02-2117:20lsentaHola guys, quick question, I lein figwheel and try to run a remote repl with cursive that connects to it#2016-02-2117:21lsentaBut it looks like it's still in clj mode, I can do js/window in the figwheel repl, but that fails in the cursive REPL#2016-02-2117:21lsentaAny *simple* solution to connect to my figwheel REPL and run clojurescript pieces of code?#2016-02-2117:22lsenta(I have issues with macro importing and expansion, that'll be a life saver)#2016-02-2118:52cfleming@lsenta: The Cursive remote REPL runs over nREPL - are you running your figwheel REPL with nREPL enabled?#2016-02-2120:47lsenta@cfleming I think I do, I have :nrepl-port 7002 in the project.clj for the figwheel conf#2016-02-2120:48cflemingOk, and the remote repl connects to that port ok?#2016-02-2120:48lsentaYep#2016-02-2120:48cflemingWhat’s the error that you get?#2016-02-2120:48lsentaI try to do js/window#2016-02-2120:49lsentaI get a:
CompilerException java.lang.RuntimeException: No such namespace: js, compiling:((ns cursive.repl.runtime
large red codetrace
#2016-02-2120:49cflemingOk, you’re right, the REPL is still in Clojure mode.#2016-02-2120:49cflemingI’m assuming you have to start the CLJS part somehow after connecting.#2016-02-2120:54cfleming@lsenta: See here: https://github.com/bhauman/lein-figwheel/wiki/Using-the-Figwheel-REPL-within-NRepl#launching-figwheel-from-nrepl#2016-02-2120:54cflemingYou don’t need the first step (`lein repl`) since you’re connecting with the remote option but following the steps after that should work.#2016-02-2121:14lsenta@cflemming
The lein figwheel is capable of launching an nREPL server that your tooling can connect to by using the :nrepl-port configuration parameter. This is not the strategy recommended below.
#2016-02-2121:15lsentaNo simple way to start the clojurescript mode in the cursive REPL?#2016-02-2121:16cfleming@lsenta: Have you seen this? https://github.com/bhauman/lein-figwheel/wiki/Running-figwheel-in-a-Cursive-Clojure-REPL#2016-02-2121:16cflemingThat doesn’t use nREPL, but I believe it’s what Bruce recommends right now.#2016-02-2121:17cflemingI’m currently investigating how to make all this easier, but that’s as good as it gets right now I think.#2016-02-2121:40lsentaSo: I used the script/repl.clj you just linked, it worked while my browser was still in the session I started with the regular lein figwheel#2016-02-2121:41lsenta(start lein figwheel, open page of the project that connects to figwheel, kill lein figwheel, start script/repl.clj, browser reconnects and all is good)#2016-02-2121:41lsentaThen I refresh, and now goog.require can't find my app anymore#2016-02-2121:44lsentaI guess it's due to note: leiningen profile merging won't occur when fetching config from project.clj#2016-02-2121:50lsentaThanks for giving me a hand @cfleming, I'll wait for an update that smooth things out simple_smile#2016-02-2121:54cflemingOk, there was some discussion on here a while ago about profile merging, sadly that’s getting beyond my cljs knowledge#2016-02-2122:00lsentaIsn't profile merging a leiningen/clj thing?#2016-02-2122:01cflemingIt is, but for some reason it badly affects cljs REPLs.#2016-02-2122:01cflemingI was really busy during the discussion and didn’t pay enough attention to it, and it’s now lost to the greedy Slack god.#2016-02-2122:03cflemingThinking about it, I assume it’s because when you’re running the REPL without using lein (as in a quickstart-style REPL), since you’re not using lein your profiles don’t get merged and your REPL ends up with the wrong config.#2016-02-2122:30lsenta@cfleming Yea I think so, I tried quickly to copy and paste parts of my config but it didn't worked#2016-02-2122:32cfleming@lsenta: So you can configure figwheel to retrieve the config directly from project.clj, is that right?#2016-02-2122:33cflemingCan you specify another file to get it from?#2016-02-2122:34lsentaFrom what I understand in the last link you sent, start-figwheel! loads the project.clj#2016-02-2122:34lsentabut does apply the lein merging, only processing the raw edn#2016-02-2122:34lsentaor you can pass config parameters to the start figwheel#2016-02-2122:35lsentanot sure it'd takes a file path, but why not slurping it directly#2016-02-2122:35lsentahttps://github.com/bhauman/lein-figwheel/blob/a364ac2eb77a98bbd15bd483267c4f3f97cb5767/sidecar/src/figwheel_sidecar/repl_api.clj#L17-L31#2016-02-2122:40cflemingRight. So I think that you could use lein pprint to create a project-merged.clj, and then slurp that and pass it to start-figwheel!#2016-02-2122:40cflemingYou probably need to use code like: https://github.com/bhauman/lein-figwheel/blob/a364ac2eb77a98bbd15bd483267c4f3f97cb5767/sidecar/src/figwheel_sidecar/config.clj#L250-L258#2016-02-2122:41cfleming@lsenta: ^^#2016-02-2122:43cfleming@lsenta: In fact, I think you’d need to call prep-config and config from that file with your slurped data too.#2016-02-2122:44lsenta@cfleming: FYI I can't open the lein pprint'd file in IntelliJ#2016-02-2122:45lsenta
23:43:55 IllegalArgumentException: Don't know how to create ISeq from: com.intellij.extapi.psi.ASTWrapperPsiElement
#2016-02-2122:45cfleming@lsenta: Why not?#2016-02-2122:45cflemingHmm#2016-02-2122:45cflemingIs this something you can refheap, or is it an internal project?#2016-02-2122:48lsentaInternal, I'll try to find the minimal part and open an issue with it#2016-02-2122:49lsentaI don't think lein pprint does merging#2016-02-2122:50lsenta
:profiles
 {:uberjar ...
  :dev [:project/dev :profiles/dev],
  :test [:project/test :profiles/test],
  :project/dev ...
#2016-02-2122:50lsentaI'm pretty sure :dev should be replaced by a map if that was the case#2016-02-2122:52cfleming@lsenta:Ok#2016-02-2122:52cflemingI’ll try to play around with this later today and see if I can come up with something better.#2016-02-2122:56lsentaThanks man, that'd be great. What I saw of cursive + cljs was pretty good already#2016-02-2122:57lsentaI believe it didn't moved namespace automatically when you evaluate a piece of code, but I got autocompletion, which is already better than the lein figwheel repl simple_smile#2016-02-2122:57cflemingHehe#2016-02-2122:57cflemingI’m actually going to be getting some help soon to make all this easier.#2016-02-2122:58lsentaIf you want to reproduce the file I posted above, just lein new luminus my-app; cd my-app/; lein pprint#2016-02-2122:58cfleming2016 is going to be the year of improving CLJS in Cursive#2016-02-2122:58cflemingOk, great, thanks#2016-02-2122:58lsentaThat's pretty cool, congratulation#2016-02-2122:59lsentaFrom what you know of the community do you think you'll be able to make a living from this?#2016-02-2122:59lsentaas in "full time work on cursive"#2016-02-2122:59cflemingYes, I think so - Cursive has been selling really well
#2016-02-2123:00cflemingLots of free licences gone out, but lots of paying customers too.#2016-02-2123:00cflemingLong term it will depend on growth in the Clojure/CLJS community, but I’m pretty optimistic about that.#2016-02-2123:03lsentaI wish you the best, you're lowering the barrier to entry to clojure so much, thanks for that... and leaving a free options for hackers-wanna-be-full-time-clojurists!#2016-02-2123:05cflemingThanks! I appreciate it.#2016-02-2123:06cflemingThere’s lots to do to make all this easier, especially around CLJS.#2016-02-2123:06cflemingThe tooling has improved a massive amount in the last year, but it’s still difficult to get started for a lot of people.#2016-02-2123:14lsentaYou should add a project > new luminus project and market this as the "one click to get started with clojure, clojurescript & react/reagent" simple_smile#2016-02-2123:51darwin@cfleming: do you see any relatively low-hanging fruit to help growth of CLJS community? I think I will have some extra time on my hands soon#2016-02-2123:52darwinbtw. I’m Cursive user myself, thanks a lot for such amazing tool#2016-02-2123:54darwinas a side note, I’m going to implement some Cursive-related workflow into Dirac soon, I want to be able to use Cursive to eval code in nREPL, but results would be echoed into Dirac REPL Console as well. If you had any ideas how to improve Dirac for Cursive users , I would be eager to hear.#2016-02-2123:55cfleming@darwin: Thanks! I’m really glad you’re enjoying Cursive.#2016-02-2123:56cflemingYou have some very interesting projects as well, plastic is very cool#2016-02-2123:56cflemingdirac is the webtools extension, right?#2016-02-2123:56darwinit is a fork: https://github.com/binaryage/dirac#2016-02-2123:57cflemingAh, that was why I couldn’t find it under darwin#2016-02-2123:57darwindo not confuse it with cljs-devtools is an “extension”: https://github.com/binaryage/cljs-devtools#2016-02-2123:58cflemingSo I have a very long list of things that I would like to improve for CLJS users. I’m not sure many of them are low-hanging fruit though, and I’ve been thinking about all of them from the point of view of integrating them into Cursive.#2016-02-2123:58cflemingMore or less: one-click REPLs, including figwheel - these will include the current Cursive goodness (auto-formatting etc)#2016-02-2123:58darwinthanks, plastic is on hold, the project was too big and with invention of ParInfer I’m not sure if I could beat it, also Cursive improved a lot, so I don’t have such pressing need to put more effort into it at this point, but still it could be a nice research “toy” project for long winters simple_smile#2016-02-2123:59cflemingTest integration, both the interactive style that Cursive currently offers for clj, and a test runner with autowatching.#2016-02-2200:00cflemingI also want to offer a proper debugger with associated REPL.#2016-02-2200:01cflemingI’d also like to build a bunch of tooling specifically for React Native, which I think is very exciting. Things like debug-on-device etc#2016-02-2200:02darwinyeah, react native is promising#2016-02-2200:02cflemingAnd most importantly, have all that be easy to use.#2016-02-2200:02darwinalso there will be need for tooling around om.next I think (graph-ql/datalog-related stuff)#2016-02-2200:02cflemingLong term pipe dreams include a runner like http://wallabyjs.com/#2016-02-2200:02cflemingYes, absolutely.#2016-02-2200:04darwinah, didn’t know about wallabyjs, thanks#2016-02-2200:08darwingood ideas, but those are mostly incremental things, testing is important but quite advanced topic, IMO to really attract masses from javascript world we need something as cool as figwheel, I mean some tool with “rails” effect simple_smile#2016-02-2200:08darwinmaybe room for some library, not really a tool#2016-02-2200:09cflemingRight. I’m also not sure how much JS devs will want to come to an IDE since they’re more used to text editors in general.#2016-02-2200:09cflemingI don’t know how many would want to use a debugger in the IDE rather than the browser, for example.#2016-02-2200:10cflemingAlso, don’t underestimate the value of incremental improvements, I think that the various paper cuts involved with getting started could seriously hinder adoption.#2016-02-2200:12darwinindeed#2016-02-2200:18cflemingIn general, after having spoken to various people who have switched from Emacs or whatever, I’m starting to think that I should have “Just works, and stays working” at the top of my feature list on the landing page simple_smile#2016-02-2200:18cflemingIt’s a huge deal for people.#2016-02-2200:31darwinsimple_smile#2016-02-2200:34darwingood point, you sure should focus on people who are already sold on Clojure/Script and provide solid stable PRO tool for them, I think. but there is a funnel, you also need fresh people who get converted to Clojure to later become your potential users simple_smile whole funnel is somewhat important IMO simple_smile#2016-02-2200:48danielcomptonNo more "I came to work on Monday, tried to fire up a REPL, and it took me until 2pm to get a working environment"#2016-02-2201:29cfleming@darwin: Yes, particularly for me since I think a lot of the consistency (or not) of licence sales will be down to community growth.#2016-02-2209:38moizsj@cfleming: Just something I wish Cursive had...Is jumping into multimethod impls in the Cursive pipeline? with a small contextual popup allowing to pick which impl.#2016-02-2214:16doddeninoI don't know if it's intended, but if I try to open a folder with a malformed (or empty) project.clj, cursive throws an exception and doesn't open the project#2016-02-2214:17doddeninoits#2016-02-2214:18doddeninoit's a little annoying as I have to fix the project.clj with a different editor#2016-02-2222:06stuartsierraI have a project set up with CIDER, nREPL, Figwheel, and Piggieback. Using lein repl and CIDER, I can run a REPL and then start a ClojureScript REPL via Figwheel-sidecar. This works in Cursive too, for me. For a coworker, it doesn't. Trying to start the ClojureScript REPL prints INFO: nREPL connection found but unable to load piggieback. Starting default REPL#2016-02-2222:06stuartsierraAfter that, the Cursive REPL will not evaluate anything.#2016-02-2222:07stuartsierraAs I said, it works (in Cursive) for me. Just not for him.#2016-02-2222:07stuartsierraAny suggestions?#2016-02-2222:08stuartsierraWe both have latest intellij and latest cursive (1.1.0-15)#2016-02-2222:09stuartsierraThe error comes from https://github.com/bhauman/lein-figwheel/blob/a364ac2eb77a98bbd15bd483267c4f3f97cb5767/sidecar/src/figwheel_sidecar/repl.clj#L143#2016-02-2222:11cfleming@stuartsierra: That’s very strange, I’ve never seen that error.#2016-02-2222:11stuartsierraas far as I know, we have the same project configuration.#2016-02-2222:12cflemingSadly, it’s not very informative about what the error actually is.#2016-02-2222:12stuartsierrayes#2016-02-2222:12cflemingIf I had to guess, I’d say piggieback is not on the classpath somehow.#2016-02-2222:12cflemingCan you see it in the classpath printed on REPL startup?#2016-02-2222:13stuartsierragood question. Will check.#2016-02-2222:16cfleming@stuartsierra: If you can’t work the problem out, a workaround would be to start the REPL on the command line, and then connect from Cursive using the remote REPL option.#2016-02-2222:17stuartsierraAh, interesting. Thanks @cfleming#2016-02-2222:17cflemingThe remote option is only nREPL right now, socket REPLs coming soon.#2016-02-2222:17stuartsierraLooking forward to Socket REPL in general.#2016-02-2222:18cflemingYes, it’s going to be nice. It’s a little tricky to present to the user since there are lots of possible configuration types over it.#2016-02-2222:19cflemingi.e. pure streaming or RPC style, both can be run over it and the user will have to select that. It’s going to require a level of understanding by the user of what’s going on under the hood.#2016-02-2222:24stuartsierraAha! It's something in my ~/.lein/profiles.clj that makes it work.#2016-02-2222:30stuartsierraAdding [cider/cider-nrepl "0.10.2"] to the :plugins in project.clj makes it work. No idea why yet.#2016-02-2222:37stuartsierraAnd cider-nrepl automatically adds :repl-options {:nrepl-middleware [cemerick.piggieback/wrap-cljs-repl]} to the project configuration.#2016-02-2222:37stuartsierraWhich is necessary to make Piggieback work.#2016-02-2222:37cflemingHmmm#2016-02-2222:38cflemingI guess you can add that manually if you don’t want to use cider-nrepl#2016-02-2222:38stuartsierraYes, that's what I'm doing.#2016-02-2222:38stuartsierraIt's even documented (!) https://github.com/cemerick/piggieback#installation#2016-02-2222:38cflemingIn the past, there have been some conflicts with cider-nrepl - I fixed a bunch of them, but it’s a fast-moving target#2016-02-2222:38cflemingWat#2016-02-2222:38cflemingWonders will never cease#2016-02-2222:42stuartsierraThanks for the help @cfleming.#2016-02-2222:42cfleming@stuartsierra: No problem, I didn’t actually do much in the end simple_smile#2016-02-2222:42cflemingBut I’m glad it’s working.#2016-02-2515:55rauhI have a clojure repl and a cljs repl, Is there a way to automatically switch the window when I eval something in a .clj/`.cljs` file? Currently cursive just complains and I need to switch over manually.#2016-02-2519:55tony.kayI'm having problems with refresh lein dependencies causing all sorts of duplications and not ending up matching what I get on the command line at all...anyone seen this?#2016-02-2521:33jcromartieI am not sure#2016-02-2521:33jcromartiebut I am getting something where running tests in one project’s REPL causes it to try and load user.clj from another project… 😕#2016-02-2521:33jcromartieprobably my fault though#2016-02-2521:37jcromartiehm, yeah I guess it is Cursive after all#2016-02-2521:37jcromartieit’s the transitive loading stuff#2016-02-2521:54danielcompton@tony.kay: are you using checkouts?#2016-02-2521:59tony.kay@danielcompton: yep#2016-02-2521:59tony.kayInitial import seems fine...but refresh kills it#2016-02-2522:01danielcomptontry making sure all the deps are the same versions in all projects#2016-02-2522:01tony.kaythey are, but the recursive deps cause two versions of cljs to come in...I've tried exclusions, but to no avail.#2016-02-2522:02tony.kayat least so far...very hard to trace#2016-02-2522:02tony.kaylein deps :tree is clean at this point#2016-02-2522:02tony.kay(e.g. no warnings, etc)#2016-02-2522:03tony.kayDefinitely seems like a bug, since initial import is fine#2016-02-2522:26tony.kayI just decided to drop checkouts and move the code into the external libraries as a later step...way too much of a pain to get checkouts working right.#2016-02-2522:59cfleming@tony.kay: Sorry you’re having problems, there are some issues when there are two versions of cljs on the classpath for some reason, I haven’t been able to figure out why. Do you know what the two deps are that caused the two versions of cljs to come in? Then I’ll try to reproduce here to track it down.#2016-02-2523:00tony.kayI wish I could figure that out...lein deps wasn't helping#2016-02-2523:00tony.kayI suspect it was Om 1.0 alpha 30 + secretary#2016-02-2523:00cflemingOk, thanks, I’ll try that.#2016-02-2523:00cflemingAnd what were the symptoms you were seeing?#2016-02-2523:01tony.kaygetting both cljs 0.3211 (or something close) and cljs 1.7.228#2016-02-2523:01tony.kayI had direct dependency on the latter#2016-02-2523:01tony.kayI think secretary is old enough that it had the former, but not sure#2016-02-2523:01cflemingOk. But did that cause some kind of problem in your project?#2016-02-2523:01tony.kayOH, yeah#2016-02-2523:02tony.kaycljs analyzer was seen as private when starting a REPL that was going to start figwheel through sidecar#2016-02-2523:02cflemingHmm, that seems strange#2016-02-2523:03tony.kayshoot..that didn't format well 😞#2016-02-2523:03tony.kayCaused by: java.lang.IllegalStateException: var: #'cljs.analyzer/default-warning-handler is not public#2016-02-2523:03tony.kayCaused by: java.lang.IllegalStateException: var: #'cljs.analyzer/default-warning-handler is not public, compiling:(cljs/analyzer/api.clj:53:3)#2016-02-2523:04tony.kayUser.clj in my project is:#2016-02-2523:04tony.kayRunning a short clj script from clojure main: (e.g. lein run -m clojure.main script/figwheel.clj)#2016-02-2523:05tony.kayIf I hand-delete the older cljs from my project library in intellij, it starts ok#2016-02-2523:06tony.kaybut there are a lot of lein dependencies listed in external dependencies that lein deps :tree does NOT show...and a lot of dupes that should not be there. E.g. since I have cljs as a top-level dependency, no other version should get pulled in#2016-02-2523:08cflemingRight, that’s very strange. I’m not sure what Cursive could be doing there, since it delegates all that stuff to lein.#2016-02-2523:09tony.kaySo, I could probably send you this project and our internal dependencies (you'd have to not disclose them to others). It is a TODOMVC implementation on our web framework...but I don't have open source permission yet#2016-02-2523:09cflemingIf you could that would be very helpful.#2016-02-2523:09tony.kayPM me with a place to send it#2016-02-2609:40cfleming@rauh: Sorry, I missed your message earlier. There’s no way to do this right now, sorry. I’m bouncing around some ideas about a combined REPL that you can send either to, and the correct part of the REPL would evaluate the code depending on its type.#2016-02-2609:41rauh@cfleming: Sounds good. Maybe I'll see if I can find some repl middleware that does this. Both my REPLs are remote.#2016-02-2609:42cfleming@rauh: I see, interesting. That might make it trickier. I’m interested in ideas about how this might work.#2016-02-2609:42cflemingBoth of them connect over nREPL remotely?#2016-02-2609:43cflemingHow would you like to configure that? Are they separate lein projects?#2016-02-2609:49rauhNope, everything is in one lein project. (That's why I absolutely need those lein profiles). Then start two nREPLs from command line and connect Cursive. In one of them I do in Cursive (load-file "scripts/figwheel.clj"). Works wonderfully.#2016-02-2609:49rauh@cfleming: ^#2016-02-2609:50rauhDidn't find a middleware that can do this 😞 Cider does it in lisp.#2016-02-2609:51cfleming@rauh: How does it work in Cider? I remember seeing they do something like this now.#2016-02-2609:52cflemingI guess it’s easier for them because you generally have only a single REPL session, or I suppose one per language these days.#2016-02-2610:02rauhI don't know LISP too well but it looks like they're sending it to the proper REPL buffer depending on the major mode. @cfleming . Could probably ask in #C0617A8PQ#2016-02-2611:09moizsj@cfleming: UI freeze on attempting to auto complete while typing (with auto require) with circular require deps. is this known?#2016-02-2617:21hugesandwichmaybe this is known, but a heads-up to all - I've been getting terrible cpu usage/freezing on and off every few days/weeks when I start typing in a clj file. Restarting, invalidating caches, messing with the indent settings, disabling other plug-ins such as Groovy, recreating projects, etc. have had no effect. What did fix things for me at least 3 times so far was when Kotlin was updated. Don't know anything about Cursive source obviously, but something about either Kotlin bugs or simply reinstalling it seems to fix issues for me each time. If you're stuck like I have been a few times, worth a try.#2016-02-2620:27shaun-mahoodCtrl-enter to run commands in a Cursive REPL has broken my brain for every other program simple_smile#2016-02-2708:23bbssI don't know if that is a cursive thing or not, but I love how I can type :any-key in any place and it will be suggested by the auto-complete later#2016-02-2709:35cfleming@shaun-mahood: You mean like Slack, that ends on Enter and needs Cmd-Enter to create a new line?#2016-02-2709:35cfleming@moizsj: I don’t think so, no - could you file an issue please?#2016-02-2709:36cfleming@hugesandwich: An issue would be great for this as well, thanks.#2016-02-2709:37cfleming@moizsj: @hugesandwich: In both cases, IntelliJ should have created thread dumps automatically, see https://intellij-support.jetbrains.com/hc/en-us/articles/206544899. If you could attach those to the issues that would be great.#2016-02-2709:38moizsj@cfleming: wil do so. I have the dumps. Thanks.#2016-02-2709:38cfleming@moizsj: Great, thanks.#2016-02-2720:58mostris there any quick shortcut to switch from editor to REPL window? I mean not to send stuff there, just switch to it/make it active (other than Cmd + Shift + E)?#2016-02-2721:33shaun-mahood@cfleming: Exactly. Surprising how quickly my brain has been rewired to be in Cursive mode most of the time.#2016-02-2722:13hugesandwich@cfleming if a freeze happens again, will get the dumps. They are probably buried somewhere on my work computer and not going to be in front of it for a few days. I'll at least try to dig for it when I'm back using that machine. Thanks.#2016-02-2810:38doddeninoGuys I'm having big issues with repls inside cursive (that don't happen when I use it from the terminal). For example it doesn't find SOME installed packages, with new projects I always have to start a repl from terminal first, or I will get a lot of exceptions in cursive, etc. Is there maybe some basic setup I didn't make? Any ideas on possible causes?#2016-02-2816:47rauhSo many projects (for instance carmine) generate their vars instead of a simple "def/defn". In this case the "Quick doc" command never works for me and the symbol is also highlighted (b/c Cursive thinks it doesn't exist). However, with clojure.repl/doc it gives me the proper documentation. Is there a way to improve this? For instance, could Cursive consult the available REPL if its house-made analyzer doesn't find vars? @cfleming#2016-02-2817:20sander@doddenino did you do a leiningen refresh from within cursive? for me that often helps with deps problems#2016-02-2817:30doddenino@sander no, I haven't tried. I will, thanks simple_smile#2016-02-2817:59doddenino@sander umm intellij's terminal can't find java when I launch lein, maybe it's related#2016-02-2818:00sander@doddenino: I meant cmd-shift-a "refresh leiningen projects"#2016-02-2918:03mandersonis there a shortcut for switching focus between the editor and repl windows?#2016-02-2919:36mostr@manderson: was looking for the same recently and haven’t found anything except from Esc that switches back to editor from basically anywhere. To go the other direction Cmd+E and typing REPL is everything I found but it’s far from being perfect 😞#2016-02-2919:37mandersonthanks @mostr seems like it would be a pretty common case. that's why i checked here because I couldn't find anything with some quick googling.#2016-02-2921:05rauh@manderson: On Ubuntu I use ALT+` (the key left to 1)#2016-02-2921:06rauhIIRC Windows does this with F7, but no clue about MACs.#2016-02-2921:10manderson@rauh: what keymap config are you using in intellij?#2016-02-2921:12rauh@manderson: Visual studio. But I think the switching between app windows is done by the O/S. Same shortcut if I have multiple Chrome windows#2016-02-2921:13mandersonah, gotcha. yeah, cmd + backtick actually switches between open intellij sessions, not windows within the actual app itself#2016-02-2921:13mandersonI'm on a mac#2016-02-2921:13mandersonmaybe i'll dig more into that. thanks for the tip!#2016-02-2921:14rauhSure. I guess the OS tries to be smart if you have multiple IntelliJ open. I only have 1#2016-02-2921:15mandersonthe chrome command to switch tabs for mac is cmd + option + arrow keys, but that doesn't work in intellij#2016-02-2921:35cflemingThe best solution for the REPL right now is to assign a Cmd/Alt-<number> key sequence to it like many of the built-in toolwindows have. Then that will jump to the REPL and ESC will jump back.#2016-02-2921:35cflemingIt’s not ideal sorry, a better solution is in the works.#2016-03-0103:34danielcomptonCan anyone suggest why connection is not resolved in the first, but is in the second?#2016-03-0106:51cfleming@danielcompton: IIRC there are problems with the .. form.#2016-03-0109:52danielcomptonseems like it’s the same issue if you expand it out to (. object method) as well#2016-03-0113:20mandersonthanks @cfleming. I set it to cmd-shift-1 and it works great. in case others are interested: go to preferences/keybindings and search for "repl". scroll down until you find it (it's under "Other") and then assign a keybinding.#2016-03-0114:05rauh@denik: That's a dangerous tick quote. If you happen to have an alias (from (:require ... :as) then the tick will resolve to the full namespace. You probably want a normal quote ', no?#2016-03-0114:06rauhIn Om.Next the tutorials only use that tick quoting to allow for evaluation (ie ~), I personally prefer to not use it and use (list 'auto-rec/advance {:param "xy"})#2016-03-0114:06denik@rauh noted thanks!#2016-03-0114:06rauhSo really, cursive is very much right here and helpful simple_smile#2016-03-0114:07denikoh nice#2016-03-0114:07denikyep notifications is gone#2016-03-0114:07deniknon-issue, deleting noise#2016-03-0409:46rauhSo many defXYZ my-var ... don't get recognized that they define a var. For instance if I use mount.core/defstate. I'd suggest allowing a little popup over any top level defXYZ statements that woule tell Cursive that this defines a var. Thoughts?#2016-03-0409:47cfleming@rauh: Yes, I’m planning exactly that - not in the next release, but probably the following one.#2016-03-0409:48cflemingI’m making some changes to move the definitive API solution along too, I’m hoping that will be within a couple of months.#2016-03-0409:49cflemingThe interim solution will also allow “this form works like let” and perhaps for and ->/`->>` too#2016-03-0409:49rauh@cfleming: Awesome! Will that also allow me to pull up docs from a dynamically created var?#2016-03-0409:50cflemingAssuming that it uses a docstring right after the name symbol, yes#2016-03-0409:50rauhFor instance, carmine slurps in a gigantig JSON file with all the Redis commands and defines tons of defn's with it. I don't get any docs from Cursive 😞#2016-03-0409:50rauhOk, different problem then.#2016-03-0409:51cflemingSo that’s a different story. There’s another solution in the works for that, which is also required for Datomic (since it doesn’t ship with source).#2016-03-0409:51rauhOk great, I see you're already a few steps ahead of me. simple_smile#2016-03-0409:51cflemingThere you’ll be able to specify namespaces that should be introspected, those will generate stubs which will then be indexed as normal.#2016-03-0409:52cflemingThat’ll be useful for libs which are so complex that there’s no way I can add support for them like Midje & Overtone#2016-03-0409:52cflemingAnd things like Carmine.#2016-03-0409:53rauhperfect, can't wait for these features.#2016-03-0409:53cflemingYeah, all this is the biggest missing feature I think.#2016-03-0409:54cflemingThis is all very tricky with IntelliJ’s indexes, which weren’t really designed for this sort of thing.#2016-03-0409:54cflemingSo fingers crossed, it should all work simple_smile#2016-03-0416:11snowellCan somebody develop a structural editing plugin for Webstorm? I’m being forced to write JS and severely missing the raise function 😄#2016-03-0416:12imreaaah the pain when you have to go back to coding in a non-lisp#2016-03-0416:12imrehad that with c# and VS, I feel your struggle#2016-03-0416:12snowellThe struggle is real#2016-03-0513:23denik@cfleming, is there a way to eval into one's clipboard? I use clojure for a bunch of things: color calculations, math, string processing… It would be nice to have a shortcut where the repl result lands in the clipboard!#2016-03-0516:28joshgIs there a key binding to align let bindings? I have the option turned on, but I’m not sure how to invoke it.#2016-03-0516:29joshgbarf or slurp will align them, but I wasn’t sure if there was another way#2016-03-0517:49rauh@joshg: CHeck out Auto indent lines command. Depends on you config what it is bound to.#2016-03-0518:03joshgRight, that will indent properly but not align let bindings#2016-03-0600:40cfleming@denik: There isn’t at the moment, no. In general, I’d like to be able to do several things here: eval and replace original text, eval and copy to clipboard etc, but you end up with a combinatorial explosion of different actions since you’re also evaling top form, previous form etc.#2016-03-0600:40cflemingVim’s editing style works much better here: I’d like to select this text and do that to it.#2016-03-0600:41cflemingI’m still not sure what to do here. Perhaps another command to copy the last result to the selection, so you could eval and then copy result to clipboard?#2016-03-0600:42cfleming@joshg: Once you have that option set, you have to reformat - just correcting indentation doesn’t help since that only adjusts the initial line indent.#2016-03-0600:42cflemingI’m going to add a “Reformat current top level form” action for this sort of thing, and I’m toying with the idea of auto-formatting after a second’s delay, or something similar.#2016-03-0600:59joshg@cfleming: thank you for the response#2016-03-0615:51denik@cfleming I'd be okay with a check box to always copy eval results to my clipboard. Then I can search through results using Alfred. REPL history on the OS level would be very useful for me. #2016-03-0615:52denikEven further, and I know this is getting specific, I'd like send stuff to the REPL from Alfred #2016-03-0615:53denikThe Alfred slack workflow inspired that line of thinking https://github.com/yannickglt/alfred-slack/blob/master/README.md#2016-03-0720:29danielcompton@ethangracer: yep, there's an issue on GitHub you can subscribe to for updates#2016-03-0722:12ethangracerthanks#2016-03-0804:12tapI applied this datomic fix https://cursive-ide.com/userguide/support.html but #db/id tag is still can be resolved. Did I just miss the fix or is it an ongoing issue?#2016-03-0807:31gravIs there a way to format the current form, or the top-level form, instead of the whole while, short of marking the whole form? Or is there a shortcut that just marks the current/top-level form without moving the cursor?#2016-03-0809:06cfleming@grav: There isn’t, although I’m planning to add a “Format top-level form” shortly. You can use the expand selection to select the top level form without moving the cursor, but it might require a few steps depending on where you are in the form.#2016-03-0809:06cflemingSorry, it’s not ideal right now.#2016-03-0809:07cfleming@tap: Fix for that (and datomic in general) coming very soon.#2016-03-0810:36tapThanks @cfleming#2016-03-0905:16moizsjwhen using the cursive debugger, values of locals on prior frames of the stack are always null. Is that a known problem?#2016-03-0907:36cfleming@moizsj: They shouldn’t be. How are you starting the debugger?#2016-03-0907:37moizsj@cfleming: once I create my repl launch config, I either 'Run' or 'Debug'#2016-03-0908:51cfleming@moizsj: When you’re seeing this problem, what does *compiler-options* show in your REPL?#2016-03-0908:53moizsj@cfleming: {:disable-locals-clearing true}#2016-03-0908:53cflemingOk, that’s what you want.#2016-03-0908:54cflemingWhich code are you seeing this in? Is it code that has been AOT compiled, like Datomic or something?#2016-03-0908:55cflemingOr has your own code been AOT compiled?#2016-03-0908:56moizsjnot AOT compiled. i tried it again right now and its working. so i guess its not always reproducible#2016-03-0909:00moizsj@cfleming: is there some scenario in which that flag would get set to false? (and cause this issue)#2016-03-0909:00cflemingI’m not sure#2016-03-0909:00cflemingCursive always tries to set it at startup when you’re debugging.#2016-03-0909:01cflemingBut there may be a bug of some kind there.#2016-03-0909:01cflemingIf you see the problem again could you check that flag?#2016-03-0909:10moizsj@cfleming: sure thing#2016-03-1012:52snowellI have a general IntelliJ/Webstorm question for you all. Is there a way to increase/decrease the tab spacing of the project view? In IntelliJ it’s nice and small, but in my Webstorm it’s spaced out much more and it bothers me.#2016-03-1012:52snowellI want the left, I have the right. Any ideas?#2016-03-1020:55cfleming@snowell: No idea sorry, that’s very strange. I actually don’t use Webstorm, is it always like that?#2016-03-1022:03danielcomptonI’ve seen that before, but can’t remember how it happened#2016-03-1112:32snowell@cfleming Not sure. I didn’t notice it immediately, so maybe it wasn’t like this before? I only posted here assuming that the crowd in this channel were more familiar with the IntelliJ family of products than I was. Plus, Google had failed me simple_smile#2016-03-1114:16snowellTurns out the solution was…wait for it… to restart Webstorm 😐#2016-03-1115:01imrenow that you mention the solution I remember having this problem with intellij itself#2016-03-1115:01imresame solution#2016-03-1119:51snowellThey said it had to do with weirdness after exiting Presentation or Distraction-free mode#2016-03-1210:17sveriHi, I am currently trying out hugsql and like some other libraries it generates functions dynamically. While they are recognized in the REPL they are not in cursive. I understand why that is, but wonder if there is a nice solution to it except using declare?#2016-03-1210:19sveriHm, I also could write a wrapper function for each generated function, but that kind of defeats the purpose of the generation#2016-03-1210:31cfleming@sveri: I’m planning a change in the next couple of releases which will do that automatically (introspect a REPL, generate hidden stubs for non-indexed vars)#2016-03-1210:41sveri@cfleming: Woho, that sounds awesome, do you have an issue for that already?#2016-03-1210:54cflemingI don't think so, but it's in my head and on my list :-)#2016-03-1211:06sveriFor me this is another distinctive feature that would ease development with cursive much more than it already does#2016-03-1305:08stephenmhopperSo I accidentally ran a function in my REPL via Cursive that's taking forever to execute. Is there a way to interrupt it without killing the entire REPL?#2016-03-1305:11cfleming@stephenmhopper: Try the “Interrupt Current Execution” button in the REPL toolbar#2016-03-1305:23stephenmhopperOh, cool. I didn't notice that one before. Thanks, @cfleming#2016-03-1400:55oshyshkoJust curious, how do I add "CLJS" label to issues in Github? https://github.com/cursive-ide/cursive/issues?utf8=%E2%9C%93&amp;q=author%3Aoshyshko#2016-03-1400:56cfleming@oshyshko: Open your issue, then on the right under “Labels” select the labels to add.#2016-03-1400:56danielcompton@cfleming: only project owners/admins can add labels#2016-03-1400:56cflemingAha#2016-03-1401:31oshyshkoah... thanks for adding the labels#2016-03-1418:02hlshipSo … if I update IntelliJ to 2016.1 RC (build 145.256) will that break Cursive?#2016-03-1418:13cfleming@hlship: Yes, until I make the next release. Should be within a week, it’s been a tricky one.#2016-03-1722:17josh.hill@cfleming: excited for parinfer simple_smile#2016-03-1722:18cfleming@josh.hill: Yeah, it’s coming very soon! It still has some edge cases, but I need to get a build out for this because of 2016.1#2016-03-1722:18cflemingIt was much harder to integrate than I expected.#2016-03-1722:18josh.hillmuch appreciated#2016-03-1801:54wilkerlucio@cfleming: I would love to hear more about the difficulties of this integration, are you considering a blog post about it?#2016-03-1801:56cfleming@wilkerlucio: I hadn’t planned one, no.#2016-03-1801:57cflemingBasically IntelliJ has a very complex infrastructure around file handling.#2016-03-1801:58cflemingParinfer is designed to replace the whole file content on every keypress, basically. However in IntelliJ when I get a document modification event I can’t modify the document further, so I have to asynchronously update the doc later. However this greatly complicates undo/redo.#2016-03-1801:59cflemingThere’s lots of other trickiness - parinfer is also designed to have paren mode run when a file is opened in an editor, but because IntelliJ implements a caching file system layer, at editor open the file contents are the last contents IntelliJ saw, and then they’re later overwritten when it syncs to the file system. So again, it’s asynchronous and it’s difficult to merge that paren mode run into later indent mode runs.#2016-03-1802:01cflemingAnd… documents in IntelliJ can have multiple editors open on them. Parinfer relies on receiving the caret position in order to make some adjustments to the raw algorithm, but there can now be multiple carets when multiple editors are open.#2016-03-1802:01cflemingNot to mention multiple caret mode, which I’m currently ignoring 😐#2016-03-1802:02wilkerluciooh, that seems pretty painful to handle, I really appreciate the effort you are putting on it, thank you#2016-03-1802:02cflemingNo worries - I should probably blog more about this stuff.#2016-03-1802:03cflemingI was going to write about the lein integration since that was really difficult and it was of interest to a lot of people, but I never got around to it.#2016-03-1802:04wilkerlucioI agree, and I believe these kind of posts could potentially be a case to improve things in a way to get easier in the future#2016-03-1802:05cflemingWell, in this case IntelliJ just isn’t designed to allow this sort of thing. I believe other editors have been problematic too, in general parinfer is a very unusual file change.#2016-03-1802:05cflemingThe lein one could have been used to make lein easier to integrate for sure.#2016-03-1802:06wilkerlucioI'm glad you got that working too simple_smile#2016-03-1802:09wilkerlucio@cfleming: I'm taking off, thanks for all the information#2016-03-1802:10cfleming@wilkerlucio: No worries, seeya!#2016-03-1802:10wilkerluciosee ya#2016-03-1811:58ricardo@cfleming: Does Cursive support IDEA 16.1?#2016-03-1811:58ricardoAh, nevermind, just read the reply from a few days ago.#2016-03-1907:20puzzlerHow do you teach Cursive how to properly indent a macro? It is currently doing weird things with the "are" macro from clojure.test.#2016-03-1907:27rauh@puzzler: Hover over it with the mouse and there should be a popup.#2016-03-1907:28rauhhttps://cursive-ide.com/userguide/formatting.html#2016-03-1907:30puzzlerSo you have to do it for each instance of the macro?#2016-03-1907:30puzzlerOh, I see, I just need to force it to reformat the code.#2016-03-1907:30puzzlerThanks.#2016-03-1917:37stefanbaconHey everyone simple_smile#2016-03-1917:38stefanbaconAny tips for remote REPL debugging? I'm trying to access it using SSH tunnels it works on a small project but loading the clj in the repl takes a long time. The debugger works and I saw that the debugger works with break points and all. But it freezes on bigger projects. SSH tunnel too high latency?#2016-03-1919:36stefanbaconsolved the problem idea was complaining about not being able to resolve a dependency. worked fine with lein repl so I had just ignored it. But making idea happy fixed the issue I was having with remote debugging#2016-03-2004:02cflemingCursive 1.2.1 is out, with support for IntelliJ 2016.1 and Parinfer!#2016-03-2005:51joshgI just update cursive, but I’m getting dependency cycle errors (time.clj -> time.clj). I’m not using time.clj anywhere and everything worked with the previous version. Is this due to a transitive dependency’s cyclic require?#2016-03-2006:02joshgIt appears to be an issue when requiring the manifold.deferred namespace. Has anyone else had errors using manifold with cursive?#2016-03-2006:13joshgI can’t find the cyclic dependency in manifold’s time.clj. Manually executing load-file in the REPL works.#2016-03-2006:33rauh@cfleming: I'm getting Can't load PluginDescriptor[name='Cursive', classpath='/tmp/plugin/clojure-plugin']: until build 143.9999 does not match IU-145.258#2016-03-2006:39cfleming@rauh: That message means that the plugin is the v15 version, and IntelliJ is v2016. If you go to Settings-&gt;Plugins can you update it?#2016-03-2006:41cfleming@joshg: There were a couple of bugs fixed in the transitive loading. I’ll try to reproduce with that. When are you getting that - when doing “Sync files in REPL”?#2016-03-2006:43cfleming@joshg: There have been some issues with manifold in the past, it does some crazy things: https://github.com/cursive-ide/cursive/issues/535#2016-03-2006:44cflemingIn particular, it uses bare require outside the ns form because that way clojure doesn’t complain about dependency cycles. I can’t remember what the fix from that issue was, I’ll look tomorrow morning. Could you file an issue for that?#2016-03-2006:44joshgYes, when I attempt to load the file or sync files#2016-03-2006:44joshgIf I evaluate each form, I don’t have a problem#2016-03-2006:45joshgalternately, if I call load-file, it loads and executes fine (as it did in the previous cursive version)#2016-03-2006:46rauh@cfleming: Yes, I've clicked update a few times and it downloads properly. But it doesn't seem to get loaded. I just tried with the Community edition instead and it seems to work. Though the source code highlighting is really weird.#2016-03-2006:47cfleming@rauh: That’s very strange. Try downloading http://updates.cursive-ide.com/downloads/cursive-1.2.1-2016.1.zip and installing from disk.#2016-03-2006:48cflemingIntelliJ’s update mechanism drives me nuts, I can’t figure out how to make it reliable when upgrading platform versions.#2016-03-2006:50joshgIs there a way to turn off Cursive’s transitive cyclic dependency checking in favor or Clojure’s looser requirements? It’s not a huge issue, as I can just manually execute load-file in the repl. It’s just nice to do that from a keybinding.#2016-03-2006:51cfleming@joshg: Yes, Settings-&gt;Languages and Frameworks-&gt;Clojure-&gt;Load out of date dependencies transitively#2016-03-2006:52joshgindeed, disabling that setting fixed it, thanks. I’ll file an issue#2016-03-2006:57rauh@cfleming: Manual install worked, but still poor syntax highlighting.#2016-03-2006:57cfleming@rauh: Can you post a screenshot?#2016-03-2007:00cflemingBack in a bit, dinner time#2016-03-2007:01cfleming@rauh: What are you not liking about that? I’m not sure what it looked like before.#2016-03-2007:02cflemingOk, definitely dinner time now. Back in a while.#2016-03-2007:05rauh@cfleming: Yeah I may have had some modifications. I'm looking into that. Therer is "Dracula (Copy)" theme. Mainly the keywords used to be in a different color. Would have to check if there is more...#2016-03-2007:05joshghttps://github.com/cursive-ide/cursive/issues/1298 /cc @cfleming#2016-03-2007:19rauh@cfleming: It was only really the keyword color which I copied from my previous color schema and all looks normal. I guess it looked really weird since the code is littered with keywords simple_smile. All working now.#2016-03-2007:42cfleming@rauh: Ok, great!#2016-03-2008:16rauhIf I parinfer (like tab) and then undo, the cursor jumps way back to the last edit (not where I was).#2016-03-2008:17cfleming@rauh: Could you file an issue for that?#2016-03-2008:17cflemingUndo/redo is tricky with parinfer, but that sounds wrong.#2016-03-2008:25rauhDone: https://github.com/cursive-ide/cursive/issues/1299#2016-03-2008:30cflemingThanks#2016-03-2009:06rauh@cfleming: Parinfer edit mode also makes the (ns (:require etc... autocomplete/suggester not work (ie no popup). Well, it still comes up manually (with a CTRL+SPACE). So not a biggie#2016-03-2023:04cfleming@rauh: Looks like this was part of your problem: https://github.com/cursive-ide/cursive/issues/1300#2016-03-2023:05cfleming@rauh: Also https://github.com/cursive-ide/cursive/issues/1302#2016-03-2100:53markmandelHaven't seen any issues with the new Cursive on 2016.1 so far simple_smile#2016-03-2100:53markmandelBeen rock solid#2016-03-2100:54cflemingNice! There are a few issues but nothing too serious so far, #1302 is the worst of it I think.#2016-03-2100:54cflemingI’ll get a fix out for these in the next day or two.#2016-03-2100:54markmandelNoice#2016-03-2109:17doddeninoMmm, I get this error: `WARN: Can't load Cursive for v15: until build 143.9999 does not match IU-145.258 WARN: Can't load PluginDescriptor[name='Cursive', classpath='/tmp/plugin/clojure-plugin']: until build 143.9999 does not match IU-145.258 `#2016-03-2109:19doddeninoweird, as I'm definitely using version 145#2016-03-2109:19rauh@doddenino: I had that issue yesterday too. (See the logs above)#2016-03-2109:19rauhOnly way was for me to manually install the zip. (Linked above)#2016-03-2109:22doddeninoI think it's more an issue with intellij update. I'll try to uninstall everything as soon as I find out how#2016-03-2109:34doddenino@rauh: I also had to install it from the zip. Thanks!#2016-03-2112:17ricardoFirst impressions after about a day with it: Parinfer is interesting, but too fiddly.#2016-03-2113:43grav@ricardo: how do you mean fiddly?#2016-03-2113:49ricardo@grav: Maybe I’m unused to it, but it is non-trivial to figure out what Parinfer will do in some situations. Say, if I have a function for tests, and want to continue adding comments near the end, Parinfer starts doing a little ordering dance.#2016-03-2113:50ricardoMight be easier to explain if I record a video, one moment.#2016-03-2113:54ricardohttps://mega.nz/#!JtIHSZxR!bMIJhy9oRuE71Kv32ZWmf4XkI0vWDdjUln4TmnmzqNk#2016-03-2113:54ricardoNice spammy header, Mega.#2016-03-2113:55ricardoMaybe I need to get used to its logic, or maybe it just doesn’t fit my approach of “let’s open up space in this function to start adding things”.#2016-03-2113:56ricardoBut I’ve also triggered other cases of non-obvious behavior when editing existing code.#2016-03-2113:59rauh@ricardo: Parinfer will never allow to sit a closing paren on its own on a line so a trailing comment in any form isn't possible. Only if you add more code below it'll be ok.#2016-03-2114:00rauhThat also tripped me up in the beginning but once you realize that closing parens are always behind the last statement then it's clear what's going on.#2016-03-2114:01ricardo@rauh: Yes, I’ve noticed. I just wanted to write the comment, then the tests… It just feels weird that for me to do that, I need to start writing my comment and the next assertion outside the deftest, and trust Parinfer will extend the deftest to encompass it.#2016-03-2114:01ricardoWhich it does, it just feels odd.#2016-03-2114:02rauhYes, I agree it's a little odd at time. But I got used to it quickly. I still use some paredit functionality but it's nice to never have to worry about unbalanced parens with parinfer on.#2016-03-2114:02rauhI can now just delete whatever I like (even with selection and it'll be balanced.#2016-03-2114:03ricardoNeither you have to worry about it with paredit. For me parinfer mostly is an advantage when re-nesting code, since it’s easier than select-chunk-plunk-chunk-elsewhere.#2016-03-2114:03rauhI can copy and paste the wildest unbalanced clojure code and it'll fix it magically#2016-03-2114:03ricardoI guess I have to get used to trusting the magic. simple_smile#2016-03-2114:04rauhYes, I started to trust it simple_smile Got some compile errors in the beginning (messing up let) but now I'm more productive I'd say#2016-03-2114:04ricardoIt’s also odd that on that sample video it extended the comment on the next line when I press enter, but if I do it on any other comment it doesn’t happen.#2016-03-2114:05ricardoNot sure if that’s Cursive or Parinfer, but on Paredit mode it doesn’t happen on either case.#2016-03-2114:05ricardoThat is, not sure if that’s a Cursive peculiarity, or specifically happens on the parinfer mode.#2016-03-2114:07ricardoAh, nevermind. That’s because the closing parens that was left inside the comment is after the cursor.#2016-03-2114:07ricardoIf there’s any text after the cursor, Cursive extends the comment to the next line when you press enter.#2016-03-2114:08ricardo@rauh: Yes, one case where parinfer made a dog’s breakfast out of things for me were let bindings. Still have to repro it.#2016-03-2114:10rauh@ricardo: It only messes up if the code is indented too far in. In that case I CTRL-W "select" the block and Shirt+tab it back. Then it's fixed.#2016-03-2114:11ricardoHmm, can’t say it was indented too far… Maybe it acted like it was indented too far because I have aligned let bindings turned on, and there was a long-ish name?#2016-03-2114:43ricardoAha, no, I think I found what it was. My let issue was probably related to something like this:#2016-03-2114:44ricardoWhere it wasn’t obvious to me initially that parinfer had extended the hashmap to encompass values it shouldn’t have.#2016-03-2114:51ricardoWhy it bit me was because my usual approach is to first split the line, then tell Cursive to reformat… but can’t do that with parinfer.#2016-03-2119:46kennyI have just updated to 2016.1 and also updated Cursive however all of the keywords in my project are not highlighted. Is anyone else having this problem? That is occurring everywhere for me.#2016-03-2119:47kennyJust the syntax highlighting problem, not the dep cycle problem simple_smile#2016-03-2119:50kennyAh I have found the relevant issue: https://github.com/cursive-ide/cursive/issues/1314#2016-03-2209:46ricardoWell, this is weird. I just started getting a KotlinReflectionNotSupportedError exception on both IDEA 15 and 2016.1 when I try to run lein tasks.#2016-03-2209:47ricardoAnd kotlin-reflect.jar is on both applications.#2016-03-2210:49ricardoOK, known issue.#2016-03-2220:50cfleming@ricardo: yeah, I thought this was a new issue in v2016.1 because people started reporting it right after the release, but it looks like it predates that.#2016-03-2220:50cflemingAnyway, it’s fixed now.#2016-03-2221:43ricardo@cfleming: I’m curious, what was the cause? I didn’t get it right after upgrading, but only until today, and it then showed up on both 15 and 2016.1, which had me thinking was an environment issue.#2016-03-2221:44cfleming@ricardo: It’s weird, I can’t see why people wouldn’t have got this earlier.#2016-03-2221:44cflemingThis is using Kotlin:#2016-03-2221:44cfleming
val logger: Logger = Logger.getInstance(LeiningenCommandLineState::class.simpleName)
#2016-03-2221:45cflemingThe trick there is that LeiningenCommandLineState::class returns a Kotlin class, not the Java class (I don’t fully understand the difference), and calling simpleName on the Kotlin one apparently requires the reflection classes.#2016-03-2221:46cflemingChanging it to:
val logger: Logger = Logger.getInstance(LeiningenCommandLineState::class.java.simpleName)
#2016-03-2221:46cflemingreturns the actual Java class, which works fine.#2016-03-2221:46cflemingThe only thing I can think of is that the latest plugin bundles a later version of Kotlin, and that behaviour has changed in Kotlin.#2016-03-2221:58ricardoInteresting, thanks.#2016-03-2322:29andrewhr@cfleming: have you ever heard about a issue where, after the first time you use "run ns tests in REPL", you're not able to run this command again? The repl appears to reload the ns but never runs the test#2016-03-2400:26bmaddyI suspect I'm missing something simple here, but does anyone know why I'd be getting a KotlinReflectionNotSupportedError when trying to run the version lein task?#2016-03-2400:27bmaddy(I'm going through the userguide docs if you can't tell)#2016-03-2400:33cfleming@bmaddy: Yes, this is a bug in the latest release - it’s fixed for the next release, which should be out sometime in the next couple of days.#2016-03-2400:33cfleming@andrewhr: No, I’ve never seen that.#2016-03-2400:34bmaddyOk, thanks!#2016-03-2408:26stijn@cfleming: on the issues about parinfer, it all definitely started happening after a split window. But now, if I unsplit or even after a intellij restart it stopped working#2016-03-2408:27stijnso whatever edit I do, it doesn't balance any parens anymore#2016-03-2409:15cfleming@stijn: What I suspect is happening is that the file has a problem that parinfer doesn’t like. There’s a bug in this version where it doesn’t show errors returned by parinfer correctly.#2016-03-2409:16cflemingDoes it work on any file, or not on any of them?#2016-03-2409:16stijnlet me try that#2016-03-2409:17stijnit seems it doesn't work on any file, even a newly created one#2016-03-2409:17stijn
(ns cantona.test-parinfer)
  (:require)
#2016-03-2409:18stijnwhen I tab before (:require)#2016-03-2409:19stijnalso, it does not work in any project anymore#2016-03-2409:19cflemingDo you get any errors in the log?#2016-03-2409:20cflemingHelp->Show log in Finder/Explorer#2016-03-2409:26stijnhmm, ok, I tried restarting and now it works again. I'll try to keep a record of what I did before it happens again#2016-03-2409:32cflemingThat’s bizarre.#2016-03-2409:32cflemingThe next build has a lot of fixes, hopefully it will be more reliable there.#2016-03-2409:32cflemingHow are you finding it, BTW?#2016-03-2409:32cflemingParinfer in general, I mean.#2016-03-2409:33stijnI think it makes a lot of sense, it's a bit getting used to#2016-03-2409:34stijnthere's some things that I don't yet see how you would do them efficiently:#2016-03-2409:34stijn
(let [a b]
  (some
    (stuff)
    (on)
    (multiple lines)))
#2016-03-2409:35stijnif you want to get the (some (stuff ...)) inside the let, you have to select multiple lines and tab them#2016-03-2409:35stijnwhereas with paredit you can just slurp or barf (i'm really bad at the terminology ;)) them in from a single carret position#2016-03-2409:37stijnthere should be some alternative 'tab entire form' or something if your cursor is just in front of the
|(some
#2016-03-2409:39stijnhah, you can use 'Extend selection' before tabbing. ok#2016-03-2409:45cflemingThere’s a bunch of discussion going on over at https://cursive-ide.com/archive/1882.html#2016-03-2409:46cflemingUgh, although the formatting is getting mangled - I’ll fix that.#2016-03-2409:47cflemingOk, got to go, seeya#2016-03-2410:04stijnbye#2016-03-2412:18andrewhr@cfleming: thanks. I believe I'm able to reproduce it consistently, Github's repo is the best place to report?#2016-03-2503:39cfleming@andrewhr: Yes please.#2016-03-2705:21denikthis time because it can’t be resolved I’m offered to create a function which I then delete after setting indentation. that does not affect other namespaces however#2016-03-2705:21denikthis is intellij 2016.1#2016-03-2723:27cfleming@denik: So in that case the indentation code wouldn’t work well anyway since initLocalState isn’t a function itself, it’s an implementation of a type#2016-03-2723:27cflemingIs that an om.next defui?#2016-03-2723:28cflemingThose should be supported and indented correctly.#2016-03-2723:46denikit’s coming from @anmonteiro’s om-css (he wrapped defui). The rules are not manually added per project/namespace or are they? In general wouldn’t it be a good idea to have default for any symbol that appears at the beginning of an expression? I’d always set the indentation there to 1.#2016-03-2812:59manutter51I’m having a weird conflict between Cursive and the latest Elixir plugin in IDEA 2016.1. Whenever I have both plugins enabled, and I try to start a repl in a clojure project, I get a stack trace complaining about an incompatible major/minor version, coming from some Elixir service builder class. Anybody else ever see anything like this?#2016-03-2813:00manutter51Works fine on my home computer, btw, both MacBook Pro’s with the latest OS, brew-installed Elixir, etc.#2016-03-2821:28cfleming@manutter51: I haven’t, no, but I’m not surprised. Do you have the stacktrace there?#2016-03-2821:29cflemingThe issue is that plugins can cause each other’s functionality to be called, since IntelliJ works on a contributor model.#2016-03-2821:29cflemingSo if Elixir is compiled for Java 8 only, and you’re running JDK 6, you might get errors like that.#2016-03-2902:21bmaddyHas anyone else seen this when trying to start the repl as described here: https://github.com/bhauman/lein-figwheel/wiki/Running-figwheel-in-a-Cursive-Clojure-REPL
"/Applications/IntelliJ IDEA CE.app/Contents/jre/jdk/Contents/Home/jre/bin/java" script/figwheel.clj -Didea.launcher.port=7532 ...lots of other stuff...  com.intellij.rt.execution.application.AppMain clojure.main -r
Error: Could not find or load main class script.figwheel.clj
The strange thing is, I think I have the same setup on my personal computer and everything seems to work fine there. On the working computer script/figwheel.clj appears at the end, after clojure.main.
#2016-03-2902:33bmaddyOh geez. As soon as I post here I realize that I put script/figwheel.clj in the JVM Args field instead of the Parameters field. Never mind, nothing to see here...#2016-03-2912:24manutter51@cfleming: Thanks, here’s a stack dump: https://pastebin.com/dL0fRnUd#2016-03-2912:25manutter51Line 14 is the elixir reference. It’s not a huge deal, I don’t really use Elixir at work so it’s no problem just to disable it. Purely idle curiosity at this point.#2016-03-2913:00rauhMinor annoyance when working with a documentation window in "floating" mode: 1. The editor loses focus when moving around and the documentation window updates.#2016-03-2921:20cfleming@manutter51: So the problem isn’t Elixir, it’s actually an IntelliJ core class. Which JVM are you using to run IntelliJ? Which OS are you on?#2016-03-3011:50manutter51This is on the latest OS X, using Java 1.7.0_80#2016-03-3023:14cfleming@manutter51: Can you check in IntelliJ IDEA-&gt;About IntelliJ IDEA to ensure that that’s the version you’re running your IDE under? Is there a reason you’re not using the bundled JDK?#2016-03-3110:21andrzejsliwaHi Guys, anyone have idea about "No nREPL ack received” when I’m running repl in Cursive#2016-03-3111:18sveri@andrzejsliwa: Hey, I have this happenening whenever I do a lot of stuff during repl startup and then it runs into startup timeout. You can configure that somewhere, search for repl startup timeout in the settings and raise it.#2016-03-3111:42manutter51@cfleming: Ah, sorry, that was the project’s JVM, the IDE’s JVM is 1.8.0_40-release-b132 x86_64#2016-03-3112:05andrzejsliwa@sveri the problem is that this is not releated to any change in app#2016-03-3112:05andrzejsliwasome day just started doing timeouts#2016-03-3112:06andrzejsliwaI belive its somehow releated to my macbook setup#2016-03-3112:06andrzejsliwaI had similar before and reinstall of macosx solves problem#2016-03-3112:06andrzejsliwalooks like routing problem or networking#2016-03-3112:06sveriDid you raise the timeout?#2016-03-3112:07andrzejsliwaI didn’t increase timeout, becuase I know that I didn’t change anything in source code#2016-03-3112:07andrzejsliwaand I want to find source of problem#2016-03-3112:07andrzejsliwainstead of extend just timeout and wait longer#2016-03-3112:08sveriI understand your intention, just wanted to see if it fixes the problem or not. Maybe you were close to the timeout all the time and are over the edge now#2016-03-3112:08andrzejsliwapreivously extending time helps, but not in 100%#2016-03-3112:09andrzejsliwaI would like to know how to debug such issue… how to find stacktrace and state of repl#2016-03-3112:11sveriWell, I want to hear @cfleming answer to this too. My assumption is just that it is a combination of code size, dependencies, your hardware, the load on your OS, leiningen version, the WLAN connection and intellij version. But, I might be wrong here, obviously.#2016-03-3112:12sveriNot to forget about the harddrive here simple_smile#2016-03-3112:43andrzejsliwaso even increase of time its not helping#2016-03-3112:43andrzejsliwaNo nREPL ack received Process finished with exit code 137#2016-03-3112:43andrzejsliwaprobably cursive runner its ignoring it#2016-03-3112:48rauh@andrzejsliwa: Are you connecting to an nREPL or does Cursive start the REPL?#2016-03-3112:48andrzejsliwaI’m starting cursive from repl#2016-03-3112:49rauhPersonally I have stopped doing that. I now have all my REPLs as nREPLs and just connect Cursive to them. Made things much easier IMO#2016-03-3112:50rauhGiven that it'll be tough to figure out the underlying problem.#2016-03-3112:51andrzejsliwathe problem is that now I have this problem even from terminal#2016-03-3112:51andrzejsliwaREPL server launch timed out.#2016-03-3112:53sveri@rauh: Can you use the same shortcuts to send code to the nRepl?#2016-03-3112:54rauh@sveri: AFAIK, yes. I don't miss anything. I also have fighweel running and whatnot#2016-03-3112:55rauhOne plus: I can even load clojurescript libraries while my repl is running without a restart (vinyasa ./inject), which AFAIK is impossible unless you have *n*REPL + Figwheel running simple_smile#2016-03-3112:56svericool, thank you#2016-03-3121:47cfleming@andrzejsliwa: If it’s happening in the terminal too then it must be something in your application, or your environment. Do you have a firewall that might be blocking something?#2016-03-3122:20bmaddyDoes anyone know if it works to set breakpoints with clojurescript code? Run > Toggle Line Breakpoint is grayed out for me.#2016-03-3122:22cfleming@bmaddy: No, I have a CLJS debugger planned, but Cursive doesn’t integrate with the existing JS debugger right now.#2016-03-3122:25bmaddy@cfleming: Sounds good, thanks! I'm loving Cursive, btw. It's an absolute delight after struggling with emacs for 5yrs. Thanks!#2016-03-3122:25cfleming@bmaddy: Thanks! I’m glad you’re enjoying it.#2016-04-0103:42cflemingCursive 1.2.2 is out, fixing a bunch of bugs - mostly around parinfer, but a few others too.#2016-04-0108:06sveriIs there a tutorial or something which shortcuts exist for working with parinfer?#2016-04-0108:11rauh@cfleming: Undo is completely broken now for me. It just jumps the cursor back and forth#2016-04-0108:11cfleming@rauh: That’s really bizarre. I can’t reproduce that at all.#2016-04-0108:12cfleming@rauh: Can you give me an example of exactly something you’re trying to do, and I’ll try the same thing here?#2016-04-0108:14cfleming@sveri: I don’t think so, no. The parinfer website describes it best: https://shaunlebron.github.io/parinfer. The idea of parinfer is that it shouldn’t need a lot of shortcuts. The main one is tab to indent and shift-tab to dedent.#2016-04-0108:15sveri@cfleming: Ok, I already looked at it, just was wondering if there is more to it. Good work!#2016-04-0108:17rauh@cfleming: I move the cursor from column 0 to column 1, Then press undo continuously. It just goes back and forth from 0 to 1#2016-04-0108:17cfleming@rauh: So you just insert a space?#2016-04-0108:17rauhNope, just moving#2016-04-0108:17cflemingOk.#2016-04-0108:17rauheven up and down#2016-04-0108:18rauhIf some actual edit happens it undoes that, then again jumps back and forth#2016-04-0108:18rauhBut if (1) edit (2) move the cursor (3) undo -> just jumps back and forth#2016-04-0108:20cfleming@rauh: Ok, I see that, thanks.#2016-04-0108:23rauh@cfleming: A little strange: If i use CTRL-Z to undo it does the behavior that I described. If I choose Edit-undo it does undo the things (kinda, needing 3 steps per undo)#2016-04-0108:24cfleming@rauh: I reopened #1299, I’ll try to fix that ASAP.#2016-04-0111:58kernelp4nicHi! what's the official way to update cursive? I can't find the repository url in the user guide page. cc/ @cfleming#2016-04-0209:04sveri@cfleming: Hi, I found another defect with parinfer in cursive: 1.2.1. Just wanted to drop a note in case you are working on it anyway.#2016-04-0221:33cfleming@sveri: Thanks, much appreciated. I’ll have to try that, but that look like a bug in parinfer proper, not Cursive. I’ll check on Monday.#2016-04-0221:40sveri@cfleming: Totally forgot the link to the issue: https://github.com/cursive-ide/cursive/issues/1342 Just saw that there are even more bugs with parinfer. Reminds me how hard development is and how impossible to test every case.#2016-04-0221:41cfleming@sveri: Yeah, although parinfer is especially bad - it’s been very difficult to integrate properly.#2016-04-0221:41cflemingThe bugs are like whack-a-mole#2016-04-0221:57cfleming@sveri: I just confirmed your issue is a bug in parinfer itself: https://github.com/shaunlebron/parinfer/issues/109#2016-04-0222:01sveri@cfleming: Thanks for looking at it, I have not of the possibility that it could be in parinfer itself.#2016-04-0504:00cfleming@kernelp4nic: Sorry, I missed your message earlier. You shouldn’t have to mess with repo URLs any more.#2016-04-0504:01cflemingJust go to Settings-&gt;Plugins, select Cursive in the list and there should be a button there to update it if there’s a new version.#2016-04-0507:07jamesNot sure if anyone here has been using it, but I’ve made some big tweaks to my dark theme “Borealis”: https://github.com/Misophistful/borealis-cursive-theme#2016-04-0507:07jameshttps://raw.githubusercontent.com/wiki/Misophistful/borealis-cursive-theme/images/Borealis.png#2016-04-0507:12jamesI found it easier on my eyes during long coding sessions to have a decreased contrast, and I’ve tweaked the colours a little. Now with the magic of Parinfer I’ve found that I don’t need to use the rainbow parens, but they’re there if you want them.#2016-04-0508:31cfleming@james: Thanks! People are definitely using (and liking!) Borealis, several people have mentioned it to me.#2016-04-0508:32cflemingThat looks very nice.#2016-04-0509:02cfleminghttps://twitter.com/CursiveIDE/status/717275630518214658#2016-04-0510:37james@cfleming: Great to hear that some people are using it, and thanks for the nice plug on Twitter! simple_smile#2016-04-0510:44sveriI will give it a try too in the next days simple_smile#2016-04-0609:34mishaso I am not the only one, who got undo/redo messed up due to parinfer?#2016-04-0610:07cfleming@misha: no, but that should be fixed in the release yesterday#2016-04-0610:08misha@cfleming < 3#2016-04-0617:28gravany way to limit the output of an expression in the repl? For instance, my repl is currently printing the 28000 datoms I just transacted.#2016-04-0617:28gravAnd now IDEA stalled.#2016-04-0617:31gravoh … and it forgot the last repl session when I restarted it. dammit.#2016-04-0617:31gravsorry for whining here 😉#2016-04-0617:31sveri@grav there is a stop process button or something similar in the repl window#2016-04-0617:32gravyes, but when the processing is over, and it’s just returning the output of the expression, there seems to be no stopping it, ie the button doesn’t do anything#2016-04-0617:32grav@sveri ^#2016-04-0617:33sveriAh, well, that might be true. Too bad. xkill could be your friend then 😄#2016-04-0623:48kennyFor some reason when clicking the “Refresh Leiningen Project” button in the Leiningen panel I get a message saying “Dependency resolution error Error synchronising myproject: Could not find artifact mydependency:0.5.1 in central (https://repo1.maven.org/maven2/)”. This dependency is installed in my local maven repo (it was pulled in from boot). What’s interesting is that when I look in my local maven repository under myproject I see version 0.5.1 does not appear in maven-metadata-local.xml, however, it does appear in maven-metadata-.xml. Any thoughts on how to fix this?#2016-04-0710:19moizsj@cfleming: any plans to build a unified search feature in Cursive? files, symbols, and namespaces . Would be really nice to have. (Intellij's search everywhere does not do this right now)#2016-04-0710:39solicode@grav I was going to mention *print-length* and *print-level*, but unfortunately they don't seem to do anything in Cursive. Would be nice if it were possible though.#2016-04-0711:11darwin@solicode: I wonder that *print-length* and *print-level* don’t do anything, that should be Clojure’s runtime setting not Cursive’s - unless Cursive is redefining those for each evaluation#2016-04-0711:18solicodeHmm, this is odd. I wonder if a recent update fixed the issue. It actually seems to be working for me now#2016-04-0711:22solicodeI’m not actually sure what I was seeing. Anyway, so I guess all that would be needed is to have a way to set default values for options like these. There seems to be an issue for it: https://github.com/cursive-ide/cursive/issues/495#2016-04-0711:23solicodeOr just put it in user.clj#2016-04-0711:23solicodefor now at least#2016-04-0718:44jeffh-fpI’m having trouble understanding when Cursive and the REPL have “Send top form to REPL” activated vs. “Send form before carat to REPL” Just want to build some muscle memory/keyboard shortcuts around having the cursor on a certain line and being able to send it to the REPL and/or selecting a function and having it sent to the REPL#2016-04-0903:30cfleming@solicode: @grav: @darwin: I’m actually not sure about the interaction of those flags with values returned from the REPL. It will depend on the type of REPL you’re using. A clojure.main REPL just spits everything to stdout, so they should take effect there.#2016-04-0903:31cflemingnREPL is more complicated - IIRC (but I’d have to check), values are pr-str’ed on the nREPL server to be passed back to the client. The values will possibly be truncated at that point, but I’m not sure - the thread bindings are tricky, I’d have to look at the nREPL source to be sure.#2016-04-0903:32cflemingOnce the nREPL result is back on the client, Cursive will just print the whole thing and ignore those flags. The flags are set on the REPL server anyway, not the client side so Cursive can’t even see them at that point.#2016-04-0903:32cflemingI think having some config in Cursive to replicate them is probably the best solution, assuming the flags are not obeyed before passing the data back from the server.#2016-04-0905:48solicodeThanks for the explanation @cfleming. I looked at pr-str and it does seem to respect *print-length* and *print-level*. It looks like everything might is fine. Now I'm wondering if I accidentally had set *print-level* instead of *print-length* when I was testing with Cursive and came to the wrong conclusion. Sorry about that.#2016-04-0906:01cfleming@solicode: No worries, like I say I’d have to look at the code to be sure, it’s been a while. I’m quite prepared to believe there’s a problem there - several people have reported problems printing huge data structures, but perhaps they hadn’t set those variables.#2016-04-0906:01cflemingI’ll take a look when I get a moment.#2016-04-0909:53darwinpr-str is definitely subject of those *print-something* settings, as @cfleming correctly pointed out nREPL uses pr-str on the nREPL-server side and send just a string over the wire. In case of local REPL, someone has to call pr-str or similar function which boils down to standard clojure printing machinery, because the outputs are properly formatted. The question is who does it and what clojure runtime environment is present around that call.#2016-04-0909:56darwinUnfortunately during Dirac development, I found out that whole REPL, nREPL and piggieback stuff is written in a style in which it is extremely hard to read and reason about for me, I’m not that much experienced in Clojure, but I think that after one year of pretty intensive Clojure work, one should be able to read any code. This is not the case. I can understand just local pieces of it, but not the whole picture.#2016-04-0911:19cfleming@darwin: Yeah, the nREPL code is very complex, and a lot of the REPL infrastructure code is complex and hard to understand too.#2016-04-0911:20cflemingI’m going to add proper CLJS REPL support soon, so I’ll be fighting that battle again. Still, taking nREPL and piggieback out of the loop will be a huge win.#2016-04-0912:58darwin@cfleming: maybe we should cooperate with that CLJS REPL a bit, because hopefully soon I’m going to implement “echoing REPL support for Dirac in Cursive”. I want to be able to use DevTools console as output window and be able to send forms from my Cursive session to it#2016-04-0912:59darwinfor this I believe I won’t need support from Cursive, I will just run my nREPL server, with some special middleware, which will additionally “send" forms to Dirac#2016-04-0913:00darwinin other words for Cursive it will behave like standard nREPL#2016-04-0913:16curlyfryHi, has anyone here worked out a configuration to make Cursive and IdeaVim play more nicely together? I checked https://github.com/cursive-ide/cursive/wiki/IdeaVim-issues and found that it is possible to map som Cursive actions to vim binding, but I am not quite sure about how to begin#2016-04-1021:29cfleming@curlyfry: I’m not sure either sorry, I haven’t had time to look at that yet.#2016-04-1021:30cfleming@curlyfry: I believe it’s possible but I don’t know how to do it.#2016-04-1021:59danielcompton@cfleming: is it possible to show release notes for the Cursive updates in IntelliJ?#2016-04-1021:59cfleming@danielcompton: No, it’s not right now. I should add them to the plugin notes.#2016-04-1022:00danielcomptonah#2016-04-1107:07curlyfry@cfleming: Ok, thanks for the answer!#2016-04-1114:58timgilbertHey, just curious, is there a changelog / release notes page for Cursive somewhere?#2016-04-1115:16shaun-mahood@timgilbert: The 2 places I'm aware of are https://cursive-ide.com/archive/ and https://github.com/cursive-ide/cursive/milestones?state=closed#2016-04-1122:08cfleming@timur: @shaun-mahood: Right, that’s as close as it gets right now. I’m planning to make a proper one soon, and also add it to the details in the plugin view.#2016-04-1122:09cflemingWhoops, sorry, that should have been @timgilbert.#2016-04-1122:24timgilbertCool, thanks @cfleming#2016-04-1204:57lfn3Hey @cfleming - I’ve written a macro around is to handle timeouts for tests - it’s not showing up the little ok/`fail` gutter icons, either in the macro body or next to the use of the macro. Is this something you’d be able to support at some point?#2016-04-1204:58cfleming@lfn3: I would have thought that would work.#2016-04-1204:59cflemingOh, actually, I might check for ’is explicitly.#2016-04-1204:59lfn3There is more than 1 is statement in the macro. I’ll link you the code.#2016-04-1204:59cflemingCould you file an issue for that?#2016-04-1204:59lfn3Sure thing.#2016-04-1204:59cflemingGreat, thanks.#2016-04-1204:59lfn3Wowza. Issue list grew a little#2016-04-1205:03lfn3Ok. I lie. Could swear it wasn’t working before, but I just went to grab a screenshot and it’s working correctly.#2016-04-1303:46ghufran@cfleming: I just downloaded a new version of intellij idea (2016.1.1), cursive doesn’t seem to be working, on the ‘plugin’ page, it shows up in the search, but there’s a little tooltip saying it is not compatible with this version of idea.#2016-04-1303:47ghufranthe cursive version info says: Built on: 2016-04-06 16:05 Built from: 1.2.4-17-g813730f#2016-04-1303:48ghufranahh, where it says “Cursive for v15 (1.2.4-15)” .. I guess I just figured out that that meant. I assumed it meant >= 15 simple_smile#2016-04-1303:48cfleming@ghufran: No, sadly there’s a bug in IntelliJ which makes this a real pain.#2016-04-1303:49cflemingPlugins-&gt;Browse Repositories-&gt;Manage repositories and delete any Cursive repos you see there.#2016-04-1303:49cflemingThen from the Browse Repositories page, refresh and search for Cursive.#2016-04-1303:51ghufranso it should still work on the 2016 version? Otherwise I can get 15.0.5 from here: https://confluence.jetbrains.com/display/IntelliJIDEA/Previous+IntelliJ+IDEA+Releases#2016-04-1303:55cflemingIt definitely works on the 2016 version.#2016-04-1304:02ghufran@cfleming: working great now, thank you!#2016-04-1304:02cfleming@ghufran: Great!#2016-04-1308:02sashton@james: how did you get a mini file view shown on the right side of https://raw.githubusercontent.com/wiki/Misophistful/borealis-cursive-theme/images/Borealis.png Is it an intellij feature or a plugin?#2016-04-1310:25simax99@sashton: Looks like it could be this https://github.com/Vektah/CodeGlance#2016-04-1311:34james@sashton: simax99 is absolutely right, it's the CodeGlance plugin.#2016-04-1311:35sashtonThanks! I'll check it out#2016-04-1311:40darwinis there any way how to teach cursive that my home-made macro should behave like ->? now Cursive underlines my calls with invalid arity#2016-04-1311:41darwinI worked around it by adding “fake” arity to my functions, but this is not an ideal solution#2016-04-1316:51onetomhow come the "Move Caret to Matching Brace ^M" editor action doesn't work in the REPL window? i thought it might mean Enter, just like in a terminal, but it simply does nothing 😞#2016-04-1316:56onetom@kenny: i was having similar issues. i just deleted the problematic subfolder for that dependency and it solved the issue.#2016-04-1323:30danielcomptonIs there a bindable keyboard command to switch from the REPL (or anywhere) to the most recent editor pane?#2016-04-1323:30danielcomptonAnd is there a command to switch to the REPL which doesn’t hide the REPL if you’re already on it?#2016-04-1400:21cfleming@darwin: There isn’t right now, but there will be very soon (a couple of weeks).#2016-04-1400:22cfleming@onetom: I’m not sure about that, I’ll check - could you file an issue?#2016-04-1400:22cfleming@danielcompton: ESC will always get you from the REPL (or any toolwindow) to the most recent editor pane.#2016-04-1400:23cflemingThere’s no command to switch back to the REPL in a reliable way, sadly - coming soon.#2016-04-1400:25danielcomptonthanks, forgot about esc#2016-04-1400:26cflemingIf you’re into IdeaVim, make sure to check this doc out to customise your setup, many thanks to @curlyfry!#2016-04-1400:26cfleminghttps://github.com/cursive-ide/cursive/wiki/Mapping-IdeaVim-actions-to-Cursive-actions#2016-04-1402:09tetriscodesI’ll admit I’m new to Clojure (Compojure) with Cursive. is there a nice way to run the jar and start the server to listen and debug the routes#2016-04-1402:12tetriscodesor does everyone run the lein server-headless?#2016-04-1403:19danielcompton@tetriscodes: what JAR are you referring to?#2016-04-1403:19danielcomptonYou can probably run your app from a REPL through Cursive, which you can then inspect#2016-04-1418:30onetom@cfleming: i've checked and there is already a half year old issue for the ^M support: https://github.com/cursive-ide/cursive/issues/1103#issuecomment-210089384#2016-04-1422:11cfleming@onetom: Ok, I’ll take a look at that, thanks.#2016-04-1503:20cfleming@lfn3: Are you sure that test problem you reported the other day works? I’m looking at the code, and I’m seeing:
#(and (psi/symbol? %)
  (= "is" (name %)))
#2016-04-1503:21lfn3I was going to take another look at it, but yes, it did work after I reopened the project#2016-04-1503:21cflemingThat’s very odd#2016-04-1503:21lfn3One moment, I’ll take another look#2016-04-1503:23lfn3Yeah seems to be working.#2016-04-1503:23cflemingBizarre#2016-04-1503:23cflemingOk, thanks.#2016-04-1503:25cflemingLooks good to me simple_smile#2016-04-1503:25cflemingAlthough I don’t know how that is working.
#2016-04-1503:25lfn3That’s always troubling.#2016-04-1503:25lfn3I’m gonna nuke the indexes and give it another shot#2016-04-1503:25cflemingNah, that wouldn’t affect this.#2016-04-1503:26lfn3Ok.#2016-04-1503:26cflemingI’m actually about to make a change that I think would have fixed that problem.#2016-04-1503:26cflemingAs part of fixing https://github.com/cursive-ide/cursive/issues/823#2016-04-1503:26lfn3At the time it was a ‘clean’ project, one I’d just started with lein new and opened for the first time.#2016-04-1503:27lfn3I reopened it to double check and it worked fine.#2016-04-1503:27cflemingHmm#2016-04-1503:27cflemingOk, I’ll see if I can figure that out.#2016-04-1503:27cflemingThanks!#2016-04-1515:54jamieorcHow do I turn off the warning highlights in cursive in hoplon and boot files?#2016-04-1518:37keethin the past i was able to (require ‘some.module :reload) in a local repl and reload that module in a running process. recently (maybe since upgrading to Intellij 2016) it no longer seems to reload the module#2016-04-1518:42keethreload still works if i am referencing that module directly in the repl session, but previously I was able to reload a module that was being used by server process that i had started in the repl. that no longer seems to work - i need to restart the repl to pull in changed modules that are dependencies of my server process.#2016-04-1518:43keethhmm actually if i restart my server in the repl it pulls in the reloaded module.. i guess that’s not so bad..#2016-04-1522:27spieden@keeth: if you have a server process with the old code loaded, i think it needs to be restarted to get the new bytecode#2016-04-1613:12lsentaHey guys, is there any way to get back auto-complete when symbols are generated by a macro?#2016-04-1613:13lsentaI have a macro that generates macros (to factorize testing) autocomplete works in the REPL but not in the editor#2016-04-1701:17cfleming@lsenta: Not right now sorry, various solutions for this coming shortly.#2016-04-1701:19cfleming@keeth: There was a change recently which affected the Cursive actions, such as Load file in REPL and Sync files in REPL. However Cursive shouldn’t be able to affect how require works, unless the classpath has changed.#2016-04-1701:20cfleming@keeth: If you’re not using the Cursive actions, let me know and we can figure it out.#2016-04-1709:49lsenta@cfleming: I'll be patient then, thanks! a few notes: - In the various discussion about the subject, I haven't seen a comment on the fact that the autocomplete works from the REPL, wouldn't that be "easy" to pull this info, relative to other solutions? That'd solve 90% of my needs. - Same thing for macro-expansion, Cursive's window is very handy but won't work in the editor, I have to resort to the REPL, could it pull the info from there?#2016-04-1709:50lsenta(I know the namespace might be filled with REPL-defined function that you don't want to autocomplete, but a simple "REPL" marker on the auto-complete line would avoid any confusion)#2016-04-1822:26cfleming@lsenta: It’s a bit more complex than that unfortunately. I could probably plug into autocomplete, but that’s far from a complete solution. You also need navigation, doc, view source etc - it’s all doable from the REPL but it’s a totally different implementation from what’s there. Many things are more difficult and having two implementations would be a source of many bugs.#2016-04-1822:26cflemingI’ll have some improvements for this soon using the current model.#2016-04-1822:47danielcomptonI just had the weirdest bug, Cursive moved around a bunch of ] and ) all over the place#2016-04-1822:48cfleming@danielcompton: Are you in parinfer mode?#2016-04-1822:48danielcomptonI think I toggled through it#2016-04-1822:49cflemingHmm, I hadn’t considered that.#2016-04-1822:49danielcomptonWhy would it change anything?#2016-04-1822:49cflemingSo when you enter parinfer mode, it has to run paren mode to ensure that the indentation is within the limits required by indent mode.#2016-04-1822:50cflemingI had assumed that anyone entering parinfer mode had explicitly chosen it, but of course toggling through it will trigger that.#2016-04-1822:50cflemingDamn.#2016-04-1822:50danielcomptonbut why would it mess up my ] and )?#2016-04-1822:50cflemingIt shouldn’t have actually broken anything.#2016-04-1822:50danielcomptonIt created invalid code#2016-04-1822:51cflemingCan you show a diff of an example?#2016-04-1822:51danielcomptonI’ll try to reproduce it#2016-04-1822:53danielcomptonI have a fancy diff tool which doesn’t show the +/- so a screenshot is better#2016-04-1822:56cflemingSo in that case, the indentation causes the parens to move to invalid locations. I’ll have to check if parinfer handles that case (multi-arity fns) - IIRC there was something in their issue tracker about that.#2016-04-1822:56cflemingIn any case, sorry 😞#2016-04-1822:56cflemingI’m starting to think that indentation is too fragile in Clojure code for a global mode that assumes it.#2016-04-1822:58cflemingIt looks like the parinfer demo editor handles that case, I must have a bug in the integration.#2016-04-1822:59danielcomptonThere were quite a few things broken#2016-04-1823:00danielcomptonI think it’s more general than just multi arity functions#2016-04-1823:01cflemingRight, but in that case it hasn’t broken code, right? It’s just pulled the parens over the comments.#2016-04-1823:02cfleming(which I agree is bad, but that is a known issue with parinfer)#2016-04-1823:44danielcomptonah yeah, that’s not a good example#2016-04-1916:38madvasHi guys, when I install new dependency via lein, it doesn’t show up in External Libraries list, only after I close and reopen project. Is there a trick for this? simple_smile#2016-04-1916:42madvasAha I got this, action is called Refresh Leiningen Projects#2016-04-2009:03ndroock1Could this be a Cursive related issue? https://stackoverflow.com/questions/36735665/why-do-i-get-this-clojure-exception-cant-change-establish-root-binding-of-u#2016-04-2018:50lsenta@cfleming: Thanks for the answer on my 'autocomplete from the REPL' question#2016-04-2018:50lsentaI have another one, I write a lot of tests, and Cursive is pretty good on showing where things go awry#2016-04-2018:51lsentaIt doesn't show the tests properly when they happen in a function (the is in the function gets green'd but not the call in the deftest)#2016-04-2018:51lsentaI worked around it by using macros instead of functions, that worked until I got exceptions.#2016-04-2018:52lsentaIt looks like if I run:
(deftest T
   ...
   (is (some-code-that-may-throw))
   ...)
#2016-04-2018:53lsentaThe error will bubble up to the deftest, I lose all the information about where the issue happened. It makes complex tests a pain to debug.#2016-04-2018:54lsentaIt looks like the (do-report {:type :error ...}) in the is macro, messes up Cursive test marking, is it intended?#2016-04-2021:43cfleming@lsenta: You’re looking for https://github.com/cursive-ide/cursive/issues/823 - I have it about half implemented, it won’t be in the next release but probably the one after that.#2016-04-2021:53lsentaThat part I solved with macros @cfleming#2016-04-2021:53lsentaMy issue is that when an exception is triggered in an is, doing (is (exists? "some selenium end-to-end testing selector")) for example, the gutter won't show the line#2016-04-2021:54lsentaInstead the whole test will be red and the exception will be shown in the deftest#2016-04-2021:57lsentaI rewrote is to do-report a type :fail instead of type :error and it behave in a more useful way#2016-04-2101:10cfleming@lsenta: I see, interesting, thanks - I’ll try to fix that as part of the same change.#2016-04-2116:08wasserI have seen some code, especially "legacy code" written before the Parinfer addition, that gets parinfer-ed into something invalid. It bit me mostly with long strings split across multiple lines. Not a bug, but it took me a minute to catch on. #2016-04-2120:43tbrookeI know this has been said before and I believe that it is on “the list” somewhere but Cursive really needs Boot I can generate the lien project.clj with the boot plugin but it is a pain#2016-04-2122:22cfleming@wasser: Actually, if it breaks code it should be a bug, I think. Can you show an example?#2016-04-2122:23cfleming@tbrooke: Yeah, it is on the list but boot support is very difficult due to the nature of boot.#2016-04-2122:37danielcomptonMy code was broken by parinfer#2016-04-2122:40danielcomptone.g.
"dev-once" ["with-profile" "+dev-run" "do"
                            ["clean"]
                            ["cljsbuild" "once" "dev"]
                            ["shell" "open" ~dev-url]]
"dev-once" ["with-profile" "+dev-run" "do"]
                            ["clean"]
                            ["cljsbuild" "once" "dev"]
                            ["shell" "open" ~dev-url]
#2016-04-2122:40danielcomptonin project.clj which unbalances the forms#2016-04-2122:41cflemingWas that by toggling the editing style?#2016-04-2122:42cflemingI’ve fixed a bug for the next release where that would not run the initial paren mode, which would cause things to break.#2016-04-2122:44danielcomptonYep#2016-04-2123:21wasser@cfleming Sure. Give me a bit. (I just plowed on, so now I need to go back and find the original formatting…)#2016-04-2200:02cfleming@wasser: Don’t worry about it too much, particularly if it was as a result of using “Toggle structural editing style” - there was a bug there which is fixed for the next version.#2016-04-2200:31wasserNow that I look at what actually happened, it probably is a bug.#2016-04-2200:36cfleming@wasser: Thanks! Wow, it’s kind of hard to work out what’s going on there.#2016-04-2200:37cflemingBut it’s a bug in parinfer itself, it also happens in the demo editor at: https://shaunlebron.github.io/parinfer/demo#2016-04-2200:37cflemingI’ll see if I can figure out what’s going on and file an issue.#2016-04-2200:43cfleming@wasser: https://github.com/shaunlebron/parinfer/issues/112#2016-04-2201:01danielcomptonNice solution with the three toggles#2016-04-2201:39danielcomptonIf I enable project code style settings in my project, and save the codeStyleSettings.xml file, will other users automatically pick up those settings, or do they need to update their config to use project settings too?#2016-04-2211:57gerritHi! Is it possible to connect Cursive to a Clojure 1.8 socket repl? The default remote REPL just hangs on connection, but that thing is a different animal anyway, isn't it?#2016-04-2302:32cfleming@danielcompton: Project settings should be shared with everyone, assuming they’re checked into VCS.#2016-04-2302:32cfleming@gerrit: No, there’s no support for that yet sorry. The remote REPL right now only supports nREPL.#2016-04-2302:33cflemingI do want to fix that soon though.#2016-04-2622:07arthur.boyerWhen using “Search Everywhere”, is there a way that I can get it to find partial namespace matches? We have quite a large project, and a number of namespaces have a file called core.clj, to the point that search everywhere isn’t very good at finding them unless they’ve recently been used.#2016-04-2623:24cfleming@arthur.boyer: Sadly I don’t think so. Search Everywhere doesn’t work very well with Clojure unfortunately, since it’s completely impossible to extend. I’d love to be able to add a new “Namespace” category, but there’s no way to do that.#2016-04-2623:24cflemingI keep meaning to supply them with a patch to allow that.#2016-04-2700:17arthur.boyer@cfleming: Thanks for being on top of this stuff, as always. I suspect that requiring search everywhere to find anything is a code smell that we should address anyway 😉#2016-04-2700:18cfleming@arthur.boyer: hehe, I don’t know about that - I think more people would use it for Clojure if it worked better. In general, making the user think less is better simple_smile#2016-04-2706:30rauhI was also wondering that. OTOH, Search symbol works pretty well globally (if you can remember the symbol).#2016-04-2708:17cfleming@rauh: Right, but it doesn’t work for namespaces sadly.#2016-04-2708:17cflemingAnd I can’t make it work for namespaces without namespaces also appearing in the “Go to Symbol” dialog.#2016-04-2708:20imrewondering why it is bad for namespaces to appear there?#2016-04-2715:04ikitommi@arthur.boyer: you can define namespace in a search with /, so kikka/co will find your mydomain.kikka/core.clj.#2016-04-2722:19arthur.boyer@ikitommi: That works great, thank you!#2016-04-2813:40ndroock1This must sound like a really stupid question but I just want to check it. There is no such thing as step mode debugging ClojureScript with IntelliJ / Cursive right?#2016-04-2813:41imrestep mode debugging as in set a breakpoint, run to it, step into step over etc?#2016-04-2814:52ndroock1Yes. @imre#2016-04-2814:52imreyou can do that#2016-04-2814:52ndroock1Wow!#2016-04-2814:52imreeven the hover over things and see their value stuff#2016-04-2814:53ndroock1We are talking ClojureScript not CLojure right?#2016-04-2814:53imresorry#2016-04-2814:53imreI did not see that part 😞#2016-04-2814:53imreit's too far to the right of my screen#2016-04-2814:53ndroock1simple_smile#2016-04-2814:53imreapologies for driving up your expectations#2016-04-2814:54ndroock1No problem. You answered my question though.#2016-04-2814:57imrewell to be honest with you I never tried that with clojurescript but due to the level of disconnect between even the cursive repl and the clojurescript app I doubt it would work#2016-04-2814:59ndroock1I thought so too. Do you code in Cljs too?#2016-04-2815:01ndroock1I am afraid that the gain in developing in Cljs is lost when things get serious. due to a lack of tools.#2016-04-2815:04ndroock1When the prince coder hops to another job and leaves you with 100k+loc undebuggable code documented in his 'head' . It would be bad judgement to invest in such a platform. Just thinking out aloud.#2016-04-2815:07imreI do some cljs yeah#2016-04-2815:08imrebut when I do I try to write proper tests so that it's not a pain to maintain later#2016-04-2815:10manutter51I use source code mapping and the Chrome Dev Tools to set breakpoints and step thru cljs functions, and it works quite well#2016-04-2815:12darwinand with cljs-devtools and Dirac DevTools is it almost painless (a shameless plug) 😉#2016-04-2815:13darwinbut we still need better story for debugging core.async, when something goes wrong it is hard to track the source of the bug#2016-04-2815:18ndroock1I'll have a look at the tools you mentioned @darwin#2016-04-2815:22ndroock1Dirac DevTools looks promising!#2016-04-2815:28darwinI’m just working on Cursive integration#2016-04-2815:29darwinyou will be able to “join” Dirac REPL from Cursive nREPL session, this way you will be able to send forms and do stuff in Dirac REPL#2016-04-2816:01averyHey, I know you can use “Fill Paragraph” to properly wrap a comment block, but does anyone know what command/binding can do a “fill” for comments?#2016-04-2822:07cfleming@ndroock1: You can’t do that right now, no, but it’s something that I’m planning.#2016-04-2822:08cfleming@avey_q: What are you looking for exactly?#2016-04-2908:37stijn@cfleming: I reported an error with the IntelliJ built in tool for exceptions in plugins, is that the right way to do it, or better report it as a github issue?#2016-04-2908:46moizsj@cfleming: I am on the latest cursive on IDEA 15. Is there a setting that will not auto reindent open files? (parinfer turned on). it creates unnecessary changes in my git working copy#2016-04-2908:51cfleming@stijn: Reporting like that is generally fine, thanks, but let me know here or file an issue if it’s particularly annoying - it can be hard to tell how many times a particular exception occurs from the tracker, or if it prevents something critical from happening.#2016-04-2908:51stijnwell, it seems that everything is still working, but I got a lot of
IndexOutOfBoundsException: chars sequence.length:502, start:3116, end:3647
#2016-04-2908:52cfleming@moizsj: No, that’s an important part of how parinfer works. For indent mode to work correctly the file has to be indented according to its rules, and that’s what that does.#2016-04-2908:52stijnand then
com.intellij.diagnostic.MessagePool$TooManyErrorsException: Too many IDE fatal errors. Monitoring stopped.
#2016-04-2908:52cfleming@moizsj: I agree it’s annoying, and I’m considering an alternative to parinfer which would avoid that.#2016-04-2908:52cfleming@stijn: That sounds quite bad, if you have the full trace there can you paste it here?#2016-04-2908:53stijnsure#2016-04-2908:53moizsj@cfleming: I like parinfer but I think i'll have to turn it off for just this reason. I work with large codebases and cant really afford to keep making commits for indents#2016-04-2908:54cfleming@moizsj: Yeah, I know. It also gives me unnecessary merge conflicts when I merge across branches.#2016-04-2908:55cfleming@stijn: It looks like File-&gt;Invalidate caches and restart might help with that.#2016-04-2908:55moizsj@cfleming: it'd be nice if parinfer could only do local indenting for the parts of the code that I am actually modifying#2016-04-2908:55cfleming@moizsj: That’s more or less what I’m planning. It’s tricky to get all of the benefit of parinfer, but it’ll reduce the annoyance significantly too.#2016-04-2908:56cflemingi.e. it won’t be full inference, but will work locally when you indent or dedent.#2016-04-2908:57moizsj@cfleming: what would that mean in terms of feature loss?#2016-04-2908:57cflemingI’m not 100% sure yet.#2016-04-2908:57moizsj@cfleming: ok. thanks for the updates!#2016-04-2908:58cflemingOne thing that is really nice is that you can just duplicate the last line in a form, and it will automatically extend the form to include the new line.#2016-04-2908:58cflemingIt’s useful for adding new test cases and so on.#2016-04-2908:58cflemingSimilarly with deleting a line.#2016-04-2908:59cflemingThose operations would require specific handling in the action, and there are potentially a lot of actions that might need handling.#2016-04-2908:59stijn@cfleming: it looks like that solved the problem, yes. thanks!#2016-04-2908:59cfleming@stijn: Great!#2016-04-2909:00moizsj@cfleming: or another option - let parinfer reindent the whole file, but only if I start editing it first. and not do it for all open files.#2016-04-2909:01moizsjthat way i can gradually include the reindents in my commits as and when i touch those files (for other reasons besides indent)#2016-04-2909:01cflemingSo I tried that too 😞#2016-04-2909:01cflemingIt’s difficult.#2016-04-2909:02cflemingIt’s because the integration is driven by modifications to the document. Once I receive an event that the document is being modified, it’s too late to modify it myself first.#2016-04-2909:03cflemingI thought about doing it when an action is triggered, but actions in IntelliJ are used for pretty much everything, and there’s no way to tell if an action will try to modify the doc or not.#2016-04-2909:03moizsjmaybe after the first edit?#2016-04-2909:04cflemingThe problem then is that the doc has already been modified in a way that may not be consistent with parinfer.#2016-04-2909:05moizsjthats ok right? I mean treat it like parinfer was doing it the first time on file open (but after 1 edit). it'd be like parinfer wont work till you make the first edit, but at least it'll keep the working copy clean#2016-04-2909:07moizsjbut anyway, even with that, i still dont think i'd want parinfer to reindent the whole file. it would upset a lot of people during code reviews (unnecessary noise)#2016-04-2909:07moizsjso what you're suggesting might be better#2016-04-2909:08cflemingI’m actually not sure about that. If that first action is a parinfer one which assumes the doc is correct, then it will behave incorrectly in ways that paren mode might not be able to fix.#2016-04-2909:09moizsjdoes it work the same way in other editors that have integrated parinfer?#2016-04-2909:09cflemingYes, it does.#2016-04-2909:10cflemingI’m not sure if more people are using Cursive for work than Atom (I don’t think Emacs has a useful parinfer integration yet), but certainly numerous people have told me that they can’t use it because of that.#2016-04-2909:12moizsjI, for example, cant use it at work because everyone else uses emacs. so they woudnt be expecting all those indent related edits.#2016-04-2909:12cflemingRight.#2016-04-2909:13cflemingI’ve been planning an alternative, hopefully I’ll have a beta at some point that everyone can try.#2016-04-2909:13moizsjcool! hats off to you for being so user focussed. thanks!#2016-04-2909:13cflemingNo worries! And thanks for the feedback, it’s useful to know this sort of thing.#2016-04-2912:04ckarlsenis there an easy way to clear a single record from the REPL history? I had a huge data structure in my clipboard which i accidently evaluated in the REPL, and now it's superslow#2016-04-2912:05ckarlsen(the repl history that is)#2016-04-2912:08manutter51I notice there’s a file named replstate.xml inside the .idea folder; no idea what would happen if you were to edit that or rename it, but...#2016-04-2912:08manutter51I imagine you’d want to stop the repl first#2016-04-2912:08manutter51and of course back up the file#2016-04-2912:12manutter51Hmm, the history’s there, but yikes, not what I’d call easily editable.#2016-04-2912:15manutter51Ok, just did a trivial edit, and successfully restarted the repl, and my change took effect, so looks like it’s doable. Definitely want that backup though, just in case.#2016-04-2912:16manutter51@ckarlsen: you know about the cmd-up-arrow shortcut in the REPL, right?#2016-04-2912:16manutter51(or ctrl-up-arrow on Windows? I forget)#2016-04-2912:22ckarlsenthanks i'll try edit the file#2016-04-2912:22ckarlsenwhats c-up-arrow supposed to do?#2016-04-2912:24manutter51It moves thru the repl history in units of one form at a time instead of one line at a time#2016-04-2912:24manutter51same for c-down-arraw#2016-04-2912:24manutter51*arrow#2016-04-2912:36ckarlsenok nice#2016-04-2913:57ndroock1Does the following sound familiar? I open a ClojureScript with figwheel configured in IntelliJ, I start a REPL. So far so good. Then I open another ClojureScript project in a new IntelliJ window. I close the REPL in the old project, I close <localhost://3449> in Chrome. Then I start a REPL in the newly opened IntelliJ window which closes with the message: " Port 3449 is already being used. " When I kill two Java processes with the ( sorry: Windows ) task manager I can start the REPL in the second project. - Have I done something wrong? If not, who did?#2016-04-2914:24manutter51Are you using :cljs/quit to close the repl?#2016-04-2918:25avery@cfleming: Hey Colin. I was writing a block comment in a source file, and was looking to get it to “fill” to n-characters wide in a fashion similar to what the Edit > Fill Paragraph action does with defn’s doc string.#2016-04-3004:50cflemingInterested in a key to jump to/from the REPL? RFC here: https://cursive-ide.com/archive/1949.html, answers here are fine if you prefer.#2016-04-3004:51cfleming@avey_q: I see, you mean a series of line comments (using ;)? Sadly fill paragraph doesn’t work for that yet, although I believe there is an issue to do so.#2016-04-3004:55cfleming@ckarlsen: This has come up quite frequently but I don’t think there’s an issue for it - I’ve filed https://github.com/cursive-ide/cursive/issues/1383.#2016-04-3013:38lsenta👍 for cycle between REPL and Editor#2016-04-3013:44lsentaFor the output, a "jump to output / go back" would be nice to have, that'd be a single shortcut to memorize#2016-05-0123:18mandersonRE: jump to/from REPL: I like option #3. If multiple REPL's running the "jump to REPL" should cycle through them (in order of last use, if possible). Also, a single "load current file in repl + switch to ns" might be nice instead of two separate actions.#2016-05-0210:03bojan.matichttps://github.com/bhauman/lein-figwheel/wiki/Running-figwheel-in-a-Cursive-Clojure-REPL#2016-05-0210:04bojan.maticis this still the recommended way to use figwheel in cursive?#2016-05-0210:04cfleming@bojan.matic: I believe so, but I haven’t tested it recently.#2016-05-0210:05bojan.matici tried it, and it works#2016-05-0210:05bojan.matichowever the part that worried me was the warning that "Use clojure.main in normal JVM process" was a more limited repl#2016-05-0210:05bojan.maticis that ok to ignore?#2016-05-0210:05bojan.matici'm not so much worried as curious actually#2016-05-0210:06cflemingSure, I should put some examples there about what isn’t supported.#2016-05-0210:06cflemingBut it’s mostly things that aren’t supported yet in CLJS anyway (macroexpansion, test support)#2016-05-0210:06cflemingI’m planning to update CLJS REPLs soon to support all that.#2016-05-0210:06bojan.maticthings that don't work in any other way of using figwheel repl, basically?#2016-05-0210:07cflemingI think so, yeah.#2016-05-0210:07cflemingI haven’t looked at Figwheel in enough detail to know how I’ll integrate with it, yet#2016-05-0210:08bojan.maticso in the future, cursive will offer superior cljs repl compared to cider for example?#2016-05-0210:08bojan.maticam i understanding that correctly?#2016-05-0210:08cflemingI hope so, yes.#2016-05-0210:08bojan.maticawesome#2016-05-0210:08cflemingAlthough I’m not totally up to date with what CIDER offers these days.#2016-05-0214:40tord@bojan.matic: I connect to the Figwheel REPL through nREPL instead, as described here: https://github.com/bhauman/lein-figwheel/wiki/Using-the-Figwheel-REPL-within-NRepl#2016-05-0214:40tordThe page does warn you that "you should still consider setting up a workflow that includes nREPL as an advanced undertaking as it requires a lot of contextual knowledge of the Clojure environment if something goes wrong", but in my experience, things don't usually go wrong.#2016-05-0214:43bojan.maticso what are the pros of using figwheel through nrepl?#2016-05-0218:56bojan.maticI can't have css syntax highlighting if I'm using community edition intellij?#2016-05-0219:23jmayaalvbojan.matic not available 😞 https://www.jetbrains.com/idea/features/editions_comparison_matrix.html#2016-05-0219:24bojan.maticsucks#2016-05-0219:24bojan.maticI guess it's emacs time simple_smile#2016-05-0219:24bojan.maticshame, i was gonna buy cursive since it seems so well done#2016-05-0219:25bojan.maticbut i'm not buying ultimate edition of intellij just to have css#2016-05-0222:30cfleming@bojan.matic: Yeah, sadly I’m not associated with JetBrains so I can’t bundle that.#2016-05-0305:16arthur.boyerIs there any way that I can print out a filename and line number to the repl in such a way that it becomes a clickable link? I’m having to use code to find out where functions are that are involved in certain behaviour, and I’d love to be able to spit out a clickable list of links.#2016-05-0305:32cfleming@arthur.boyer: I’ll have to check, but I have a couple of related requests for this - I’ll see if I can get to this shortly.#2016-05-0306:30danielcomptonIs it autodetected by IntelliJ?#2016-05-0307:35cflemingNo, I provide a filter (regexp matcher, basically)#2016-05-0308:28rauhDoing an auto indent on a multi arity function defined with schema as well as parinfer enabled will mess up the code. Ie pull the function body into the arguments:#2016-05-0308:29rauhIs there any way to configure that behavior? Messes up my entire file.#2016-05-0308:30cfleming@rauh: When you say an auto indent, what do you mean?#2016-05-0308:52rauhLike the ctrl+alt+I keypress, should be called auto-indent lines in Intellij#2016-05-0308:53cflemingOh, ok.#2016-05-0308:53cflemingI’ll check that case out, thanks.#2016-05-0308:53rauhWhich also happens automatically on some input AFAIKT#2016-05-0308:53cflemingActually, could you file an issue?#2016-05-0308:53rauhSure#2016-05-0308:53cflemingThen I won’t forget.#2016-05-0308:53cflemingThanks.#2016-05-0317:54arthur.boyer@cfleming: Thanks for that. It’s definitely a nice to have rather than a need to have.#2016-05-0319:43danielcomptonIs it an intelliJ or Cursive bug that you can’t drag files from one source tree to another?#2016-05-0319:43danielcomptonI had a feeling it was an IntelliJ thing#2016-05-0321:31cfleming@danielcompton: You should be able to do that, I think.#2016-05-0321:31cflemingWhat is the problem when you do?#2016-05-0321:32danielcomptonIt just gets stuck in the move window, and I can only type Esc to get out of it#2016-05-0321:33danielcomptonhmm, I can’t reproduce it on my desktop, and my laptop has an older version of IntelliJ#2016-05-0321:33danielcomptonI think that’s the issue#2016-05-0406:52jumarhi, I have a question regarding Cursive + Figwheel + Reagent integration#2016-05-0406:52jumarI followed the guide https://github.com/bhauman/lein-figwheel/wiki/Running-figwheel-in-a-Cursive-Clojure-REPL and for project generated by “lein new figwheel” it works basically ok#2016-05-0406:53jumarhowever, for project generated by “lein new reagent” it doesn’t seem to work well - the figwheel repl is not able to connect to the browser - and I can’t figure why#2016-05-0406:53jumarThe issue is also described here: https://github.com/bhauman/lein-figwheel/issues/297#2016-05-0407:01jumarOddly enough, I if run another figwheel repl via “lein figwheel” in console, the Cursive repl is able to connect - however, after I stop the figwheel running in console and restart Cursive REPL the browser keeps complaining:
ClojureScript has not been compiled!

please run lein figwheel in order to start the compiler
#2016-05-0408:08grav@jumar: The reagent template profile.clj contains a lot of stuff. Maybe start out with the figwheel template instead, and then add the stuff you need when you need?#2016-05-0408:33jumaryeah, that’s definitely an option - however, I just want to try some reagent hello world and check how it works with figwheel#2016-05-0408:55ndroock1I required [cljsjs.reactable] in a clojurescript namespace. Subsequently hovering over Reactable.Table ( from the required library ) invokes the message "This object cannot be resolved." Otherwise the program works as expected. Is this expected behaviour because it is an external javascript library?#2016-05-0423:08darwin@cfleming: I’m working on the Cursive REPL integration with Dirac: (teaser) https://dl.dropboxusercontent.com/u/559047/the-first-happy-joined-dirac-session-party.png my current problem is that after joining a Dirac session in Cursive (which effectively turns it into ClojureScript REPL), Cursive still thinks it is a normal Clojure REPL. What is the mechanism which determines/triggers Cursive to treat the REPL as CLSJ REPL?#2016-05-0423:19cfleming@darwin: It’s done by pattern matching on the output. It’s hard-coded right now, but I had planned to expose that in config.#2016-05-0423:20darwingood, I could probably trigger that pattern match for now#2016-05-0423:20cflemingLooks great BTW simple_smile#2016-05-0423:20cflemingLet me check the conditions, one sec#2016-05-0423:21cflemingCurrently it searches for "Type :cljs/quit to stop the ClojureScript REPL” or "To quit, type: :cljs/quit"#2016-05-0423:22cflemingUgh, I can’t escape the markdown in Slack - in the first message there are backticks#2016-05-0423:23darwinthanks, will try to print those upon joining#2016-05-0423:23darwintomorrow simple_smile#2016-05-0521:19kennyIf I require [my.namespace.core :refer :all] and I later want to change it to [my.namespace.core :as m] is there a way in Cursive to update all the function calls with m/?#2016-05-0523:37darwinDirac 0.3.0 is out with Cursive integration example: https://github.com/binaryage/dirac/blob/master/docs/integration.md join us for discussion/testing it in #C0J01U7MY#2016-05-0600:50cfleming@kenny: That would be a great refactoring, but sadly there’s nothing like that at the moment.#2016-05-0600:50cfleming@darwin: Awesome! I’ll definitely check that out#2016-05-0600:51kenny@cfleming: Dang.. Is it on a feature list? #2016-05-0601:10cfleming@superstructor: Looks great, but where’s your actual browser window? simple_smile#2016-05-0601:11superstructor@cfleming: on another screen 😉 nothing interesting there for this example.#2016-05-0601:11superstructor@cfleming: now the only thing missing for ClojureScripters in Cursive is run cljs.test in ns!#2016-05-0601:11cflemingSure, I was just wondering#2016-05-0601:12darwinthis is my setup: https://dl.dropboxusercontent.com/u/559047/doupe.jpg simple_smile#2016-05-0601:12darwinplenty of room for more windows simple_smile#2016-05-0601:13cfleming@kenny: I added a comment to https://github.com/cursive-ide/cursive/issues/863#2016-05-0601:14cflemingFeel free to emoji it or whatever the cool kids are doing on Github these days#2016-05-0601:19kenny👍 #2016-05-0601:29superstructor@cfleming: with Dirac setup from above screenshot if I try to run “Run tests in current NS in REPL” the Dirac REPL prints e.g. Loading src/some-test-dep.cljs… but doesn’t mention the actual test/something-test.cljs and nothing else happens. Tests don’t run.#2016-05-0601:30cfleming@superstructor: Yeah, the test functionality is CLJ-only at the moment.#2016-05-0601:30superstructor@cfleming: ok thanks, hope to see CLJS support soon. Let me know if you need someone to test etc.#2016-05-0601:32cflemingCool, will do, thanks.#2016-05-0605:42bojan.matic@darwin steel series? what model is it?#2016-05-0605:43bojan.matic@darwin: that setup looks niiiice#2016-05-0610:04darwin@bojan.matic: it is SS Sensei, I believe#2016-05-0610:05darwinbut the keyboard is the best, “das keyboard 4” simple_smile#2016-05-0610:20bojan.matici’m currently on apple keyboard, how does it compare?#2016-05-0610:24darwin@bojan.matic: ask google, my friend#2016-05-0619:41weltanhey all, is this a good place to ask questions about cursive weirdness?#2016-05-0619:42weltanI’ve been getting dependency resolution errors for a while now and it’s finally gotten under my skin#2016-05-0619:50cfleming@weltan: Sure, what’s going on?#2016-05-0619:51cfleming(I’m in and out today, but leave a message here with an example of what’s going on and I’ll reply when I can)#2016-05-0708:20madvasGuys, I downloaded latest version of Intellij
IntelliJ IDEA 2016.1.1
Build #IC-145.597, built on March 29, 2016
JRE: 1.8.0_40-release-b132 x86_64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
Cursive plugin stopped working. I uninstalled, when I try to install, it downloads plugin, but after that literally nothing happens. Did anybody get it working with this build?
#2016-05-0708:47madvasok I reinstalled everything and got it working#2016-05-0923:30hlshipI put a breakpoint there, for size comparison.#2016-05-1007:26moizsj@cfleming: I consistently have an issue with the Leiningen Tool Winow's Synchronize action. It causes Cursive to remain unresponsive for a minute or two even after its done. (post sync, indexing, etc)#2016-05-1009:35cfleming@hlship: https://github.com/cursive-ide/cursive/issues/1310#2016-05-1009:35cflemingI don’t know what’s up with that, I use a retina screen and I don’t see that.#2016-05-1012:14stunamiLooks like this is perhaps unexpected behaviour, as its not consistent between the REPL and the standard editor window.#2016-05-1012:14stunami(I dont have the problem when in the window under the REPL)#2016-05-1018:53gpetukhovHi. Why when I debug, the debugger is getting stuck on the same endpoint? Only after I press step-over several times, it gets to the next line.
#2016-05-1022:24cfleming@stunami: This looks like https://github.com/cursive-ide/cursive/issues/1386 - I haven’t managed to reproduce it in the debugger unfortunately.#2016-05-1022:24cflemingRestarting IntelliJ seems to fix it, which I’m ashamed to recommend you do - sorry#2016-05-1022:25cfleming@gpetukhov: That is usually because on that line, you have a macro which expands to more than one statement. I haven’t figured out how to make the debugger force step to the next line always.#2016-05-1022:27gpetukhov@cfleming: thanks! is there a way to inspect how the data is being transformed inside a macro such as ->>?#2016-05-1022:28cfleming@gpetukhov: Yes, you can use Tools->REPL->View macroexpansion#2016-05-1022:29cflemingIt’s interactive - initially it will show you the original unexpanded form, then you put the caret in the part you’d like to expand and either press the right arrow toolbar button, or Ctrl/Cmd-Right#2016-05-1022:29cflemingThat will expand from the root of the form to the point around the caret so you can see what the resulting code will look like.#2016-05-1022:38gpetukhov@cfleming: I did what you said but pressing the right arrow in the macroexpansion tool doesn't do anything#2016-05-1022:39cfleming@gpetukhov: Do you have the caret inside the form you’re trying to expand?#2016-05-1022:41gpetukhov@cfleming: yes. I tried putting it everywhere. #2016-05-1022:41cflemingThat looks like it should work. And you have the REPL running, and that namespace loaded into it?#2016-05-1022:42gpetukhov@cfleming: yes and yes. where should the expansion show up?#2016-05-1022:45cflemingIn that same window. It’ll highlight what has changed.#2016-05-1022:45cflemingAre you getting any errors showing in the status bar at bottom right?#2016-05-1022:45gpetukhovI know why it did not work#2016-05-1022:46gpetukhovIt is because it was at the breakpoint#2016-05-1022:46cflemingOhhh#2016-05-1022:46stunami@cfleming: thanks mate, I'll have a poke to see if I can find anything useful before a restart. #2016-05-1022:46cflemingYes, that will do it - the REPL doesn’t respond in that case.#2016-05-1022:46cflemingInteresting case, I wonder if I could fix that.#2016-05-1022:46cfleming@stunami: Thanks, let me know if you find anything.#2016-05-1022:48cfleming@gpetukhov: In general, when the JVM is stopped at a breakpoint, everything is frozen and evaluation has to be done in a special way.#2016-05-1022:49gpetukhovSo it is just expanding the macro which I could do with macroexpand function anyway. But I was wondering if I could debug my code with intermediate values showing up. So, as on the photo, I would like to see the value created by forms->postfix while I am stopped at postfix->value. #2016-05-1022:53cflemingOh, I see.#2016-05-1022:54cflemingIn general, that’s difficult. It’s because the JVM debugger is line-oriented, and the macros expand out to code which doesn’t correspond accurately to the original source lines.#2016-05-1022:54cflemingI don’t have a good solution for that yet, sorry.#2016-05-1022:54cflemingWhat you can do, assuming your calls are pure functions, is use the expression evaluator, and just evaluate part of the expressions#2016-05-1022:55cflemingi.e. evaluate (-> expr (forms->postfix))#2016-05-1022:55gpetukhovIn repl, right?#2016-05-1022:55cflemingNo, because the REPL is frozen.#2016-05-1022:55cflemingIn the debugger window, there’s an expression evaluate button.#2016-05-1022:57cflemingIf your result is a lazy seq, wrap it in vec to see all the elements realised.#2016-05-1022:58gpetukhovHmm getting nullpointerexception#2016-05-1023:00gpetukhovAnyway, thanks Colin!#2016-05-1023:04cfleming@gpetukhov: No worries, good luck!#2016-05-1103:06d-t-wHey Colin, I get fairly regular (fortnightly perhaps) bounce messages from <mailto:/cdn-cgi/l/email-protection|/cdn-cgi/l/email-protection>#2016-05-1103:06d-t-w
Hi, this is the Mlmmj program managing the <
#2016-05-1103:07d-t-wMy mail is gmail hosted, and I don't get similar messages from any other list.#2016-05-1103:39cfleming@d-t-w: Yeah, I’ve seen a couple of those too.#2016-05-1103:39cflemingI’m not sure what’s causing them.#2016-05-1103:39cflemingI’m going to try to switch to sending mail via Mailgun#2016-05-1104:18danielcomptonI also get them#2016-05-1113:22rauhSo parinfer has now multiple times messed up source files from when I goto source to some 3rd party library file and all my compilation subsequently failed.#2016-05-1113:22rauhOr worse, I got really strange undebuggable errors.#2016-05-1113:23rauhI understand parinfer needs this reindentation. But: Is there a way to have parinfer not kick in until an edit is done? That would already help IMO.#2016-05-1120:45kennyIt seems like the formatting in a function with a type hinted return value is off. Example:
(defn foo ^long
[a b c]
  (* a b c))
#2016-05-1120:54kennyDoesn't look like there is an issue for this yet so I went ahead and created one: https://github.com/cursive-ide/cursive/issues/1400#2016-05-1123:45cfleming@kenny: Thanks for the issue.#2016-05-1202:13kennyAny update on Cursive support for boot?#2016-05-1202:14cfleming@kenny: It’s still on the list, but no movement, sorry.#2016-05-1202:14cfleming@rauh: I would really, really like to do that. Unfortunately, there isn’t a good way to do it.#2016-05-1202:14cflemingParinfer is driven by changes to the document - I get a notification when that happens, but it’s too late to modify the doc when the notification comes in.#2016-05-1202:15cflemingI can hook into the start of an action, but there’s no way to know which actions will modify the document - pretty much everything is an action, including all navigation (moving around a file, or switching to another file).#2016-05-1202:15cflemingSo even if I defer to that point, it will still run when it shouldn’t.#2016-05-1202:17cflemingI’m planning to try a parinfer variant which only works locally, i.e. only on the part of the document you’re actually working on.#2016-05-1202:17cflemingI’m not sure if it’s possible, but it would fix a lot of these problems.#2016-05-1203:14danielcomptonWhen I try to start a Yourkit profiler from IntelliJ REPL#2016-05-1203:20danielcomptonI get Error running REPL for <myapp>: Error creating JavaParameters#2016-05-1203:20danielcomptonThat is a familiar error, but I’m not sure what to do about it?#2016-05-1203:21danielcomptonI can create a normal REPL fine#2016-05-1203:22cflemingThat usually means that you don’t have an SDK defined for your project.#2016-05-1203:23cflemingBut if you’re using Yourkit it might mean something else.#2016-05-1203:23cflemingActually, I’m going to see if I can fix that message right now.#2016-05-1203:24cflemingDo you see anything more than that message if you look in the log?#2016-05-1203:27cflemingI thought there was an issue related to this, but I can’t find it#2016-05-1203:30danielcomptonNope, that’s all that’s in the event log#2016-05-1203:30cflemingThat’s not very useful#2016-05-1203:30danielcomptonMy thoughts too#2016-05-1203:30cflemingLooking at the code, IntelliJ is swallowing that error.#2016-05-1203:31danielcomptonThe sin eater#2016-05-1220:58danielcomptonIs it possible to show source files in a project while Cursive is downloading deps for the first time?#2016-05-1221:42danielcomptonAt the moment, src and test folders aren’t shown until all deps are resolved#2016-05-1222:23cfleming@danielcompton: Hmm, that might be possible. I’d have to check how much hacking of lein that would involve.#2016-05-1222:23cflemingCould you file an issue for that?#2016-05-1223:50dimiter@cfleming: Are you giving any work to Boot integration into IntelliJ.#2016-05-1223:54cfleming@dimiter: I’m thinking about it and I have it planned, but I haven’t actually made any progress on it, no - sorry.#2016-05-1223:55dimiterGood enough answer 🙂.#2016-05-1223:58cflemingLots of people are asking for it, though, you’re not alone!#2016-05-1314:53shaun-mahoodWould it be possible for autocomplete in project.clj to query clojars? In my current example, I want to add lein-ancient to my plugins but don't know the most recent version, and I find this happening repeatedly - I know the package name but not the version. Obviously this isn't a major problem in any way, but I think it would be a pretty nice convenience feature if it turns out to be easy to implement.#2016-05-1406:55cfleming@shaun-mahood: Yes, this is something I’m planning to do soon.#2016-05-1609:56danielcompton@sveri: don’t have a screenshot handy at the mo, but it is something like “Method cannot be evaluated ..."#2016-05-1609:57sveriInteresting, never seen that before 🙂#2016-05-1609:58cfleming@danielcompton: That sounds like you might have a line breakpoint with a condition?#2016-05-1609:58danielcomptonYep I’ve got those too#2016-05-1609:59cflemingCould one of those conditions cause that error?#2016-05-1610:06danielcomptonDon’t think so, the condition was just (= token 2)#2016-05-1610:09cflemingOk, well, send over a screenshot if it happens again, hopefully I’ll recognise what’s going on.#2016-05-1615:34Petrus TheronHow do I get Cursive to reload my source files in the connected REPL? When I “Load file in REPL”, it does not seem to actually load the file I’m working on, but it shows some warnings about replaced symbols.#2016-05-1615:40Petrus TheronSometimes Cursive refuses to switch to the NS of the file I’m working in. Is it because there is a bug in my code?#2016-05-1615:40Petrus Theron…maybe these two issues are related to my environment or project.#2016-05-1615:42imrethere is a command called reload modified files or something similar, have you tried that one?#2016-05-1616:20Petrus TheronYeah same thing happens when I call “Sync files in REPL…” It shows the following:
Loading src/my-project/data/queries.clj... 
WARNING: update already refers to: #'clojure.core/update in namespace: telemetrics.data.queries, being replaced by: #'honeysql.helpers/update
WARNING: partition-by already refers to: #'clojure.core/partition-by in namespace: telemetrics.data.queries, being replaced by: #'honeysql-postgres.helpers/partition-by
and then stops. It’s like it’s failing silently. Is there a hidden Cursive log somewhere?
#2016-05-1616:29Petrus TheronThink I figured it out. One of my namespaces’ require was quietly failing to import a symbol. When I took out the broken :refer, everything seemed to start working again.#2016-05-1616:30Petrus TheronHmm, maybe spoke too soon#2016-05-1619:37cfleming@petrus: That error means you’re defining functions called update and partition-by, which override functions in core. It’s not a Cursive error, you’d get the same in lein repl. You can avoid the errors using (:refer-clojure :exclude [update partition-by]) in your ns form, or rename those functions.#2016-05-1619:37cflemingCursive will have loaded your namespace, but it doesn’t show the “done” part of the loading message if there have been errors or warnings.#2016-05-1714:49imre@cfleming:
Error updating completions:
RuntimeException Unmatched delimiter: )  clojure.lang.Util.runtimeException (Util.java:221)
#2016-05-1714:49imrehappens when I type into the repl#2016-05-1714:52imrestarted after a good while of repl use#2016-05-1723:41danielcomptonIs there any way you can synchronise REPL output with logging output? Depending on my logging intensity, I sometimes get logs interspersed with REPL output. I’m not even sure if this is even possibly in the general case without synchronising with the logging library#2016-05-1800:03cfleming@danielcompton: Not that I’m aware of, no#2016-05-1800:03danielcomptondidn’t think so#2016-05-1800:03cflemingI guess your logs come over stdout?#2016-05-1800:03danielcomptonyep#2016-05-1800:04cflemingI don’t think that’s possible, no.#2016-05-1800:04danielcomptonIf they were over STDERR would that work? Or would they all be red?#2016-05-1800:09darwin@danielcompton: here is how I fixed lein-cooper, you could synchronize all your own printing code similar way (but that would not be complete solution, because Cursive REPL is not only output produced by your “stdout” but also content produced by Cursive (REPL/nREPL) itself, I guess#2016-05-1800:09darwindepends on what is your problem exactly, if multiple threads in your own code racing for stdout, or race between your code and cursive#2016-05-1800:09danielcomptonRace between Logback and Cursive (nREPL)#2016-05-1800:10darwinok, then Cursive could implement some kind of buffering of stdout and synchronize printing per-line#2016-05-1800:10darwinI think#2016-05-1800:12darwinand the link: https://github.com/kouphax/lein-cooper/commit/d1e09cfc72ea22e128e505b8144184384b8ef2a7#2016-05-1800:13darwinbut it is not relevant to your problem, Cursive has to do something like this between your output and its own output#2016-05-1819:54arijunI updated IntelliJ to the latest version as a popup recommended, and subsequently the cursive plugin stopped working and turned red in the plugin menu. I tried uninstalling and reinstalling the plugin but every time I try to install it it runs through a progress bar that says "Downloading Plugin 'Cursive for v15'" and then disappears. Nothing gets installed#2016-05-1819:55manutter51Is that in Windows?#2016-05-1820:22arijunyes#2016-05-1820:22arijunIntelliJ IDEA 2016.1.2 Build #IC-145.972, built on May 14, 2016 JRE: 1.8.0_77-b03 x86 JVM: Java HotSpot(TM) Server VM by Oracle Corporation#2016-05-1820:31manutter51I’ve been having the same issue — I tried the “Invalidate Caches / Restart” option under the File menu, but that didn’t help. I didn’t try uninstalling/reinstalling, though. I think when I get home tonight, I’m going to try 1) uninstall the plugin, 2) Invalidate the caches and restart, and 3) re-install.#2016-05-1900:17cfleming@arijun: @manutter51: Hopefully that problem will be fixed in the latest build, but you have to be able to update to it first. Try Settings-&gt;Languages &amp; Frameworks-&gt;Clojure and unset “Check for EAP builds”. Then you should be able to go to Settings-&gt;Plugins-&gt;Browse Repositories… and search for Cursive there.#2016-05-1913:43arijun@cfleming: There is no Clojure under Languages &amp; Frameworks, nor does a search for EAP or Clojure yield results. Is that because I uninstalled Cursive? The same thing still happens when I try to install Cursive.#2016-05-1915:23moizsj@cfleming: Is there a way make the namespace search include namespaces from the project's dep libs?#2016-05-1919:09bvulpesallo! i'm failin to find a cursive command to run all project tests. am i failing in ide-discovery or is this unimplemented?#2016-05-1922:01cfleming@arijun: Oh, in that case, go to Settings-&gt;Plugins-&gt;Browse Repositories…-&gt;Manage Repositories…. You probably have a cursive plugin repo configured there. Delete that, and then go back to Settings-&gt;Plugins-&gt;Browse Repositories…, refresh and search for Cursive.#2016-05-1922:02cfleming@moizsj: Yes, when you search there’s an option “Include non-project files” in the popup. Press the same shortcut as you used to invoke the namespace search again, and namespaces from outside your project will be included.#2016-05-1922:03cfleming@bvulpes: This is unimplemented right now, but I’m hoping to add a proper test runner soon.#2016-05-1922:03bvulpesthanks @cfleming #2016-05-1922:45bvulpesI spent some time fixing a collaborators tests last night, in large part I think because they didn't have an easy way to get a green light for the whole project#2016-05-2001:33bvulpes:q#2016-05-2001:33bvulpeswell that was odd, sorry.#2016-05-2002:51cfleming:q should probably drop you from the channel 🙂#2016-05-2002:55bvulpesthe most amusing thing to me about the errant :q is that /i don't use vim/#2016-05-2002:58cflemingThat is truly mysterious, then.#2016-05-2004:13moizsj@cfleming: cool that seems to work. it'd be nice if the check box selection for 'non-project files' was remembered.#2016-05-2004:14cfleming@moizsj: I’m not sure I can do that - it’s controlled by IntelliJ, I think.#2016-05-2004:14moizsjok#2016-05-2008:45colorvisaDoes anyone get clojurescript repl run successfully? I ran into the problem with cljs-repl. This is my current project.clj
:profiles {:dev
             {:dependencies [[figwheel "0.5.2"]
                             [figwheel-sidecar "0.5.2"]
                             [com.cemerick/piggieback "0.2.1"]
I have this error with cursive INFO: nREPL connection found but unable to load piggieback. Starting default REPL
#2016-05-2008:45colorvisaemacs works fine#2016-05-2008:46colorvisaI choose local repl run nREPL with lein#2016-05-2008:46colorvisa?#2016-05-2008:53cfleming@colorvisa: Have you seen https://github.com/bhauman/lein-figwheel/wiki/Running-figwheel-in-a-Cursive-Clojure-REPL?#2016-05-2008:53cflemingI’m not sure about your specific problem, but I believe that is the recommended setup.#2016-05-2017:38colorvisaI tried that but it doesn’t work for me. Let me try again#2016-05-2019:27dnolenis there a key binding for reload this namespace?#2016-05-2019:27dnolenthis would be useful in remote contexts where load-file isn’t going to work due to discrepancies in the file system#2016-05-2022:57cfleming@dnolen: There isn’t, but in the next release (out today hopefully) you’ll be able to bind arbitrary commands to keys.#2016-05-2022:57dnolenCool!#2016-05-2104:12colorvisa@cfleming. I tried again it works. Thanks#2016-05-2104:12cfleming@colorvisa: Oh great, thanks for letting me know!#2016-05-2104:12cflemingI’m going to be working on all that soon, so it should be much easier.#2016-05-2510:11cfleming@vikeri: There’s no way to fix that right now, no - that would be a good candidate for another quick fix like the ones in the latest EAP.#2016-05-2510:11cflemingCould you file an issue for that?#2016-05-2510:11vikeriSure!#2016-05-2510:12vikeri@cfleming: Decent response time btw, hate to wait more than 1 minute.#2016-05-2510:12cflemingWe aim to please!#2016-05-2510:13cflemingI’m generally very fast at telling people there’s no solution for their problem 🙂#2016-05-2521:55danielcompton@vikeri: this is part of it https://github.com/cursive-ide/cursive/issues/979#2016-05-2521:56danielcompton@vikeri: https://github.com/cursive-ide/cursive/issues/1420#2016-05-2607:15vikeri@danielcompton: Yes exactly#2016-05-2705:05colorvisaHi, just wonder how can i access to a namespace fast in cursive? Does it have something like search for namespace?#2016-05-2705:05cfleming@colorvisa: Yes, Navigate-&gt;Namespace#2016-05-2705:06colorvisa:thumbsup:#2016-05-2705:06colorvisathanks @cfleming#2016-05-2705:06cflemingNo worries!#2016-05-2708:44rauhJust and idea: Could Cursive inspect clojure.spec data for macros and then learn what macros do? For instance, we could spec the args of rum's defc as first being a symbol that'll be defined, followed by some mixins that can be ignored by curisve and then followed by "function parameters" that cursive again understands, followed by code.#2016-05-2710:18cfleming@rauh: Maybe, I’m still not sure. I probably can’t use spec internally for various reasons, but it will definitely help to be able to write a translator from spec to whatever I use internally. It may be possible to just provide a spec and say “these bits are local vars”, I’m not sure yet.#2016-05-2710:18cflemingBut it will definitely be helpful that it will hopefully become ubiquitous that macro authors define grammars for their macros.#2016-05-2710:34cflemingThere aren’t a lot of example macro grammars out there yet, when they’re out I’ll spend some time with them and see what can be done.#2016-05-2710:41rauhSound good. Def. something for the future.#2016-05-2710:42rauhDifferent question: When will "Quick documentation" work with things like datomic.api?#2016-05-2718:11cap10morgan@cfleming: Out of curiosity, are you (still) planning to do a standalone distribution of Cursive at some point? And if so, would that come with a more opinionated set of Cursive-focused keybindings out of the box?#2016-05-2800:29cfleming@rauh: If the stars align in my favour, datomic (and other tricky cases) will be supported in the next release.#2016-05-2800:30cfleming@cap10morgan: Probably, but there’s not a lot of incentive - it’s a large, difficult change that complicates my release and build process massively. Now that Cursive is in the JetBrains repo, downloading IntelliJ and installing Cursive in it is relatively trivial.#2016-05-2800:31cfleming@cap10morgan: However I’ll be making a change soon to have the keybindings set out of the box in all Cursive versions, which was going to be the main appeal of making a standalone edition.#2016-05-2815:15grumpletI saw somewhere that cursive supports tonsky rum in its latest version. Can anyone point me at some documentation so I can find out how it helps?#2016-05-2819:04cfleming@grumplet: Mostly it just won’t annoy you since it knows how to resolve the symbols now. There’s no explicit support that’s more complicated than that.#2016-05-2821:57grumplet@cfleming. Ah, thank you! Does it know better how to indent rum.core/defc and the like too?#2016-05-2903:41cfleming@grumplet: Yes, the indentation should be correct too. Let me know if it’s not, I reverse-engineered based on a bunch of examples but I don’t use rum myself.#2016-05-2917:51grumplet@cfleming: Great - I'll keep an eye on it. It was the indentation that I noticed first but wasn't sure whether it had improved due to my config. By default cursive generally appears to indent def defn and now rum/defc in the same way by lining body forms up with the defined name. I have a preference for using a 2 space indent there. Is that configurable somewhere?#2016-05-2921:53cfleming@grumplet: That indentation is definitely wrong, Cursive should not do that for any of those forms out of the box.#2016-05-2921:54cflemingAre you seeing warnings along the lines of “defn cannot be resolved” in your editor?#2016-05-3006:37grumpletYes I am, but not consistently. In this project previously, I had to replace rum/defc with rum.core/defc and use the roll-over light-bulb menu to configure an indent Plugin is Cursive 1.3.0-eap1-2016.1#2016-05-3007:02grumplet@cfleming. This was because rum/defc could not be resolved, but rum.core/defc could. Does the light bulb menu indent configuration have symbol, file or project scope? I think this behaviour persists with the new plugin - I have some files resolving rum/defc and some not. Sorry, but must do other stuff now - I realise I haven't got to the bottom of this issue yet.#2016-05-3008:22cfleming@grumplet: I think it sounds like your indexes may be corrupted. Does File-&gt;Invalidate Caches and Restart help this?#2016-05-3008:58grumplet@cfleming. No. Still different in different files. eg. in main.cljs: rum/defc is unrecognised and badly formatted, whereas in core.cljs, it is recognised and gives me syntax help and good formatting. Both files have (:require [rum.core :as rum] . ...No, it's even weirder... core.cljs has reverted to not recognising rum as I pasted in this test snippet from main. (rum/defc foo [] [:div "test"]). I'll try reindexing once more with no files open.#2016-05-3008:59cfleming@grumplet: Is this project public, or could you zip it up and send it to me? Or is it a work project?#2016-05-3009:10grumplet@cfleming: Try github gmp26/prais2cljs branch links3. After reindexing this time, both core.cljc and main.cljs are bad. https://github.com/gmp26/prais2cljs/blob/links3/src/prais2/core.cljc and main.cljs#2016-05-3010:41cfleming@grumplet: Thanks, I’ll try that tomorrow.#2016-05-3110:38grumplet@cfleming: The main issue seems to be that cursive doesn't recognise rum.core require aliases. So (rum.core/defc ...) is resolved, but (rum/defc ...) isn't - given (ns ... (:require [rum.core :as rum]) in header. It's been worth my while converting to rum.core throughout just so I can find the real non-rum warning messages.#2016-05-3112:10solicodeI haven't done much ClojureScript in Cursive, but to what level should I expect Cursive to know about JavaScript libraries? For example, I'm using three.js, and I see it picking up some constructors if I prefix them with js, like (js/THREE.Scene.) and so on. But it doesn't seem to be picking up much beyond that, like functions.#2016-05-3112:10solicodeThings like requestAnimationFrame, js/Float32Array, etc aren't resolving either.#2016-05-3112:10solicodeThis might be normal, but I just wanted to be sure I'm not missing out on some autocomplete that I should be seeing.#2016-05-3112:42serceHi! Are there any plans for cursive to support clojure.spec as a kind of type system? Like maybe error highlighting and early error catching?#2016-05-3114:39grumplet@cfleming: So, in summary, (rum.core/defc ...) is always resolved correctly, whereas (rum/defc ...) is resolved only sometimes depending on some confounding factor that is more likely to show up in the larger files.#2016-05-3114:58grumplet@cfleming: prais2.components.analytics is a short file that fails whereas p.c.body is a short file that works fine.#2016-05-3116:41moizsj@cfleming: is there a way I can get hold of the repl history without actually launching the repl?#2016-05-3121:01vinnyataideHello. How are you guys, I'm using cursive as my new ide from cider because of the deeps code understanding, but I am facing some issues here and there, hope you guys can help. It's mostly about import namespace problems, some goog libs doesnt get resolved when I import them, like Jsonp so I can't see how the api works, does anyone have a solution? thanks#2016-05-3121:48danielcompton@vinnyataide: I don’t think some of the Google Closure import stuff works unfortunately#2016-05-3121:49vinnyataide@danielcompton Is it because the js parts?#2016-05-3121:49danielcomptonNot really sure https://github.com/cursive-ide/cursive/issues/1280#2016-05-3121:55danielcomptonIt’s not just JS, because requires work#2016-05-3121:56vinnyataideI see, thanks#2016-05-3122:07cfleming@grumplet: Thanks, I haven’t had a chance to look at that problem yet, I’ll try to get to it today.#2016-05-3122:08cfleming@solicode: @vinnyataide: @danielcompton: Sadly JS resolution is a bit hit and miss, I’m hoping to improve that soon.#2016-05-3122:09cfleming@solicode: WRT things like Float32Array, I’m using the initial imports from Tern to create the initial “browser” environment. They’re a bit lacking unfortunately, and I’m considering moving to the Typescript ones.#2016-05-3122:10cfleming@serce: See https://cursive-ide.com/archive/2023.html. Spec isn’t capable of providing all the tool support that a type system would, but there’s probably a lot that can be done there. I’m not sure exactly how much yet, though.#2016-05-3122:11cfleming@moizsj: No, because Cursive holds different REPL histories for different REPL types.#2016-06-0105:21solicodeThanks for the confirmation. Hmm, a TypeScript solution could be interesting with all the extra information it would have.#2016-06-0106:58cfleming@solicode: Yes, I’m definitely interested in investigating whether type propagation could help CLJS support. Unfortunately since CLJS itself doesn’t support much type hinting, it’ll probably only be useful right near the interop site.#2016-06-0108:28imre@cfleming: I'm a little puzzled. This morning I opened up Intellij and loaded the project I was working on yesterday#2016-06-0108:28imrebut the whole static analysis thing seems to be broke#2016-06-0108:28imreand everything is yellow#2016-06-0108:29imreis there a way to force cursive to reindex everything?#2016-06-0108:30cflemingYes, File-&gt;Invalidate Caches…#2016-06-0108:30cflemingHave you been using the new features to mark some forms as def-like?#2016-06-0108:31imreyeah, although -> instead of def#2016-06-0108:32cflemingHmm, that shouldn’t affect it.#2016-06-0108:33cflemingThe indexes do get borked from time to time - it happens with IntelliJ for Java too, although much less frequently. I use the indexes in very different ways to most plugins, so I suspect I expose more bugs in their indexing layer.#2016-06-0108:35imrethat did work, thank you!#2016-06-0108:36imreon that note, is there a single place in the IDE where I can check what macros I marked as def-like or ->-like?#2016-06-0108:43cfleming@imre: Yes, Settings-&gt;Languages &amp; Frameworks-&gt;Clojure-&gt;Symbol Resolution#2016-06-0108:44imrethis is what I call excellent customer support 🙂#2016-06-0108:44imrethanks#2016-06-0109:04cflemingNo worries!#2016-06-0117:16dnolenso is known that basic things don’t seem to consistently work in .cljc files?#2016-06-0117:18imresuch as?#2016-06-0121:27danielcompton@dnolen: theres some issues here https://github.com/cursive-ide/cursive/issues?q=is%3Aopen+is%3Aissue+label%3ACLJC#2016-06-0121:34dnolenjump to definition just doesn’t seem to work from a reader conditional#2016-06-0122:03danielcomptonThe way Cursive is implemented at the moment, it sees two functions, a clj and a cljs, and it doesn’t know which one to pick (even though they resolve to the same position in the file)#2016-06-0122:04danielcomptonhttps://github.com/cursive-ide/cursive/issues/1132#2016-06-0204:01cflemingYes, CLJC needs some love, definitely.#2016-06-0206:28raymcdermottI’m a big fan of the Cursive and was looking for a little help to reduce the repetitiveness of obtaining a REPL … I’m always creating a new REPL in each project and sometimes that’s OK (cos I want to set up specific env vars for example) but often I just want to code there. Do I just put up with a trivial amount of drudgery, for I know that’s what it is, or is there a more slick way of doing this that I’m unaware of?#2016-06-0207:24cfleming@raymcdermott: The easiest way, I think, is to right-click project.clj in the project view and select “Run REPL for <project>"#2016-06-0207:24cflemingI’m also planning to make a change that will automatically create a default REPL config when a lein project is created or imported.#2016-06-0207:35raymcdermottBoom - awesome, thanks @cfleming! I even see that shortcuts to Ctrl-Shift-R on my system :the_horns:#2016-06-0207:36raymcdermottAnd yes a default REPL would be a bonus#2016-06-0207:42cflemingNo doubt - that’s on my list as part of making the getting started experience better.#2016-06-0301:45superstructoris it possible to set the default for “New clojure namespace” to be ClojureScript instead of Clojure ?#2016-06-0302:03danielcompton@superstructor: https://github.com/cursive-ide/cursive/issues/904#2016-06-0302:04superstructor@danielcompton: thanks!#2016-06-0302:18danielcomptonInstalling Java 6 to try stop the IntelliJ crashing 😞#2016-06-0318:37kennyIs it a known bug that Rum macros are still not getting resolved? I don't see an issue for it on Github.#2016-06-0318:49darwin@kenny: rum macros work for me as expected, at least defc#2016-06-0318:50kenny@darwin: I am not referring the macro. I am doing:
(require '[rum.core :as rum])
(rum/defc ...)
Is this what you are doing?
#2016-06-0318:51darwinnot exactly, let me find a link#2016-06-0318:51darwinhttps://github.com/binaryage/dirac/blob/master/src/options/dirac/options/ui.cljs#L3#2016-06-0318:51kennyRight, you're referring the macro.#2016-06-0318:52kennySeems like the symbol should be resolved by the fully qualified name, not just defc.#2016-06-0318:54darwin@kenny: when I do (:require-macros [rum.core :as rum-core]) and then rum-core/defc it works as expected#2016-06-0318:55darwinlooks like the only problematic case is yours, when is it ambiguous what namespace are you referring to, if cljs rum.core or clj rum.core#2016-06-0318:56kennyAh yes that solves the problem.#2016-06-0318:56darwinI agree that it should get fixed if it is recognised as valid clojurescript resolution (I have fuzzy knowledge about auto-importing macros via shadowed namespace naming)#2016-06-0320:47grumpletSFAIK the earlier thread on this has not been resolved and the above solution fails in my case too. I have the most success with#2016-06-0320:49grumplet(:require [rum.core]), then (rum.core/defc) - but even this does not always indent properly, though it does resolve.#2016-06-0401:04cfleming@grumplet: @kenny: Ah, I see what the problem is - Cursive’s symbol resolution is not aware that (:require [rum.core]) should refer both the symbols from the cljs namespace and the macros from the clj namespace. As darwin points out, using :require-macros in addition to :require should work.#2016-06-0401:04cflemingSorry, that’s been on my list to fix for ages.#2016-06-0401:05kennyGlad it's a known problem 🙂#2016-06-0401:06cflemingIn fact, there was a comment on the relevant issue this morning: https://github.com/cursive-ide/cursive/issues/775#issuecomment-223699662#2016-06-0401:07cflemingIt has another workaround: using :include-macros true, as in: (:require [schema.core :as s :include-macros true])#2016-06-0521:54danielcomptonI thought :include-macros true was required for the macros to come in#2016-06-0522:39cflemingRight, I believe that’s what the problem people are having with rum is.#2016-06-0523:58danielcomptonMy understanding was that code without that was incorrect?#2016-06-0523:59danielcomptoni.e. it’s not really a Cursive problem?#2016-06-0600:00cflemingNo, for a while now in CLJS, if you (:require [my-ns :as my]), that will pull in the declarations from my_ns.cljs but will also implicitly pull in the macros from my_ns.clj if it exists.#2016-06-0600:07danielcomptonah, I missed that#2016-06-0610:24darwinjust installed 2016.2 EAP and I don’t see cursive in Plugins, I tried to mess with “Browse repositoris”, click refresh button, but I cannot get it to display Cursive 1.3.0-eap2#2016-06-0610:24darwinany ideas?#2016-06-0610:38cfleming@darwin: It’s only an EAP build right now. If you didn’t import your previous settings, you’ll need to go to Browse Repositories-&gt;Manage Repositories and add https://plugins.jetbrains.com/plugins/eap/8090 to your repos list. Then go back to Browse Repositories, refresh, and you should see it.#2016-06-0610:38cflemingIf you were previously registered for EAP builds and you imported your settings, that should have been done automatically though.#2016-06-0610:40darwinsecond case, "https://plugins.jetbrains.com/plugins/eap/8090” was in my repositories as the only url, Cursive plugin was marked as incompatible, I couldn’t make it upgrade, when I uninstalled it, it went away and Cursive disappeared from the plugin list#2016-06-0610:41darwinI tried to remove the eap url as suggested somewhere on github in cursive issues, then put it back, click refresh buttons, but nothing helped#2016-06-0610:41darwinno big deal, I’m back in 2016.1#2016-06-0610:41cflemingOk, I’m off to bed now but I’ll test that tomorrow.#2016-06-0615:22tony.kayAnyone know how to see which license they're using? I have 12 licenses and I need to know who is using which license...Well, I assume I need to know that. Perhaps it is ok as long as we're not using more than 12 total...but I was trying to keep from having duplicates, and people move around...so shuffling licenses needs to happen.#2016-06-0615:22tony.kayTried looking through IntelliJ files, but don't see anything#2016-06-0615:43viniciushanaI’ve organized ours through google docs 😄#2016-06-0615:48tony.kayYeah, I just did that....fortunately I just found the original email I sent for allocation, so I figured it out.#2016-06-0617:09hlshipSo, I’m on a team that uses Emacs clojure-mode, with default formatting, and I’m always working to try and get my code to format just exactly the same inside Cursive. Is there a cheat sheet for setting that up?#2016-06-0622:13danielcompton@hlship: not directly related, but you can set code style settings to be at project level, which will mean you could save them in the git repo#2016-06-0622:13danielcomptonAnd anyone using Cursive would pick them up#2016-06-0622:40hlshipIt’s been a matter of setting code settings, then getting dinged by the other members when the code is not formatted precisely the way Emacs would. Even with “reformat only VCS changed text:, I spend a lot of time double checking indentation when I submit a PR for review.#2016-06-0622:40hlshipAnd tweaking Cursive’s settings a lot. And finding some things it just doesn’t want to do.#2016-06-0622:41cfleming@hlship: I don’t think there’s anything like that, no, but it sounds like a useful thing to have. If you can send examples of things you can’t get to work I can probably suggest something.#2016-06-0623:33cfleming@darwin: I just tried this, and it works fine for me:#2016-06-0702:01ckarlsenwhen I've required [clojure.spec.gen :as gen] in a namespace, cursive suggests constantly that I can require 'clojure.test.check.generators :as gen'#2016-06-0702:02cfleming@ckarlsen: Which function is it reporting that on?#2016-06-0702:03ckarlsengimme two min. will show#2016-06-0702:03cflemingIIRC there might be a bug in Cursive where it doesn’t check if the alias exists before proposing that require.#2016-06-0702:08ckarlsenhttps://www.refheap.com/1bb3a43a18a7fd9c34e8c93ad#2016-06-0702:16ckarlsenbasicly every time I type something in this namespace the popup shows. 2016.2 EAP and latest cursive EAP btw#2016-06-0702:17ckarlsenwhen I hover over gen/fmap and gen/tuple it says "gen/tuple can be required"#2016-06-0702:19cflemingDo clojure.spec.gen/fmap and clojure.spec.gen/tuple exist?#2016-06-0702:20ckarlsenclojure.spec.gen/tuple => #object[clojure.spec.gen$fn__12968$tuple__12971 0x338a2da4 "/cdn-cgi/l/email-protection"]#2016-06-0702:20ckarlsenyup#2016-06-0702:20ckarlsenI can even autocomplete it 😉#2016-06-0702:20cflemingOk, one sec#2016-06-0702:24cflemingThe problem is that clojure.spec.gen is generating things with macros.#2016-06-0702:24cflemingI’ll fix that for the next build.#2016-06-0702:26ckarlsenok#2016-06-0702:26ckarlsenthx#2016-06-0702:28cflemingIn the meantime, to prevent the popups you could create a clojure.spec.gen namespace somewhere, and (declare hash-map list map not-empty set vector fmap elements bind choose fmap one-of such-that tuple sample return any any-printable boolean char char-alpha char-alphanumeric char-ascii double int keyword keyword-ns large-integer ratio simple-type simple-type-printable string string-ascii string-alphanumeric symbol symbol-ns uuid) in it.
#2016-06-0702:28cfleming@ckarlsen: ^^#2016-06-0702:28ckarlsenthanks! 🙂#2016-06-0703:18cfleming@ckarlsen: That’s fixed for the next build.#2016-06-0704:25danielcomptonDid the new build of Cursive change CLJS indexing?#2016-06-0704:25danielcomptonI’m seeing a bunch of cljs internal functions showing up now#2016-06-0704:26danielcomptonthe ones I don’t want to see are the cljs$core ones#2016-06-0704:43cfleming@danielcompton: I don’t think so, no - that’s very strange.#2016-06-0704:59moizsj@cfleming: running into an issue where Load file in REPL simply does not work. Tried restarting IntelliJ. What could it be?#2016-06-0705:02cfleming@moizsj: It just doesn’t do anything, or you get an error?#2016-06-0705:02moizsjdoesn't do anything#2016-06-0705:02cflemingAny errors in your log? Help-&gt;Show log in Finder/Explorer#2016-06-0705:07cflemingThat’s unrelated I think#2016-06-0705:08cfleming@moizsj: Does your project have a single module, or multiple modules?#2016-06-0705:08moizsjsingle module#2016-06-0705:08moizsjused to work fine for this project#2016-06-0705:09cflemingThat’s very strange.#2016-06-0705:09cflemingLeiningen project?#2016-06-0705:10moizsjyup#2016-06-0705:10cflemingIf you re-import the project, does that fix it?#2016-06-0705:10moizsji can try#2016-06-0705:11cflemingGive that a go, then we’ll know if it’s something in the project itself or something random getting screwy, though I have no idea what that might be#2016-06-0705:14moizsjso i dint reimport (to avoid losing all the run configs I have). just did a sync and that fixed it. @cfleming#2016-06-0705:14cfleming@moizsj: That is really strange#2016-06-0705:15cflemingWell, let me know if the problem comes back#2016-06-0705:15moizsjits back @cfleming 🙂#2016-06-0705:15cflemingWell, damn#2016-06-0705:15cflemingCan you share the project?#2016-06-0705:16moizsjnah..#2016-06-0705:16cflemingOk.#2016-06-0705:16cflemingI actually have to go and look after my daughter, I’ll think about the best way to diagnose this, and get back to you.#2016-06-0705:16moizsjok sure.#2016-06-0705:17cflemingTo test the reimport, you could copy the whole project dir and import the copy, and see if that exhibits the problem too.#2016-06-0705:17cflemingSo you don’t lose run configs etc from the original.#2016-06-0705:17cflemingI have to shoot, but drop me a message either here or by email and let me know if that worked.#2016-06-0705:18moizsjok sure#2016-06-0705:23moizsj@cfleming: its fixed. disabling load out-of-date deps transitively fixed it. I used to have it disabled, must have forgotten that i turned it on. thanks.#2016-06-0711:38darwin@cfleming: thanks, now it works for me as well, don’t know what was the issue#2016-06-0713:19imreintellij question: is there a command to show the tooltip for a gutter icon? I would like to bind a key to it so I don't have to reach for the mouse to view why a test failed#2016-06-0714:58wasser@cfleming I did the Intelli-J update and the corresponding Cursive (I think), but now REPLs are broken. I set one up, but when I go to run it the configuration is set back to blanks and the REPL fails. Much like @darwin, I’m seeing the v1.3.0-eap2-2016.1 build, not the .2 that you showed. I tried removing the EAP repo and re-adding it (as you showed), opening and closing Intelli-J multiple times (CDN issue maybe?), flushing the caches: still no REPLs. I suppose I could remove and re-add Cursive, but I’m afraid I’ll lose my settings and still only see the .1 build. Any thoughts on what to try next?#2016-06-0715:23manutter51@wasser: what platform/OS?#2016-06-0716:01wasserOS X. El Capitan, specifically. #2016-06-0809:15henryw374I have el capitan, latest 1.3 eap and intellij 2016.1.3. the earlier eap 1.3 seemed ok but I intellij is now freezing and on startup i get no panels (ie just blank windows). i can use keys to open settings, but that’s about all. no error msgs i can see#2016-06-0809:24henryw374but… this didnt happen straight away… was using it for some while before it froze#2016-06-0811:15stijn@cfleming: is there somewhere a list of (IntelliJ) refactorings that Cursive supports?#2016-06-0811:53cfleming@henryw374: Try the workaround in https://github.com/cursive-ide/cursive/issues/1210#2016-06-0811:55cfleming@stijn: Not that I know of. The list is pretty short, sadly - introduce binding, inline binding, and rename. That’s all the classical refactorings, but some of the paredit stuff might count too (thread/unthread etc), and some of the intention stuff to (create function from use)#2016-06-0811:55stijnrename on package/namespace?#2016-06-0811:56cflemingYes, but only on the last segment, because anything else is actually a move.#2016-06-0811:56stijnokay#2016-06-0811:57cflemingWhich is next on my list to implement.#2016-06-0811:57stijnI was doing a rename package and then search/replace namespaced identifiers/keywords#2016-06-0811:57stijnmaybe I was doing it wrong 🙂#2016-06-0811:59cfleming@wasser: I can’t think of anything that should cause that. I’m not sure what the plugin issue is, unfortunately I no longer control the repo since I’m now using JetBrains’ one.#2016-06-0811:59cfleming@wasser: Does this REPL issue happen on all projects?#2016-06-0812:38joshkhhas anyone else experienced indentation problems when using cursive + clojure pretty symbols?#2016-06-0812:40joshkhactive-networks stays indented as though "let" isn't a symbol#2016-06-0815:33sashton@cfleming @hlship: With regards to indentation differences between Emacs and Cursive (https://clojurians.slack.com/archives/cursive/p1465252874000027), here is one case that I can't figure out how to handle right now. According to this style guide (https://github.com/bbatsov/clojure-style-guide), macros with body params should be indented with 2 spaces, while other macros/functions should use 1 space. https://github.com/bbatsov/clojure-style-guide#body-indentation https://github.com/bbatsov/clojure-style-guide#one-space-indent#2016-06-0815:34sashtonI can only seem to get Cursive to either do 2 everywhere or 1 everywhere, using One space list indent#2016-06-0815:35sashtonHere is an example formatted with Emacs:
(defmacro with-body [body]
  body)

(with-body
  (str         ; should be indented 2
   "hello"     ; should be indented 1
   "world"))
#2016-06-0815:39wasser@cfleming yes. Even in projects that were working properly. New projects are the same. I can set the host and port, click apply/ok and it looks good. But as soon at I either try the repl or reopen the Config for it those fields are blank. #2016-06-0815:41wasser@cfleming I uninstalled cursive and tried installing again. Same thing. Next it to reinstall intelli-j (goodbye customizations) and see what happens. #2016-06-0900:14cfleming@wasser: I can’t think of anything that should cause that. Can you send a copy of your log (Help-&gt;Show log in Finder/Explorer) to <mailto:/cdn-cgi/l/email-protection|/cdn-cgi/l/email-protection>?#2016-06-0900:16cfleming@rodeorockstar: That’s somewhat inevitable unfortunately - the problem is that let is what actually appears in the code, and that’s the width the formatting uses. It can’t use the folded text width, because if you unfold it then your formatting would be bad as well. You’ll see the same in Java when it folds e.g. lambdas etc.#2016-06-0900:20wasser@cfleming will do#2016-06-0900:20cfleming@sashton: You should be able to achieve that easily. "One space list indent” only applies when there’s no other formatting configuration for a form. So turn that on, and str (and any other function) should be formatted as in your example. Macro forms that Cursive knows about out of the box should be indented correctly with 2 spaces, and new ones like your with-body you can configure the formatting for as described at the bottom of the page here: https://cursive-ide.com/userguide/formatting.html#2016-06-0902:24wasser@cfleming. The full log is on its way.#2016-06-0902:50cfleming@wasser: Thanks. Could you check a couple of things - open File->Project Structure->Modules-> and check that the module you’re trying to use to run your REPL has Clojure attached to it?#2016-06-0910:25rauhUsing garden (css generator) I keep getting Dependency cycle [units.cljc -> units.cljc -> units.cljc] when I want to Sync files in repl#2016-06-0910:27rauhSeems to be: https://github.com/cursive-ide/cursive/issues/1026#2016-06-0910:29cfleming@rauh: Can you file an issue for that, and I’ll look at it? I thought I’d fixed that issue with cljc#2016-06-0910:35rauhDone: https://github.com/cursive-ide/cursive/issues/1432#2016-06-0912:18sashtonThanks @cfleming. I wasn't aware that the symbols with custom indentation would use 2 spaces in that case. Looks good.#2016-06-0914:50wasser@cfleming I’m not seeing “Dependencies” listed anywhere on that dialog. Am I looking in the wrong place?#2016-06-0922:40cfleming@wasser: So that’s your problem, I think. How did you import this project? It looks like the module type is wrong, perhaps a web module or something?#2016-06-0922:40cflemingOh right, you said that this worked and now does not, right?#2016-06-0922:43cflemingIf you look in your module *.iml file (mine is at .idea/modules/cursive.iml) you should see something like this:
<module external.linked.project.id="cursive" external.linked.project.path="$MODULE_DIR$/../.." external.root.project.path="$MODULE_DIR$/../.." external.system.id="GRADLE" external.system.module.group="com.cursive-ide" external.system.module.version="1.3.0-eap2-2016.2" type=“JAVA_MODULE" version="4”>
#2016-06-0922:43cflemingIn particular, you want to see the type=“JAVA_MODULE”#2016-06-0923:02wasser@cfleming not sure how, but looked like it was set to a web_module. I re-imported and it's working now. Let me see if it's he same in some of the other project I had trouble with. #2016-06-0923:07wasser@cfleming: I made extra sure to click the project.clj file when I did the import this time. I'll test a few other thing to see how I got it wrong. #2016-06-0923:21cfleming@wasser: That is really strange. Fortunately the fix is easy!#2016-06-0923:22wasser@cfleming: with your help. Thanks!#2016-06-0923:22cflemingNo worries!#2016-06-0923:30cfleming@wasser: I’m going to put a popup warning if you’re editing Clojure code under a non-Java module, which would make this more obvious.#2016-06-1005:22wasser@cfleming: It was definitely my fault. You really do need to grab the project.clj file on import or it “looks” kind of like it works (a bunch of dialogs whiz by) but the project is hosed, just as you saw.#2016-06-1008:25cfleming@wasser: That’s really weird - I’ve never seen that. If you can remember the steps to import like that I’d like to reproduce it and fix it, but if not no worries, it’s clearly not a common thing.#2016-06-1013:24wasser@cfleming: It’s really all on me. And some not-so-great UX/UI. When I imported the “lein new …” project I wasn’t paying attention and selected the project FOLDER, not the project.clj file (the “Select File or Directory to Import” dialog says you can do this!) Intelli-J then dutifully started the import which its not-so-great. Next, Next, Finish…Boring. I didn’t notice that the 3 steps (not 4) weren’t the right ones. Just that there were the expected 3 (or 4, I wasn’t paying attention). Unfortunately, choosing the folder doesn’t build the project correctly. You don’t get the Java/Clojure dependencies. You MUST select the project.clj file! The intermediate dialogs for the project build ARE different, but we quickly get trained to just click “Next,” so we don’t pay enough attention. Lesson here: I need to pay more attention. And UX MATTERS!#2016-06-1023:21cfleming@wasser: That’s definitely a bug, not a user problem - you should never be able to create web modules for Clojure projects. I’ll try to reproduce this.#2016-06-1116:34vincentjames501@cfleming: Just in case you don’t hear this enough... Our company, including myself, love Cursive. I use it everyday and it is rock solid for what I use it for. Keep up the good work!#2016-06-1122:55cflemingThanks @vincentjames501! That’s always great to hear.#2016-06-1203:14cjmurphyI'm sure that control shift slash is always how I've uncommented code. But now it is not working. Looking at my keymap it seems to be assigned to 'Comment with Block Comment'. And I can't see Uncomment anywhere. So looking at the configuration makes sense. Probably not related, but I have a question - how do you ensure that you are not receiving the absolutely latest Cursive changes? I remember on installing I elected to go for getting the latest updates, so would now like to know how to undo this.#2016-06-1203:30cfleming@cjmurphy: Actually, “Comment with Block Comment” has never worked with Clojure, there’s an issue here: https://github.com/cursive-ide/cursive/issues/1047#2016-06-1203:30cflemingThe equivalent “Comment with Line Comment” does work.#2016-06-1203:31cjmurphyCommenting works as usual, uncommenting doesn't.#2016-06-1203:31cflemingre: the beta builds, see here: https://cursive-ide.com/userguide/#eap#2016-06-1203:31cjmurphyMy money is on its either my fault or Linux Mint's fault.#2016-06-1203:32cflemingI just tried it, it definitely doesn’t work for me, and I would swear it’s never worked because I have never implemented that 🙂#2016-06-1203:32cflemingSo the block commenting for you adds a line comment?#2016-06-1203:33cjmurphyOh - so uncommenting has never worked?#2016-06-1203:33cflemingThey both work for line comments, neither has ever worked for block comments.#2016-06-1203:33cjmurphyYou highlight something that has lots of ; at the start of each line, and you can't just remove them with a keystrokes?#2016-06-1203:34cflemingYes, that’s “Comment with Line Comment"#2016-06-1203:34cjmurphyI am only talking about uncommenting lots of lines that are already commented then.#2016-06-1203:35cflemingThat should work fine, but the command is not the block comment one.#2016-06-1203:35cflemingFor example, in Java/JS/C etc, that would comment and uncomment all the lines with //. Using the block comment commmand would use /* ... */#2016-06-1203:36cjmurphyI'm used to commenting and uncommenting the //, and this carried over to the ;.#2016-06-1203:37cflemingRight, that should work. If it does not, can you send an example?#2016-06-1203:39cjmurphyMaybe I should try to find the keyboard shortcut in IDEA. Will it be called 'Uncomment with Line Comment'?#2016-06-1203:40cfleming“Comment with Line Comment”, probably Ctrl-/#2016-06-1203:42cflemingI think you want Ctrl-/#2016-06-1203:42cjmurphyThat works fine#2016-06-1203:43cjmurphyOMG sorry you are right I am so dumb.#2016-06-1203:43cflemingIf you want to map that to Ctrl-Shift-/ you can do that in Settings-&gt;Keymap#2016-06-1203:43cjmurphyIt is a toggle.#2016-06-1203:43cflemingRight - that’s how it works for Java as well#2016-06-1203:44cflemingThe one edge case there is if your selection contains some commented and some uncommented lines - in that case, it will comment them all, which means re-commenting the lines that are already commented.#2016-06-1203:44cjmurphyBeen doing it for years. I can only laugh#2016-06-1203:45cflemingHehe, no worries - that stuff gets down into the reptilian hindbrain, but gets erased from the conscious 🙂#2016-06-1203:45cflemingI can never remember what the keystrokes are for things I do all day, unless I have a keyboard to actually do it on.#2016-06-1203:46cjmurphyYes thanks - sometimes when starting my brain just isn't there yet. Wow. Thanks. (EDIT: but never-the-less some update had trashed my existing keystroke settings, so it seems I smelt there was a problem 😛)#2016-06-1203:47cflemingNo problem!#2016-06-1216:24wasserAFK, but I think it even works for stuff like HTML. #2016-06-1220:39joshgIs it possible to force Cursive to reindex without closing and reopening the project? This seems to be required to get Cursive to recognize new imports.#2016-06-1220:58danielcompton@joshg: what do you mean when you say imports? Java imports in an ns, or new deps in project.clj?#2016-06-1220:59joshgJava imports, although come to think of it, it’s probably due to adding a new dependency to project.clj. Is there a way to reindex without closing and reopening the project?#2016-06-1220:59joshgRunning lein deps or restarting the repl doesn’t seem to be enough.#2016-06-1221:02ckarlsen'refresh leiningen projects'?#2016-06-1221:04joshgckarlsen: I didn’t know that existed, but seems to have worked. Thanks!#2016-06-1221:27danielcompton@joshg https://github.com/cursive-ide/cursive/issues/56 you can watch that issue for improvements to Lein syncing#2016-06-1221:29joshgdanielcompton: that would be a convenient feature, thanks#2016-06-1221:31danielcomptonor https://github.com/cursive-ide/cursive/issues/1433#2016-06-1221:32cflemingI’m planning to do #1433 rather than #56, BTW, because it’s very difficult to detect when edits to a project.clj are done and it’s in a valid state.#2016-06-1302:16danielcomptonIs there a way to dump all Cursive formatting details into the .idea/codeStyleSettings.xml?#2016-06-1302:17danielcomptonThe current way it works, I think they only get written there when it changes, and otherwise they are taken from your default config?#2016-06-1302:17danielcomptonSo if you have several colleagues with different config, they can have different formatting settings, even when code style is set to project#2016-06-1303:22cfleming@danielcompton: No, there isn’t. Currently only values that differ from the built-in values are written out.#2016-06-1303:22cflemingBut I don’t understand what the issue is - if the code style is set to project, different users shouldn’t be able to have different config.#2016-06-1303:23danielcomptonIs it built in values or default values?#2016-06-1303:23cflemingSince they all have the same defaults, and the config in the project is just the delta from those defaults.#2016-06-1303:23danielcomptonOk#2016-06-1303:23cflemingUmm, both actually. I see what you’re saying - the default value config is not written out?#2016-06-1303:24cflemingThings like “One space indent” and “default to indent only”?#2016-06-1303:24danielcomptonThe specific one was comment indentation #2016-06-1303:24cflemingI see, yes.#2016-06-1303:24cflemingHmm#2016-06-1303:25cflemingCould you file an issue for that?#2016-06-1303:25cflemingI’ll see if I can move that in there.#2016-06-1303:25cflemingSo it’s shared correctly.#2016-06-1303:25danielcomptonSure. Is it cursive or IntelliJ though?#2016-06-1303:25cflemingThat’s Cursive.#2016-06-1303:42danielcomptonhttps://github.com/cursive-ide/cursive/issues/1434#2016-06-1303:52cflemingThanks#2016-06-1306:24rauhI keep having resources in my source-path when I do a Refresh leiningen dependencies in Cursive. Even though it shouldn't ever be. (I can see it's not with lein pprint). It's annoying since Jump to source etc, all resolve to my compiled (cljs,js) files in there.#2016-06-1308:50danielcomptonCan you share a link to your project.clj?#2016-06-1312:11lsentaHi guys, I get errors consistently in cursive, intellij15
myproject/project.clj
         java.lang.ClassNotFoundException: jsr166y.ForkJoinPool, compiling:(clojure/core/reducers.clj:56:21)
         jsr166y.ForkJoinPool
#2016-06-1312:12lsentaIt started breaking a few weeks ago, I left my project on the side, but it breaks even a simple new project, created with lein new luminus myproject +swagger, then import project from sources#2016-06-1312:13lsentanone of the folders (src, env, resources, test) are shown in the project manager#2016-06-1312:13lsentaand project.clj gives me things like defproject cannot be resolved#2016-06-1312:16lsentaon Mac El Captain, tried to import the project with java7 and java8, same error. Is there something I can do?#2016-06-1404:43cfleming@lsenta: That library is generally used to patch fork/join functionality into Java 1.5 IIRC.#2016-06-1404:43cflemingCan you send the whole stacktrace? When does the error occur?#2016-06-1405:45lsenta@cfleming: that’s all I got:
07:44:12 Error reading /…/myproject/project.clj
         java.lang.ClassNotFoundException: jsr166y.ForkJoinPool, compiling:(clojure/core/reducers.clj:56:21)
         jsr166y.ForkJoinPool
#2016-06-1405:47lsentaWhen I load a project, either after import from files or just opening a used-to-be-working project. After synchronizing project-`reading project.clj`, this message pops up and appears in the error logs#2016-06-1405:48lsentaevery function in my .clj is highlighted with the x cannot be resolved tooltip#2016-06-1408:13cfleming@lsenta: Which JVM are you using to run IntelliJ? You can see that in IntelliJ IDEA-&gt;About IntelliJ IDEA#2016-06-1408:26cfleming@lsenta: Ok, I think I know what the problem is. I’ll try to reproduce tomorrow and fix it for the next build.#2016-06-1410:50lsenta@cfleming: thanks! IntelliJ was running with JRE1.6, can’t be good#2016-06-1410:53lsentaIt’s working now after tweaking the application package -> Info.plist -> JVMVersion#2016-06-1418:50kennyIs there going to be more extensive support for Rum? defc works, but defcs and defcc are highlighted as incorrect arity when called.#2016-06-1422:59cfleming@lsenta: You can also use the action “Switch IDE boot JDK"#2016-06-1422:59cflemingI recommend using the bundled JDK now.#2016-06-1422:59cfleming@kenny: I thought I caught those, I’ll check.#2016-06-1423:00danielcomptonalthough the bundled JDK has a crash when Mac’s go to sleep 😞#2016-06-1423:01danielcomptonhttps://youtrack.jetbrains.com/issue/IDEA-146955#2016-06-1423:05cflemingI don’t get that#2016-06-1423:05cflemingSadly, all these JDK problems are kind of erratic, you just have to try one and see how it works.#2016-06-1423:15danielcomptonyep, not all mac’s crash on that one I think#2016-06-1600:54kenny@cfleming: Did you check on the Rum issue? The red "incorrect arity" is driving me crazy 😜#2016-06-1600:55cfleming@kenny: Actually I’ll check that now. Do you have an example, by chance?#2016-06-1600:56kennyI'll make one. One sec#2016-06-1600:56kenny
(rum/defcs example
  [component-state some other args]
  [:div "hello"])

(rum/defc call-example
  []
  (example "some" "other" "args"))
#2016-06-1600:56cflemingThanks. If you have one for defcs and defcc that would be great#2016-06-1600:57kennySame example for defcs and defcc, just change the defcs to defcc.#2016-06-1600:57cflemingOk, great. One moment...#2016-06-1600:58cflemingOk, so the issue is that the state argument is passed implicitly?#2016-06-1600:58kennyYes#2016-06-1600:58cflemingOk#2016-06-1622:44danielcomptonIs this a new bug?#2016-06-1622:44danielcomptonFind usages of seems to be missing a word#2016-06-1623:04cfleming@danielcompton: No, there’s an issue I think - I’ve never managed to figure that one out.#2016-06-1708:19imre@cfleming: is there a cursive changelog somewhere for current eap builds?#2016-06-1708:28cfleming@imre: Not really sorry, it’s on my to-do list. The best thing is the mailing list archive: https://cursive-ide.com/archive/#2016-06-1708:29imrethanks, that should do!#2016-06-1708:35moizsj@cfleming: Is there a way to search for a keyword's usages? Without first having to find an instance to use for the search#2016-06-1708:36cfleming@moizsj: No, currently you always need an instance to search from.#2016-06-1708:36moizsjor maybe a fuzzy search like thing might be nice for keywords#2016-06-1708:36cflemingAnd there’s no “Navigate to keyword” option because it’s not entirely clear how that would work.#2016-06-1708:37cflemingYes, I can see that.#2016-06-1708:37moizsjthe way we have for namespaces, etc#2016-06-1708:37cflemingRight, but that generally navigates to the definition of the ns/symbol/whatever, but keywords don’t have a useful definition.#2016-06-1708:37cflemingOr rather, they don’t have a specific point where they’re defined.#2016-06-1708:38moizsjso the search could list usages instead of definitions#2016-06-1708:38cflemingIt would have to be: narrow down the name on typing, and then search for usages.#2016-06-1708:38cflemingRight.#2016-06-1708:38cflemingCan you file an issue for that?#2016-06-1711:24moizsj@cfleming: I will. thanks#2016-06-1711:27moizsjhttps://github.com/cursive-ide/cursive/issues/1439 @cfleming#2016-06-1719:27torbjornvatnI've got the 2016.2 EAP version of Intellij Community, but I can't find Cursive by searching for it. One issue on Github stated that 1.3.0-eap2 should fix this, but where do I find that?#2016-06-1802:48cfleming@torbjornvatn: I replied on the issue: https://github.com/cursive-ide/cursive/issues/1407#issuecomment-226917625#2016-06-1903:19onetomIs it possible to use Cursive's nREPL in a Maven project? I see Project is <unknown> under the Use Leiningen REPL port option#2016-06-1903:22onetomi think it was working for awhile but maybe the latest EAP versions broke it#2016-06-1903:23onetomah, i just noticed this message at the bottom:
Run Configuration Error: No Leiningen modules containing clojure.main found
#2016-06-1903:53cfleming@onetom: The Leiningen option has never worked with Maven, but the the nREPL in normal JVM process option should.#2016-06-1904:05onetomREPL run configuration is incorrect - no module selected#2016-06-1904:06onetomthat's what i get if i choose Connect to server and provide localhost and 8300#2016-06-1904:06onetomin the Remote REPL dialog#2016-06-1904:07onetomah, ok, you meant the local repl option#2016-06-1904:08onetomwell, that's not very helpful since i can't tell it the nREPL host and port#2016-06-1904:12onetom(im running the repl server in a terminal via boot)#2016-06-1905:38cfleming@onetom: Oh ok, if you’re running the REPL externally then you want the remote option, yes. I’ll try to reproduce that error tomorrow#2016-06-1911:02vikeriCan the REPL output in Clojurescript be pretty printed and/or syntax highlighted by default? I have neither. (I can use cljs.pprint/pprint though, but that is a bit cumbersome to add at each evaluation.) I’m using figwheel.#2016-06-1922:22cfleming@vikeri: It can’t right now, but it will be soon. I’m going to be fixing up the CLJS REPLs hopefully in the next couple of builds.#2016-06-2000:38emperorcezarHow do I turn rainbow parens on?#2016-06-2000:38emperorcezarNm. Found it.#2016-06-2006:32vikeri@cfleming: Alright, great to hear!#2016-06-2015:53chrisdevoIs anybody else having issues with Intellij locking up on a Mac when “scanning files to index”?#2016-06-2018:21vincentjames501@chrisdevo: Oddly I had this happen this morning to me for the first time. I just restarted and everything is working well now.#2016-06-2018:39leo.ribeirohey guys do you know why it’s happening to me?#2016-06-2018:40leo.ribeiromaybe because my sql queries from conman is generated on the fly? the strange thing is that it happens to the bouncer too#2016-06-2018:42chrisdevo@vincentjames501: I think it was a conflict between cursive and the .ignore plugin.#2016-06-2019:00sveri@leo.ribeiro: could you post the db namespace please?#2016-06-2019:01leo.ribeirooh yes sure… sorry, here’s the snippet#2016-06-2019:02sveriah and here is the problem, intellij does not know which functions are being generated by bind-connection#2016-06-2019:03sveriYou could declare them manually for instance#2016-06-2019:03sveriAlso I think @cfleming was or will be working on a feature that enables this stuff#2016-06-2021:45chrisdevohttps://clojurians.slack.com/archives/cursive/p1466448172000172 Removed the .ignore plugin (and many others). Still locking up at “scannning files to index”.#2016-06-2022:25cfleming@chrisdevo: See https://github.com/cursive-ide/cursive/issues/1210 for a possible cause with a workaround.#2016-06-2022:32chrisdevo@cfleming: Thank you.#2016-06-2022:35cfleming@chrisdevo: No worries, let me know if that helps.#2016-06-2022:42cfleming@sveri: @leo.ribeiro: Yes, I hope to have a solution for that use case shortly.#2016-06-2023:42seantempestaHas anyone done any CLJS debugging with Cursive? It seems like there’s support to connect to a Chrome instance. https://www.jetbrains.com/help/idea/2016.1/debugging-javascript.html?origin=old_help#2016-06-2023:43cfleming@seantempesta: I know dnolen tried that out, I think it worked ok.#2016-06-2023:44seantempestainteresting. I’ll give it shot. Thanks @cfleming…for everything. Cursive is pretty amazing.#2016-06-2023:54cfleming@seantempesta: Thanks! I’m glad you’re liking it.#2016-06-2100:26seantempestaOkay. So I got the javascript debugger working, but it’s separate from the repl and doesn’t speak Clojure. Any ideas on how we can integrate the two?#2016-06-2102:12superstructorwould Dirac help @seantempesta ?#2016-06-2102:14seantempestaDirac is for Chrome, right?#2016-06-2103:10superstructor@seantempesta: yes :thumbsup: but you can connect to Dirac REPL from Cursive. Havn’t attempted any debugger integration yet.#2016-06-2105:12moizsj@cfleming: another feature request - a Clojure specific unified fuzzy search. Not the search everywhere of IntelliJ (I'm aware there are issues integrating with it). Unified searching for symbols/namespaces/keys/files.#2016-06-2105:13moizsj@cfleming: a lot of times i find myself mistakenly launching the search ns, when i wanted to search a symbol, or vice versa.#2016-06-2108:06cfleming@moizsj: One thing I have been considering is to have a keypress to switch the search type when there are no results. IntelliJ already does this for some cases (I believe it switches to a file search if a class search doesn’t work well).#2016-06-2108:07moizsj@cfleming: but wouldnt a unified search be just easier? I dont have to pause to think what type i want. And in case i pick the wrong type, a further keypress would be needed.#2016-06-2108:08cflemingPossibly, yeah. I’m a little worried about implementing something that is basically search everything again. A better solution might be to make that extensible and send them a PR.#2016-06-2108:08moizsj@cfleming: of course the individual type specific searches would still have value and be relevant#2016-06-2108:10moizsj@cfleming: you may be correct from an implementation perspective. but from a user perspective, I'd definitely prefer unified (as one of the search types). you've already implemented 3 of them, would it be hard to merge them?#2016-06-2108:11cflemingNo, it wouldn’t. But what I mean is, that’s what Search Everything is supposed to do, the issue at the moment is that it’s not extensible. So I’d rather make that extensible so that you could just use that.#2016-06-2108:12moizsj@cfleming: sure. i see your point. do you see any chances of them budging?#2016-06-2108:13cflemingI suspect if I send them a PR they’d accept it - I’ll mail the developer in question and ask.#2016-06-2108:14moizsjcool..#2016-06-2115:02rauhAfter an evaluate the REPL window doesn't automatically scroll down anymore, which drives me slightly insane. Has anybody have this problem? Used to not have this issue.#2016-06-2120:21rauhRestart fixed the scrolling problem. Yay 🙂#2016-06-2212:32manutter51Is there a special Local REPL config I need to use to work with luminus projects? I’ve selected “Run nREPL with Leiningen” and have tried each of the profiles listed under :profiles in the project.clj file, but I keep getting Error running Local REPL: Error creating JavaParameters#2016-06-2212:37manutter51Eh, I guess I can just use a “remote” REPL and connect on 7000 after a lein run#2016-06-2219:38cfleming@manutter51: Do you get that on all luminus projects?#2016-06-2219:40cfleming@manutter51: Also, which version of Cursive are you on?#2016-06-2219:45manutter51I’m on the latest non-EAP cursive, and I’m trying it with a new luminus project with +cljs#2016-06-2219:46manutter51let me try it without the +cljs#2016-06-2219:49manutter51Yeah, if I just do lein new luminus ltest, I can get the local REPL to come up with no problems.#2016-06-2219:53manutter51I had a bunch of other options activated when I created the luminus project that’s giving me problems, trying to remember what else I had#2016-06-2219:53manutter51lein new luminus ltest +cljs also fires up a local REPL with no problem.#2016-06-2219:57manutter51If I do lein new luminus ltest +mysql +site +sassc +auth +cljs I get the “error creating JavaParameters” message#2016-06-2219:59manutter51Ok, looks like the minimum reproducible case is lein new luminus ltest +sassc#2016-06-2223:30wilkerluciohello, I'm trying to create a live template here that applies a predefined function to another variable on the live template#2016-06-2223:31wilkerluciobut I can't get how to send the other variable as an argument#2016-06-2223:32wilkerluciothis is what my variables looks like, I can't figure how to replace that String by the name variable#2016-06-2223:32wilkerluciodoes you know how can do that?#2016-06-2300:22danielcompton@wilkerlucio have you looked at the Cursive defined live templates? I learned a lot from them#2016-06-2300:45wilkerlucio@danielcompton: just looked, but could not find any of then using variables in expressions =/#2016-06-2300:45wilkerlucioone thing is being weird, is that I can't put any custom value at the expression, not even blanking it out, when I type something there it always seems to be rejected#2016-06-2300:45wilkerlucioI'm not even able to clean the expression#2016-06-2300:46wilkerlucioit changes when I use the mouse interface, but no custom text#2016-06-2300:46wilkerluciocan someone please test and see if this happens out of my setup?#2016-06-2319:54puzzlerAnyone out there using parinfer in Cursive? Has it stabilized yet? (last time I tried Cursive, there were still several problems with parinfer, for example, refactoring name changes could change the semantic meaning of the code, so I've been waiting for it to mature before trying again)#2016-06-2323:00cfleming@puzzler: No, I haven’t updated that yet. I’m still not sure whether to try to create a hybrid mode which solves those problems, or just to expose paren mode (which I’m resisting because I think it increases the user complexity considerably).#2016-06-2323:00cfleming@wilkerlucio: Can you give an example of what you’re trying to achieve?#2016-06-2323:02wilkerlucio@cfleming: sure, I'm trying to write a snippet to create UI components for om.next, as a pattern the component factory name is a dash-case version of the class name#2016-06-2323:03wilkerlucioI thought I could use lowercaseAndDash(String) function to do that into the variables#2016-06-2323:03wilkerluciothen I get into the issue I talked before#2016-06-2323:03cflemingOk, so you want the user to enter UiComponent for $COMP$ and have it generate ui-component for $COMP_LOWER$?#2016-06-2323:03wilkerlucioexactly#2016-06-2323:04cflemingLet me check, one sec#2016-06-2323:14cflemingYou still have to tab through the var name, but it’s generated correctly.#2016-06-2323:37puzzlerIs there a way to disable the automatic entry of right parens when typing left parens, when paredit and parinfer are turned off?#2016-06-2323:47wilkerlucio@cfleming: nice, thanks!#2016-06-2323:47wilkerlucioand actually, it is working before tabbing here, perfect 🙂#2016-06-2323:48cfleming@puzzler: Yes, Editor-&gt;General-&gt;Smart Keys and the various matching pair options there.#2016-06-2414:18kevinI often want to resize the REPL window/pane/frame/thingie. With other windows (e.g. “Project”) cmd-shift-{left,right} works. With the REPL window, however, that seems to work only on rare occasions (or maybe never). So I usually end up using the mouse, but I would love a way to do this with the keyboard instead. Any ideas?#2016-06-2415:04manutter51For whoever might care, I was having issues where I was getting a crash in the Cursive plugin if I had the Elixir plugin enabled, I just tried with the latest (non-EAP) version of Cursive and the latest Elixir plugin, and looks like everything is playing nicely together finally.#2016-06-2418:17zaneWhat's the right way to control the indentation of macro forms with Cursive? a-la emacs clj-mode's put-clojure-indent: https://github.com/clojure-emacs/clojure-mode/#indentation-of-macro-forms#2016-06-2418:24zaneMore broadly, we're trying to get Cursive to conform to clojure-mode's defaults. Is there a config template or something we can load into Cursive to make that happen?#2016-06-2502:30cfleming@zane: See the doc here: https://cursive-ide.com/userguide/formatting.html
#2016-06-2502:31cflemingThere are some other options that are not documented there, in particular Editor-&gt;Code Style-&gt;Clojure-&gt;General-&gt;One space list indent.#2016-06-2502:31cflemingIf you can send an example of something that’s not matching what you want, I can probably help with that.#2016-06-2503:33zaneGreat. Thanks, @cfleming!#2016-06-2503:44cfleming@kevin: I just investigated this a bit. The problem is that that action conflicts with a standard editor action, “Move to line start/end with selection”. For most toolwindows there’s no conflict because they don’t contain editors, but for the REPL it’s a problem.#2016-06-2503:44cflemingI don’t have a good solution sorry, I’ll have to think about it.#2016-06-2503:44cflemingYou could rebind the stretch left/right actions to another key, of course.#2016-06-2512:15kevincfleming: ah, yeah, that makes sense, kinda figured it was something like that. Stupid IntelliJ and its use of a default single keybinding for multiple, context-specific actions. actually, rebinding the “stretch” actions seems like a pretty decent solution, i’ll give it a go. thanks!#2016-06-2513:44onetom@cfleming: i've checked that 1.2.6-2016.1 has no issue with recognising the Maven project for the Clojure REPL / Remote / Use Leiningen REPL port, but with the EAP version it's just showing <unknown> in the list of projects there. Should I file an issue about this? Do you need an example repository?#2016-06-2513:56onetombtw, i've just noticed the new macro support accidentally and i almost cried from the excitement ;D i see it's even documented! https://cursive-ide.com/userguide/macros.html it's a great practical solution to this fundamental problem!#2016-06-2514:08onetomit has induced a few questions though. 1. why is there no defn option? i would have immediately use it for the hoplon defelem which is the most frequently used function definition form in hoplon code https://github.com/hoplon/hoplon/blob/393e9099d00eeb58c73a39bb4b94ff345b806320/src/hoplon/core.clj#L118 2. where are these resolution and indentation settings stored? how am i supposed to share them across projects and workstations? i've tried grep -ri defrpc .idea in a project but it's not there... it's neither here: grep -ri defrpc ~/Library/Application\ Support/IntelliJIdea2016.1/#2016-06-2514:51onetomactually defelem is a bad example because it's defined like a function, but the usage time parameters are pre-processed 😕
(defelem dialog [{:keys [title] :as attrs} kids]
   (div :class "dialog" (dissoc attrs :title)
     (h1 title)
     kids))

(dialog :class "large" :title "Login"
   (input :type "text" email)
   (input :type "password" pwd))
where the value of attrs becomes:
{:class "large"
 :title "Login"}
and the kids will be:
[(input :type "text" email)
 (input :type "password" pwd)]
#2016-06-2514:54onetomi wouldn't want the call site to be underlined because of arity error, but i also don't want to see title, attrs and kids marked as unresolvable within the definition of dialog#2016-06-2602:22cfleming@onetom: Sorry, I thought I’d replied about that Maven issue - it should be fixed in the next build, but there was an IntelliJ bug that I reported that the fix needs. They’ve fixed it and it’s ported to the 2016.2 branch so it should be in the next IntelliJ EAP.#2016-06-2602:24cflemingThe defelem case shows why I didn’t add defn as an option - there are almost no functions that look exactly like defn that I’m aware of. They’re all sufficiently different that just treating them as defn is not useful.#2016-06-2602:24cflemingdefelem will need some support added for it, either by me or when I get the API open.#2016-06-2602:24cflemingThere’s some more macro support coming in the next build too.#2016-06-2716:09miguelbIs it possible to get cursive to resolve goog imports?#2016-06-2722:34cfleming@miguelb: It should do already, although JS interop is pretty tricky. Do you have a specific case that isn’t working?#2016-06-2802:22danielcomptonThis could be pretty cool for (limited) Cursive support in other IDEs https://code.visualstudio.com/blogs/2016/06/27/common-language-protocol#2016-06-2814:28miguelb@cfleming: I can require the package, goog.events.KeyCodes in this case, but anytime I use goog.events.KeyCodes.* in code, intellij tells me cannot be resolved. I guess it’s not really an issue, just annoying to have that visual noise. Here’s a photo:#2016-06-2819:24danielcomptonsome of the goog stuff works, and some doesn't#2016-06-2907:39rauhAlready works in Cursive:
(let [{:foo/keys [bar]} {:foo/bar 4}]
  bar)
I'm impressed.
#2016-06-2908:50cfleming@rauh: Yes, that’s worked for a while now. I’ll add the new map namespacing stuff in either the next drop or the following one.#2016-06-2911:32ilukinovHello, thanks for cursive!) QQ - how to re-read project.clj?#2016-06-2911:45rauh@ilukinov: "Refresh leiningen Projects" (search all)#2016-06-2911:50ilukinovWhere do I need to search it?#2016-06-2911:55rauhHelp -> "Find action"#2016-06-2911:55rauh@ilukinov: ^#2016-06-2911:55ilukinovoh, correct answer is “You can assign this operation to a keystroke in 'Keymap' section under Preferences’. Thanks#2016-06-2911:56rauhYes, probably best to assign it. "Search everywhere" should already have keybinding, but I don't know what's the default. I edited mine to "Numpad slash"#2016-06-2911:57ilukinovExpected to find it in context menu for project.clj#2016-06-2912:15ilukinovAnd while I’m here - is there a way to jump to matched brace in one keystroke?#2016-06-2912:25rauh@ilukinov: "Move bracket to matching brace" is the command. Again, search all or Help -> "Find action"#2016-06-2912:33rauhMove caret to matching brace#2016-06-2912:45ilukinovThank you!#2016-06-2914:04kaukoHow do you see docstrings with cursive?#2016-06-2914:05kaukoJust realised I've been using cursive for a year now but I've never seen a docstring 😄#2016-06-2914:05kaukoF1 doesn't seem to work for third party libraries at least#2016-06-2914:12imrectrl-q for me#2016-06-2914:13imreaction is "quick documentation"#2016-06-2914:17kaukoIt does work for my own functions#2016-06-2914:17imredoes it work for core stuff like map?#2016-06-2914:17imreI'm sure it does#2016-06-2914:18kaukonot for me#2016-06-2914:18imredoesn't work on (map)?#2016-06-2914:18imrethat's strange#2016-06-2914:21imrecould also try "quick definition"#2016-06-2914:23kaukonope#2016-06-2914:45imreI'm lost then#2016-06-2914:45imreboth of these work ok for me#2016-06-2914:52kaukoI'll ask my colleagues tomorrow if it works for them 😛#2016-06-2916:06rauhWith the new clojure namespace keyword they get printed differently which removes all syntax highlighting. Eg: {:a/b 1 :a/c 2}#2016-06-2916:06rauhTemporary fix for people on clojure 1.9alpha8:
(defmethod print-method clojure.lang.IPersistentMap [m, ^Writer w]
  ((var clojure.core/print-meta) m w)
  ((var clojure.core/print-map) m (var clojure.core/pr-on) w))
#2016-06-3008:37conandoes anyone have a way to install cursive while the ssl certificate is broken? i can't find a manual download link#2016-06-3008:39conanoh actually i can see it in the XML: https://updates.cursive-ide.com/downloads/cursive-1.2.7-15.zip#2016-06-3008:44cfleming@conan: Actually, you shouldn’t need that URL to install Cursive any more.#2016-06-3008:44conanoh, how do i do it now?#2016-06-3008:45cflemingCan you check Settings-&gt;Plugins-&gt;Browse Repos-&gt;Manage Repos and see if you have a URL there with that domain?#2016-06-3008:45conanyes, i do#2016-06-3008:46conanoh no, actually i don't any more#2016-06-3008:46cflemingOk, you can remove that, it’s no longer needed. Which version of Cursive are you running#2016-06-3008:46cfleming?#2016-06-3008:46conanmaybe a manual install removed it#2016-06-3008:46cflemingOk, no, actually Cursive removes it now since it’s no longer required.#2016-06-3008:47cflemingSo are you having problems installing? The only thing that URL should be needed for is sending usage stats back.#2016-06-3008:47conanoh, i just got a message "Cursive EAP repository address changed"#2016-06-3008:47cflemingHave you just upgraded?#2016-06-3008:47conanyeah, i went to install and it gave me an SSL error because the certificate is invalid#2016-06-3008:47conanso i downloaded the file and installed from disk#2016-06-3008:47conannow the updates seem to be working!#2016-06-3008:48conanso i guess it's all fine, thanks#2016-06-3008:48cflemingGreat! Sorry for the hassle that cert has been a real pain.#2016-06-3008:48conanthey all are#2016-06-3008:48cflemingWaiting on the provider for a fix now.#2016-06-3008:53cfleming@kauko: Is this for clj or cljs?#2016-06-3008:54cflemingThere’s https://github.com/cursive-ide/cursive/issues/1339, which I could never reproduce.#2016-06-3013:11danielohrlundhey people, thanks for a great plugin! I have one quick question, tried to search in the channel but couldn’t find anything in the history: I have problems with indentation for threading macros in cljs files, it works like a charm in regular clojure files but for cljs files it doesn’t respect the formatting rules. any ideas?#2016-06-3019:17hueypis there a way to tell cursive to never reload a file? when I eval a file (well, a test in a file) somehow its calculating a dependency to dev/user.clj and it breaks my workflow#2016-06-3022:40cfleming@danielohrlund: Can you show an example of a form which isn’t working as you expect?#2016-06-3022:42cfleming@hueyp: You can’t for a specific file, no. You can turn off the transitive dependency loading altogether in Settings-&gt;Languages &amp; Frameworks-&gt;Clojure-&gt;Load out-of-date file dependencies transitively#2016-06-3022:42cfleming@hueyp: Do you know where that dependency is coming from?#2016-06-3022:43hueypgreat question — I’m not sure … its (ns user) at the top which I’m guessing nothing actually requires#2016-06-3022:43hueypbut maybe it gets picked up just as the general scratchpad namespace?#2016-06-3022:44cflemingIt shouldn’t, but perhaps it’s being picked up because user is the default ns? I’m not sure.#2016-06-3022:44cflemingIs dev a source root?#2016-06-3022:44hueypyah, wondering that too#2016-06-3022:44cflemingi.e. marked in blue in the project view?#2016-06-3022:44hueypyah it is#2016-06-3022:44cflemingInteresting. I’ll try to reproduce this and see if I can figure it out.#2016-06-3022:46hueypthanks, it isn’t a huge deal, and I’ll try and see what triggers it. the actual error is an error about aliasing stuff (one of the requires)#2016-07-0105:28danielohrlund@cfleming: of course, sorry for not including that in the first place! in a .clj-file:
(->> some
     broken
     example)
in a .cljs-file:
(->> some
  broken
  example)
#2016-07-0115:43imrea question to cursive users: do you use the "move forward/backward into/out of sexp" commands?#2016-07-0115:44imreand another one, maybe for @cfleming : is there a command that would require the current file's namespace in the repl but wouldn't switch to it?#2016-07-0200:24danielcompton@imre I use forward and backwards lots, I haven’t got as used to into/out of sexp commands. I have them bound, but just don’t use them as often#2016-07-0200:26danielcomptonhere’s my config FWIW#2016-07-0203:09bvulpesimre: C-c C-k does what you want, i believe#2016-07-0203:09bvulpeser#2016-07-0203:09bvulpesi'm in #cursive#2016-07-0203:09bvulpesscuse me#2016-07-0203:09cfleming@bvulpes: You’ll need soap and vinegar for that potty mouth#2016-07-0203:10bvulpessry sry disregard#2016-07-0203:10cflemingHehe#2016-07-0217:47gborghiI am using cursive on ubuntu 16.04, am having problems defining custom keybindings... it does not let me edit the keybindings list... do you have any idea on how to fix this?#2016-07-0220:17montanonicHow might I get rid of all of the cider namespaces popping up in code autocomplete suggestions? It frustratingly takes up like half of the territory.#2016-07-0320:45montanonicWith Parinfer on, the following code:
((juxt (partial reductions move) (partial reductions mirror))
      [0 0]
      movements)
continuously gets 'corrected' to:
((juxt (partial reductions move) (partial reductions mirror)
      [0 0]
      movements))
In which the two values become arguments (and therefore functions) for juxt, rather than arguments for the result of juxt. So far, this is the only time Parinfer has failed me, but this forced me to disable it entirely for this particular file. If there's a way to tell the structural editing system to ignore a block of code that'd be great.
#2016-07-0522:45danielcomptonThe mailing list software breaks all the links on https://cursive-ide.com/archive/2068.html 😞#2016-07-0603:00cfleming@danielcompton: Fixed, thanks.#2016-07-0603:01cflemingBetter looking archives soon.#2016-07-0605:49moizsjIs there a kill command or action that won't also copy to the buffer?#2016-07-0605:50moizsjAnd also is there a copy sexp action? (without having to kill it)#2016-07-0605:50moizsj@cfleming: ^#2016-07-0605:50cfleming@moizsj: There isn’t a kill without copy, no.#2016-07-0605:51cflemingNor a copy sexp, although there you can use expand selection to select it and then copy.#2016-07-0605:51cflemingThere’s an issue about that one, I think.#2016-07-0606:20moizsjthanks @cfleming#2016-07-0619:44joshgI just upgraded to the latest EAP and I’m getting a StackOverflowError when opening a project#2016-07-0619:45joshgI’m running Cursive 1.3.0-rc1-2016.2 on 2016.2#2016-07-0623:33cfleming@joshg: Thanks for the repro case, I’ll fix that.#2016-07-0816:23rauhJust realized a "Grow selection" on something, then followed by a "splice" is basically a "raise". Nice, now I don't need a key for "raise" anymore. 🙂#2016-07-1106:22moizsj@cfleming: UI freeze issue (had reported a similar one earlier but its not exactly the same). also attached a thread dump. https://github.com/cursive-ide/cursive/issues/1457#2016-07-1115:50danboykisanybody run into an Run Configuration Error: No working directory specified when creating a REPL for a new project using 1.3.0-rc1-2016.1?#2016-07-1115:51danboykisI am getting Error running REPL: Working directory /Applications/IntelliJ IDEA.app/Contents/bin does not exist when trying to run a newly created REPL in the event log#2016-07-1115:51danboykisI checked and the directory most certainly exists#2016-07-1115:53danboykishmm never mind, I think it's because I had other cursive repls open in different projects...#2016-07-1213:56sveriI just had a similar error as @danboykis I just created a new leiningen project, opened intellij, updated cursive, restart, create a new local REPL configuration where it should run nREPL with leiningen. The error was: Error running config: working directory /home/sveri does not exist. Fun fact, in this mode I cannot edit the working directory, I had to switch to "use nREPL in normal JVM process", then set the working dir to my project dir and switch back to "run nREPL with leiningen". Now the error is gone and I can run everything as expected#2016-07-1214:06danboykis@sveri: yeah it's a weird error, i'm glad someone could confirm it and it's not something weird about my setup#2016-07-1214:16sveriIndeed, the first time I saw it 🙂 @cfleming: Did you hear of it already?#2016-07-1222:58cfleming@sveri: @danboykis: No, this is the first I’ve heard of it. I’ll try to reproduce this. I don’t have the code open here but IIRC the working directory for Lein projects is automatically set to where the lein project is, since using lein itself AFAIK you can’t run from anywhere else.#2016-07-1402:57ckarlsencan anyone recommend some nice intellij color themes? I usually switch between default darcula and borealis-cursive-theme, but a little bit tired of both at the moment 🙂#2016-07-1402:57danielcomptonI like solarized#2016-07-1402:57danielcomptonEverywhere#2016-07-1402:57danielcomptonI’d have solarized wallpaper on the house if my wife would allow it#2016-07-1402:58ckarlsenlol 🙂#2016-07-1402:59ckarlsenI haven't used it since the horror days of vim+fireplace#2016-07-1402:59ckarlsenshould maybe try it in cursive as well#2016-07-1408:43jmayaalv@ckarlsen: i like borealis a lot: https://github.com/Misophistful/borealis-cursive-theme#2016-07-1408:49imreanyone know an option with a light background?#2016-07-1408:53cflemingI’m a plain default black-on-white man myself, so I can’t offer any advice here sorry.#2016-07-1413:08ckarlsenis it possible to configure code completion to not trigger when I use the #_ comment macro?#2016-07-1414:42nwjsmithI'm having trouble with the new Cursive/IntelliJ and auto-closing parens, it looks like this: https://dl.dropboxusercontent.com/s/i3ct3ft3mv2vo0w/EB9386DA-A0A6-4F9E-958A-77E0343D2D2B-74678-000085ADA9EBA448.gif?dl=0#2016-07-1414:42nwjsmithNot sure how to describe it really. Sometimes the auto-close doesn't happen, and when I switch lines it comes back#2016-07-1414:42nwjsmithI'm using parinfer#2016-07-1414:43nwjsmith@sveri @cfleming I had this error yesterday too, I did the same thing to fix it#2016-07-1500:50chrisdevo@ckarlsen: http://www.decodified.com/misc/2011/06/15/blueforest-a-dark-color-scheme-for-intellij-idea.html#2016-07-1502:30nwjsmith@tap: in the history here, sveri has a workaround#2016-07-1502:31nwjsmithEdit your run configuration to run in a normal jvm process then switch it back#2016-07-1502:31nwjsmithI had the same issue#2016-07-1502:51tap@nwjsmith: Thanks for pointing out. It fixes the issue for me too. I was in rush, didn’t scroll back to read. Thanks again#2016-07-1510:41michaelrhmm#2016-07-1510:42michaelrthere used to be a button to wrap text in repl output pane#2016-07-1510:42michaelrlooks like it's gone in latest version#2016-07-1510:42michaelrwhat am i missing?#2016-07-1511:05imre@michaelr now that you mention it's gone from mine too#2016-07-1511:05imrefortunately there's a command on ctrl shift a#2016-07-1511:05imreactive editor: use soft wraps#2016-07-1511:06michaelrimre: nice 🙂#2016-07-1517:59nwjsmithIs there a way to roll back to the previous version of Cursive? I've come across a couple of bugs in 1.3.0 that make it difficult to work with.#2016-07-1601:14cfleming@nwjsmith: Yes, go to https://plugins.jetbrains.com/plugin/8090?pr=&amp;showAllUpdates=true, choose the previous version you’d like to download for the version of IntelliJ you’re on, download it and install it with Settings-&gt;Plugins-&gt;Install from Disk#2016-07-1601:16cflemingOddly enough, 1.2.7 doesn’t appear there, I don’t know why. If you let me know which IntelliJ version you’re on I can build one and put it somewhere for you.#2016-07-1601:17cfleming@michaelr: That’s very strange. It’s definitely disappeared, I’ll investigate that.#2016-07-1601:17cfleming@nwjsmith: A few people have reported the parinfer issue, thanks for filing those. I’ll see if I can reproduce that and fix it.#2016-07-1601:50nwjsmith@cfleming: thanks Colin. I'm running IntelliJ 2016.2#2016-07-1604:57elahtiIs it an IDEA or a Cursive feature that IDEA's "make project" sometimes places cljs files into target/classes? Easiest way to reproduce is just to clean the whole project (from command line with lein clean) and then hit the "make project" button from IDEA. This broke my figwheel as it saw the same cljs file in two different locations (src/cljs and target/classes) and wasn't then able to push the changes to my client. I was able to resolve this by just disabling the "make project" from my clojure repl config. It's on by default and I don't 100% understand if there'll be some issues by disabling it.#2016-07-1604:58elahtiMy cljs directories are only configured as source dirs for the cljsbuild of course.#2016-07-1607:41cfleming@nwjsmith: Unfortunately you’re out of luck I’m afraid - the 1.3.0 series is the first to support 2016.2.#2016-07-1723:42cfleming@michaelr: https://github.com/cursive-ide/cursive/issues/1466#2016-07-1814:12wasser@cfleming: Just wanted to say how much Cursive is adding to my “flow.” Having parinfer also work in the REPL is especially sweet!#2016-07-1904:18moizsj@cfleming: request to re-open. added fresh stacktrace (after disabling kotlin). see latest comment too. https://github.com/cursive-ide/cursive/issues/1457#2016-07-1910:06madvasHas anybody met this error when trying to run REPL? Error running REPL for <project name>: Invalid javascript engine (javascript)#2016-07-1910:48madvasIt’s obviously because of lein less, but when I try lein repl or lein less once it works, throws error only in Cursive#2016-07-1910:49madvasI have java 1.8.0_91#2016-07-1923:03hlshipAre there any limitations on the debugger & locals clearing? I’m using the debugger, the prevent locals clearing button is clicked, but I’m still seeing all my locals set to nil. JDK 1.8, Cursive 1.3.0-rc1-2016.2.#2016-07-1923:03hlshipMaybe its a timing thing; I reloaded the namespace I was debugging, now I see the expected locals.#2016-07-1923:04hlshipPerhaps the disable locals clearning button doesn’t take effect soon enough on startup? That is, code could be loaded (say, by user.clj) where locals are still cleared?#2016-07-1923:12cfleming@moizsj: I’ve actually closed that since it’s a dupe of 1246. Are both of those from the same project?#2016-07-1923:13cfleming@wasser: Thanks! I’m glad it’s helping you out.#2016-07-1923:15cfleming@hlship: I’ve noticed this from time to time too. I don’t think it’s a timing thing - is your code usually AOT compiled?#2016-07-1923:15hlshipNo, shouldn’t be aot compiled.#2016-07-1923:15cflemingHmm, interesting.#2016-07-1923:16hlshipBut run as normal process, not via leiningen, because of our project structure#2016-07-1923:17cflemingI don’t think that should affect things, but it’s possible there’s a bug there - I’ll look.#2016-07-1923:17cflemingI’ve noticed this with my code from time to time recently but haven’t investigated it.#2016-07-1923:18cflemingIn my case I believe it was caused by switching to use Gradle.#2016-07-1923:20cfleming@madvas: I’ve never seen that, but I suspect that is caused by the JVM that IntelliJ uses to run the IDE.#2016-07-1923:20cflemingIt’s not a full JDK, it’s a JRE with tools.jar available, but it may not have Nashorn available, which is what I guess the less plugin is trying to use.#2016-07-1923:22cflemingYou can select another 1.8 JDK to use by executing the command "Switch IDE boot JDK", but depending on your platform that will probably make your fonts look like crap 😞#2016-07-1923:32cfleming@moizsj: My theory is that there’s something funky in your project which is causing that error. It’s in the code which finds cycles in the namespace dependency graph. Is your project somewhere I can look at it to see what’s going on?#2016-07-2004:17moizsj@cfleming: yes same project (pretty large one), and no its not public code. i run into it almost every time i try to use the auto complete. now i pretty much avoid using auto complete.#2016-07-2005:04cfleming@moizsj: Ok, we can’t have that - I’ll think about something we could use to diagnose that.#2016-07-2005:07moizsj@cfleming: correction - avoid using auto-complete where it'll involve an auto require#2016-07-2014:48sashtonHas anyone tried using lein-shorthand in Cursive? It works as expected from the command line (`lein repl`), but not in the Cursive repl#2016-07-2014:49sashtonCursive:
(./pprint 3)
CompilerException java.lang.RuntimeException: No such namespace: . 
lein repl:
user=> (./pprint 3)
3
nil
user=>
#2016-07-2021:07kidpolloAlt+enter the first symbol on the form and Click on the menu to configure identation#2016-07-2021:12madvasI see, it’s Code Style -> Clojure -> Form Parameters#2016-07-2021:12madvasthanks#2016-07-2100:13cfleming@madvas: Currently there’s no way of setting the indent of will-mount directly, no. Which defcomponent is that you’re using there?#2016-07-2108:48danielohrlundI have this problem with indentation of threading macros where it works in .clj files but not in .cljs files:#2016-07-2108:49danielohrlund^ on the image I also tried to cmd + b on the ->> in a cljs file, and as you can see it cannot find the definition but if I do the same thing in a .clj file it opens the macro definition in clojure core.cljs. EDIT: ->> definition can now be found (fixed by re-adding the project.clj) but the indentation issue is still there#2016-07-2108:50danielohrlundso its likely some kind of misconfiguration from my side, any ideas on how to solve it?#2016-07-2110:32dominicm@cfleming: In the will-mount/defcomponent example, how does Cursive know which forms to treat as special? Is there a list somewhere? The defcomponent was om-tools#2016-07-2121:11danboykisanybody using 2016.2 IDEA with Cursive? I am thinking of upgrading from 2016.1.3#2016-07-2121:26nwjsmithI am, and have seen some bugs. Might want to hold out until 1.3.1-eap#2016-07-2121:32cfleming@nwjsmith: @danboykis: That should hopefully be out today.#2016-07-2121:33danboykislooking forward to it#2016-07-2217:45dominicm@cfleming: I think you may have missed my previous message. https://clojurians.slack.com/archives/cursive/p1469097162000049#2016-07-2217:46dominicmI'm interested in unifying cursive, Emacs and Vim in behavior.#2016-07-2220:35jeffh-fpError running REPL: Working directory /Applications/IntelliJ IDEA.app/Contents/bin does not exist Weird error message I got... realized I hadn't installed Leiningen. Oops 🙂#2016-07-2222:21cfleming@jeffh-fp: That’s a bug, fixed in the next build.#2016-07-2222:23cfleming@dominicm: Yes, there’s a list internally in Cursive. I’m going to add another option to the formatting customisation, to allow forms to be configured like defrecord#2016-07-2300:08meta-metaWhat is the preferred way to run a REPL with lein-figwheel? This method was last updated in April. https://github.com/bhauman/lein-figwheel/wiki/Running-figwheel-in-a-Cursive-Clojure-REPL It works, but as a total n00b I'm wondering what am I missing out on by not using nREPL?#2016-07-2300:09meta-metaAre these instructions relevant to Cursive? https://github.com/bhauman/lein-figwheel/wiki/Using-the-Figwheel-REPL-within-NRepl#2016-07-2309:04dominicm@cfleming: Thanks for the info! 🙂#2016-07-2503:37cfleming@nwjsmith: @danboykis: Sorry for the delay, 1.3.1-eap1 is out now.#2016-07-2506:58tapI got this error on 1.3.1-eap1 when trying to load a clj file that requires cljc file internally
Error evaluating - class java.lang.ClassCastException: com.intellij.openapi.vfs.newvfs.impl.VirtualFileImpl cannot be cast to java.lang.Comparable
More details here https://github.com/cursive-ide/cursive/issues/1472
#2016-07-2507:24cfleming@tap: Thanks for the great repro case, I’ll fix this ASAP.#2016-07-2507:25tapNo problem#2016-07-2507:35danielcomptonme too#2016-07-2507:36danielcomptonin unrelated news, what’s the easiest way to roll back a version of Cursive?#2016-07-2507:57cfleminghttps://plugins.jetbrains.com/plugin/8090?pr=&amp;showAllUpdates=true, download the version you want and install from disk#2016-07-2507:58cflemingI need to add that back to the doc actually, I had it in there but didn’t update it after changing the plugin download method.#2016-07-2507:58cfleming@danielcompton: ^^#2016-07-2507:58danielcomptonta#2016-07-2510:07cfleming@tap: 1.3.1-eap2 is out with that fix - thanks again for the repro case.#2016-07-2510:12danielcomptonWhat was the cause of the bug?#2016-07-2510:46cflemingMe changing something after testing and then not re-testing everything :-(#2016-07-2510:49cflemingTechnically, I added a new algorithm for detecting namespace cycles, since the old one was O(MG) for large namespace graphs. The new one requires nodes to be comparable, which files aren't.#2016-07-2609:08adamwHi folks, is there a way to let cursive automatically pick up the .nrepl-port in a maven project (not leiningen)? I seem to remember this used to work, but in recent versions has broken.#2016-07-2609:10adamwI don't seem to see an issue for it in the github repo, should I open one?#2016-07-2609:10adamwI just updated to 1.3.1-eap2#2016-07-2609:12cfleming@adamw: There’s no way to do this, no. How would that file get generated in a Maven project? It’s created by lein.#2016-07-2609:14adamw@cfleming: seems to be created by the boot repl task when starting a remote repl server#2016-07-2609:15adamwhttps://github.com/tailrecursion/boot.core/blob/master/src/tailrecursion/boot/core/task/repl.clj#L25#2016-07-2609:17cfleming@adamw: I see. I can enable that - could you file an issue?#2016-07-2609:21adamw@cfleming: certainly, thank you very much. https://github.com/cursive-ide/cursive/issues/1473#2016-07-2609:21cfleming@adamw: Thanks!#2016-07-2711:19dmi3yGetting this error on 2016.2.1 EAP and Cursive 1.3.0-2016.2 while trying to open a Lein project
Throwable: Conflicting component name 'LeiningenProjectsManager': class de.janthomae.leiningenplugin.project.LeiningenProjectsManager and class cursive.leiningen.project.LeiningenProjectsManager
#2016-07-2721:27danielcompton@dmi3y: do you have https://plugins.jetbrains.com/plugin/5029?pr=clion installed?#2016-07-2721:27danielcomptonCursive bundles that anyway, so you probably don’t need it#2016-07-2723:42cfleming@dmi3y: Right, as @danielcompton says, you have to uninstall the old lein plugin and La Clojure totally#2016-07-2723:42cflemingCursive originally bundled that plugin but there’s basically nothing left of it these days.#2016-07-2802:11danielcompton@cfleming: where is the setting for resolve-as kept? I’m trying to resolve a clojure async macro the same way that cljs.test/async is resolved#2016-07-2802:12cflemingI don’t think cljs.test/async has any resolution settings#2016-07-2802:12cflemingOne sec#2016-07-2802:13cflemingI lie, it does#2016-07-2802:14cfleming@danielcompton: See https://github.com/cursive-ide/cursive/issues/1440#issuecomment-232776904#2016-07-2802:14danielcomptonThanks#2016-07-2802:14danielcomptonI knew it was somewhere, but couldn’t remember where I’d seen it#2016-07-2802:14danielcomptonthought it was in Slack#2016-07-2802:17danielcomptonWhere is that directory on OS X?#2016-07-2802:17danielcomptonApplication Support and Preferences both don’t seem to have the config folder?#2016-07-2802:26cflemingPretty sure it’s ~/Library/Preferences/IntelliJIdea2016.2/options/#2016-07-2802:26cflemingThe file may not exist if you haven’t configured anything.#2016-07-2802:26danielcomptonah yep#2016-07-2802:37cfleming@danielcompton: If you fiddle with that file and add a modification which requires indexing more vars (i.e. not just local bindings), you’ll need to do a File->Invalidate Caches#2016-07-2802:37danielcomptonthanks#2016-07-2802:37danielcomptonwas wondering what to do#2016-07-2813:35kevinI’m getting the following error in IntelliJ’s Event Log quite often: "Unable to save settings: Failed to save settings. Please restart IntelliJ IDEA”. Nothing seems to stop working when that error shows up, but it's started happening quite regularly (hourly?) and I’m getting a little tired of restarting. Anybody else run into this / ideas how to fix it?#2016-07-2815:39cap10morganWith parinfer, is there a way to have it paste code at the level of the cursor rather than always pasting at column 1?#2016-07-2816:38snowellIs there a way (easy or otherwise) that I can reformat a big clojure map that’s all on one line (result of a (prn) call) into multiple lines? Cmd-Alt-L is telling me that it’s already properly formatted, which is technically correct, but it’s quite hard to read#2016-07-2816:41snowellWorked around via http://pretty-print.net, but that’s hardly a permanent solution 😄#2016-07-2816:47snowellIgnore me. cljs.pprint exists and is exactly what I wanted#2016-07-2819:28hjrnunesHi guys. On IC 2006.2 trying to get cursive updated. It was installed before, I updated IC, Cursive prompted me for my license, which I inserted, but it’s not working. IC prompts me to update to 1.2.7-2016.1 and when I do it, it downloads but does nothing. Doesn’t even prompt for reinstall. Any ideas?#2016-07-2819:30hjrnunesOk forget about it. It had some old repo url in there.#2016-07-2823:09cfleming@kevin: Do you have a better error in your main log file? Help->Show log in Finder/Explorer?#2016-07-2823:10cfleming@cap10morgan: Not now unfortunately, pasting is one of the things I need to fix up in parinfer.#2016-07-2823:14cap10morganOK, cool. Just wanted to make sure I wasn't missing a setting. Thanks!#2016-07-2909:42kevin@cfleming: I just dug through my logs … there are some errors but nothing which seems obviously relevant. Next time I see the error I’ll see if I can correlate that to an error in the log. Thanks!#2016-07-2911:42dominicm@cfleming: (continuing from #C053K90BR) I don't think cursive does work with hooks, because trampoline doesn't work with hooks, and cursive uses trampoline?#2016-07-2919:46kennyCan we get formatted map printing in the REPL again? In Clojure 1.9.0 maps are now printed using reader macros. For example, running this in the REPL gets printed like this:
{:db/id 1}
=> #:db{:id 1}
#2016-07-2920:42spiedenfyi downgraded from eap to release and problems went away#2016-07-2921:04cfleming@dominicm: Hmm, that’s interesting - I didn’t know that trampoline didn’t work with hooks. There was one case of that related to cljsbuild, but that was a cljsbuild problem and fixed there.#2016-07-2921:04cfleming@spieden: I’ll check that, thanks.#2016-07-2921:04cfleming@kenny: Oh, that’s a bummer. I’ll check that and fix it too.#2016-07-2921:05cflemingI’m really not a fan of the namespaced maps change.#2016-07-2921:05dominicmOh, I thought the issues were still open.#2016-07-2921:05dominicmand you were considering a patch to Leiningen#2016-07-2921:05dominicmBut didn't know it well enough#2016-07-2921:05dominicmThe best workaround you suggested was to use the nrepl from the cli#2016-07-2921:10spieden@cfleming: still deciding how i feel too. i guess it eliminates some visual noise#2016-07-2922:00cfleming@dominicm: Yeah, it was a nasty issue. Maria resolved it in cljsbuild a while back, I think recent versions include the fix.#2016-07-2922:35kennyAlso is there an issue about Cursive constantly wanting to import clojure.spec? Most of the time when I tab complete a Clojure spec fn/macro Cursive will pause for a moment then add the redundant [clojure.spec :as s] dependency.#2016-07-3001:15cfleming@kenny: Do you mean that it will require spec again even if it’s already required?#2016-07-3001:16kennyYes#2016-07-3001:16cflemingI’ll try that and see if I can reproduce it.#2016-07-3001:21kennyWhat's interesting is that I get duplicated of all clojure.spec auto completes. The one that causes the re-require is the one that says something like this coll-of [pred & opts] (clojure.spec :as s). Right below that one is another row that looks like this coll-of [pred & opts] (clojure.spec). If I hit enter on the second one I will not get clojure.spec re-required.#2016-07-3001:21kennyAlso probably relevant is this is a cljs and clj project so I have both Clojure and Clojurescript as deps.#2016-07-3001:48cflemingOk, does this happen when editing clj or cljs, or both?#2016-07-3001:49cfleming@kenny: ^^#2016-07-3001:50kennyI have only tried with clj. The cljs port of spec is too far behind to use right now.#2016-07-3001:50cflemingOk, thanks.#2016-07-3001:50cflemingCLJ should never require CLJS, but it’s possible there’s a bug there - that require code is complex, and I’m planning to revise it shortly.#2016-07-3001:52kennyI have not had that be a problem. I'm just wondering if it somehow has to do with Clojurescript's recent addition of aliasing Clojure namespaces to improve portability.#2016-07-3001:52kennyI'll try it in a clj only project and see if I get the same issue.#2016-07-3001:53kennyAlso, the project I am having the issue in is in cljc#2016-07-3001:55kennyMade a clj file in the same project and I am not having the issue. It would appear to only happen in cljc.#2016-07-3001:58kennyMinimal example: 1. Make myns/core.cljc. 2. Paste this
(ns myns.core
  (:require [clojure.spec :as s]))

(s/coll)
3. Place cursor after the last l in coll. 4. ctrl + space to open auto complete You should see two coll-of completions like I described before.
#2016-07-3003:23cfleming@kenny: That’s perfect, thanks.#2016-08-0111:32ilukinovhow to go back to stable releases not eap?#2016-08-0121:33cfleming@ilukinov: See the doc here: https://cursive-ide.com/userguide/#eap. That actually doesn’t make it clear that you can also choose to not receive them, but you can.#2016-08-0121:59danielcompton“Send form before caret to REPL” seems to require the form to be selected before it can be sent?
#2016-08-0122:00danielcomptonIs that right?#2016-08-0218:46hueypI just upgrade intellij / cursive on a new computer … when I highlight code and do parens, it replaces everything instead of wrap … I copied my keymaps over, and I’m not sure what this feature is called … but I live and die by it wrapping things 🙂#2016-08-0219:17manutter51@hueyp check under Editor > General > Smart Keys for a checkbox labelled “Surround selection on typing quote or brace"#2016-08-0220:09hueyp@manutter51: thanks!#2016-08-0223:09cfleming@danielcompton: No, that shouldn’t be required. Both the “Send form…” actions will send the selection instead of what they would normally do if you have text selected, but that shouldn’t be required.#2016-08-0223:10danielcomptonCan you replicate that issue?#2016-08-0223:10cflemingThanks @manutter51, that’s the one.#2016-08-0223:10cflemingI’ll try in a moment.#2016-08-0223:10danielcomptonNot sure if my keybindings are conflicting#2016-08-0223:10cflemingYou can check that in the keymap panel using Find Actions by Shortcut#2016-08-0223:11danielcomptonno conflicts that I can see#2016-08-0301:11cfleming@danielcompton: That seems to be working fine for me.#2016-08-0301:12cflemingJust to be clear, your caret needs to be at the end of the form you want to send, e.g. after the closing paren of a list.#2016-08-0301:24danielcomptonOhhhh#2016-08-0301:25danielcomptonI read “Send form before caret to REPL” as the one in front of it#2016-08-0301:25danielcomptonas in, this lies before me#2016-08-0317:02hlshipSo … is there a way to change Cursive such that, in paredit mode, an edit that would unbalance nesting would be rejected? Currently, you can select arbitrary text and delete (or replace it) and things go unbalanced. My Emacs friends say that is not possible there.#2016-08-0317:03hlshipI would prefer to see a transient bubble that said “Edit rejected: unbalanced” or some such.#2016-08-0317:03hlshipLikewise, should not go into paredit mode if source is not initially balanced.#2016-08-0317:03hlshipProbably tricky to do this I imagine, but would be very nice.#2016-08-0321:36danielcompton@hlship: the only way I know how to do this is to only select text with paredit commands, then it’s not possible to select text in an unbalanced way#2016-08-0322:21cfleming@hlship: No, there isn’t now but it’s something I’m considering. I’m not sure I can do it, though. Cut and paste is something else that would have to be intercepted, but that is definitely possible.#2016-08-0323:25cfleming@hlship: Just to be clear, your friends are saying that you cannot unbalance Clojure code in Emacs by selecting arbitrary text and deleting it?#2016-08-0323:26hlshipYes. They were just a bit smug about it.#2016-08-0323:26cflemingI don’t believe them.#2016-08-0323:27cflemingUnless things have changed since I last tried it.#2016-08-0323:27hlshipIt’s too late to check w/ Brandon, since he’s on east coast time.#2016-08-0323:27cflemingCertainly Emacs paredit doesn’t prevent it by default - there may be some new mode which helps with that.#2016-08-0323:27hlshipCould be; Brandon is a Spacemacs wizard.#2016-08-0323:28cflemingPerhaps he’s using lispy or something similar - that goes much further, but doesn’t work with arbitrary commands AFAIK. So as long as you only use lispy commands, your code will never be unbalanced.#2016-08-0323:28cflemingi.e. never use stock cut and paste.#2016-08-0401:00vermaopened a leiningen project and trying to run a repl session, I get this: Error running REPL: Working directory /Applications/IntelliJ IDEA.app/Contents/bin does not exist#2016-08-0401:00vermaany ideas what might be going on?#2016-08-0401:00vermathe directory does exist.#2016-08-0401:09vermainstalled 2016.2.1 which prompted for a cursive update which seems to have fixed it 😕#2016-08-0402:32tap@verma: yeah, it is fixed in recent 1.3.1 release https://github.com/cursive-ide/cursive/issues/1464#2016-08-0407:56alexrrrHi! short question is it possible to set environmet variables in Run/Debug configurations ? I have a projects that depends on a snapshot release so I must set the LEIN_SNAPSHOTS_IN_RELEASE and could not find it.#2016-08-0408:00alexrrrI know the REPL provides a spaces for envs, but could not figure this one out for my Leinigen uberjar task#2016-08-0417:54verma@tap: :thumbsup:#2016-08-0420:06hlshipCursive really gets confused/stuck when you rename a module in a multi-module project. Just can’t seem to deal with it, even after quitting, and after rebuilding indexes and restarting.#2016-08-0420:08hlshipHm. May have been a bad edit in a project.clj ...#2016-08-0421:11hueyphttps://cursive-ide.com/userguide/macros.html — resolve as def is amazing \o/#2016-08-0421:11hueypso much yellow went away!#2016-08-0513:08snowellCursive is flagging my transducers (in clojurescript) with “incorrect arity” errors, e.g., “Incorrect arity 1 for cljs.core/filter” Is this a known thing, an option I can check, or a bug I should file?#2016-08-0513:11snowellInterestingly enough, it’s not flagging ALL transducers. map with arity 1 seems to be just fine, but filter and mapcat are flagged#2016-08-0913:23kevin@cfleming: Hi. A week or two ago, I asked a question about the "Unable to save settings: Failed to save settings. Please restart IntelliJ IDEA” errors I’m getting regularly. You asked about errors in idea.log - I finally got around to digging that up (was AFK the last week or two): https://gist.github.com/KevinCorcoran/1c53c917348167499d653b19300e4c1f#2016-08-0913:23kevinI guess the good news is that the stacktrace doesn’t make it look like Cursive’s to blame#2016-08-0915:56cap10morganAnyone else getting nil language errors w/ latest cursive eap and latest IntelliJ?#2016-08-0919:02bnoguchiAnyone figure out a nice continuous testing setup for projects in Cursive?#2016-08-0920:29timgilbert@bnoguchi: in the past I've just opened a terminal window and run lein test-refresh inside of it, which was faster than running them from the command-line but had various other problems#2016-08-0920:30timgilbertUsing this: https://github.com/jakemcc/lein-test-refresh#2016-08-0920:36cfleming@hueyp: Glad that’s helping!#2016-08-0920:36cfleming@snowell: That’s very odd, I’ll try to reproduce that. Is that all with CLJS?#2016-08-0920:37cfleming@kevin: Ok, thanks. Cursive might be to blame there, if I’m storing something invalid in the config components - when IntelliJ comes to serialise them things might barf at that point. Unfortunately from that trace it’s pretty hard to work out what’s going on.#2016-08-0920:38cfleming@cap10morgan: Are you using Markdown, by any chance?#2016-08-0920:40cap10morgan@cfleming: yep!#2016-08-0920:40cfleming@cap10morgan: https://github.com/cursive-ide/cursive/issues/1256#issuecomment-237607592#2016-08-0920:40cflemingAre you actually embedding Clojure blocks in markdown, or just using normal Markdown files?#2016-08-0920:41cap10morganWe have some embedded clojure blocks, yeah#2016-08-0920:43cflemingOk, I’ll try to reproduce that. Which Markdown plugin are you using?#2016-08-0920:44timgilbertFWIW, I've been using the free version of Markdown Navigator to edit markdown with embedded Clojure and it works like a charm. I had various other gripes with the "markdown support" plugin and uninstalled it eventually#2016-08-1000:17bnoguchi@timgilbert: thanks!#2016-08-1011:27snowell@cfleming: Yes, it’s in a cljs source file. What’s even more odd is that removing lines AROUND the transducer somewhat randomly makes the red underline appear or disappear#2016-08-1011:27snowellLike adding/removing comments#2016-08-1016:31cap10morgan@cfleming: sorry for the delayed response. I'm using JetBrains' "Markdown support" plugin, version 2016.2.20160713.#2016-08-1018:40curlyfryAny updates on refactor: extract function? https://github.com/cursive-ide/cursive/issues/89#2016-08-1022:37cfleming@snowell: That is really strange. I’ll see if I can figure that out. Can you give me a snippet of a working and non-working case to try?#2016-08-1022:37cfleming@curlyfry: Not really - I’d love to get to it but haven’t done so yet.#2016-08-1022:38cflemingThe next refactorings I work on will probably be moving things around.#2016-08-1108:57curlyfry@cfleming: Ok, thanks for the reply!#2016-08-1121:21hlshipI really wish that the spot where you create a REPL command (which I just started using today) was also the place where you set the keystroke for it.#2016-08-1121:21hlshipI’m kind of doing it this: Alt-z is a prefix for all my REPL commands, then some other key (such as TAB to run tests).#2016-08-1121:24danielcomptonCan you explain further? Don’t quite follow#2016-08-1121:48hlshipOk two things: One, when I’m defining new REPL commands, I wish part of that UI included the ability to set the keyboard shortcut, as is done in the Key Map settings view.#2016-08-1121:49hlshipSecond: I’d love to see special case for a pattern where all the REPL commands are two strokes, with a universal first stroke (Alt-z, in my case) followed by an unmodified key for the particular command.#2016-08-1122:18tawonga(go#2016-08-1123:00danielcomptonWhat do you mean “special care”?#2016-08-1123:01danielcomptonlike the ability to define a REPL prefix key?#2016-08-1200:09cfleming@hlship: You mean you’d like to be able to define the keystroke when defining the command? That makes sense, sure. I’m also not sure what the special care part means, do you mean support for saying “All my keystrokes should be prefixed with alt-z”?#2016-08-1211:46snowell@cfleming: Here’s a snippet. Screenshot with red underlines to follow:
(def my-trans
  (comp
    (mapcat vals)
    (map second)))

; My transducer
(def my-transducer
  (comp
    (mapcat vals)
    (map second)))
#2016-08-1220:18cap10morganI just issued a PR to get solarized rainbow parens when using Cursive w/ solarized: https://github.com/jkaving/intellij-colors-solarized/pull/131#2016-08-1220:19cap10morganYou can, of course, add the diff into your own ~/Library/Preferences/IdeaIC2016.2/colors/Solarized*.icls files and restart to get them now.#2016-08-1221:28robOk, I fixed ☝️ by setting src/java as a source dir in Project Structure.#2016-08-1222:52cfleming@rob: If you do it manually like that, Cursive will overwrite it when it syncs your project. But if you’ve added it to your project.clj, Cursive should mark that dir as a source root anyway.#2016-08-1222:53cflemingOne thing - after adding the value to :java-source-paths you have to sync your project.clj, if you didn’t do that things should just work now it’s set.#2016-08-1222:59robah excellent, I didn’t do that, as I wasn’t aware that operation — I’ll check it out, thanks!#2016-08-1223:00cfleming@cap10morgan: Nice, thanks!#2016-08-1408:54danielcomptonHas the Leiningen project refresh command been decoupled from starting a new REPL? I seem to remember that starting a new REPL would reload the project.clj, causing any new dependencies (say from switching branches) to be resolved in Cursive. On the current version, this doesn’t seem to happen.#2016-08-1423:57cfleming@danielcompton: No, I don’t think this ever happened, actually. The REPL will definitely use the new deps, but they won’t be synced back to Cursive.#2016-08-1602:38cflemingCursive 1.4.0-eap1 is out now. Read all about it here: https://cursive-ide.com/archive/2129.html#2016-08-1602:39cflemingI’m interested in feedback on the new stubs functionality, still half baked but hopefully useful especially for you datomic folk.#2016-08-1609:40curlyfryHas anyone been able to do this https://github.com/bhauman/lein-figwheel/wiki/Running-figwheel-in-a-Cursive-Clojure-REPL without removing lein-figwheel? It would be nice to still be able to do lein figwheel#2016-08-1609:42rarous@curlyfry: I have both, did not run to any issue#2016-08-1609:58curlyfry@rarous: Cool, thanks! How did you configure it to use the correct project.clj profiles (for example, devand figwheel)?#2016-08-1610:01rarous@curlyfry: I have only figwheel-sidecar dependency in :dev profile, nothing special I’m aware of#2016-08-1610:01rarousit just worked#2016-08-1618:01spiedenexcited for 1.4.0 — can make my unresolved symbol styling loud again 😃#2016-08-1618:36ckarlsenshould I file an issue for this ?#2016-08-1621:19sandbagsHrmm.. is there some way around “Cannot load ClojureScript form into Clojure REPL” ?#2016-08-1621:21sandbagsthe form i want to play with is pure Clojure#2016-08-1621:24sandbagsperhaps there is a way of starting a Planck REPL instead?#2016-08-1621:25sandbagsoh i never noticed the little clj|cljs drop-down in the REPL window#2016-08-1621:26sandbagshrmmm but simply switching the repl type isn’t the answer it seems… thought that was too easy#2016-08-1621:48kenny@sandbags: If your file is cljc you can load the file in a Clojure REPL, otherwise you need to run a cljs repl.#2016-08-1621:57sandbagsright it just seems a bit odd that it prevents me from evaluating code, i appreciate some code may not work#2016-08-1621:57sandbagshey ho#2016-08-1621:59sandbagshrmm… i don’t see add cljs repl as an option#2016-08-1701:09cfleming@ckarlsen: Yes please#2016-08-1701:10cfleming@sandbags: That’s to prevent people from accidentally sending code to the wrong REPL, which happened a lot.#2016-08-1701:10cflemingYou can always cut+paste the code to the REPL editor in case of emergency#2016-08-1708:08pupenoIn this snippet of code:#2016-08-1708:09pupenoWhat’s the paraedit way of pushing the let inside the function definition?#2016-08-1708:46cfleming@pupeno: I don’t think there’s a good way to do that, unfortunately. I’d kill the fn [data], raise the (assoc-in… and then wrap the whole thing and paste the fn [data] again. Not very elegant. Paredit proper has transpose-sexp which I think does that, but I couldn’t find any useful examples online of how it should work.#2016-08-1713:07rauhJust generated some stubs.... Unsuccessfully. Gave me a few errors at first, which I fixed. Eventually only gave me warnings and the window "note" (at the top) for generating stubs disappeared. But it seems to not do any "Quick Doc" for Datomic. Do I have to do anything else?#2016-08-1718:38cfleming@rauh: You shouldn’t, no. Could you try closing and opening your project? I’ve seen a couple of issues where IJ doesn’t pick up new stubs.#2016-08-1719:30rauh@cfleming: A restart just broke about everything in IJ, it's loading and then just not displaying anything besided the top menu#2016-08-1719:31rauhInvalidate and restart fixed it. Now checking the stubs. Edit: Quick docs works. YES! 🙂#2016-08-1723:33cfleming@rauh: Well, I’m sorry about the restart issue, but I’m glad it’s working! I have to figure out a reliable way to ensure the stubs are picked up after being added.#2016-08-1804:13onetomI was seeing this message after the latest IntelliJ & Cursive updates > Your project requires namespaces which need stubs to be generated BUT 1. it was not clear it was coming from Cursive and not IntelliJ 2. I was trying to google the message but nothing found 3. Finally I found the https://cursive-ide.com/archive/2129.html email here slack when i searched for stubs I think it would be good to mention the full message somewhere (on the mailing list for example), so it's easier to track down what is it about#2016-08-1804:28cfleming@onetom: It does mention namespaces which suggests Cursive, but yes, fair point.#2016-08-1804:28cflemingThat message has been confusing for people who didn’t see the release announcement, I’m not sure what the best place to put info about it is.#2016-08-1804:29cflemingI’ll be adding this to the documentation once the feature is stable, at that point it should be easier to Google.#2016-08-1804:34onetomindeed, the mention of namespaces gives it away... thanks for the feedback. actually the message will appear on https://clojurians-log.clojureverse.org/cursive/2016-08-18.html soon; that should be enough#2016-08-1804:35onetomamazing work, btw thanks for all these efforts in the name of the team#2016-08-1804:36cflemingNo problem, hopefully this will be helpful!#2016-08-1804:37cflemingIt’ll hopefully allow good support of libraries that are very difficult right now.#2016-08-1804:39onetomthat datomic stub jar you made earlier was actually a satisfactory solution.#2016-08-1804:40onetomsetting javelin defc, defc= and hoplon defelem to be treated as defs are also good enough#2016-08-1804:41onetomwhere are these settings stored, btw?#2016-08-1804:41onetomis it possible to version control it with our projects?#2016-08-1804:41cflemingYes, although various people mentioned that the jar solution was annoying when using cloud hosted CI solutions.#2016-08-1804:41cflemingActually, hoplon is one that this support might help for as well, I haven’t looked at it yet though.#2016-08-1804:42cflemingCurrently they’re stored IDE-wide, because I figured that you would not want to have to set them up per-project every time you create a new project.#2016-08-1804:43cflemingThose settings can be shared between users by using the settings repository plugin, although I haven’t tried it.#2016-08-1804:43cflemingI’ll try to test that out soon, since it’s a very reasonable thing to want to do.#2016-08-1804:48onetomthe settings repo plugin needs a jetbrains account though, right?#2016-08-1804:49onetomah, you were referring to this plugin, right: https://github.com/develar/settings-repository#2016-08-1805:01cfleming@onetom: Right, that’s the one, it’s built in.#2016-08-1805:02cflemingSo it’s documented in the official IntelliJ docs#2016-08-1918:27kenny@cfleming bar is marked as cannot be resolved in this example:
(let [{:keys [foo/bar]
       :or   {bar 1}} {}]
  bar)
Previously you could get around this by doing:
(let [{:keys [foo/bar]
       :or   {foo/bar [1]}} {}]
  bar)
However that behavior was accidental and broken. It is removed from clojure 1.9.0. Per Alex Miller: > the keys of the :or should always be the symbols to bind locally (not keywords or qualified symbols)
#2016-08-1918:39Alex Miller (Clojure team)it’s unfortunate that this is version dependent, but it is. I consider supplying :or defaults for namespaced keys to be broken prior to 1.9.0-alpha8.#2016-08-1919:08cfleming@kenny: Can you file an issue for that? I’ll fix it for the next release as part of updating some things for 1.9.0.#2016-08-1919:08kennyWill do#2016-08-1919:09kennyDone: https://github.com/cursive-ide/cursive/issues/1495#2016-08-1919:10cflemingAwesome, thanks!#2016-08-1920:47chrisjd@cfleming Just wanted to say a big thanks for making Cursive as great as it is. It’s a pleasure to use such a polished tool that the author obviously, genuinely cares about.#2016-08-1923:31curlyfryVery much agreed!#2016-08-1923:41hlshipHave an odd thing … in one of my projects, I don’t get pass/fail test markers on my functions. In others, it works.#2016-08-1923:46hlshipOh, that’s right. It’s the difference between launching using Leiningen, and launching using JVM process, right?#2016-08-1923:46hlshipMostly, I launch in JVM because I have these ugly mutli-projects.#2016-08-2003:20cfleming@chrisjd: @curlyfry: Thanks! I appreciate it, it’s always great to hear that people are liking Cursive! I do indeed have a lot of fun working on it.#2016-08-2003:21cfleming@hlship: The test markers should work either way, I think - it’s possible that one way or another the classpath is created differently, such that Cursive can’t find the file? Not sure.#2016-08-2003:22cflemingAny more details might be useful in tracking it down - could you post (or send privately if you prefer) details of the two run configs and I’ll try to reproduce.#2016-08-2201:10atrocheand you can use the keyboard to do it here: https://stackoverflow.com/questions/25065535/intellij-idea-hotkey-for-scroll-from-source#2016-08-2201:10atrochewish I’d know about it a year ago 🙂#2016-08-2201:20cflemingYeah, IntelliJ is big enough that I still learn new things about it all the time#2016-08-2201:43cflemingWhenever I encounter some fairly complex piece of functionality that I never knew was there, I always spare a thought for the poor devs who write and maintain all this functionality that so many people never find 🙂#2016-08-2201:45cflemingHelp-&gt;Productivity Guide is actually really useful for finding features you never knew about. Sort by “Used” and check out all the “Never”s. Cursive doesn’t participate in this yet unfortunately, but there’s lots to find in there anyway.#2016-08-2204:45onetomI see the Symbol Resolution list in /Users/pair/Library/Preferences/IntelliJIdea2016.2/options/ClojureResolveSettings.xml but that doesn't seem to be shared via the IntelliJ Settings Repository#2016-08-2212:45jcromartie@atroche :thumbsup: that little button is extremely useful, thanks#2016-08-2212:45jcromartieI've been having trouble launching a project using Cursive. I can run it with "lein repl" in the terminal, or "lein repl :headless" and connect remotely#2016-08-2212:45jcromartiebut I'd like to just have a one-click solution from IntelliJ#2016-08-2212:47jcromartieit just says "8:46:33 AM Error running REPL for [project name]: Error creating JavaParameters"#2016-08-2212:59jcromartieis there a more extensive log?#2016-08-2213:01jcromartiea ha, Help > Show Log files...#2016-08-2218:10hlshipI just used the resolve as … intention to clue Cursive into a custom defcheck macro. Bravo!#2016-08-2300:34cfleming@jcromartie: Great, were you able to figure out the problem with the log? If not feel free to send it over, either here or at <mailto:/cdn-cgi/l/email-protection|/cdn-cgi/l/email-protection>#2016-08-2300:35cfleming@onetom: Ok, I need to investigate that since several people have asked about it. I’ll let you know what I find, I might need to tweak something.#2016-08-2301:32danielcompton@cfleming is it easily possible to extend the ‘resolve-as’ to arbitrary Clojure symbols?#2016-08-2301:32danielcomptonwhere you can just type to select#2016-08-2301:48cfleming@danielcompton: Technically yes, I just went conservative because I wasn’t sure if that would be a good idea.#2016-08-2301:48danielcomptonThere’s been a few others I’ve wanted, will make a list of them as they come up#2016-08-2420:55potetmAnyone else getting a constant "Your project requires namespaces which need stubs to be generated"?#2016-08-2420:56potetmI did that last week at some point. Worked fine. Today it's just showing up non-stop. Clicking once gives me an NPE. Clicking again makes it do something for a short time (like ~10s), and then the message shows up again.#2016-08-2421:19kenny@potetm Did you try Invalidate caches and restart?#2016-08-2421:20potetmNo. Good idea.#2016-08-2421:25potetmNo luck. 😞#2016-08-2421:34Madara UchihaHowdy!#2016-08-2421:35Madara UchihaI'm just getting started with Clojure and following the "Clojure for the Brave and True" book#2016-08-2421:35Madara UchihaOne of the examples shows the use of (Integer. some-string) which I understand sort of translates into the Java new Integer(someString)#2016-08-2421:36Madara UchihaBut the IDE marks Integer. as unresolved#2016-08-2421:36Madara UchihaIs this a known thing? Or am I doing something wrong?#2016-08-2421:36Madara UchihaIt does work in the REPL and when I run the script file itself.#2016-08-2422:20bfabry@madarauchiha what's the error message the ide is giving you?#2016-08-2422:54danielcompton@madarauchiha if you look at Parameter Info you’ll see#2016-08-2422:55danielcomptonNotice there’s arities with the same number of args#2016-08-2422:55danielcomptonJava can distinguish this by the type of the args, but Clojure as a dynamically typed language can't#2016-08-2422:55danielcomptonIt will figure it out from reflection at runtime#2016-08-2422:56danielcomptonTo fix this, add a type hint, either to your def, or in the call#2016-08-2423:01danielcomptonhttps://github.com/cursive-ide/cursive/issues/1504#2016-08-2423:03cfleming@potetm: Yes, that’s new in the latest EAP, see https://cursive-ide.com/archive/2129.html#2016-08-2423:04cflemingThe problem is the error you’re receiving trying to generate the stubs.#2016-08-2423:08cfleming@danielcompton: Cursive actually already does flow that info, but currently models what Clojure does, and Clojure doesn’t automatically add a tag to def based on the type of a simple expression.#2016-08-2423:09cflemingCursive could retain that info and prompt to add a hint, as you suggest.#2016-08-2423:11danielcomptonI think the reagent thing is a subtly different issue again#2016-08-2423:11danielcomptonas type hinting Clojure expressions when dereffing won’t mean anything?#2016-08-2500:02cflemingRight, I have plans to improve the interop there - things like marking type hints when they’re not required, for example.#2016-08-2500:03cflemingAnd quickfixes to add them either at the point of use or definition.#2016-08-2500:04cfleming@danielcompton One problem with that issue (I’ll comment over there) is that CLJS currently has no inference at all.#2016-08-2500:04cflemingBecause there there are no type hints etc - it would require a global algorithm. I have plans to investigate whether some of the JS type inference algorithms would work well (e.g. Tern)#2016-08-2500:06danielcomptonThat could be good, as it looks like they support JSDoc#2016-08-2500:06danielcomptonwhich is used throught Closure, and is being added to CLJS#2016-08-2500:07danielcomptonhttp://clojurescript.org/reference/compile-time-type-checking#2016-08-2500:07cflemingYes, it does.#2016-08-2502:23potetm@cfleming Yeah I noticed the feature. And it worked fine up until today. But now I get a NPE every single time I click the button.#2016-08-2502:24potetmAnd I can't get the banner to go away, which is pretty distracting.#2016-08-2502:24cflemingCan you send a copy of the NPE?#2016-08-2502:24cfleming@potetm: ^^#2016-08-2502:24potetmprivate message, github, or here?#2016-08-2502:25cflemingThere is one problem where even if the stubs are generated, sometimes IntelliJ doesn’t pick them up. Closing and re-opening the project seems to work for that case.#2016-08-2502:25cflemingHere is fine if it doesn’t contain anything sensitive.#2016-08-2502:25potetm
null
java.lang.NullPointerException
	at java.io.File.<init>(File.java:317)
	at cursive.stubs$cljs_namespaces_form$fn__12313.invoke(stubs.clj:145)
	at clojure.core$map$fn__4553.invoke(core.clj:2624)
	at clojure.lang.LazySeq.sval(LazySeq.java:40)
	at clojure.lang.LazySeq.seq(LazySeq.java:49)
	at clojure.lang.RT.seq(RT.java:507)
	at clojure.core$seq__4128.invoke(core.clj:137)
	at clojure.core$concat$cat__4217$fn__4218.invoke(core.clj:700)
	at clojure.lang.LazySeq.sval(LazySeq.java:40)
	at clojure.lang.LazySeq.seq(LazySeq.java:56)
	at clojure.lang.Cons.next(Cons.java:39)
	at clojure.lang.RT.next(RT.java:674)
	at clojure.core$next__4112.invoke(core.clj:64)
	at clojure.core$nthnext.invoke(core.clj:3038)
	at clojure.core$print_sequential.invoke(core_print.clj:58)
	at clojure.core$fn__5839.invoke(core_print.clj:155)
	at clojure.lang.MultiFn.invoke(MultiFn.java:233)
	at clojure.core$pr_on.invoke(core.clj:3548)
	at clojure.core$print_sequential.invoke(core_print.clj:59)
	at clojure.core$fn__5839.invoke(core_print.clj:155)
	at clojure.lang.MultiFn.invoke(MultiFn.java:233)
	at clojure.core$pr_on.invoke(core.clj:3548)
	at clojure.core$pr.invoke(core.clj:3560)
	at clojure.lang.AFn.applyToHelper(AFn.java:154)
	at clojure.lang.RestFn.applyTo(RestFn.java:132)
	at clojure.core$apply.invoke(core.clj:630)
	at clojure.core$pr_str.doInvoke(core.clj:4563)
	at clojure.lang.RestFn.invoke(RestFn.java:408)
	at cursive.stubs$cljs_namespaces_form.invoke(stubs.clj:123)
	at cursive.stubs$generate_stubs$fn__12326$process__12327.invoke(stubs.clj:247)
	at cursive.stubs$generate_stubs$fn__12326.invoke(stubs.clj:281)
	at cursive.task$backgroundable$reify__12256.run(task.clj:12)
	at com.intellij.openapi.progress.impl.CoreProgressManager$TaskRunnable.run(CoreProgressManager.java:635)
	at com.intellij.openapi.progress.impl.CoreProgressManager$3.run(CoreProgressManager.java:170)
	at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:494)
	at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:443)
	at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:54)
	at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:155)
	at com.intellij.openapi.progress.impl.ProgressManagerImpl$1.run(ProgressManagerImpl.java:128)
	at com.intellij.openapi.application.impl.ApplicationImpl$2.run(ApplicationImpl.java:308)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at java.lang.Thread.run(Thread.java:745)
#2016-08-2502:25potetmthat was bigger than expected#2016-08-2502:26potetmI'm remembering that initially I had to work around a js dep that was brought in manually. But that was a different error that I was able to track down myself.#2016-08-2502:28cfleming@potetm: To answer your question on Twitter - it’s not just IntelliJ dev 🙂#2016-08-2502:29cflemingAlthough that probably makes it worse.#2016-08-2502:29potetmah yeah, I almost forgot about that 🙂#2016-08-2502:29potetmironic really#2016-08-2502:30cflemingYeah, no doubt.#2016-08-2502:30potetmOkay, I think I actually figured this particular issue out. We recently moved our cljs deps into a lein profile, and that profile wasn't included under "Leiningen Projects -> Profiles".#2016-08-2502:30cflemingOk, I think I see the problem. I’ll fix it and PM you a dev build you can test. It’ll be in a bit, I’m right in the middle of something.#2016-08-2502:31cflemingOh, ok. That might explain it, I’m not sure. However I can patch that NPE anyway in case of future misconfigurations.#2016-08-2502:31cflemingAre you using Om or Om-tools?#2016-08-2502:31potetmI am. Om.#2016-08-2502:31potetmThat's the next problem.#2016-08-2502:32cflemingActually, let me check - I’m not sure this code obeys the lein profiles yet.#2016-08-2502:32cflemingI’m not sure where you’d specify them - I guess it should use the ones selected in the project view.#2016-08-2502:32cflemingI’ll fix that too.#2016-08-2502:33cflemingI’ll try to get you a dev build today sometime (my time, probably tomorrow for you)#2016-08-2502:33potetmYeah that was my expectation. It did change the behavior, but it is indeed still hitting problems.#2016-08-2502:33potetmCool. No worries.#2016-08-2502:34cfleming@potetm: BTW are you planning on going to the conj this year?#2016-08-2502:35cflemingIt’s a bit closer for you guys this year, I guess.#2016-08-2502:35potetm@cfleming I was just rolling that around. I'm really considering submitting a talk, though I'm not 100% on which topic I would go for.#2016-08-2502:36potetmProbably about the same really. Nashville is pretty far from Texas. Texas is a bigass state.#2016-08-2502:36potetmYou?#2016-08-2502:36cflemingOh, cool. I believe there’s a channel here for talk feedback.#2016-08-2502:36cflemingYeah, it actually does look pretty far now that I look on the map.#2016-08-2502:36cflemingYeah, I’m hoping to be there.#2016-08-2502:36cflemingHope to see you there again!#2016-08-2502:36potetmLikewise!#2016-08-2511:06curlyfryDoes cursive ignore some top forms when executing "Load file in REPL"? I don't get any output for (+ 1 1) as a top form in my file for example (Pretty cool if this is the case, I usually wrap my testing top form stuff in comment)#2016-08-2515:36vermahmm, it should eval them 😕#2016-08-2515:36vermaI see the same behavior though 😕#2016-08-2517:44rauhCursive hangs right after startup. Had to invalidate the caches again for it to work. 😕 Stacktrace: https://gist.github.com/rauhs/4b65b876af05ea60a1d9b96c10007c57 If I remove <component name="FileEditorManager"> from workspace.xml it seems to work. So some problems with my split window layout and/or caret position/selection, maybe?#2016-08-2517:49bfabryhas anyone seen an issue with thousands of the error: ClassCastException: cursive.psi.impl.ClVectorImpl cannot be cast to clojure.lang.Named#2016-08-2517:49bfabryseems to show up when I def a proxy object#2016-08-2522:37yiinhoAnyone experiencing IDEA hanging on startup after updating Cursive to the latest version?#2016-08-2522:44yiinholooks like it hangs right after starting REPL#2016-08-2523:28kidpollohappened to me recently#2016-08-2523:28kidpollosome project specific settings caused the problem#2016-08-2523:28kidpolloyou need to rule that out 😛#2016-08-2523:29kidpolloI mean, it is definitely a but on cursive but it was specific to my project 😛#2016-08-2523:29yiinhoI see. I've configured IDEA to open up project loading screen, not opening project directly#2016-08-2523:29yiinhostill happening to me. will any project specific settings still affect IDEA startup?#2016-08-2523:30kidpolloonly if idea is trying to load the project by default#2016-08-2523:30kidpolloit seems to be the default for me#2016-08-2523:49kennyIs there a way to make Cursive use a local deps.cljs file to auto-complete for Clojurescript?#2016-08-2600:04cfleming@rauh: I think that is probably https://github.com/cursive-ide/cursive/issues/1210 - could you try the workaround there?#2016-08-2600:05cfleming@yiinho: I think yours is probably the same.#2016-08-2600:05cfleming@kenny: Not right now, is this a CLJS thing I should be aware of?#2016-08-2600:06kenny@cfleming https://github.com/adzerk-oss/boot-cljs/wiki/Usage#preamble-and-externs-files#2016-08-2600:06kennyIncluding jars with a deps.cljs works#2016-08-2600:06cfleming@bfabry: I see a few people reporting that in the tracker, definitely seems related to proxy.#2016-08-2600:07cfleming@curlyfry: No, Cursive does nothing like that. But it doesn’t show you the results of the evaluation - (println (+ 1 1)) should show it though.#2016-08-2600:08cfleming@kenny: Thanks, I’ll check that out.#2016-08-2600:09bfabrycheers @cfleming, I did start trying to make a minimal repro but got bored. it seems to be specifically related to proxying this class I have here, as we have other proxies that don't do it. Also it blows up when opening the java file#2016-08-2600:10bfabryoh wait#2016-08-2600:10bfabryno I lied#2016-08-2600:10cflemingOk, I’ll try to repro it here, if I can’t I’ll let you know.#2016-08-2600:10bfabrymust be a new version thing#2016-08-2600:10cflemingI don’t think that code has changed in a long time, but you never know.#2016-08-2600:10bfabryhere's a pretty small class that we're proxying that seems to cause it#2016-08-2600:10bfabryhttps://gist.github.com/bfabry/1e2c14c60aff3937d6a0245eb89c78e8#2016-08-2600:11cflemingGreat, thanks - I’ll try that this afternoon.#2016-08-2600:12bfabryta#2016-08-2604:42cfleming@bfabry: I just tried to reproduce this, but I can’t:
(def x (proxy [CljDoFnWithContext] []
         (cljProcessElement [context window])
         (cljStartBundle [context])
         (getAllowedTimestampSkew [])
         (getInputTypeDescriptor [])
         (getOutputTypeDescriptor [])
         (populateDisplayData [builder])
         (processElement [context window])
         (startBundle [context])))
#2016-08-2604:42cflemingI’ll see what I can see from the stacktrace.#2016-08-2604:51cflemingOh, ok, looks like you’re destructuring directly in one of the parameters, like (populateDisplayData [[a b]]) - I’ll fix that.#2016-08-2604:52cflemingIn fact, https://github.com/cursive-ide/cursive/issues/1149#2016-08-2604:53cflemingAs a workaround, you could accept a single param and then destructure in a let inside that.#2016-08-2614:19Madara UchihaHey guys, I'm having some issues (I'm not sure this is strictly a cursive issue, but I'm hoping you'll help me find out if it is)#2016-08-2614:20Madara UchihaI started a brand new leiningen project from intellij#2016-08-2614:20Madara UchihaI'm right clicking the project.clj file and choosing "Create REPL for PROJNAME"#2016-08-2614:20Madara UchihaIt creates the run with Intellij#2016-08-2614:21Madara UchihaThen, when I start the repl, nothing from the project file (`core.clj`) is available in the repl#2016-08-2614:21Madara UchihaEven directly sending the file or specific forms into the REPL doesn't seem to have an effect.#2016-08-2614:22Madara UchihaThe funny thing is, I had another project yesterday with a REPL, and I had no issues there. In face, opening that project again and starting its REPL through the same means, works fine.#2016-08-2614:22Madara UchihaI get this when I try to access the default foo function that leiningen gives#2016-08-2614:23Madara Uchiha
(foo)
CompilerException java.lang.RuntimeException: Unable to resolve symbol: foo in this context, compiling:(/tmp/form-init3194148113876011604.clj:1:1) 
#2016-08-2614:23Madara UchihaAnd here's the code in core.clj#2016-08-2614:23Madara Uchiha
(ns pegthing.core)

(defn foo
  "I don't do a whole lot."
  [x]
  (println x "Hello, World!"))
#2016-08-2614:24Madara UchihaIt's worth noting that I used the terminal lien command to generate the other project. Maybe it has some bearing on the result?#2016-08-2614:27Madara UchihaYeah, when I use lein new app PROJ instead of intellij, the REPL works#2016-08-2614:27Madara UchihaWhat could be the problem?#2016-08-2616:38bfabry@cfleming odd I wouldn't have thought we have anywhere where we could destructure those vals directly, I'll have a dig around. if you've found something that exhibits similar behaviour I'm happy anyway#2016-08-2617:03yiinho@cfleming I've got indent autodetection disabled. still happening#2016-08-2618:43cfleming@yiinho: Could you check for automatic thread dumps as described here: https://intellij-support.jetbrains.com/hc/en-us/articles/206544899-Getting-a-thread-dump-when-IDE-hangs-and-doesn-t-respond and file an issue, please?#2016-08-2619:19yiinhohttps://github.com/cursive-ide/cursive/issues/1508#2016-08-2619:19yiinhoturned out to be deadlocking with one of the plugins in use internally
#2016-08-2621:20spiedenanyone know how to disable the eap builds? i unchecked the box and uninstalled but only 1.4.0-eap is available for reinstall#2016-08-2711:21juhoteperiShould breakpoints in java libs (closure-compiler) work? I tried adding breakpoints both to the decompiled class file and the source#2016-08-2711:29juhoteperiOh, maybe I just had the breakpoints set up in places before the error#2016-08-2723:11timothypratleyIs there a way to type hint CLJS browser events such as:
(defn navigation [event]
  (model/set-route! (.-token event)))
such that Cursive knows that .-token is the right thing?
#2016-08-2723:33cfleming@spieden: 1.4.0 is only in EAP at the moment, but 1.3.1 should be available.#2016-08-2723:33cflemingAfter unchecking the box, go to Settings-&gt;Plugins-&gt;Browse Repositories and hit refresh - does that help?#2016-08-2723:34cfleming@juhoteperi: Yes, that should definitely work. Breakpoints can be occasionally flakey in Clojure but they’re very reliable in Java.#2016-08-2723:36cfleming@timothypratley: No, unfortunately. However it looks like this might help in the near future (I’ll have to add Cursive support for it): http://clojurescript.org/reference/compile-time-type-checking#2016-08-2723:37timothypratleyooOOoo nice!#2016-08-2723:37cflemingI’ve filed this to track it: https://github.com/cursive-ide/cursive/issues/1509#2016-08-2723:37timothypratley🙂#2016-08-2723:37cflemingI can actually add that support independently of CLJS - it will just only help Cursive, not the compiler, until it works there.#2016-08-2723:39cflemingThat was not the easiest sentence to parse - what I mean is that Cursive can have that support for completion, symbol resolution etc even if the compiler doesn’t support it.#2016-08-2723:39cflemingWould be nice to have quickfixes to add the annotations etc.#2016-08-2723:40cflemingA compile-to-typescript CLJS would be really nice.#2016-08-2723:44timothypratleyAh I see that makes sense yup. Yeah it seems that there is growing support for Typescript from libraries out there. 🙂 Glad to hear there are some good options available. I'm actually really confused how Cursive manages to resolve so many JavaScript symbols, it sure makes it easier to know when all the externs etc are correct.#2016-08-2723:45cflemingYeah, I’m actually planning to go over all the CLJS resolution soon, since it’s very confusing and I can’t keep up with all the different things required to resolve symbols correctly. Once that’s more accurate hopefully the warnings will be more useful.#2016-08-2723:47cflemingI’m actually going to have to bump https://github.com/cursive-ide/cursive/issues/1481 to the next beta build because of the subtleties involved.#2016-08-2723:48cflemingCLJS is hard to keep up with.#2016-08-2723:50timothypratleyHahahaha totally. Yeah I can imagine that would be a doozy to handle 🙂#2016-08-2818:18Madara UchihaJS resolution is hard#2016-08-2818:18Madara UchihaEvent intellij/webstorm is having difficulties with it#2016-08-2818:19Madara UchihaEspecially because you easily can (and often do) add functions to things in runtime#2016-08-2818:19Madara Uchiha(Not sure if CLJS gives you that ability, honestly, I'm studying Clojure at the moment as a stepping stone to CLJS)#2016-08-2821:34danielcompton@madarauchiha you can do (almost?) anything you can do in JS in CLJS, but it is mostly unidiomatic to do that kind of stuff AFAIK.#2016-08-2916:50timothypratleyvery minor feature request: When refactoring a 'folder' to a new name the files all get moved but the namespaces don't get updated... it would be nice if it did (search replace is fine though)#2016-08-2917:05Madara Uchiha@danielcompton Here's an example#2016-08-2917:05Madara UchihaThe bluebird Promise library, which provides an alternative implementation of the native Promise object, comes with a few helper functions#2016-08-2917:07Madara UchihaOne of which is called promisifyAll() which is a utility function to run against any other object (usually APIs), it will then add new functions onto the object (mutating them, but it shouldn't be a problem to not mutate) so that for each method which accepts a callback, you get a new methodAsync which returns a Promise.#2016-08-2917:07Madara UchihaIt's a handy feature.#2016-08-2920:36danielcomptonSure, but in most Clojure code I’ve seen, something like core.async would be used instead.#2016-08-2920:37danielcomptonI think I’m vigorously agreeing with you. Full JS resolution would be hard (impossible?), but that tends not to be as big a problem, as idiomatic CLJS mostly doesn’t do the stuff that would be hard to resolve.#2016-08-2922:50cfleming@timothypratley: Yes, moving things around correctly will be the next refactoring I add.#2016-08-2923:53timothypratleyooo great 🙂#2016-08-3014:34moizsjI dont see the "Run"/"Debug" green button when i created a new project. What could I be doing wrong?#2016-08-3014:39moizsjI see it for projects created outside cursive.#2016-08-3015:13vikeriHas anyone gotten boot-cljs-repl working with Cursive?#2016-08-3015:14vikeriI have the following config:
(cljs-repl :ws-host "localhost"
               :port 9001
               :ip "0.0.0.0”)
#2016-08-3015:14vikeriAnd I try to connect in Cursive through an nREPL at port 9001 and tried both localhost and 0.0.0.0 as IP.#2016-08-3015:15vikeriIt works in Cider and Fireplace...#2016-08-3015:16juhoteperi@vikeri 9001 is the WS server port, not nrepl port#2016-08-3015:18vikeri@juhoteperi Alright, how can I get the nREPL port?#2016-08-3015:18juhoteperiIt should be printed on when starting the repl#2016-08-3015:19juhoteperiyou can set it by passing nrepl-opts map to cljs-repl#2016-08-3015:19juhoteperiand you can see the available options by checking repl task help#2016-08-3015:20vikeri@juhoteperi: Sweet! Do you want a PR with Cursive instructions in boot-cljs-repl readme?#2016-08-3015:20juhoteperi@vikeri sure#2016-08-3015:33vikeri@juhoteperi: https://github.com/adzerk-oss/boot-cljs-repl/pull/48#2016-08-3015:41juhoteperi@vikeri Thanks#2016-08-3019:44joe.kozaQuestion regarding using Cursive offline... Is it possible and expected that Cursive should work offline? When trying to open a clojure project, Cursive tries to download the standalone leiningen jar (leiningen-x.x.x-standalone.zip) from github. Since I am offline, it naturally fails out with an IOException because it can't reach github.#2016-08-3019:46joe.kozaIf I download the jar separately and copy it to a location where Cursive is looking for it, I would hope that is a workaround. However, I have no idea where Cursive is looking for the lein standalone... I do have leiningen working in the typical way outside of Cursive using the shell script with the .lein folder in my user space....#2016-08-3021:19joe.kozaMy mistake. Looks like I was running IntelliJ as a different user, and that user did not have leiningen set up. Starting IntelliJ as the proper user and everything works just fine. My apologies!#2016-08-3021:40cfleming@joe.koza: For reference, Cursive will get lein from the same place as lein itself: ~/.lein/self-installs. If you want to use it offline, just make sure that you’re telling Cursive to use a version which is already downloaded in that dir (Settings-&gt;Build, Execution, Deployment-&gt;Build Tools-&gt;Leiningen-&gt;Project Settings).#2016-08-3021:41cfleming@moizsj That’s very strange. If you go to Run-&gt;Edit Configurations... can you set one up there?#2016-08-3101:16moizsj@cfleming: yes that works. So do the keyboard shortcuts. But still no button. It's not a big issue. Just curious what causes the buttons to disappear.#2016-08-3101:51cfleming@moizsj: Can you post a screenshot of what you’re seeing?#2016-08-3104:47moizsj@cfleming and now I see them! when I flipped open my laptop this morning, they were there. as if they grew overnight.#2016-08-3107:08cfleming@moizsj We can just blame cosmic rays for that one: https://en.wikipedia.org/wiki/Soft_error#Cosmic_rays_creating_energetic_neutrons_and_protons#2016-08-3107:18moizsjHaha#2016-08-3120:24madvasWhat might be an issue when in cljs figwheel repl, I try to Load file in REPL I always get an error like java.lang.IllegalArgumentException: Namespace <ns> does not exist, with <ns> being always some required ns from my project (not library ns)#2016-08-3122:06madvasin case someone wondered, had to add src/cljs into clojure (not cljsbuild) source-paths. I guess this wasn’t needed before last update of Cursive? not sure tho#2016-08-3123:41hlshipSo, I’ve set up a namespace in my project and a command so that I can copy a stack trace out of a terminal window and have it show up as an io.aviso/pretty formatted exception in the REPL. It would be cool if that was built into Cursive.#2016-08-3123:42cfleming@hlship: IntelliJ actually has an Analyze Stacktrace action, but I’m not sure what it does. I’ll investigate it.#2016-08-3123:45cfleming@hlship: https://blog.jetbrains.com/idea/2006/08/analyzing-external-stack-traces/#2016-08-3123:45cflemingI’m not sure how extensible that is, i.e. if for Clojure stacktraces I could reformat them using pretty.#2016-08-3123:46cflemingDoes pretty contain functionality to parse stacktraces from text? I guess usually it formats from the exception object itself.#2016-08-3123:47hlshipYes, I have some pretty usable code that does the parse. It’s all too easy to get tripped up, but for any exceptions I’ve gotten out of our application logs, it works fine.#2016-08-3123:48hlshiphttps://github.com/AvisoNovate/pretty/blob/master/src/io/aviso/exception.clj#L668#2016-08-3123:48cflemingAre you basically trying to get clickable links from the trace?#2016-08-3123:49cflemingI actually have code to do that for the code folding in the REPL, now that I think about it.#2016-08-3123:51hlshipNope, really want to have the full reformat treatment (name demangingly, column organization, ANSI fonts, etc.).#2016-09-0100:00cflemingOk. Looks like that might need to be a specific action since the current one is not sufficiently extensible. And you’d like the formatted version to be output to the REPL, or to a new console?#2016-09-0100:11hlshipProbably REPL because that’s what I have visible.#2016-09-0101:36danielcomptonAny idea on when EAP 2016.3 will be supported? It’s got some fixes to crashers in OS X (apparently) that would really make a big difference in my workflow#2016-09-0101:39cfleming@danielcompton: I’m planning to add that soon, hopefully in the next EAP build if it’s not complicated.#2016-09-0101:41danielcomptoncool#2016-09-0111:34rauhIs there a way to clear the autocomplete cache for keywords? I misspelled one for a while and now fixed it. Though it keeps popping up and I keep using the wrong one (had :coures.part/id instead of :course.part/id)#2016-09-0118:02hlshipJust discovered that if you Move Form Up with cursor on the key in a binding form, it moves up the key and value. I’ve been doing that the hard way.#2016-09-0118:03hlship
(let [foo bar
       baz bif])
to
(let [baz bif
       foo bar])
in one keystroke. Cursor starts before the b in baz.
#2016-09-0211:38sandbagsI realise this isn’t really a Cursive thing but… does anyone know how to stop IntelliJ from automatically invoking completion as you type?#2016-09-0211:39sandbagsokay always the way… i search and search and then, as soon as i ask, I find it#2016-09-0211:39sandbags(for ref: what i was missing was “autopopup code completion” not sure how i missed it)#2016-09-0300:12hlshipSorry, @cfleming , one more thing … managed dependencies in a parent/child project don’t seem to work correctly.#2016-09-0300:12hlshipI’ll add an issue about it.#2016-09-0302:37cfleming@hlship: Is that the new lein 2.7.0 feature?#2016-09-0302:37cflemingAn issue would be great, thanks.#2016-09-0401:56cfleming@rauh: No, there isn’t right now. That index is flakier than the others for some reason that I haven’t managed to determine. It can take time to update when a new keyword is added, too.#2016-09-0409:19rauhOk, no harm. I used the proper one often enough that now it appears in first position so no more mistakes 🙂#2016-09-0419:31squestHi all, is there anyway I can get the “Your project requires namespaces which need stubs to be generated” turned off?#2016-09-0502:53borisIs there a way to “kick” cursive’s autocomplete to update for example after adding :requires ? Only the REPL is autocompleting somewhat reliably for me in that situation.#2016-09-0502:56borisif I restart IDEA then lastest :requires that were only completing in REPL work in editor too.#2016-09-0503:20lfn3@boris whenever I have issues with that I do Refresh Leiningen Projects (from cmd-shift-a or top left of the leningen window)#2016-09-0503:25boris@lfn3: yeah it has never just worked for me but refreshing lein project does the trick. thanks (i’m evaluating cursive for first time)#2016-09-0503:27lfn3The times I’ve had issues with it are when adding new deps to the project.clj, but other than that I don’t really have to use it.#2016-09-0503:29borisoh ok - I think that’s the same with me#2016-09-0504:27danielcompton@boris you can do File > Invalidate Caches / Restart to reset all Cursive/IntelliJ state#2016-09-0504:29boris@danielcompton is that what you do when adding dep to project.clj?#2016-09-0504:30danielcomptonnope#2016-09-0504:30danielcomptononly if something gets really weird#2016-09-0504:30danielcompton@lfn3’s tip is right for just adding a dep#2016-09-0507:19cfleming@squest Why do you want to turn that off?#2016-09-0507:30squest@cfleming some of us are working on “content” that is not related to the project but still need to code in clojure, so it’s distracting for some of my team 🙂#2016-09-0507:36cfleming@squest But can’t they just generate the stubs to make that go away?#2016-09-0507:37cflemingIf they’re writing Clojure code they’ll need to do that for the symbol resolution to work correctly.#2016-09-0507:44squest@cfleming somehow it’s always error when generating stubs#2016-09-0507:45cflemingWhat’s the error you’re receiving?#2016-09-0507:45squestsince they mostly use clojure.core so, symbol resolution should have been fine#2016-09-0507:45cflemingI’d prefer to fix that rather than allowing the notification to be turned off.#2016-09-0507:45squestok I see#2016-09-0507:46squestre:error that I have to check with them#2016-09-0507:46squestThanks for now#2016-09-0510:23cfleming@squest Ok, when you get details on the error, let me know here or file an issue and I’ll look at it.#2016-09-0601:37onetomwhen i look for the usages of a symbol with cmd-alt-f7 i only see the filename part of the location of occurances#2016-09-0601:38onetomit's often useless because the filenames might be the same, eg core.clj#2016-09-0601:38onetomis there an option to affect this, like we can set the tab titles to show namespaces?#2016-09-0601:39onetomin my very specific case for example i have app.docs and app.profile.docs just showing docs.clj and no context around the occurrence is not very helpful#2016-09-0601:41onetomor should i just press alt-f7 to switch to the detailed view if the short version is ambiguous?#2016-09-0602:53lfn3Oh wow. Didn’t even know there was a short version.#2016-09-0602:55lfn3I’ve always just used the long form one. Thanks, and sorry I can’t help apart from - yeah, just use alt-f7.#2016-09-0607:55cfleming@onetom That’s a good question, I don’t know - I’ll try to figure that out.#2016-09-0607:55cflemingActually, could you file an issue for that one so it doesn’t get lost?#2016-09-0608:56onetomok#2016-09-0609:00onetomhttps://github.com/cursive-ide/cursive/issues/1522#2016-09-0609:12cfleming@onetom Thanks!#2016-09-0609:41rauh@onetom There is an option "Group by package" that should do what you want? Or maybe I misunderstand the problem...#2016-09-0609:42rauhIt's in the "Find usage" window#2016-09-0612:20onetom@rauh The action Cmd-Alt-F7 is bound to is called "Show Usages". It's a small floating window which appears next to the cursor. It only shows filenames but no path next to each matching line. The Alt-F7 is bound to the "Find Usages" action. That does have the grouping functionality at the cost of stealing the focus and opening a docked window which obscures too much screen estate usually.#2016-09-0612:22rauh@onetom Oh I see, never used "Find Usages". Now I see the problem. 🙂#2016-09-0612:25onetomon a bigger screen it's really distracting when u have to refocus your eyes to the bottom of the screen so i mostly using the concise version of the lookup#2016-09-0614:55shaun-mahoodHas anyone got a nice workflow for renaming an entire project using Cursive (or otherwise)?#2016-09-0618:12pseudHey - I'm getting pretty annoyed with cursive and it's run configurations. Is there not a way to simply achieve some equivalent of "lein figwheel" or "lein cljsbuild auto" ? Why is the support for lein so extremely poor ?#2016-09-0618:14ckarlsenhttps://github.com/bhauman/lein-figwheel/wiki/Running-figwheel-in-a-Cursive-Clojure-REPL works like a charm#2016-09-0618:14pseudExcept it breaks checkout dependencies ... 😞#2016-09-0618:16ckarlsen😞#2016-09-0618:18pseudUgh, I just want to code, not mess with stupid things like this ... 😞#2016-09-0619:08cfleming@pseud What’s the problem with checkout dependencies?#2016-09-0621:59shaun-mahood@cfleming: not sure if it's an actual problem or not, but in the figwheel wiki above it claims that running the repl as it mentions will break checkout dependencies. The documentation is pretty out of date though and it needs some work, so it may just be a problem with the wiki entry not keeping up with improvements to figwheel / cursive.#2016-09-0622:01cfleming@shaun-mahood No, I think it is a problem - it’s because the REPL script isn’t run with the full Leiningen classpath, so it’s not aware of the classpath dependencies.#2016-09-0623:30danielcomptonWhen I use checkouts with figwheel (not through Cursive, just in general), I add checkouts/mylib/src to the :source-paths for my cljsbuild config#2016-09-0623:40gpetukhov@cfleming: hi Colin, what is the best way to debug clojurescript? #2016-09-0623:51danielcompton@gpetukhov my opinion would be dirac and cljs-devtools#2016-09-0623:56gpetukhov@danielcompton: i found that too but setting up Dirac is so complex so thought maybe there are other ways..#2016-09-0623:56danielcomptonit’s worth the effort#2016-09-0701:00superstructorI second that it is definitely more than worth the effort to setup Dirac :thumbsup: I use it every day.#2016-09-0701:01superstructorAlso Cursive REPL can connect to a Dirac session so you can run code from Cursive in the Chrome runtime.#2016-09-0702:25cfleming@shaun-mahood Of course, it’s not a Cursive-specific problem, any of the REPL script solutions will have the same problem since they’re not lein based.#2016-09-0702:27cfleming@pseud So, to answer a bunch of your questions - the support for lein is so extremely poor because I am lazy and useless.#2016-09-0702:28cflemingBut you can run a lein task by creating a leiningen run config, and putting whatever config you like in there, and selecting the profiles that you want.#2016-09-0702:29cflemingYou are also correct that Cursive fails to ruin remote nREPL connections, which work fine.#2016-09-0702:32cflemingI’m also planning to add a figwheel run config shortly which should do exactly what you want.#2016-09-0702:33cflemingTo answer your other question, what you are missing is that Cursive, Leiningen and Figwheel are all monstrously complicated internally, and lein in particular is not designed to be embedded.#2016-09-0703:18shaun-mahood@cfleming: you know, that makes total sense - I just try things until they work. Have you experimented with socket repls or boot much? Coming to the conj again this year?#2016-09-0704:02cfleming@shaun-mahood Yeah, I’m actually planning to fix all this (socket repls and figwheel CLJS REPLs) shortly. And yes, I’d love to support boot better, it’s a fairly large change unfortunately, but one that I definitely want to do ASAP.#2016-09-0704:03cflemingAnd yeah, hopefully I’ll be at the conj#2016-09-0704:03cflemingAre you going again this year?#2016-09-0704:05cfleming@gpetukhov Cursive doesn’t (yet) provide any native CLJS debugging capabilities. Dirac seems to be the best option right now, and I’m hoping to help with the setup too. I’ve been meaning to look at that for a while now but have been busy with other changes.#2016-09-0704:08gpetukhov@cfleming: thanks for your answer!#2016-09-0704:20shaun-mahood@cfleming: I'm going to the conj again, really looking forward to it! For my purposes all the repls work well enough, I'm just glad I don't have to figure out how they work.#2016-09-0706:03pseud@cfleming Yea, I - as an outsider who became frustrated over losing some 5 hours tinkering when I really needed something done, lay the blame at whatever object was the most visible to me. I need to tinker more, but I'm certainly seeing the complex interplay (i.e. the fail to observe checkout dependencies for figwheel seems to come as soon as nrepl is even involved, so not exclusively a Cursive thing). I'll be a cursive user professionally but I'll hold off on buying a personal license for a while. Hopefully this situation gets better, somehow.#2016-09-0707:14cfleming@pseud Sure, no worries - CLJS REPLs have always been a bit of a house of cards, hopefully things will be better soon when I get figwheel properly integrated.#2016-09-0707:19pseudI do have a question, though. Reading up on boot I begin to see the appeal (for personal projects, anyway - workplace has its own policies). @cfleming - you said boot wasn’t supported in cursive right now. What does that entail, exactly ? Can I still navigate code, go to definitions and the like if I get an nrepl session going ?#2016-09-0707:34cfleming@pseud I believe so, yes. There are a couple of options for emulating boot support in Cursive: https://github.com/boot-clj/boot/wiki/For-Cursive-Users#2016-09-0707:35cflemingBasically, as part of your boot build you generate either a project.clj or a pom, and import that into Cursive.#2016-09-0707:35cflemingProbably the biggest issue will be lack of symbol resolution in the boot file itself - all the project code should be fine.#2016-09-0707:35cflemingI’m also not sure how their CLJS REPL works, nREPL should work fine if you can start one of those easily.#2016-09-0707:36cflemingActually, re-reading your question, note that Cursive doesn’t actually need a REPL for symbol resolution (navigation, completion, etc) - you might be used to needing one from Cider and other environments.#2016-09-0707:56sveri@cfleming When I hit a stacktrace in general, 99% of the times I have to scroll back to the start of it. Would it be possible to have cursive do that for me? Would be really nice to not have to scroll myself all the time. Especially given that they are so long in clojure.#2016-09-0707:59pseud@cfleming - (wrt. nREPL & symbol resolution), that’s very good to know. Thanks 🙂 I’ll definitely play with cursive & boot in the near future#2016-09-0711:58cfleming@sveri Are they still too long even with the folding of lines not in your project? Is this clj or cljs?#2016-09-0713:54pupenoHello#2016-09-0713:54pupenoI'm using Cursive for the first time on Windows and the shortcuts include a meta key. Is this broken or am I missing something? #2016-09-0714:35imreI suppose it is, I reported it a while back#2016-09-0714:35imrehttps://github.com/cursive-ide/cursive/issues/1139#2016-09-0715:29pupenoI modified them and created a chestography cheat sheet which I published. #2016-09-0719:01hlshipAnyone see the REPL hang sometimes on reload (or run tests)? I think I see this rarely with normal run, more often w/ debug.#2016-09-0719:03hlshipI see “Loading namespace <x> …” and that’s as far as it gets.#2016-09-0719:03hlshipI’m tailing the log to see if anything pops up there next time.#2016-09-0719:17hlship… and of course, now it doesn’t manifest.#2016-09-0721:53kennyIs there an easy way to get all of your requires to :reload in the REPL? This would be incredibly helpful for when you are working on two different libraries at once and you want the code that was changed from a dependency to be reloaded in the REPL. Right now I have to manually type (require 'my.ns :reload) every time I want to reload my.ns.#2016-09-0800:07hlshipIt does a good job for source files from the same project; have you tried using checkouts? That’s a leiningen feature, but I believe (I can’t use this on my project) that it will do the right thing for you in Cursive as well.#2016-09-0800:07hlshipThe “Load file in REPL” command, BTW.#2016-09-0800:15danielcompton@kenny cursive has a “Load file in REPL” command which will reload dependent namespaces that have changed#2016-09-0800:15danielcomptonwhich will work in conjunction with checkouts as hlship has pointed out#2016-09-0800:31jrheardhi - i can't set a breakpoint in my clojurescript project in cursive, can't figure out what i'm doing wrong. i'm coming back to this project (and cursive / programming in general) after having stepped away for about six months, and am pretty sure that i used to be able to set breakpoints#2016-09-0800:32jrheardwhen i select the "run" menu up top, most of its items are grayed out, including "toggle line breakpoint"#2016-09-0800:32jrheardi'm sure i'm doing something wrong (and am half-convinced that i've entirely forgotten how to use a computer) - has anyone run into anything like this before?#2016-09-0800:32jrheardnot sure what other info i can provide to help diagnose this issue#2016-09-0800:33jrheardper a random google result, i've done a file -> invalidate caches + restart, issue persists#2016-09-0800:34jrheardhttps://github.com/jrheard/voke/tree/ai is the project, if that's at all helpful#2016-09-0800:40jrheardmy repl is configured as specified in https://github.com/bhauman/lein-figwheel/wiki/Running-figwheel-in-a-Cursive-Clojure-REPL , and i'm running it in debug mode#2016-09-0800:49jrheardintellij 15.0.6, cursive 1.3.1-15#2016-09-0800:59jrheardlooks like this: https://www.evernote.com/shard/s11/sh/44d356ef-206e-473e-858a-4211efe6ba8c/827d71dff27673f8#2016-09-0801:00jrheardnothing in the intellij event log, just an "all files are up-to-date" message; restarting computer didn't fix problem 😄#2016-09-0801:12lfn3@jrheard I’m pretty sure you can’t debug cljs yet.#2016-09-0801:14lfn3If you want to debug cljs I’ve heard good things about https://github.com/binaryage/dirac#2016-09-0801:17jrheardoh hm i could've sworn cljs cursive debugging was a thing#2016-09-0801:17jrheardmust've just misremembered i guess#2016-09-0801:17jrheardall these months of dark souls 3 and hearthstone turning my brain to mush#2016-09-0801:19lfn3@jrheard https://clojurians.slack.com/archives/cursive/p1473221140000083#2016-09-0801:20lfn3Dw, I’ve found part of programming is realising you’re being a bit of idiot every now and again.#2016-09-0801:20jrheardnice, thanks @lfn3 !#2016-09-0801:21jrheards/every now and again/multiple times daily/ in my case... 😄#2016-09-0807:19sveri@cfleming you mean the "Prettify stacktrace elements using folding"?#2016-09-0807:19sveriIf so yes, then it does not work for me. I see the whole stacktrace printed.#2016-09-0807:50cfleming@sveri Can you send me an example of one that fails to fold?#2016-09-0807:50cflemingEither here or by email#2016-09-0807:56sveri@cfleming#2016-09-0808:00cfleming@sveri Interesting, is that the new readable error format?#2016-09-0808:00cflemingIt’s not actually a stacktrace, it’s an object - is that the Clojure one or some custom object?#2016-09-0808:17sveri@cfleming Actually I never really thought about it. Its from web dev and I guess its just a stacktrace that is embedded.#2016-09-0808:17sveriI will try to figure out where it comes from exactly#2016-09-0810:20cfleming@pupeno Thanks very much for the cheatology sheet, if those shortcuts are working for you I’ll take those as the new defaults.#2016-09-0810:21cfleming@hlship The built-in “Jump to next error” (F2 by default, I think) should work for test failures.#2016-09-0810:22cfleming@jrheard Right, no CLJS debugging yet sorry, it’s on the roadmap#2016-09-0810:23pupeno@cfleming: i think I already modified them a bit. Give me a couple of weeks of use and I'll polish the selection. #2016-09-0810:24cfleming@pupeno Ok great, let me know when you think they’re good and I’ll make them the defaults.#2016-09-0810:24pupenoCool #2016-09-0810:31shooodooken@cfleming Would you have a public facing tracker we could view what's happening in Cursive dev (similar to what Fogbugz on Trello(https://trello.com/b/JZLXnMnN/fogbugz-development)) ?#2016-09-0810:32cfleming@shooodooken I don’t right now, but using Trello for that is something I have thought about#2016-09-0817:41kenny@danielcompton No this does not work for dependent projects. It works for all namespaces in your current project, but not namespaces that have changed in dependent project. For example: I have two projects: project1 and project2. project1 depends on project2. I have an auto building task running in project2 (the auto build task builds a new jar, same version, into your local maven every time a file in project2 changes. for boot users this is just boot watch pom jar install). I have a function in project2 called project2.core/foo. Now I open a REPL in project1 and load the file project1.core, which looks something like this:
(ns project1.core
  (:require [project2.core :as project2]))
and switch namespaces to project1.core. I can now run project2/foo and get my expected output from that function. Now I decide I want to add a new function to project2.core called bar (located at project2.core/bar). So I go ahead and add it, save the file, the auto build task runs, and I switch back to project1. I run the "Load file in REPL" command and try to execute project2/bar. I get
java.lang.RuntimeException: No such var: project2/bar
To get the REPL to recognize the changed dependency, project2, I need to run (require 'project2.core :reload). Now if I run project2/bar, the function exists and I get the expected output. It would be great if Cursive could add a way to do this.
#2016-09-0818:35darwin@kenny https://github.com/clojure/tools.namespace#reloading-code-motivation#2016-09-0818:35darwinnot using it myself, it just sounds like what you just described#2016-09-0818:37kennyHmm, yeah that looks like what I need. There's nothing like that built in Cursive though, correct?#2016-09-0818:38darwinthe problem is much deeper in general, you have to write “reloadable” code in the first place, Cursive could run (refresh) for you, that is easy, but it won’t rewrite your app 😉#2016-09-0820:07dmarjenburghHi, if I run a test.check defspec, the repl will log an error. Any ideas?
Error handling response - class java.lang.IllegalArgumentException: Argument for @NotNull parameter 'path' of com/intellij/openapi/vfs/impl/local/LocalFileSystemBase.findFileByPath must not be null
I’m using OSX 10.11.6 and Cursive 1.4.0-eap2-2016.2
#2016-09-0821:57danielcompton@kenny I think the use case you’re describing would be (better?) served by checkouts? I don’t think much Clojure tooling expects JARs in a running JVM to be changing#2016-09-0822:02kenny@danielcompton Works great for cljs, not for clj due to caching.#2016-09-0822:04cfleming@dmarjenburgh Could you file an issue for that please, and I’ll try to reproduce it?#2016-09-0822:11danielcomptonright, that’s why checkouts may be a better option#2016-09-0822:14cfleming@kenny Hmm, that’s an interesting one. I’ll try to reproduce that case and see if I can fix it. Are you overwriting a snapshot jar here?#2016-09-0822:15kennyDoesn't have to be a snapshot but it could be#2016-09-0822:15cflemingI don’t think that tools.namespace will handle that better, since it assumes (IIRC, don’t have the code here) that the files are on disk and not in a jar.#2016-09-0822:16cflemingSo if it’s not a snapshot, a lot of tooling will assume that my-library-x.y.z.jar will not change, since in theory it’s the same version.#2016-09-0822:16cfleming(I doubt that’s the real problem here, but it’s something to bear in mind).#2016-09-0822:17kennyI can test with a snapshot version#2016-09-0822:18cflemingI’m actually surprised that works in a normal REPL too. You’re essentially dynamically updating a classpath element, and often things will cache etc, or maintain a File open on a particular jar - if you swap the jar out from under it you’re probably in undefined territory I suspect.#2016-09-0822:19kennySame result with a snapshot#2016-09-0822:19kennyIt's possible boot's :checkouts is doing some handy work here. I'll try with no :checkouts.#2016-09-0822:21juhoteperiBoot checkouts explodes the JAR to tmp-dir and adds that to the classpath instead of the JAR in maven repo (and looks for changes in the jar file and updates tmp-dir if it changes)#2016-09-0822:22kennyInteresting.. I get a
Could not locate my/ns/core__init.class or my/ns/core.clj on classpath. Please check that namespaces with dashes use underscores in the Clojure file name.
when using :reload. Works fine without :reload.
#2016-09-0822:22kennyAh, that would explain how it works#2016-09-0822:23cflemingRight, I think that swapping the jar itself is a recipe for problems. What I suspect you’ll find is that require works without :reload, but it won’t actually reload anything.#2016-09-0822:23kennySo yeah. Looks like it only works with boots :checkouts. Still would be nice to have a way to :reload changed namespaces.#2016-09-0822:24kennyWhen :checkouts is set?#2016-09-0822:25juhoteperi@kenny What about just using c.t.n.repl/refresh like normally?#2016-09-0822:25cflemingWell, it sounds like boot’s :checkouts does some magic (thanks deraen, I didn’t know that)#2016-09-0822:26kennyYes, require without :reload works but does not do anything#2016-09-0822:27kenny@juhoteperi I'll look into it. It may cause some code changes that I'm not happy with though.#2016-09-0822:28cfleming@juhoteperi I don’t think c.t.n will work here, I believe it only reloads files from disk, not from jars#2016-09-0822:28cfleming@kenny Are you using the boot script which generates the project.clj?#2016-09-0822:28kennyYes#2016-09-0822:29juhoteperi@cfleming Yes, but as Boot checkouts unpacks the jar to disk, it doesn't see the jar but just files in disk like any source-path#2016-09-0822:29cflemingPerhaps you could modify that to set up lein checkouts when :checkouts is used in boot?#2016-09-0822:31cflemingI see - the problem is that I’m not sure lein gives you a way to add an arbitrary dir to the classpath. Perhaps you could generate resource-paths in lein, or something like that.#2016-09-0822:31kennyUnless checkouts in lein have changed I don't see how that is possible. :checkouts in boot are a vector of deps and I have no way of knowing where that project is located on disk.#2016-09-0822:32kennyActually you could probably symlink to a file in jar#2016-09-0822:33cflemingRight - I think generating a resource-paths entry for the exploded jar location (if you can access that) might work.#2016-09-0822:33cflemingThe problem is you’ll have to remove the original jar from the classpath too.#2016-09-0822:34cflemingOtherwise it’ll depend on lein’s internal classpath generation order.#2016-09-0822:34kennyPossibly using the same functions boot's :checkouts uses?#2016-09-0822:34cflemingMaybe, I don’t know anything about boot so I’d only be guessing 🙂#2016-09-0822:35kennyHmm.. I think this would need to be separate from the lein-generate task because you wouldn't want to run lein-generate every time you change a dependency.#2016-09-0822:36cflemingYou might not have to - it depends whether the unpacked jar location is stable.#2016-09-0822:36kennystable meaning static?#2016-09-0822:37cflemingRight. If it is generated using a hash of the jar’s location or something then you can just add the resource-path in lein-generate and that will always remain the same.#2016-09-0822:37cflemingSo I also think you’ll hit another problem here - Cursive will complain that the source/resource dir is outside the module content root.#2016-09-0822:37cflemingLet me find the issue#2016-09-0822:38cfleminghttps://github.com/cursive-ide/cursive/issues/324#2016-09-0822:39cflemingI can fix that if that is a blocker for this problem, I spoke to IntelliJ’s Gradle support guy about it and I know how to fix it.#2016-09-0822:39kennyHmm#2016-09-0822:39kennyWell I think the first thing would be to confirm that this would work as we think.#2016-09-0822:40cflemingSure, I guess first make sure you can actually generate the source-path or similar.#2016-09-0822:40kennyWould doing "Load file in REPL" realize the changed files from dependencies or would you still need to do require with :reload?#2016-09-0822:41cflemingWell, if you add that as a source path, then Cursive will think that the copied source is part of the same project, so that should work.#2016-09-0822:41kennyAh#2016-09-0822:41cflemingDo you have both lein/boot projects added to a single IntelliJ project?#2016-09-0822:42kennyOne project per IntelliJ project#2016-09-0822:42kennyI usually have multiple IntelliJ projects open#2016-09-0822:43cflemingOk, so that will be ok - otherwise you’d get multiple completion entries etc. You will have to be careful not to edit the files in the wrong project. If I do fix that content root issue, I’ll try to add the sources as read-only.#2016-09-0822:43cflemingNot sure if that’s possible though.#2016-09-0822:44cflemingOne possibility - if you can control where the checkout exploded dir is put, then you could just put that inside the other project in a src-checkout dir alongside your src#2016-09-0822:45cflemingThen Cursive would not complain about the content root.#2016-09-0822:45kennyThat's probably pretty easy#2016-09-0822:45cflemingI think that’s your best solution then.#2016-09-0822:46kennyIs the checkout exploded dir the same dir as where the jar is installed to?#2016-09-0822:46cflemingNo, it won’t be, it’s probably a temp dir somewhere.#2016-09-0822:47cflemingI imagine (again, just guessing), that boot writes the jar as normal and then additionally writes the exploded contents somewhere else.#2016-09-0822:52kennyDoes the unpacking only occur once?#2016-09-0822:52kennyMaybe a question for #boot#2016-09-0822:52cflemingYeah, I think so - I’m only making stuff up at this point.#2016-09-0822:53cflemingI mean, it must happen once each time you re-generate the jar.#2016-09-0822:53kennyThat's what I thought#2016-09-0822:53kennyI have no idea how it knows when the jar is regenerated#2016-09-0822:54juhoteperiSame as Figwheel etc., using inotify/such or polling for file modification date changes#2016-09-0822:54cflemingRight, looking at file changes I guess#2016-09-0822:54kennyAh, so there is a watch on the maven dir where the jar is located?#2016-09-0822:54juhoteperiYes#2016-09-0822:55cflemingOr a watch on the source, which regenerates the jar when it changes (which provokes the exploding)#2016-09-0822:55kennyIs there one watch per dep in :checkouts or one watch on the whole maven?#2016-09-0822:55kennyI believe there is a watch on both the source and the jar
#2016-09-0822:56juhoteperiwatch per dep#2016-09-0822:56juhoteperihttps://github.com/boot-clj/boot/blob/17855d2574d797e25c55dc4cf4c70b93e46ca2b9/boot/core/src/boot/core.clj#L270#2016-09-0822:57kennyOh cool, so there is a :checkout-paths#2016-09-0822:58juhoteperioh right, didn't see that, I guess that could be useful here#2016-09-0822:58kenny@juhoteperi Each time a checkout dep changes is the exploded path a new tempdir?#2016-09-0822:58juhoteperiproblem is that it changes for each Boot process#2016-09-0822:58juhoteperitemp-dir is per Boot process per dependency#2016-09-0823:00kennySo the checkout path is not static#2016-09-0823:00kennyno bueno#2016-09-0823:01cflemingCan you run the lein-generate when starting your boot auto-watcher?#2016-09-0823:01cflemingActually#2016-09-0823:01cflemingHang on, if you’re setting your own exploded path there’s no problem, right?#2016-09-0823:01juhoteperiShould be possible to update project.clj the first thing in pipeline#2016-09-0823:01cflemingBy definition it’s static.#2016-09-0823:02kennyI thought the exploded path changed each time the dependency updates, no?#2016-09-0823:02kennyboot removes old path from classpath then adds the new one?#2016-09-0823:02juhoteperiNo, the contents on temp-dir change#2016-09-0823:02kennyOh cool#2016-09-0823:02cflemingNo, I doubt it#2016-09-0823:03cflemingRight, just the contents.#2016-09-0823:03kennySo then it should work if I just call lein-generate when starting a repl#2016-09-0823:04kennyI suppose that bug you mentioned will need to be fixed first 🙂#2016-09-0823:04cflemingBut can’t you set the checkout dir?#2016-09-0823:04cflemingIf you do that, and set it within your other project, you’ll be fine.#2016-09-0823:04juhoteperiNo. :checkout-paths is read-only property, I guess supposed to be used for debugging and such#2016-09-0823:05cflemingBummer.#2016-09-0823:05cflemingSo is that a directory that boot then creates all exploded content inside of?#2016-09-0823:05kennyA vector of paths#2016-09-0823:05cflemingWell damn#2016-09-0823:06cflemingYou need a Cursive fix, then. I’ll try to fix that issue in the next EAP.#2016-09-0823:06kennyCool. Once that's fixed I'll update the lein-generate task to add :checkout-paths to :source-paths.#2016-09-0823:07kennyThat'll actually be really helpful#2016-09-0823:07kennyIt's pretty time consuming having to type the require out each time 😛#2016-09-0823:13cflemingThat, my friend, is a first-world problem 🙂#2016-09-0823:13cfleming(also, you can use your REPL history)#2016-09-0823:24kennyXD#2016-09-0910:07pupenoHow do I add a Java argument (now heap space) to a lein task? #2016-09-0910:29cfleming@pupeno You have to add them to project.clj#2016-09-0910:29cflemingI’ve gone back and forth on whether Cursive should allow you to override args that are provided in project.clj#2016-09-0910:29cflemingFor reproducibility, the idea is that they should be there.#2016-09-0910:30cflemingIf I let users override them in the run configs, merging them is pretty hard - parsing all the JVM options to filter dupes (e.g. if you specify -Xmx in project.clj and then override it in the run config, I have to remove one of them and replace it with the other).#2016-09-0910:31cflemingI’m open to opinions about whether that should be allowed per-task (or per-REPL, etc)#2016-09-0910:43pupenoUnderstood. #2016-09-0910:44pupenoIs this the best resource for running ClojureScript in Cursive? https://github.com/bhauman/lein-figwheel/wiki/Running-figwheel-in-a-Cursive-Clojure-REPL#2016-09-0910:47pupenoAlso, what does the clj cljs select above the repl do? #2016-09-0911:18cflemingYes, that’s the best solution. I’m going to add an integrated solution shortly.#2016-09-0911:20cflemingWhen you’re using a REPL, often you’ll connect to a Clojure REPL and then switch it to a CLJS one. Cursive has no way to know you’ve done that, and it needs to know whether the REPL is currently expecting clj or cljs. It tries to autodetect by looking for common banner strings, but sometimes you have to override it manually.#2016-09-0914:28pupenoArgh... It's hard to find available key shortcuts in intellij #2016-09-0914:56pupenoWhat's the difference between kill and kill sexp? #2016-09-0915:30imrehaha! I'm just planning a big rethink of how I organize my shortcuts#2016-09-0915:30imreprobably a chordy direction for less-used stuff#2016-09-0915:37shaun-mahood@pupeno: if you start with the figwheel template, you can add and run the repl script from that wiki without any of the other changes. That wiki info is a bit out of date I believe but there is nothing better, and I've had some difficulties getting it to work from certain lein templates.#2016-09-0919:12cfleming@pupeno Yeah, it’s really difficult to find enough shortcuts. Note that conflicts don’t matter if the Clojure action conflicts with something that isn’t used (or isn’t used much) for Clojure#2016-09-0919:13cflemingKill kills forms until the end of the line (and continuing if the last form on the line continues), kill sexp kills a single form.#2016-09-0919:17pupenoYeah... I'm not familiar enough with intellij to make good decisions on conflicts. #2016-09-0919:18pupenoWould you be up to doing it together. I could share my window, propose shortcuts and you tell me if the conflicts are acceptable. #2016-09-1003:21cfleming@pupeno Sure, that would be good, the only thing is the 11-hour time difference and I’m pretty busy right now (moving house and several other things at once).#2016-09-1006:50pupeno@cfleming ping me whenever it’s convenient for you to work on this and I’ll try to accommodate.#2016-09-1006:50pupenoalthough first I need to get intellij+cursive on a non-work laptop.#2016-09-1215:12onetom@kenny here is my dev task using checkout:
(comp
    (watch)
    (speak)
    (checkout :dependencies '[[hoplon/ui "0.0.1-SNAPSHOT"]])
    (environ)
    (hoplon)
    (reload)
    ;(cljs-repl)
    (cljs)
    (from-cljsjs :profile :development)
    (serve :port 8100))
i don't have to do (require ... :reload) manually. not sure why would u need that
#2016-09-1217:29nwjsmithFor navigating, I noticed that the keybindings override ⌘[/`⌘]` which are usually used for backwards and forwards. Does anyone have a good override?#2016-09-1218:02kenny@onetom Yes works for me in cljs, not in clj.#2016-09-1301:31onetom@kenny sorry, i didn't get that part. in clj im just using boot-system from https://github.com/danielsz/system BUT i haven't tried it with checkout indeed#2016-09-1303:10cfleming@nwjsmith Which keymap are you using? OS X or OS X 10.5+?#2016-09-1308:33sandbagsI’d like to run ring server from within Cursive. I know it’s possible because I read https://cursive-ide.com/archive/1269.html but I’m not clear how to create the appropriate Lein run configuration.#2016-09-1308:34sandbagsI assume i have to create a “Clojure Application” rather than “Clojure REPL"#2016-09-1308:35sandbagsbut it’s asking for things like Script Path & Module but i’m near clear how they connect#2016-09-1308:40cfleming@sandbags There’s a leiningen run configuration type#2016-09-1308:41sandbagsAhhh#2016-09-1308:41sandbags@cfleming i swear i looked over that list… didn’t see that#2016-09-1308:49sandbags@cfleming thanks!#2016-09-1308:51sandbags@cfleming should this support debugging? It worked using the run button with the trampoline turned off, but when I turned on the trampoline (it said it was required for debugging) and hit the debug button I get an entry in the event log "Error running Server: Error executing Leiningen task”#2016-09-1308:57sandbagsthere’s no output at all in the run box so i can’t see what’s going on, i just get that one message in the event log. but it doesn’t say what the error that failed the task is#2016-09-1309:01cfleming@sandbags Sorry, busy in the background. This should support debugging, yes, but there is a bug reported against the current build: https://cursive-ide.com/archive/2133.html#2016-09-1309:02sandbagsAh, yes, looks like the exact same thing here#2016-09-1309:46sandbagsWhat controls how Cursive knows about things to complete?#2016-09-1309:47sandbagsI’ve added a new dependency to projects.clj and run lein deps#2016-09-1309:47sandbagsat this point it still can’t complete package names#2016-09-1309:48sandbagsmake also doesn’t do it#2016-09-1309:57sandbagsif i restart, after restarting the packages are known to Cursive. I guess its something to do with this indexing task. But how to trigger that without restarting intellij#2016-09-1310:24cfleming@sandbags Lein toolwindow, hit the refresh button at the top#2016-09-1310:24cflemingOr Cmd-Alt-A, search for Refresh Leiningen Projects#2016-09-1310:25sandbagsaha, thank you#2016-09-1310:25sandbagsnow just to remember this 🙂#2016-09-1310:33cflemingI’m planning to remind you, but have not yet added that 🙂#2016-09-1314:08nwjsmith@cfleming when I went to look up the keymap, I figured out that ⌥⌘→/`⌥⌘←` can be used for forward/back. Thanks!#2016-09-1407:08dhruv@sandbags I've added the Synchronise Leiningen Projects task to my REPL Run config.. so whenever I add a new dep to project.clj, I just re-launch my REPL and it does it's thing (pulling in the dep / refreshing Cursive's autocomplete). Works well!#2016-09-1409:09sandbags@dhruv good call, thanks#2016-09-1505:05moizsj@cfleming any plans for fn moving? (from one NS to another)#2016-09-1507:37cfleming@moizsj Yes, definitely - that will be the next refactoring I add#2016-09-1507:37cflemingNo timeline promises, sorry#2016-09-1507:44moizsjthanks @cfleming#2016-09-1511:50gravIs it possible to move a def/`defn` to another namespace using refactoring?#2016-09-1511:50gravD’uh. Just looked up 😄#2016-09-1511:52cfleming@grav 🙂 Not yet, sorry, but I want it as badly as you do!#2016-09-1514:41henryw374I used this macro feature back in May https://cursive-ide.com/userguide/macros.html … but now I don’t get a Resolve x as… in the lightbulb. i have just upgraded to the latest cursive. any ideas?#2016-09-1517:56cfleming@henryw374 Which is the form you’re trying to customise?#2016-09-1606:04henryw374say if i try something like this:
(defmacro defblah [x])

(defblah abc)
and put the caret over (defblah , the light bulb just has choice to set indentation
#2016-09-1616:49hueypis there a way to use cursives pretty print fn in my own code? 🙂#2016-09-1620:41timothypratley
Starting nREPL server...
/Library/Java/JavaVirtualMachines/jdk1.7.0_51.jdk
^^ how do I make this JDK 1.8 (sorry I should know this lol)
#2016-09-1621:22kenny@timothypratley File > Project Structure. Under "Project Settings" click the "Project" tab. Select your SDK.#2016-09-1621:22kennyAlso see https://www.jetbrains.com/help/idea/2016.2/configuring-global-project-and-module-sdks.html#2016-09-1621:23timothypratley@kenny awesome, thanks!#2016-09-1716:15shooodookenI'm just wondering why I can't access/interact with vars through the REPL when I'm debugging with Cursive? As in, if I set a breakpoint in functionX, why can't I interact with anything in that (jvm) frame?#2016-09-1722:06tony.kayAnyone seeing this?
Error generating stubs for module rad: Exception in thread "main" java.lang.ExceptionInInitializerError
				at clojure.main.<clinit>(main.java:20)
				Caused by: clojure.lang.ExceptionInfo:
				------- Figwheel Configuration Error -------
				
				Missing required key :cljsbuild at path []
				
				:cljsbuild
				^ required key :cljsbuild is missing
#2016-09-1722:06tony.kaymy project file works fine for figwheel and cljsbuild, so I’m not sure what might be wrong. Using latest figwheel…perhaps a version conflict?#2016-09-1722:08tony.kayAh, issue 1529 (https://github.com/cursive-ide/cursive/issues/1529), it looks like#2016-09-1800:34cfleming@henryw374 I’ll try to reproduce that, thanks.#2016-09-1800:34cfleming@hueyp Yes, it’s basically just https://github.com/brandonbloom/fipp, modified to work better within Cursive#2016-09-1800:35cfleming@shooodooken That’s because the REPL tries to use the VM normally, and the VM is totally suspended when you’re at a breakpoint. I’d like to make that work using the evaluate expression functionality from the debugger, but I haven’t done that yet.#2016-09-1800:42hueyp@cfleming perfect, thanks 🙂#2016-09-1820:18denik@cfleming I saw a something cool in emacs recently. It enabled you to evaluate an expression and if a var is used inside it that is defined in another scope it would move up the scopes and eval at the right level. I found this incredibly valuable for individual binding in a let statement. Is this coming to cursive?#2016-09-1822:15cfleming@denik That’s a cool idea. When you say a var used inside it, do you mean a local binding like something from a let?#2016-09-1903:49denik@cfleming, yes in that case it was a local binding from a let. I think it simply moved through each parent scope until all symbols in the expression could be resolved. It never has to go beyond the top-level form since from there things are namespace global. This really eliminates a lot of pain writing print statements within lets or going to the end of the let an rewriting it to return the binding’s result.#2016-09-1903:51denik@cfleming I know you have a whole lot on your plate, but this seem like an easy feature. But in terms of dev experience I think it would be worth gold.#2016-09-1905:06cfleming@denik Yeah, that seems relatively easy, and it’s actually related to something I wanted to build for extract function#2016-09-1919:20kenny@cfleming I also would love that feature ^. Another use case is in deftests and evaluating all bindings in the parent scope until you can run your individual test.#2016-09-2004:13cfleming@kenny Cursive already does something like that - do you mean evaluate an individual assertion?#2016-09-2004:13cflemingi.e. an is check or something similar?#2016-09-2004:16kennyYes#2016-09-2004:17kennyWhich could (probably is) be surrounded by a let block. #2016-09-2004:51tghaliI'm having a little frustration...#2016-09-2004:52tghalicreated a lien project, added a local repl configuration#2016-09-2004:52tghaliwhen I start the repl, it can't find the .core namespace#2016-09-2004:53cfleming@kenny So that gets a little tricky because of fixtures and the like#2016-09-2004:53cflemingAnd also cases such as having your assertion in a loop and so on.#2016-09-2004:54cflemingBut it’s something I’d really like to have myself, I’ll see what I can do.#2016-09-2004:54cfleming@tghali How did you create the lein project? On the command line or within Cursive?#2016-09-2004:54tghaliwithin cursive#2016-09-2004:55cflemingOk, can you post a screenshot of your REPL run config?#2016-09-2005:00cflemingLooks good - what’s the error you’re receiving?#2016-09-2005:01kennyWhile having custom behavior for tests would be cool, the simple use case should be covered. Example:
(let [x 1
      y 1]
  (is (= 2 (+ x y))))
Just running the (is (= 2 (+ x y))) would give you your result, taking into account the parent scope
#2016-09-2005:01tghaliphooey.core:#2016-09-2005:01tghali(ns phooey.core) (def something "wowee")#2016-09-2005:02tghaliin repl:#2016-09-2005:02tghaliConnecting to local nREPL server... Clojure 1.8.0 nREPL server started on port 53981 on host 127.0.0.1 - <nrepl://127.0.0.1:53981> wowee CompilerException java.lang.RuntimeException: Unable to resolve symbol: wowee in this context, compiling:(/tmp/form-init5376564895231553441.clj:1:4272) (str "sdf " wowee) CompilerException java.lang.RuntimeException: Unable to resolve symbol: wowee in this context, compiling:(/tmp/form-init5376564895231553441.clj:1:1) ns => #object[clojure.lang.Namespace 0x6b1ae6c2 "user"] (find-ns 'phooey) => nil (find-ns 'phooey.core) => nil#2016-09-2005:02cfleming@kenny Right, but something like this is harder:
(doseq [x [1 2]
        y [1 2]]
  (is (= 2 (+ x y))))
#2016-09-2005:03cfleming@tghali So the problem is that you haven’t loaded your namespace - Cursive doesn’t load namespaces automatically.#2016-09-2005:04cfleming@tghali Tools-&gt;REPL-&gt;Load file in REPL before you start evaluating should do the trick#2016-09-2005:05cfleming@kenny I can special case your simple case, but then it’s more complex than just a case of ensuring all the symbols resolve.#2016-09-2005:05kennyTBH just having this ability for a let would be huge. I think loops are more of a special case#2016-09-2005:05cfleming(that case is probably ok actually, it’ll just run the is multiple times, but there are plenty of trickier cases)#2016-09-2005:06cfleming@kenny Ok, I’ll try something along those lines and see what I can come up with.#2016-09-2005:07kennyAlso would be cool to have the values of the let displayed next to their definition (like Light Table), but I recall you saying redrawing the editor in IntelliJ was hard/not possible.#2016-09-2005:08cflemingAgain, it’s actually relatively simple in simple cases. It gets difficult when your results are collections.#2016-09-2005:09kennyBecause it becomes too large to display?#2016-09-2005:14kennyAlso, not sure if this precisely covered but for clarification.. It would be awesome to be able to individually evaluate let bindings (without actually being in the body of the let):
(let [a 1
      b 2
      c (+ a b) ;; <— cursor is after last parens
      d 4])
Then run the command “Send (+ a b) to REPL” and it knows about a and b.
#2016-09-2005:17cflemingYes, @denik’s original case would cover that, with the slight caveat that:
(let [a 1
      b 2
      c (+ a b) ;; <— cursor is after last parens
      d (launch-missiles)])
would launch your missiles since the whole let would be evaluated.
#2016-09-2005:17cflemingActually, thinking about it that’s a little trickier since the return value of the let is not what you want - that would be a little harder.#2016-09-2005:18cflemingI’m actually planning some more sophisticated manipulation of this kind of form for extract function, since in a lot of cases you’d like intermediate local let bindings moved into the extracted function too.#2016-09-2005:22cfleming@kenny Sorry, missed your earlier question about collections display - yes, the restriction is that I can only display a single line at the end of the code line.#2016-09-2005:23cflemingSo the only available space is whatever space is left at the end of the line after the code, simple values should be ok but collections will be tricky.#2016-09-2005:36kennyThat super awesome. That feature would be HUGE! 😀#2016-09-2005:36tghali@cfleming , was there a time when the core namespace was loaded and set as current ns on repl launch? I have an older project with a local repl that behaves that way (very conveniently).#2016-09-2005:37kenny@tghali There’s no way to tell a REPL what the “main" namespace is#2016-09-2005:38kennyAlso, it takes no time at all to load and switch into the namespace you want. Just set keybindings for load and switch commands and you’ll be set 😉#2016-09-2005:51tghali@kenny - I just found the missing ingredient. I needed :main phooey.core in my defproject.#2016-09-2005:52tghalithanks for pointing out keybindings; I'll look into them. I'm sure they can be very useful.#2016-09-2011:29tapIn clojure file, when I type ; on a non-empty line, this semi-colon is shifted to column 61. I just want to it stay where I typed. I’m not sure if it’s IntelliJ thing or Cursive thing. Anyone knows how to turn this off?#2016-09-2020:22cfleming@tap Settings-&gt;Editor-&gt;Code Style-&gt;Clojure-&gt;General-&gt;Comment alignment column. Setting that to 0 will do what you want.#2016-09-2021:34bradrhod@cfleming : I have an application written storm. I really want to debug some of the lower level startup code in Storm that is written on clojure. I have a remote debug jvm and I am connected to that vm with Intellij and Cursive. That is hitting breakpoints but none of the symbols are resolving, and the step throughs seem to be java byte code step throughs. I am not stepping through at the Clojure level.#2016-09-2021:36bradrhodI have spent a bit too much time on this already. Those applications are starting with nrepl running from nrepl.jar file.#2016-09-2021:36bradrhodBut I am not sure the debug port, the process does not have any ports other than the ones for jmx, already in the java command line.#2016-09-2021:38bradrhodI also need to debug at startup. so I have -agentlib:jdwp=transport=dt_socket,server=y,address=8100,suspend=y which is halting until I connect with initellij debugger.#2016-09-2021:39bradrhodCan I get the Clojure symbols and step through with Clojure using lines?#2016-09-2021:40bradrhodThis is a link to the nrepl jar file: https://github.com/clojure/tools.nrepl#2016-09-2021:50cfleming@bradrhod Cursive uses the JDI under the hood, which actually debugs Java bytecode. It’s difficult to get e.g. expression level debugging with it.#2016-09-2021:51cflemingI spoke about this at Clojure/West last year, and I discussed a bunch of the problems with it there.#2016-09-2021:51cflemingThe symbol resolution should work, with the caveat that Storm is extremely macro heavy and Cursive struggles with it.#2016-09-2021:51cflemingDo symbols like defn resolve ok? Which are some of the symbols that do not resolve?#2016-09-2021:56bradrhodI do not think any variables are resolving.#2016-09-2021:56bradrhodI saw your talk on Clojure/West and have a note to look at it again.#2016-09-2021:57bradrhodthanks for all your help.#2016-09-2022:35cflemingbradrhod When you say the symbols are not resolving, what do you mean? Do you mean local variables in the debugger view? I was referring to the editor, where everything except nimbus appears to be resolving correctly.#2016-09-2022:36cfleming@bradrhod ^^#2016-09-2022:37bradrhodcorrect#2016-09-2022:37bradrhodin the debugger. Symbols#2016-09-2022:37bradrhodIf nothing can be done, that is fine. Just wanted to ask the question.#2016-09-2022:37cflemingYou’re seeing no symbols where the debugger is currently stopped in that image because it’s stopped in a class initialiser (<clinit> in the stack frame)#2016-09-2022:38bradrhodIt hit the break point on line on 437#2016-09-2022:38bradrhod(defnk launch-process [command :environment {}]#2016-09-2022:39bradrhodI think it is showing the javabytecode decompile symbols there, correct?#2016-09-2023:16cflemingCould be, can you send a screenshot of what you’re seeing when it’s stopped at that line?#2016-09-2023:16cfleming@bradrhod ^^, sorry, forgot to ping you again#2016-09-2101:11tapThanks @cfleming. I missed this input box because I was looking for a check box 😅#2016-09-2117:47bradrhod@cfleming : sorry for the delay.#2016-09-2117:48bradrhodWe have hit the breakpoint at line 437. and this is the UI from intellij that you requested.#2016-09-2117:48bradrhodugh, wait that was an old screenshot#2016-09-2117:48bradrhodjust a second.#2016-09-2117:49bradrhodI reran, have suspend=y in the jdwp command, so the app breaks waiting for a debugger to attach.#2016-09-2117:50bradrhodI think maybe the issue is that i have the app built locally with Java 8, but I am remote debugging an app that is running on java7#2016-09-2117:50bradrhodI will get my dev environment to run java 7 and rebuild and try that.#2016-09-2117:51bradrhodLet me know if you have any ideas.#2016-09-2118:01cfleming@bradrhod The problem is that your breakpoint is still stopping in the class initialiser. This is because Clojure executes code very differently to Java.#2016-09-2118:02cflemingWhen a namespace is loaded, the class initialiser will load all the function classes and attach their metadata etc#2016-09-2118:03cflemingWhat you’re seeing is that during that initialisation, the code being executed is the code that actually creates your function and assigns it to a var.#2016-09-2118:04cflemingIf you put your breakpoint on the following line (438), it will break when the function is actually called.#2016-09-2118:05bradrhodthanks, that sound like how javascript create class initialization. I will move the breakpoint and see if that is better.#2016-09-2304:49timgilbertSay, I’m still a little baffled about what the right thing to do is when I have a leiningen checkout dependency (link from my-parent/checkouts/my-child to the root of the my-child project, which has a distinct git repo) and IntelliJ warns me about “Unregistered VCS root detected”. I have options for “Add root”, “Configure”, “Ignore”. What happens if I “add root”?#2016-09-2309:00cfleming@timgilbert If you go to Settings-&gt;Version Control, you’ll see how the roots work. It basically maps a directory within the project to a VCS type. So if you Add root, it will simply register my-parent/checkouts/my-child as a Git repo, and will let you modify files, diff, commit etc. If you’re editing files in my-child while working on my-parent (which presumably you are, otherwise you wouldn’t be using checkouts) you probably want this.#2016-09-2309:00cflemingEither way, if you find it’s not what you want, you can always remove the root later and ignore it from that settings pane.#2016-09-2312:33timgilbertAwesome, thanks for the explanation @cfleming#2016-09-2322:26bfabryanyone know why I would have a thing where if I have a non-clojure file open it takes over the whole screen and the clojure files get hidden behind it?#2016-09-2420:07cfleming@bfabry I had that for a while too with the 2016.2 EAP. It was really annoying. I think it must be an IntelliJ bug. I couldn’t find anything in their tracker about it, and I couldn’t reproduce it reliably enough to file one.#2016-09-2420:07cflemingIt just went away after a while for me.#2016-09-2523:39danboykisI am currently on 2016.2.1... how safe is it to upgrade to IDEA 2016.2.4?#2016-09-2523:40danielcomptonDon’t think 2.4 is supported yet#2016-09-2608:14rarous@danboykis it is safe#2016-09-2608:35Rachel WestmacottI’ve just noticed that if I rename a (deftest …) form then re-running the tests at the REPL appears to run all the tests twice (once per name). Obviously not a big deal, though.#2016-09-2608:35gerredjust means you’re twice as sure it ran troll#2016-09-2608:41imreWell, it can be a problem as you could be changing the assertions as well. It also happens if you delete a deftest you've already run in the repl - run all tests in ns will keep executing it. If you use the reloaded workflow though, you can call (refresh) and it will get rid of symbols no longer in the file.#2016-09-2613:44danboykis@rarous thanks#2016-09-2614:15imrehas anyone used cursive with lein-sub or lein-modules? https://github.com/jcrossley3/lein-modules#2016-09-2617:12bfabrysuggestion: all the useful actions (paredit, repl interaction, tests) able to be bound to some opinionated set of default keybindings. mine and my co-workers keybindings are rapidly diverging#2016-09-2617:54spiedenis cursive meant to support lein’s syntax for private repository credentials stored in environment variables? when I have e.g.
:username  :env/artifactory_user
:password  :env/artifactory_password
i get “dependency resolution error” while subbing in the values works
#2016-09-2618:00spiedenseems to be intermittent#2016-09-2618:21cfleming@danboykis Any 2016.2.x should be safe. I haven’t got 2016.3.x EAP support in there yet.#2016-09-2618:22cfleming@peterwestmacott I suspect that’s because Cursive doesn’t completely replace the test namespace, it just loads it. So you’ll get a var with your new name, and still have a var with the old name hanging around.#2016-09-2618:23cfleming@imre When I was doing the last big round of lein changes, I tested lein-modules pretty well - immutant works, for example, which is the canonical lein-modules project.#2016-09-2618:24cfleming@bfabry Yes, I’m planning to just have default bindings for everything soon. I’ll send out the ones I’m planning to choose for feedback before making it definitive.#2016-09-2618:25cfleming@spieden I’d need to check that - I think it does, but IntelliJ probably doesn’t see env vars you have defined.#2016-09-2618:27spieden@cfleming i’m setting them on the mac via e.g.
launchctl setenv ARTIFACTORY_USER deploy
#2016-09-2618:27spiedencould be that it’s not seeing them though — can’t think of a way to check#2016-09-2618:35bfabryit really surprises me that there's no way to auto discover external library javadoc url's in intellij. we bring in the google cloud stack, that's like 50 jars, I have to set a url for every one? what the fuck java ecosystem#2016-09-2618:36spieden@bfabry you mean clicking the little “download” link in the banner across the top of the editor?#2016-09-2618:36spiedeni think if you precached them all via maven it would pick them up#2016-09-2618:37spiedenhttps://stackoverflow.com/questions/4166190/forcing-maven2-to-download-source-jars-to-local-repository#2016-09-2618:38spiedenso maybe
lein pom
mvn dependency:sources
#2016-09-2618:38bfabryah ok so that builds the javadocs and hosts them locally? that'll do. I think I was expecting it to be more internet centric, but I guess I'm forgetting java is pretty old 🙂#2016-09-2618:40spiedenno building involved, it just checks your maven cache for jars containing the source code corresponding to the compiled code you’re trying to get docs for and gives you that prompt if they’re not there#2016-09-2618:41bfabryright. I think the confusion here is I very rarely navigate to source, I just hit up documentation (official stuff like google jars have good doco) so I never see the download link. hitting f1 just gives you the javadocs, but if you have never cached the jar it just gives you a sig#2016-09-2618:42bfabrybut if you navigate to definition, click the download button, suddenly all the f1 popups are detailed 🙂#2016-09-2618:45spiedenfor projects that only publish docs and not full source i think you can do this:
mvn dependency:resolve -Dclassifier=javadoc
#2016-09-2618:46bfabryawesome, cheers#2016-09-2623:46liamdanyway to debug a cljs app running via figwheel?#2016-09-2700:34cfleming@spieden I’m not sure if IntelliJ will see those env vars or not, I’ll try to test that. If not I’ll need to allow them to be set in the UI, but then that involves letting some be password fields etc.#2016-09-2700:34cflemingI might need to add a specific repo auth UI for that case, I’d like it to be more general but that might be tricky.#2016-09-2700:36cfleming@spieden @bfabry I don’t think that will work, sadly. Do the poms for these jars have the doc URL in the pom anywhere?#2016-09-2700:38cflemingI just checked, looks like no.#2016-09-2700:40cflemingThe reason that Cursive doesn’t allow sources and javadoc to be downloaded automatically is that most Clojure deps don’t have it. There’s no good way to tell which deps are Clojure, and so Cursive will try to go out to all your repositories on every sync for all your libs which don’t have sources in your local Maven repo. That will be most of them, obviously.#2016-09-2700:42cflemingThe only solution I can think of for this would be to use some metadata in the project.clj which doesn’t interfere with other tools, something like :dependencies [^:with-sources [com.google.cloud/puffy-white-clouds “1.2.3”]]#2016-09-2700:42cflemingThen I would only sync the source (or javadoc) artifacts for those deps which explicitly ask for it.#2016-09-2700:44cfleming@liamd No built in cljs debugging yet, sorry#2016-09-2700:45cflemingcljs-devtools and dirac seem to be the best options now.#2016-09-2703:56bfabry@cfleming I was actually talking about a java lib, so the download sources button works 🙂#2016-09-2705:30pupeno@cfleming these shortcuts seem to be working nicely so far, although they might be a bit controversial: https://www.cheatography.com/pupeno/cheat-sheets/cursive-on-windows/#2016-09-2708:47vikeriHmm strange. All of a sudden I don’t have the REPL option under Tools and my default key binding does not work anymore. Did anyone else run into this?#2016-09-2708:47vikeriOn 2016.2.4 and 1.4.0-eap2-2016.2#2016-09-2708:53vikeriI am on macOS Sierra I should add#2016-09-2713:02horiaany ideas ?#2016-09-2713:38misha@horia repl settings?#2016-09-2713:41horia@misha I ticked 'use clojure.main in normal JVM process' and now it seems to start fine. thank you for your time.#2016-09-2717:52cfleming@horia That option will not affect the editor you end up with. I’ve never seen that before, I suspect that just restarting the REPL night have worked.#2016-09-2717:53cfleming@vikeri That option is only present when you have a REPL running - if you start one up, that menu item will reappear.#2016-09-2717:54vikeriAlright, funny, I've used it heaps but I never noticed that. Must have only been looking when I had a REPL going already#2016-09-2717:56cfleming@bfabry Right. But let me know if it would be useful to indicate with metadata that you’d like sources or docs downloaded automatically.#2016-09-2717:58bfabryI mean it would definitely be useful if I didn't need to jump to the definition and click download sources the first time#2016-09-2717:59cflemingOk, I’ll see how difficult that might be to implement.#2016-09-2718:00cflemingI did have an implementation that did something similar previously, I can probably fish it out of Git and brush it up.#2016-09-2816:11pupenoIs there a way to get test errors in the repl, not just the report at the end? #2016-09-2816:15darwin@pupeno you mean compiler errors? or something your own code prints?#2016-09-2816:15darwinah, ok, I understand, test errors printed by cljs.test macros, right?#2016-09-2816:16pupenoI mean the error generated by the is function. #2016-09-2816:19darwinhm, it is using normal println by default, so it should work, and you don’t see them at all or they all get printed at once at the end with report summary?#2016-09-2816:19darwin@pupeno ^#2016-09-2816:20darwinhow are you connected to REPL? using a script or via nREPL#2016-09-2816:20darwinI’m just playing with some nREPL stuff for Dirac, so I thought I could give at least some help in case of nREPL#2016-09-2816:24pupenoI have it configured as run nrepl with leiningen #2016-09-2816:24pupenoI see the end report summary of how many errors and failures there were #2016-09-2816:24pupenoAnd I can also see things I print. #2016-09-2816:24pupenoBut not the error reports from the test macros. #2016-09-2816:25pupenoThe test functions do get marked as failed and the failed badge has that output, but a 50 line tool tip is hard to read. #2016-09-2816:28pupenoBTW, I just con be two devs to Cursive at work (Credit Suisse) and we are thinking of standardizing in Cursive for pair programming. #2016-09-2816:28darwincan you run lein repl from command-line and run your tests there?#2016-09-2816:29pupenoDoes run test in the repl still work? #2016-09-2816:29darwinwell, how cursive does it?#2016-09-2816:29pupenoI don't know. #2016-09-2816:30darwinI assumed it runs that lein command, connects to nrepl and then runs all tests using cljs.test#2016-09-2816:30pupenoI thought it was nrepl magic. #2016-09-2816:30darwinif it does its own magic there, then I can understand that something might not work 🙂#2016-09-2816:31pupenoI think it's not a bug, it's a feature. #2016-09-2816:31darwinanyways, if your own println works, you can define your own cljs.test :reporter and implement your own printing to work around this issue I guess#2016-09-2816:31pupenoI think that output is hidden on purpose. #2016-09-2816:31darwinI assume cursive defined its own reporting functions and intercepting them#2016-09-2816:32pupenoAnd having badges next to each assertion telling you which one passed and which one failed is great. #2016-09-2816:35darwinyeah, now I looked at cursive docs, the test support looks good 🙂#2016-09-2816:35pupenoYeah... In those screenshot you can see the lack of error output. #2016-09-2816:35darwinand it is for clojure only I assume, I was automatically thinking about cljs, so forget what I wrote 😉#2016-09-2816:42pupenoYeah. #2016-09-2816:43cfleming@pupeno There isn’t right now, no, although a couple of people have asked for it.#2016-09-2816:44cflemingMost people don’t want it cluttering up their REPL if they’re using the GUI functionality#2016-09-2816:44cflemingBTW instead of using the tooltip, you can click on the error icon and get a visual diff.#2016-09-2816:47cflemingCursive basically uses clojure.test functionality, but it hooks the test reporting to get the information it needs for the icons etc.#2016-09-2816:49pupenoIn my team some people would like to get the output anyway #2016-09-2816:50pupenoSomething that I think can help a lot would be for the window with the diff, which I think is great, to be a proper top level window. #2016-09-2816:50pupenoIn Windows it cannot be maximized #2016-09-2816:52darwin@pupeno I think you can always re-hook the test reporting and do whatever you want there, e.g call cursive and then print your own thing#2016-09-2818:14bfabry@pupeno I'm sure you know this, but if you want to just run the test in the repl and get the output sans cursive you can do (clojure.test/run-tests your-test-ns.t-test)#2016-09-2818:16pupenobfabry not using the keymap is too high of a price to pay though.#2016-09-2818:45bfabryfair enough
#2016-09-2906:40cfleming@pupeno You could use REPL commands for that: https://cursive-ide.com/userguide/repl.html#repl-commands#2016-09-3017:48jrheardwill cursive be getting support for the new (don’t know the actual name for this) namespaced-keyword map syntax? eg #:foo{:bar :baz} becomes {:foo/bar :baz}#2016-09-3017:49bfabry@jrheard EAP releases already do#2016-09-3017:49jrheard!!!!!!!!#2016-09-3017:49bfabryhttps://cursive-ide.com/archive/2130.html#2016-09-3017:50jrheardthanks!#2016-09-3017:50bfabrynp#2016-09-3019:57kenny@bfabry @jrheard I assume you guys are talking about in the REPL.. Do I need to enable this somewhere? I still get this output and I am on 1.4.0-eap2-2016.2 running clojure 1.9.0-alpha13
{:foo/bar 1}
=> #:foo{:bar 1}
#2016-09-3019:58jrheardi was talking about just in regular text editing, particularly in the context of code formatting#2016-09-3019:58jrheardon my mac laptop i hit option-command-L periodically and it formats the code nicely for me, but on the non-EAP build that code formatting didn’t know what to do with #:foo {:bar :baz} maps#2016-09-3019:59kennyAh#2016-09-3019:59jrheardmy cursive REPL is in a slightly borked state atm so i can’t test the output of the command you gave on my machine, sorry! 😞#2016-09-3020:00bfabry@kenny that's the expected behaviour, and is coming from the clojure printer not cursive#2016-09-3020:00cfleming@kenny That output is Clojure itself… right#2016-09-3020:01kennyI have tried doing
(binding [*print-namespace-maps* false] {:foo/bar 1})
=> #:foo{:bar 1}
#2016-09-3020:01kennyAny idea how to get normal map printing back?#2016-09-3020:02cfleming@kenny Actually, I’ll need to check that - there will have been changes to the standard printer which I might need to sync to Cursive. It’s been ages since I touched that code, I can’t remember off the top of my head how it works.#2016-09-3020:03kennyIt has been annoying the hell out of me lately. Makes maps completely unreadable 😛#2016-09-3020:03cflemingYeah, I hear that - I actually don’t like the namespaced maps at all.#2016-09-3020:04cflemingI’d have preferred just emphasising ::alias/kw forms.#2016-09-3020:04cflemingAnyway, I’ll try to sort that out in an EAP soon.#2016-09-3020:05cfleming@kenny https://github.com/cursive-ide/cursive/issues/1541#2016-09-3020:05bfabry@kenny I think the problem there is the binding has gone out of scope by the time the repl actually calls print on the value
voke.specs=> (binding [*print-namespace-maps* false] (prn {:foo/bar 1}))
{:foo/bar 1}
nil
#2016-09-3020:06kenny@cfleming Awesome.#2016-09-3020:06cfleming@bfabry In this case you’re definitely right, because it’s Cursive on the client side actually doing the printing.#2016-09-3020:07kennyI though it was something like that#2016-09-3020:07bfabry@cfleming it actually does it in a raw boot repl too#2016-09-3020:07cflemingThe problem with doing prn like that is that the result comes back as an output string, and Cursive can’t format it etc.#2016-09-3020:07cflemingSo for big maps it’ll be even uglier than in the namespaced form.#2016-09-3020:08bfabryI'm not really sure how to bind that var for the whole repl process =/#2016-09-3020:08cflemingIt’s actually pretty hard for Cursive to emulate the printing vars since they’re on the REPL server, and Cursive is the client.#2016-09-3020:09cflemingLocally binding them will never work, if you set! them I might be able to fix that.#2016-09-3020:09cflemingOtherwise I can just add corresponding config in the REPL UI.#2016-09-3020:11kennyWhose responsibility will it be to set *print-namespace-maps*?#2016-09-3020:11kennySeems like the default should be false for any repl#2016-09-3020:16bfabryit defaults to true atm because printing the maps that way was specifically added to make them easier to read. holding off on any of my own judgement as to whether that works for now, it wouldn't make much sense for it to default false#2016-09-3022:52puzzlerMy plugin version shows Version: 1.2.6-2016.1. I can't figure out how to update the plugin (or is the one from May the last stable release?)#2016-09-3023:46puzzlerI manually uninstalled the plugin to try to get the newest plugin to show (1.2.7), but when I click to install the new plugin, it downloads something for a while and then nothing happens.#2016-10-0100:43puzzlerTried uninstalling and reinstalling Intellij, latest Ultimate edition (porting over my old settings file so I don't have to re-register), go to settings, browse repositories, install cursive plugin -- it downloads for a while and then nothing happens. Can't install Cursive.#2016-10-0100:45cfleming@puzzler That’s not good. The latest stable version should be 1.3.1.#2016-10-0100:45cflemingI used to get a lot of flakiness when I was using my own repo, but since I’ve switched to using the JetBrains one, it’s been stable.#2016-10-0100:46puzzler1.3.1 isn't even showing up when I try to browse repositories. Is there any way to force it to look in the right place?#2016-10-0100:46cflemingIf you go to Settings->Plugins->Browse Repositories and press refresh, that doesn’t pick up 1.3.1?#2016-10-0100:47puzzlerNo.#2016-10-0100:48puzzlerBased on your comment, I just went into "Manage Repositories", and I see the following entry under custom repositories: https://updates.cursive-ide.com/plugins-2016.1.xml#2016-10-0100:48cflemingIf you go to Manage Repositories from Browse Repositories, do you have any plugin repositories registered there?#2016-10-0100:48cflemingOk, if you remove that, hopefully things will work.#2016-10-0100:48cflemingThat should have been removed automatically though, I’ll check that.#2016-10-0100:50puzzlerSo far, so good, it's asking me to restart...#2016-10-0100:50puzzlerSeems to be working now. Thanks.#2016-10-0100:51puzzlerIs there a change log so I can understand what's changed recently with the plugin?#2016-10-0100:51puzzlerI especially want to know if there have been any changes surrounding the launching of the REPL and setting up configurations, as the last version I worked with had some extra entries that were confusing and not useful.#2016-10-0100:53cflemingActually, I don’t have a good change log in a single place, I’ve been meaning to add one. The best source for change updates is the mailing list archive: https://cursive-ide.com/archive/. I post information about new versions there but I have not put them all in a single place yet.#2016-10-0100:54cflemingHowever I don’t think those REPL entries have changed recently.#2016-10-0101:06puzzlerI recently updated my JDK as well. Where do I need to go to make sure the REPL is using the latest JDK on my system?#2016-10-0101:09puzzlerNever mind, found it by trying to create a new project.#2016-10-0108:19puzzlerHow do I force cursive to reload the "external libraries"? I'm having to do "lein deps" from a command line to pick up new snapshots from clojars, and when I updated the version of clojure in my project file, the Cursive project external libs still shows old version.#2016-10-0108:44cfleming@puzzler In the Leiningen window, press the refresh button, or search for the “Refresh Leiningen Projects” action using Cmd-Shift-A or Ctrl-Shift-A#2016-10-0108:45puzzlerThanks. Didn't notice that window existed.#2016-10-0108:46cflemingI’m planning a notification for that with a link to refresh them right away, since it’s a common source of confusion.#2016-10-0108:58puzzlerHave you played around with 1.9 much in Cursive? When something like defn or let fail during compilation of a file due to non-conformance to the corresponding Clojure specs for those macros, no location is reported so it's extremely difficult to figure out what the error is referring to.#2016-10-0108:59cflemingNo, I haven’t. Is that a problem with Cursive or with spec? Is Cursive masking location info somehow?#2016-10-0109:02puzzlerNot sure, this is the first time I've tried it.#2016-10-0109:03cflemingI’ve heard several people comment that the spec messages are hard to decipher. I haven’t played around with it enough myself to know yet.#2016-10-0112:15Alex Miller (Clojure team)Macro spec errors do throw with file/line/col info so there shouldn't be any reason they can't be located#2016-10-0112:31puzzlerWith smart parens turned off, is there any way to enter a multi-line input at the REPL?#2016-10-0112:38puzzler@alexmiller Does it throw file/line/col info when the problem is in Clojure code from a jar file listed as a dependency? That's the context in which I was having a problem, where the REPL couldn't even start because the Clojure compiler was throwing an error while starting everything up and compiling and loading all the dependencies.#2016-10-0112:47Alex Miller (Clojure team)yes#2016-10-0112:51Alex Miller (Clojure team)regardless of when you’re compiling or where the source resides, the error thrown is a CompilerException that carries file/line/col info#2016-10-0115:30shaun-mahood@puzzler: not sure the shortcut on other platforms, but on my windows machine ctrl-enter allows multi line input with smart-parens off - so there must be a shortcut you can define. Can't check right now, but if you can't find it let me know and I can see what command it's bound to.#2016-10-0120:17puzzler@shaun-mahood I'm also on Windows. In my keymap settings, Enter is bound to Execute current statement in one-line console and Ctrl-Enter is bound to Execute current statement in multi-line console. But they both do the same thing in the REPL window, which is to immediately send whatever I've typed on the first line to the nREPL server for evaluation. So yes, I'd be interested to know how you have it set up. I couldn't find any other "Execute" commands available in the keymap options.#2016-10-0200:37shaun-mahood@puzzler: I looked at all my config and couldn't find anything obvious. I may have smart parens on, here's how my repl behaves - open paren creates a closing paren, enter goes to next line, ctrl-enter executes. I have structural editong turned off in the bottom right of the screen. Wish I could be more help!#2016-10-0201:02puzzler@shaun-mahood Right, I think that's the distinction. I have it set up so that typing an open paren does not create a closing paren. And that seems to break the Enter/Ctrl-Enter behavior in the REPL.#2016-10-0203:08cfleming@puzzler I’ll try to reproduce that and fix it.#2016-10-0203:10cfleming@puzzler Just to be clear, is your problem is that Ctrl-Enter doesn’t send the command immediately, or that Enter does send immediately?#2016-10-0205:52puzzler@cfleming Both Enter and Ctrl-Enter send the command immediately, so there's no way to do multi-line entry (without manually adding an extra right-paren and then keyboarding back to before the right-paren).#2016-10-0223:11puzzlerInstructing cursive about the indentation settings for a macro doesn't seem to work the way I remember it working, or the way that is explained in the Cursive documentation. When clicking on the "lightbulb" for the macro, instead of letting me type a number of characters to indent, it takes me to a completely different dialog box under the indentation settings in the settings panel and shows an example of how "while" would be re-indented (even though I clicked on something other than while), but there doesn't seem to be any way to edit this box or add a new construct or make any changes. What am I missing?#2016-10-0223:20cfleming@puzzler I’m not sure why it would work in the way you describe. I’m in the middle of a merge, when I’m done I’ll check that.#2016-10-0223:21puzzlerHmmm, I was clicking on the little triangle arrowhead at the right to see the options, but it looks like that is the wrong thing to do. If you click to the left of the triangle it works more as expected. Confusing, but I think I might have it figured out now.#2016-10-0223:22puzzlerWhat is the difference between setting the "resolution" and setting the "indentation"? Is that just two different ways of accomplishing the same thing?#2016-10-0223:23cflemingNo, the indentation just sets the indentation rules.#2016-10-0223:23cflemingBTW one point on that - the number is not the number of spaces to indent the form, it’s the number of parameters to treat as special.#2016-10-0223:25cflemingThose parameters will be aligned, then everything following them will be assumed to be body forms, and will be indented two spaces.#2016-10-0223:25puzzlerInteresting. So what is resolution? It seems like resolution is also an indenting thing, a way to say "indent this form like this other common form".#2016-10-0223:26cflemingNo, resolution refers to symbol resolution. So if you have a let-like macro form you’ve defined, you can say that your form should resolve its local variables in the same way as let.#2016-10-0223:27cflemingThat requires that your form conforms to the grammar for let, so it only works for forms that are very similar syntactically to their built-in counterparts.#2016-10-0223:29cflemingAlso, when the lightbulb pops up, the most convenient way to see the options is Alt-Enter rather than clicking.#2016-10-0223:29cflemingI’ll see if I can figure out the triangle issue, I might not have seen that since I never click the bulb.#2016-10-0223:30puzzlerAlt-Enter shows the same thing as clicking on the lightbulb: misleading triangles at the right end of the option which take you to the wrong dialog.#2016-10-0223:30puzzlerMaybe you just know the "right" way to interpret, so you never noticed the triangles.#2016-10-0223:31puzzlerIs there a way to see all the forms you've "taught" to cursive? Is there a way to teach it something that persists across projects?#2016-10-0223:32cflemingOh, I see - you’re referring to the arrow in the popup menu, not the arrow on the lightbulb itself. Yes, that will show further options for each item, often allowing you to disable the relevant inspection, or configure it, etc.#2016-10-0223:32puzzlerRight, I thought that arrow was the only thing to click on. It gives you an option to "configure indentation" which is what I thought I needed to click, but it takes you somewhere that doesn't do anything.#2016-10-0223:33puzzlerOr, at least, all it lets you do is turn on and off the indentation overall, I think.#2016-10-0223:33cflemingYes. You can see the indentation configuration under Settings-&gt;Editor-&gt;Code Style-&gt;Clojure-&gt;Form Parameters, and the resolution configuration under Settings-&gt;Languages &amp; Frameworks-&gt;Clojure-&gt;Symbol Resolution.#2016-10-0223:34cflemingNeither of those currently allow editing the forms, because of my fear of JTables - that’s on my list to fix.#2016-10-0223:44cflemingOh, and those settings should both persist across projects.#2016-10-0223:46puzzlerIs there any way to "unteach" something you've added to the indentation configuration?#2016-10-0223:47cflemingNot currently, due to the aforementioned JTable fear. You can reconfigure the form to the correct indentation, though.#2016-10-0223:50puzzlerWhat is the difference between 0 and indent?#2016-10-0223:52cflemingThere probably isn’t one, now that I think about it.#2016-10-0223:53cflemingBoth will cause all forms after the head symbol to be indented two spaces.#2016-10-0223:57puzzlerHmmm, so is there a way to get back to something working like functions do by default, i.e., things line up under the first parameter?#2016-10-0223:59cflemingThat’s something I realised was missing, and will add for the next EAP, now that you mention it. Functions internally have essentially Integer.MAX_VALUE parameters - the best approximation available in the UI right now is to set that to 9. I’ll add a “Function” option there which will do the right thing.#2016-10-0300:08puzzlerShould I set an "if-let"-style macro to mimic resolution of "let"? Is that considered "close enough" to do the right thing?#2016-10-0300:09cflemingYes. The only issue is that the bound variable will be incorrectly available in the else clause.#2016-10-0300:09puzzlerActually, after trying it out more carefully, it looks to me like maybe Indent of "0" works like functions do.#2016-10-0300:11cflemingThat might be true, actually, depending on whether I specified that "body" values should all be indented two spaces, or should all be aligned - I can’t remember off the top of my head.#2016-10-0300:14puzzlerWell, I think I've successfully got Cursive recognizing for indenting and resolution purposes the cond, if-let, when-let, and defnc constructs in my better-cond library. Thanks. Only issue remaining is that if I use the "rename" feature of require, Cursive doesn't recognize the new names (I filed an issue about this yesterday). I want to rename defnc as defn, so that's an issue for me, but for now I'll avoid renaming.#2016-10-0300:18cflemingYes, someone else reported a similar issue - I’ll look into that since I added support for that and I believe it has unit tests. Something may have broken though.#2016-10-0301:28cfleming@kenny @bfabry BTW I just looked into the namespaced maps issue. Here’s how this works: nREPL has a middleware called pr-values, which is responsible for converting values into strings to be passed back from the server to the client. This currently just calls pr, and is supremely un-customisable: http://dev.clojure.org/jira/browse/NREPL-55#2016-10-0301:28cflemingI haven’t looked at Whidbey yet to see if I can use its solution.#2016-10-0301:28cflemingI checked that Cursive’s pretty-printing will happily pprint whatever is returned from that, so I may be able to customise this at some point.#2016-10-0301:52kennyCool. Thanks for the update! #2016-10-0301:59cflemingAfter a little more investigation, I commented over here: https://github.com/cursive-ide/cursive/issues/1541#issuecomment-251011925#2016-10-0316:09shaun-mahoodThis might be a bad idea, but is there any way to run leiningen tasks from within cursive? I see there's a run external tool option when adding a new REPL config, but I haven't tried it with anything. Really it's just me being lazy so that I can run lein ancient without having to open a command prompt on Windows, so it's about as low on the list of importance as it gets.#2016-10-0318:57cfleming@shaun-mahood Yes, you can create a Leiningen run configuration.#2016-10-0319:37shaun-mahoodGreat, thanks! One more win for laziness.#2016-10-0319:51cfleming@kenny I’ve fixed the source root outside of project root problem for the next EAP, so you should be good to do your boot magic when that drops.#2016-10-0319:53cfleming@shaun-mahood I’ve actually considered integrating lein-ancient into Cursive, so you could just see the warnings in the IDE all the time, and perhaps fix them with a quickfix. I haven’t looked at what lein-ancient does in enough detail to know how feasible that is, though.#2016-10-0319:53kenny@cfleming Perfect, thanks!#2016-10-0320:18shaun-mahood@cfleming: That would be kind of cool, not sure how much effort it would be worth though - seems like a nice bit of polish if you have nothing else to do 🙂#2016-10-0321:13cfleming@shaun-mahood Well, that might not be for a while 🙂. But I’m planning some lein support upgrades using IntelliJ’s repo indexes, so it might fit nicely with that.#2016-10-0321:57puzzlerIs there a way to move back and forth from editor to REPL with keystroke? Is there a way to disable that ESC moves from REPL to editor ? (sometimes when I use ESC to stop the auto-complete in the REPL, it moves me back to the editor when that's not what I want)#2016-10-0321:58bfabrythere is a keybinding for focus on repl, I use that. I haven't found an equivalent 'jump back to editor' binding#2016-10-0322:35spiedenanyone else having issues with reloading of transitive namespaces when using the “Sync files in REPL” action?#2016-10-0322:36spiedenit’s not happening for me anymore.. not sure why#2016-10-0322:36spiedenit will load the file that was changed, but not others that require it and are loaded in the REPL#2016-10-0323:17cfleming@puzzler You can bind keys to jump to the editor and to the output pane, but there’s no way to disable ESC as the way to jump back. That’s a UI rule that is pretty hard and fast in IntelliJ, although it has some bad side effects (especially for Vim users).#2016-10-0323:18cflemingThe actions for REPL jumping are under Tools-&gt;REPL-&gt;Jump to REPL Editor and Tools-&gt;REPL-&gt;Jump to REPL Output Pane.#2016-10-0323:19cfleming@spieden There’s a config item that controls that - have you unselected that somehow?#2016-10-0323:19spiedenhmm let me check#2016-10-0323:20cflemingSettings-&gt;Languages &amp; Frameworks-&gt;Clojure-&gt;Load out-of-date dependencies transitively#2016-10-0323:20cflemingOk, no messages in your log?#2016-10-0323:21spiedenhmm, i do have that issue where lein deps can’t resolve due to the cred environment variables for my private repo not being used#2016-10-0323:21cflemingOh, one thing in your question - sync files in REPL will reload changed files in dependency order. It will not reload namespaces that depend on changed items, if they haven’t been changed themselves.#2016-10-0323:21spiedenmaybe that’s leaking into general dep resolution#2016-10-0323:22cflemingOh, that was the env var issue, right?#2016-10-0323:22spiedenoooooh#2016-10-0323:22spiedenhmm, what does that setting control, then?#2016-10-0323:22cflemingWhich one?#2016-10-0323:22spieden"Load out-of-date dependencies transitively"#2016-10-0323:22cflemingLoad out of date etc?#2016-10-0323:23cflemingSo that one doesn’t actually do anything for “Sync files”, since that will load all changed files anyway.#2016-10-0323:23cflemingHowever for “Load file in REPL” it controls whether that file’s modified deps are loaded first.#2016-10-0323:23cflemingI’m open to opinions as to whether namespaces that depend on changed files should also be reloaded.#2016-10-0323:24cflemingI actually have to step out a bit, sorry - back later.#2016-10-0323:24spiedenah so if i go back and “Load file” in my core namespace that will pull in everything that changed?#2016-10-0323:24spiedenok sure, ttyl#2016-10-0323:24cflemingOnly files that the file you’re loading depends on.#2016-10-0323:25cflemingNot files that depend on it.#2016-10-0323:25spiedenok got it#2016-10-0323:25spiedenthanks!#2016-10-0323:27spiedenfor when you get back: my use case is modifying the code of a persistent service and wanting to test the changes. i expected “sync files” to go up the dependency tree from the file i modified and load everything back to the core namespace. then i stop/start the service to clear the stale bytecodes from memory and test my changes with the fresh ones#2016-10-0323:28spiedenif cursive could run a line of my choosing in the REPL after the sync this would be down to a single keystroke#2016-10-0323:29spieden1) edit code 2) (for me) CMD+S 3) try changes in browser#2016-10-0323:30spiedensounds like i can use “Load file” on my core ns to get most of the way there#2016-10-0323:31spiedenhmm, although trying it just now it doesn’t seem to hop over an unmodified file to reach a modified one during the traversal#2016-10-0323:32spiedendoesn’t seem to go to a depth greater than one either way actually(?)#2016-10-0323:57puzzler@cfleming So is there a way to kill a auto-completion pop-up other than ESC?#2016-10-0400:02jrheardsimple question, something that i don’t think used to happen and is just vaguely irritating - when i hit cmd-shift-R to start a repl, the “run” bar on the bottom of editor pops up every time, and i don’t want it to. this is in addition to the REPL pane, which pops up and is fine. do you folks know what i’m talking about? is there a way to make the run bar not pop up?#2016-10-0400:05gerredi do, I have no idea how to solve it.#2016-10-0400:20jrheardaha - cmd-4#2016-10-0400:20jrheardis what toggles it (on my machine), anyway#2016-10-0400:20jrheardso now i can do that instead of having to click on the little hide icon manually, so at least that’s an improvement#2016-10-0400:22puzzler@jrheard My process to start a REPL is Shift-F10 to run the default configuration which I've set up to be the REPL, then I have to click in the editor pane (because it loses focus), Ctrl-Alt-N to change namespace to the current file, Ctrl-Alt-L to load the file, then click back in the repl pane. [I don't remember which of those keystrokes were ones I bound, and which are by default]. It's a bit tedious. Is there a better way?#2016-10-0400:22jrheardeep, yeah#2016-10-0400:23jrheardtry pressing escape instead of clicking on the editor pane, i think escape focuses the editor (at least on my machine_#2016-10-0400:23jrheardand again, on my machine, cmd-3 focuses the REPL pane, and toggles it if it’s focused#2016-10-0400:23jrheardso hopefully those help for less clicking, although they don’t remove any of steps#2016-10-0400:24jrheardi am not at all an expert though, so hopefully someone else has a better idea#2016-10-0400:58cfleming@spieden It sounds like REPL commands might be what you want: https://cursive-ide.com/userguide/repl.html#repl-commands#2016-10-0400:59cfleming@puzzler Not that I’m aware of, no. However if you have an autocomplete popup up, ESC should not take you back to the editor.#2016-10-0401:02cfleming@jrheard That’s annoying - I don’t see that. I only get the Run toolwindow opened when I debug the REPL, and that’s required since it’s where the debugger UI is.#2016-10-0401:03jrheardhm, i don’t think i’m debugging#2016-10-0401:03jrheardi’m able to mitigate it now that i’ve got a handy keyboard shortcut, so i’m not super upset, but if i can give you more information let me know 🙂#2016-10-0401:06cflemingCould you look in the Run menu and see which command that is bound to? Looking in the default keymaps, Cmd-Shift-R is normally bound to run an Ant task.#2016-10-0401:12cfleming@jrheard ^^#2016-10-0401:13jrheard@cfleming https://www.evernote.com/shard/s11/sh/c4d543d7-ad87-4a4b-b431-dd249f8ed5e7/032a8a152b07895c , which is set up per https://github.com/bhauman/lein-figwheel/wiki/Running-figwheel-in-a-Cursive-Clojure-REPL - will grab a snap of the configuration in case it’s helpful#2016-10-0401:14cflemingOk, so that’s bound to run the last config - you’re not debugging, then.#2016-10-0401:14jrheardhttps://www.evernote.com/shard/s11/sh/99d343cc-a5ad-4043-b6b1-6d571989e0b2/b7981b74ea2e8d87#2016-10-0401:24spieden@cfleming: RTFM helped a lot -- thanks. after some experimentation I realise I'd overestimated the amount of reloading and restarting that needed to happen for my changes to appear. Re reading Stuart sierra's post helped a bit on the exceptions to var dynamism. Guess I'll just feel out my scenarios with the "try the small 🔨first then progressively larger ones" approach to resetting#2016-10-0401:25cflemingOk, cool - let me know if you have more questions - it’s a common workflow, so if there are ways to improve it I’m interested.#2016-10-0401:25spiedenSeems like I shouldn't need tools.namespace for anything anyway#2016-10-0401:25spiedenOk will do#2016-10-0404:56joshg@cfleming How does one install 1.4.0-eap3? Cursive not showing up when I “Browse repositories” in 2016.3 EAP.#2016-10-0405:01joshgWas able to download it directly from intellij at https://plugins.jetbrains.com/plugin/download?pr=idea&amp;updateId=28984#2016-10-0405:03onetomI've disabled resolution on a macro and I don't know how to enable it again. Before that it was set to resolve as def but it wasn't behaving like that, that's why I wanted to disable 1st and set again to behave like def#2016-10-0405:21puzzler@onetom When you are disabling resolution, you are effectively unchecking a setting in the settings panel. To re-enable, go into settings and search on resolution and find the checkbox and recheck it. Then it will appear again as a pop-up on the symbol and you can set it to behave like def.#2016-10-0405:26puzzlerWhen a thread running in the REPL has an out-of-memory error, it brings all of Cursive to its knees. Is there any way to isolate this better, so that I can still interact with my program, edit things, save and exit safely?#2016-10-0405:28cfleming@puzzler Hmm, Cursive should be isolated from the REPL process, I’m not sure why that would affect it. I’ll provoke an OOM and see if I can reproduce.#2016-10-0406:08onetom@puzzler thanks; found it under Editor / Intentions indeed#2016-10-0418:19jdubieRecently there was a regression with my Cursive Test integration. Test Integration interactive running of clojure.test tests, with failures marked in the editor and visual diffs. I’ve lost failures marked in editor and visual diffs and the green test success flash message that fills my heart with joy. Is this a known regression? Any ideas on how I should debug? Intelij version
IntelliJ IDEA 2016.2.4
Build #IC-162.2032.8, built on September 9, 2016
JRE: 1.8.0_112-release-b343 x86_64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
Cursive version
Version: 1.4.0-eap2-2016.2
#2016-10-0418:41ckarlsenI find typing in the REPL very slow/sluggish compared to editing files. Running latest EAP of cursive and intellij on linux with bundled jdk. Low mem usage in intellij. Have tried to invalidate caches. tips?#2016-10-0420:14shaun-mahood@ckarlsen: Can you type in a scratch file (or real files) and just send things to the REPL? I adopted it as my general workflow a few months ago and it's been pretty nice, and it would at least give you a workaround until someone can help you. No idea about the REPL issues unfortunately.#2016-10-0420:36ckarlsen@shaun-mahood: that's what I do about 70% of the time 😉#2016-10-0420:38shaun-mahood@ckarlsen: Well then I'm no help at all 🙂#2016-10-0420:42ckarlsenrunning the REPL as a 'normal JVM process' feels super responsive at least#2016-10-0420:42ckarlsenthe slowness might be the nature of nrepl?#2016-10-0423:20snoeIs it possible to send nrepl messages through cursive? Such as stuff in https://github.com/clojure-emacs/refactor-nrepl.#2016-10-0508:00stijnis it possible to show the test results in the REPL instead of in a popup when you hover the line with failed tests?#2016-10-0508:01stijnI was thinking of creating a REPL command, but can you use parameters in the command (like e.g. the namespace of the file from which you are calling the command)?#2016-10-0514:02mishathis is embarrassing , but I get cljs.user=> No nREPL ack received on fresh lein new figwheel and following https://github.com/bhauman/lein-figwheel/wiki/Running-figwheel-in-a-Cursive-Clojure-REPL#2016-10-0514:02mishaupdating idea/cursive, cache invalidation and restarts do no help -_-#2016-10-0514:02mishasend help#2016-10-0514:05mishaomg, it's "use nREPL clojure.main in normal JVM process".#2016-10-0515:09shaun-mahood@misha: You get it all working?#2016-10-0515:10mishayes, that "omg" message is the solution : ), thanks @shaun-mahood#2016-10-0515:14shaun-mahoodI figured, but I've found it a bit tricky to get working (even after doing it a few dozen times) depending on which template I started with, as the instructions are a little bit outdated. Glad it's working.#2016-10-0517:16timgilbertIs anyone else's mouse control getting kind of squirrelly after upgrading to macOS Sierra? I keep accidentally dragging and dropping text selections, it's driving me slightly crazy#2016-10-0517:16timgilbertBut I also just moved to a new desk, so I'm not sure it's really upgrade related#2016-10-0517:17bfabryhaha, software problem, or slanted desk. who knows!#2016-10-0517:19timgilbertYeah, there is a non-zero chance of PEBKAC#2016-10-0517:49spiedenreminds me of when my cursor started randomly spewing characters towards the end of the day. my keyboard is made of optical switches that were triggered when the sun hit at a certain angle =)#2016-10-0517:50spiedentook a while to figure that one out#2016-10-0517:50spieden(i’m staying on el cap until we’re sure it’s your desk placement)#2016-10-0519:27mandersonwe have a project with sub modules that we keep in sync with the same version. to avoid changing version in multiple project.clj files we simply defined a VERSION file at the root and symlinked it in each sub module. Each sub module project.clj reads this, eg:
(def +version+ (slurp "VERSION"))

(defproject foo +version+
This was working fine until the latest upgrade and now the Lein refresh in Cursive gives a FileNotFoundException for the slurp on the VERSION file. Any ideas on why this might be the case? I'm able to run the slurp in the REPL. Or any suggestions for more easily/cleanly managing versions across multiple submodules?
#2016-10-0519:45cfleming@manderson Right, it looks like something got broken with the managed dependencies support, see: https://github.com/cursive-ide/cursive/issues/1551 filed by darwin#2016-10-0519:51mandersonAh, cool. I'll track the ticket. Thanks @cfleming !#2016-10-0520:50timgilbertHoly cow @spieden, that would drive me completely insane#2016-10-0521:30jrheardthat is hilarious#2016-10-0523:27spiedenwas pretty spooky =)#2016-10-0523:36jrheard@spieden - i mentioned your story in an irc channel i sit in, and a friend said he worked with someone else that had the same issue#2016-10-0523:36jrhearddatahands keyboard?#2016-10-0523:36spiedenyes!#2016-10-0523:36jrheardhe didn’t recognize your name fwiw, so at least two people have had this problem 😄#2016-10-0604:56mikebHi, I'm having a little trouble connecting to a repl running in a local docker container via a network repl. I get an error "Error running cljapp in docker: REPL run configuration is incorrect - no module selected". What is a "Context module" and what does it need to be set to?#2016-10-0618:51spieden@cfleming the more i use “Sync files in REPL” and “Load file in REPL” the more i believe they should walk all the way up the dependency tree reloading namespaces#2016-10-0618:51spiedenonce my namespace stack is more than a couple deep i find myself running around doing this manually#2016-10-0618:52bfabry@spieden that would be a big job for cursive to do, but have you looked at clojure.tools.namespace?#2016-10-0618:53spiedenit seems to me the intent of these cursive features should be to obviate tools.namespace#2016-10-0618:54spieden(for ide use, anyway)#2016-10-0618:55spiedenit gets really close, too#2016-10-0618:55bfabryI guess that's true, but there's a lot of dynamic programming consideration that goes into just going ahead and reloading namespaces#2016-10-0618:57spiedeni don’t know anything about the implementations, but i assume the static analysis tools.namespace and cursive do to resolve namespace dependencies are similar(?)#2016-10-0618:58bfabrynot sure, but I was just thinking about how that breaks aot, some uses of protocols, refreshes any data you've def'd#2016-10-0618:59spiedenoh sure, i’m all for using the rest of the reloaded pattern as normal#2016-10-0618:59spieden“system as a value” and component, etc.#2016-10-0619:00spiedenjust trying to sub cursive for tools.namespace’s traditional role#2016-10-0619:27cfleming@spieden @bfabry Right, Cursive pretty much obsoletes tools.namespace#2016-10-0619:28cfleming@spieden So I think Cursive already does what you’re asking, unless you also want all namespaces which depend on modified namespaces to be reloaded?#2016-10-0619:29spiedenbingo, that’s what i’m after#2016-10-0619:29spiedenotherwise the change can’t propagate up to the entrypoint of the system#2016-10-0619:29spiedeni’m still a little fuzzy on why that is, actually#2016-10-0619:30spieden.. because i thought vars were dereferenced every time and the results never cached#2016-10-0619:32spiedeni guess “static initialization” would be one concrete example, where a data var is read during compilation to do some declarative stuff like @bfabry alluded to#2016-10-0619:32spieden(that kind of initialization would need to be reevaluated)#2016-10-0621:26darwinIMO Cursive (or any other tool) can never magically turn code which is not written with reload-ability in mind to be reloadable. Unless we talk about some future AI which will rewrite the code in such way 🙂 And when you have reloadable code, then recursive reloading of dependents should be all you need (relatively simple problem which has been solved by tools.namespace).#2016-10-0710:17imreanyone knows where Cursive stores the resolve as... settings? I accidentally set def resolve on for a macro and want to remove it 🙂#2016-10-0711:01tawonga@imre settings > Languages and Frameworks > Clojure > Symbol Resolution#2016-10-0711:38imrethanks!#2016-10-0712:14henryw374@imre so resolve as still works for you? I cannot get it to work as described in the docs . for example ...
(defmacro xyz [& args])

(xyz asd)
putting the caret over the second xyz I don’t get an option to resolve
#2016-10-0713:33imreI put caret, alt enter, enter on second option in popup menu#2016-10-0713:33imreWorked this morning#2016-10-0714:10henryw374ok thanks. I found out it’s not just me https://github.com/cursive-ide/cursive/issues/1505#2016-10-0715:44snoe@spieden you can call (require 'clojure.tools.namespace.repl) (clojure.tools.namespace.repl/refresh) in the repl to reload all changed files and their deps#2016-10-0715:44snoeyou might have to have the dependency in your ~/.profiles.clj#2016-10-0721:35devnAm I stupid or something? (Don't answer that.) I can't seem to get cursive working. It's complaining about ForkJoinPool which leads me to believe it's using a 1.6 JVM. In addition, the latest version of leiningen it shows under build tools is 2.6.1, and I'm on 2.7.1.#2016-10-0721:36devnLong story short, I can't get cursive working after killing /Library/Application Support/Idea* and /Library/Preferences/Idea*#2016-10-0721:36kidpolloI’ve seen weird things happen with some lein plugins#2016-10-0721:36devnIt's complaining about reducers... Color me confused.#2016-10-0721:36kidpollohmmm yeah I’ve never seen that#2016-10-0721:41devnThe cursive getting started page links to Idea CE 15#2016-10-0721:41devnShould I be running IDEA 2016.2?#2016-10-0721:42kidpollopossibly#2016-10-0721:42kidpolloI try to keep updated#2016-10-0721:43shaun-mahood@devn: What platform are you trying to install on? I'm on community edition, of my intellij it says "IntelliJ IDEA 2016.1.4" - Cursive 1.3.0 supports IntelliJ 2016.2, so that should work as long as your Cursive is newer.#2016-10-0721:44devnI hit the page that the getting started page references, followed that link, then started up intellij and it told me to update to the newer version#2016-10-0721:45devnfollowed that link, and got what i believe is a newer build, just blew away all of the intellij preferences and making another attempt at opening my project#2016-10-0721:45devnalso commented out everything except cider-nrepl 0.13.0 in my ~/.lein/profile.clj#2016-10-0721:45shaun-mahoodHmm, that seems like it should work - so you should be on IntelliJ 2016.2.4 then.#2016-10-0721:46devnright so then, as i understand it, i just grab the plugin by browsing for sources, restart, and then Open -> find project.clj, and hit OK, yes?#2016-10-0721:46devnI got this on first start: We wanted your IDE to receive upgrades over a secure connection. Unfortunately, this doesn't work on Java 6, so the option was disabled. You can enabled it again in settings after upgrading the JRE.#2016-10-0721:47devnAnd on this update, guess what: A new version of IntelliJ IDEA is available!#2016-10-0721:47shaun-mahoodYeah, that should work. I get that IntelliJ popup pretty much right away any time I upgrade, I tend to ignore it as hard as I can.#2016-10-0721:48shaun-mahoodI'm assuming you have a newer JDK installed and have done some Clojure work on the same machine with cider, right?#2016-10-0721:48devnThis worked like 12 months ago#2016-10-0721:48devnI drop in from emacs every now and then#2016-10-0721:50shaun-mahoodMaybe something useful on https://intellij-support.jetbrains.com/hc/en-us/articles/206544879-Selecting-the-JDK-version-the-IDE-will-run-under - I've not had that problem before though, so no idea if it's at all going to help#2016-10-0721:51devn@shaun-mahood do I import my project using "Create project from existing sources" or "Import project from external model" and select Leiningen?>#2016-10-0721:51bfabry@devn project from existing sources#2016-10-0721:52bfabrythen select the project.clj#2016-10-0721:53devnWhen I look at the default SDK that IntelliJ created "IDE SDK"#2016-10-0721:53devnI see 1.6.0jdk paths under the Classpath tab#2016-10-0721:55devnso, I switched it to point at my java 1.8.0 home dir, that looks more reasonable#2016-10-0721:57devnStill no dice. Every core fn is highlighted as being unresolved#2016-10-0721:58snoeYou'll need to "Refresh Leinigen Projects" (the refresh button on the leinigen tab)#2016-10-0721:59devn@snoe where's that tab at?#2016-10-0722:00snoeview->tool windows->lein#2016-10-0722:01devn@snoe still nothin'#2016-10-0722:01devnI can't be the only one who has run into this, right?#2016-10-0722:02devn@snoe I hit refresh and see "There are no Leiningen projects to display."#2016-10-0722:03snoesorry @devn that's the extent of my experience ¯\(ツ)/¯#2016-10-0722:04devn@snoe do you see Leiningen version 2.7.1 in the dropdown under Leiningen -> Project Settings?#2016-10-0722:05snoe2.6.1#2016-10-0722:06devn@snoe When I use the "run REPL" feature, how should that be set up? Do I need to list leiningen as an external tool and provide the path?#2016-10-0722:06devn"Run nREPL with Leiningen" is blurred out#2016-10-0722:06snoeI connect to an nrepl in a terminal#2016-10-0722:07devnand I continue to receive this error in that dialog: "Run Configuration Error: No modules containing clojure.main found"#2016-10-0722:07snoesounds like the project import didn't go right
#2016-10-0722:07devnfacepalm#2016-10-0722:08devnFinally found a decent error: "Unmatched delimiter in ~/.lein/profiles.clj" because I commented almost all of it out to try and get past the other error#2016-10-0722:09snoejust opening the project.clj is an easy way to load a new or existing project#2016-10-0722:09snoeand, yknow, closing your braces#2016-10-0722:10devnBack to this shit:
java.lang.ClassNotFoundException: jsr166y.ForkJoinPool, compiling:(clojure/core/reducers.clj:56:21) jsr166y.ForkJoinPool
#2016-10-0722:13devnOpening the project.clj in intellij shows no dirs in the project view#2016-10-0722:16jrheard@cfleming fyi^#2016-10-0722:17devn@jrheard -- thanks for bothering him for me 🙂#2016-10-0722:17jrheard😄#2016-10-0722:20devnI'm on Yosemite, btw#2016-10-0722:22devnI googled and see someone had this problem, and their solution was to edit the JVM Version in the Idea.app/Contents/Info.plist manually. See here: https://clojurians-log.clojureverse.org/cursive/2016-06-14.html#2016-10-0722:27devnToday is not my day. Just realized that I have two IntelliJ installed. One is 2016.2, the other 15.*. I thought the 15 version was overwritten when I dragged and dropped the 2016.2 version to /Applications.#2016-10-0722:28devnThen, because I hadn't said "Open anyway", it never showed up in the list of launchable apps, so I kept launching CE 15 and not 2016.2.#2016-10-0722:31bfabryugh, OSX's application management 👎#2016-10-0722:34devnI think the last time I set up cursive was like the exact same day of a big IntelliJ release, and I wound up with an app "IntelliJ IDEA 15 CE", and one named "IntelliJ IDEA CE". The 15/no 15 caused a bit of confusion, as the release date for version of 15 I'd downloaded was 2016.#2016-10-0722:37bfabryI actually have the same deal of both 16 and 15 in my app list, too scared of trying to remove 15 for fear of breaking the osx rube goldberg package management#2016-10-0722:38devn@bfabry if you're just dumping the .app you should be fine#2016-10-0722:41devnReally the thing is: "What package management?" Off-topic, but I used to run something that watched file creation using fs_usage + execsnoop and company and kept track of processing launching processes which wrote files to disk. Then when I wanted to truly delete an app, I could find all of its litter.#2016-10-0722:43devnThere's some awfully fancy obfuscation techniques that some of these software vendors use, like setting a noop hidden property on 7 random plists which are referenced via a hash in another plist, which points at an obfuscated timestamp of the modification time on a file, yadda yadda#2016-10-0722:44devnOr running processes which spawn and terminate so quickly you don't see them in top, ps, Activity Monitor, etc.#2016-10-0722:44devn</rant over>#2016-10-0722:44devnThank you for your help.#2016-10-0816:49cfleming@devn Sorry about the problems, prior to IntelliJ 2016.1, JDK6 was the recommended JDK to run IntelliJ itself due to bad Swing bugs (Oracle’s fault, not JetBrains’).#2016-10-0816:49cflemingLooks like my doc is out of date, I’ll update that.#2016-10-0816:50cflemingIf you’re using the community edition, you probably want the most recent version - there’s generally no reason to use an older version.#2016-10-0816:52cflemingSorry for the delay, BTW - I’m travelling#2016-10-0816:52cflemingSo reading through all that, it sounds like there’s some confusion based on an old IntelliJ version, and it seems like your project didn’t import properly for some reason.#2016-10-0816:53cflemingI think most of the issues would be resolved using the latest IntelliJ, which uses JDK8 out of the box.#2016-10-0816:55cflemingTo fix the project import problem, it looks like you just need to right click on your project.clj, and click Add as Leiningen project (IIRC, I don’t have the code open here).#2016-10-0816:56cflemingThat should re-import the project, and then you’ll be able to set up your run config.#2016-10-0816:56cflemingLet me know if that doesn’t work for you.#2016-10-1009:28stijnI'm trying to get the 'reloaded workflow' running with REPL commands. it works, properly refreshes and starts the system, but I can't access the var system in the REPL to which the command has been sent#2016-10-1009:29stijnit's value is nil#2016-10-1009:30stijnthe command is configured as follows#2016-10-1009:30stijnwhen actually typing (reset) in the REPL, the system var has a proper value afterwards#2016-10-1011:26imreshould reset not be run in the dev ns though?#2016-10-1011:26imrebottom half of your screenshot#2016-10-1011:58stijnthe clojure REPL starts in the user namespace by default, so that's were I usually put the system and reloading functions#2016-10-1012:08imreI think lately the recommendation is that you create a separate dev ns and do it there though#2016-10-1012:08imrehttps://github.com/stuartsierra/reloaded#2016-10-1012:08imreso if your dev ns fails to compile you still have a chance of recovery#2016-10-1012:08imrebut that seems to be unrelated to the problem you have#2016-10-1012:25stijnmakes sense#2016-10-1022:50kennyIs there a way to make the red underline go away after running tests in the repl? It can be extremely annoying when lots of tests fail and every time you hover over a failing test the difference dialog pops up which often covers your code#2016-10-1101:30puzzlerIs there any way to make Cursive's resolution automatically aware of macros that expand into uses of let? How do you handle :let inside of a for comprehension? Is it hard-coded to that specific construct or can it be generalized. The reason I ask is that I can't figure out how to make Cursive aware of better-cond's let clause, but since it expands to a regular let, I would think it would be theoretically possible for Cursive to figure that out.#2016-10-1102:20danielcompton@kenny 'Clear all test markers'#2016-10-1106:32kenny@danielcompton Perfect, thanks!#2016-10-1202:51gerredwill cursive work with multiple nrepls running at the same time? what about having a lein-figwheel nrepl and a standard clojure repl going?#2016-10-1202:51gerredah multiple tabs, I see it working#2016-10-1209:47stijn@cfleming I'm having trouble with structural editing. Context: paredit is turned on, but when I edit the following form, it does something weird.#2016-10-1209:47stijn
(def m
  {|:a :b})
#2016-10-1209:47stijn| is the cursor#2016-10-1209:48stijnI press enter#2016-10-1209:48stijn
(def m
  {
   |:a
   } :b})
#2016-10-1209:49stijnis there a way to reset a possible wrong state of the editor that causes this?#2016-10-1209:49stijnrestarting intellij still results in this behaviour#2016-10-1209:50stijninvalidate caches doesn't help either#2016-10-1209:58stijnok, it happens when parens are unbalanced, but paredit mode shouldn't do this, right?#2016-10-1212:12imreany chance you have parinfer on?#2016-10-1212:15stijnno paredit is on#2016-10-1212:15stijnit also happens when structural editing is off#2016-10-1212:16stijni'll try to create a small example, but I fixed the parens matching and it seems hard to reproduce 🙂#2016-10-1213:57cfleming@stijn If you can come up with an example of that, that would be great.#2016-10-1213:58cflemingI'll try your example above when I can, my work laptop is in with Apple at the moment.#2016-10-1214:01cfleming@puzzler Unfortunately there's no way to do what you'd like there. There will be in the future, but until then I'll have to add that. I'll add support for those forms, which should be easy since they're very similar to existing forms. I'm also very interested to try them out.#2016-10-1304:05kahunamooreDoes anyone know where to configure/tell cursive where the source code is for a library dependency? I need to step into some code in a (clojure) library and can download the code from github, etc. Currently stepping into the code puts me into a callstack that shows the line numbers but not the code. AFAIK the library is not AOT compiled… Should I use a checkout directory?#2016-10-1304:06kahunamooreI can step just fine into other libraries such as compojure, etc.#2016-10-1308:56vikeriIs it a know limitation that REPLs with Use clojure.main in normal JVM process don’t have syntax highlighting/prettyprint of output?#2016-10-1314:35cfleming@kahunamoore I don't think there's a way to do this right now. What's the dependency that doesn't have source? If it's not AOT compiled, Cursive should just find the source.#2016-10-1314:37cfleming@vikeri Yes it is. This is because it's a streaming style REPL, i.e. the REPL values just come over stdout like all the other process output, and there's no good way to distinguish them.#2016-10-1314:37cflemingIf you're using that REPL style for CLJS, I'm planning a better option for that (hopefully very soon) which will work like the CLJ REPL.#2016-10-1317:25tetriscodesAnyone know what the current status of Boot support for Cursive is?#2016-10-1317:28tetriscodesI’m outnumbered on people wanting to use Cursive and I’m wondering whats the best practice for integrating Boot with Cursive.#2016-10-1318:04cfleming@tetriscodes You have two main options: see https://github.com/boot-clj/boot/wiki/For-Cursive-Users for details.#2016-10-1318:04cflemingIt's a little clunky I'm afraid, but it seems to work ok.#2016-10-1322:13kidpolloHi! I’ve had a problem for a while that I kinda just ignored by bypassing it but I wanted to ask anyways. It seems that if I include something like in my project file :repl {:injections [(user/hints) (api.hooks/abordage!)]}. Intellij will completely stop working and just hang whenever I restart the editor. The Intellij log shows nothing and there is no way to get out of that state unless you delete the .idea folder on that project and re import the project without the stuff in :injections#2016-10-1322:14kidpolloBtw it seems that the call to user/hints is fine#2016-10-1322:15kidpollothe call to api.hooks/abordage! is the one that is causing this dissaster :S and it only causes this on intellij restart lein repl works just fine#2016-10-1406:32vikeri@cfleming Nice to hear that!#2016-10-1415:00deasI sometimes end up in cljsbuild/ when navigating around. Intellij "knows" those files do not belong to the project (greyed out). Any idea what I might be missing?#2016-10-1505:04kahunamooreIt was the raven-clj library but I think the problem was that the function I was calling was throwing an exception upon entry… I’m past it now, thanks!#2016-10-1506:40kenny@cfleming I’m on 1.4.0-eap3-2016 and it seems like doing “Load file in REPL” does not reload a file that has changed from an external source. If I change the file in the editor it will pick up the change. (This has to do with adding boot :checkouts support in the REPL pane)#2016-10-1506:51kennyI have to actually open the file for Cursive to recognize that the file changed and then run “Load file in REPL” and it loads the changes in the REPL#2016-10-1506:56kennyIf I do File > Synchronize then “Load file in REPL” it will pick up the changes.#2016-10-1506:57kennyA little annoying to have to do that every time 😛#2016-10-1517:08cfleming@kenny That might be, yeah. IntelliJ uses a virtual file system, and I don’t think the detection of externally changed files is perfect.#2016-10-1517:08cflemingI’m not sure what the best workaround might be.#2016-10-1517:46kennyIs there a IntelliJ issue on this problem? #2016-10-1517:47kennyIs it possible to tell IntelliJ the file changed when I modify the file "externally"? #2016-10-1517:53cflemingYes, by using File->Synchronise 🙂#2016-10-1517:53cflemingI’m not sure about any JetBrains issues, sorry#2016-10-1517:53cflemingYou could try looking in YouTrack#2016-10-1811:06rauhCould we get stub generation for specter? (I cannot choose "Resolve as..." for the devnav macro)#2016-10-1811:07rauhWhich would bring most of the vars into Cursive for autocompletion#2016-10-1816:41cfleming@rauh I’ll look at that, since Specter seems really interesting. I’ve been meaning to investigate if I should be using it myself.#2016-10-1821:38jrheardhas anyone noticed cursive placing an extra layer of parens when you do cmd-shift-( ?#2016-10-1821:38jrheardhappens to me after cursive has been running for a few hours or days, not sure what triggers it#2016-10-1821:38jrheardrestarting intellij fixes it#2016-10-1821:39snoeI have#2016-10-1821:41jrheard@cfleming fwiw i just started noticing this.. yesterday, maybe the day before#2016-10-1822:00cfleming@jrheard Yeah, I’ve experienced that - it’s not just with extra parens, it will double any paredit action from time to time.#2016-10-1822:01cflemingI’ve never managed to reproduce it in order to debug it - it happens randomly then will stop, and I can’t provoke it.#2016-10-1823:26jrhearddang#2016-10-2005:55kennyRefactoring an alias in :require doesn't also change all qualified keywords 😞
(require [myns.foo :as something])
::something/a-keyword
refactor something to something2
(require [myns.foo :as something2])
::something/a-keyword ;; <-- keyword not changed

#2016-10-2006:01puzzlerDoes a local REPL configuration get its JVM args from the "Edit Configuration" form entry for JVM args, or from the leiningen profile?#2016-10-2010:52cfleming@kenny https://github.com/cursive-ide/cursive/issues/1511#2016-10-2010:55cfleming@puzzler Both. It will respect JVM args in your project.clj, and if you add any in the config they will be added too.#2016-10-2010:56cflemingHowever that’s only additive, there’s nothing clever trying to remove duplicates or anything like that.#2016-10-2102:34dadairHello! Is there a way to have cursive identify a “ghost defn” (such as with yesql, hugsql, etc) in the actual editor? I can autocomplete the fns in the repl obviously, but the editor says the fn can’t be resolved. Very new to Cursive after being very comfortable with emacs/cider so sorry if this is a noob question 😄#2016-10-2103:04tap@dadair I think this might be able to help you https://cursive-ide.com/userguide/macros.html#2016-10-2103:24tapSorry, I was wrong, misunderstood your question#2016-10-2104:44dadairNo problem, thanks for trying 😄#2016-10-2401:14bfabryI have a request for stub file generation: specter#2016-10-2719:06cfleming@deas Yes, that’s very strange. What’s inside that directory?#2016-10-2719:07cflemingDo you have a library that references that somehow? You can see them in File-&gt;Project Structure#2016-10-2719:15deas@cfleming Advanced optimization compiled Javascript code. No clue how this folder ended up being library root. I think we can ignore the issue unless other people see similar things. #2016-10-2719:17deas@cfleming Will check for refs when I'm in front of the box tomorrow morning. #2016-10-2719:18cflemingOk, great. Let me know if you can’t figure out how that’s getting marked. I’ve actually never seen that type of directory marking before.#2016-10-2720:22snoeIs it possible to have the output of a repl command inserted (or replace the evaled form) in the edit buffer?#2016-10-2720:24snoeAnd is it possible to access metadata about the current buffer (like the path name)?#2016-10-2720:25snoeI'm trying to run refactor-nrepl commands that change my current file like:
(with-open [conn (repl/connect :port (Integer/parseInt (slurp ".nrepl-port")))]
  (-> (repl/client conn 1000)
      (repl/message {:op "clean-ns" :path "src/something/example.clj"})
      first
      :ns
      read-string))
#2016-10-2720:39ericnormandhello!#2016-10-2720:39ericnormandI have a question#2016-10-2720:39ericnormandhow do I see the result of macroexpansion on my macros?#2016-10-2720:40ericnormandI'd like to test them#2016-10-2720:41cfleming@ericnormand You need to have a REPL running. Then Tools-&gt;REPL-&gt;View macro expansion#2016-10-2720:41cfleming(or whichever key you have that bound to, if any).#2016-10-2720:41cflemingYou’ll need your cursor over a macro form to expand.#2016-10-2720:42cflemingYou’ll see a window which initially shows your original unexpanded form.#2016-10-2720:42cflemingThen you can put the cursor anywhere in the form, and either hit the right arrow icon in the toolbar, or Ctrl/Cmd-Right#2016-10-2720:43cflemingThat will expand from the root down to the point your cursor is over, so you can selectively expand the parts of the macro you’re interested in.#2016-10-2720:44ericnormandthanks, mate!#2016-10-2720:45ericnormandis that documented somewhere?#2016-10-2720:45cfleming@snoe Hmm, no - currently the only thing that can be substituted into a REPL command is the selection.#2016-10-2720:45cflemingThe path would be a nice addition to that.#2016-10-2720:46cfleming@ericnormand Sadly, no - the doc that exists is at https://cursive-ide.com/userguide/ but it is sadly incomplete.#2016-10-2721:10puzzlerThe x button to "interrupt current execution" doesn't seem to reliably work. Anyone else have this issue? I really don't like having to kill the entire REPL due to one hung evaluation.#2016-10-2721:41cfleming@puzzler Unfortunately I don’t think there’s more I can do - I just call the nREPL interrupt operation.#2016-10-2721:42snoe@cfleming how about being able to echo the output of a repl command into a file buffer instead of the repl output?#2016-10-2721:42cflemingThat’s not there now but it sounds like a good improvement.#2016-10-2721:44cflemingI wanted to do that for standard REPL execution, but the problem is that I end up with a combinatorial explosion of commands (execute top-level form and print output, execute top-level form and substitute into editor, execute previous form and… etc).#2016-10-2721:44cflemingVim’s verb-object model works much better for that.#2016-10-2721:45snoeyeah, I'm looking to hoop it up to ideavim, is it possible to expose :actions for just vim users?#2016-10-2721:46snoelike, don't have menu items#2016-10-2721:46cfleming@snoe Is that what you’re after? https://github.com/cursive-ide/cursive/wiki/Mapping-IdeaVim-actions-to-Cursive-actions#2016-10-2721:47cflemingSee also: https://github.com/cursive-ide/cursive/wiki/IdeaVim-issues#2016-10-2721:47snoeoh I meant for stuff like execute top-level form and substitute into editor that gives the combinatorial explosion#2016-10-2721:48cflemingSo… I don’t think so at the moment. How would you want that to work? I’m almost totally Vim-ignorant.#2016-10-2721:49cflemingi.e. I think the sort of action you’re talking about is not a standard IntelliJ action.#2016-10-2721:51snoeRight now I have a mapping like noremap cpp :action :cursive.repl.actions/run-last-sexp<CR> which works great. But, like you said, there aren't as many repl actions in cursive as say cider. I assume that's because you're trying not to overwhelm people. However as a vim user if they existed I could take advantage of them even if they weren't exposed to most users.#2016-10-2721:52cflemingSo you’d like smaller more composable actions? What sort of actions would be helpful?#2016-10-2721:52snoeso I would like to add noremap c!! :action :cursive.repl.actions/eval-last-sexpr-and-replace<CR>#2016-10-2721:52cflemingOh, I see.#2016-10-2721:52cflemingHmm#2016-10-2721:52snoeeven if they weren't composable#2016-10-2721:52cflemingI don’t think there’s a way to have lots of actions but only expose some.#2016-10-2721:53snoeone composable one I would like is to get the first and last char positions of a sexp#2016-10-2721:53cflemingAll actions are by default visible. I guess I could expose them all, perhaps others might like to use those instead of the existing ones.#2016-10-2721:53snoewith that I think I could build motions for inner/outer form#2016-10-2721:56cflemingWhat would I do with those positions? Select from start to end, or something?#2016-10-2722:01snoeright if you look at https://github.com/guns/vim-sexp#text-object-selections-visual-operator-pending a motion just defines the bounds to operate on, so I could write a vimscript function that called the cursive action to get the bounds of the curent form, omap af call get_current_form_bounds() that and it'll be available to delete (`daf`) or select (`vaf`) etc...#2016-10-2722:03cflemingBut IdeaVim doesn’t support vimscript, right?#2016-10-2722:05snoehrm, darn I'm still learning the differences.#2016-10-2722:07cflemingHehe - it’s tricky for me to understand since I don’t understand vim, to begin with.#2016-10-2722:07cflemingAnd then the subtleties of IdeaVim, even less.#2016-10-2722:07cflemingI do want to figure it out so I can help people get it set up.#2016-10-2722:11snoecool, I'll play with some static positions and see what's possible, there's stuff like :goto that can jump to byte indices#2016-10-2807:40mikebIs this the best way to connect a figwheel repl with cursive? https://github.com/bhauman/lein-figwheel/wiki/Running-figwheel-in-a-Cursive-Clojure-REPL#2016-10-2808:13tapI don’t know if it’s the best way, but it works well for me. Few things I did differently from that wiki and it still works: - I use latest version for all the dependencies - I don’t need to remove lein-fighweel from :plugins as it suggests#2016-10-2819:36denik@cfleming I’d like to suggest a better way to indent code:
(def current-ugly-indent
  [:.vims-list {:position      :absolute
                :margin-top    :25px
                :margin-left   :-400px
                :padding       :20px
                :background    :lightgrey
                :border-radius :5px}
   [:.container
    [:&:after {:position      :absolute
               :top           :-5px
               :left          :9px
               :border-bottom "5px solid black"
               :border-right  "5px solid transparent"
               :border-left   "5px solid transparent"
               :content       "''"
               :line-height   0
               :font-size     0}]
    [:.title]
    [:.list {:display        :flex
             :flex-direction :column
             :overflow-y     :scroll}
     [:.row {:display    :flex
             :margin-top :10px}
      [:&:first-child {:margin-top 0}]]]]])

(def pretty-indent
  [:.vims-list        {:position       :absolute
                       :margin-top     :25px
                       :margin-left    :-400px
                       :padding        :20px
                       :background     :lightgrey
                       :border-radius  :5px}
   [:.container
    [:&:after         {:position      :absolute
                       :top           :-5px
                       :left          :9px
                       :border-bottom "5px solid black"
                       :border-right  "5px solid transparent"
                       :border-left   "5px solid transparent"
                       :content       "''"
                       :line-height   0
                       :font-size     0}]
    [:.title]
    [:.list           {:display        :flex
                       :flex-direction :column
                       :overflow-y     :scroll}
     [:.row           {:display    :flex
                       :margin-top :10px}
      [:&:first-child {:margin-top 0}]]]]])
#2016-10-2819:46denikThis is about aligning not only pairs in relation to their neighbors (like let), but neighbor's children in relation to each other.#2016-10-2819:48denikanother example:
;; ugly
(let [props     {:slices         (:vims.derived/slices vims)
                 :playback-speed playback-speed}
      callbacks {:on-play  #(.play this)
                 :on-pause #(.pause this)}])

;; VS

;; pretty
(let [props     {:slices         (:vims.derived/slices vims)
                 :playback-speed playback-speed}
      callbacks {:on-play        #(.play this)
                 :on-pause       #(.pause this)}])
#2016-10-2912:33simax99@cfleming Hey Colin. I’ve not used Clojure/Cursive for a number of months now. I just came back to an existing project and tried to run the REPL and ended up with this exact issue https://github.com/cursive-ide/cursive/issues/1555. I'm using Cursive version : 1.4.0-eap3-2016.2 Built on: 2016-10-03 13:04 Built from: 1.4.0-eap3-4-g6138141 What do I need to do to fix the issue?#2016-10-2913:14misha@denik eew#2016-10-3010:24cfleming@simax99: this is fixed for the next build, and you can try a few workarounds in the meantime. The simplest is to use java 8 for your project if possible. Failing that, if you're not using AOT, try disabling make project in your before run options in your run config, chances are you don't need it.#2016-10-3010:46simax99@cfleming Thanks, I disabled the “make project” from the run config. It all works again now, thanks for the suggestion Out of interest, how would I have told it to use Java 8? I have Java 8 installed on my mac, when I look in system preferences it says I’m using Java 8. How would I have told my project to use that version? (I’m from a Windows background, so a lot of the Java/JVM stuff is unfamiliar)#2016-10-3011:15roelofw@cfleming Can you look for me why after more then 12 hours I do not get a licence#2016-10-3013:11cfleming@simax99: File-> Project Structure#2016-10-3013:14cfleming@roelofw: I just resent that - mailgun doesn't always deliver properly#2016-10-3013:16roelofwoke, I did get invoice#2016-10-3013:16roelofw@cfleming licence is here, Thanks#2016-10-3013:32roelofw@cfleming very wierd. when I want to use the new licence. I still see a message that my licence has experired#2016-10-3013:35roelofwI bought yesterday a new non commercial license#2016-10-3013:56roelofwOrder Number/ Invoice: #952534#2016-10-3019:10cfleming@roelofw: sorry, I resent the wrong one. I've resent the right one now.#2016-10-3019:11roelofwnp, thanks#2016-10-3109:41camJust discovered Cursive supported checkout dependencies, that’s awesome. Thanks Colin!#2016-10-3115:19denik@misha use your free speech wisely. what do you don’t like about the proposed indentation style?#2016-10-3119:18cfleming@cam no worries, it has a couple of quirks but works well mostly#2016-10-3119:20cfleming@denik: I'm away for a long weekend and on a phone so I can't see what that looks like, will check when on a real device again.#2016-11-0100:36denik@cfleming appreciate it!#2016-11-0120:01cfleming@denik I’m not sure what the rule I would use to determine which elements to align is in your first example.#2016-11-0120:02cfleming:&:after is not a sibling of :.vims-list, for example.#2016-11-0120:03cflemingIt seems like you’re asking for something like “within <some data structure>, align all the map values” but I can trivially come up with a lot of examples where that would look bad.#2016-11-0120:04cflemingCan you clarify how you think this might work?#2016-11-0120:56denik@cfleming I think you have the right idea. Can you jot down a couple examples you think would look bad?#2016-11-0209:35sandbagsPlease can I make a plea for fixing the create namespace workflow?#2016-11-0209:35sandbagsIf I accidentally create a .clj file when I wanted a cljs/cljc one more time I think I shall go mad! 🙂#2016-11-0211:34cfleming@sandbags You mean https://github.com/cursive-ide/cursive/issues/904, right?#2016-11-0211:53cflemingOne thing that isn’t mentioned in that issue is what to do about cljc files, since there’s no way to autodetect when to use those. https://github.com/cursive-ide/cursive/issues/893 also suggests a way to convert between the file types - does that sound useful?#2016-11-0212:54pseud@cfleming did you think about a timetable for boot integration ? I know how to generate a lein project-file from boot and that of course works for now, but it seems like direct integration could offer so much more#2016-11-0213:03cfleming@pseud I don’t have a timeline, but it’s definitely something I want to do soon. It’s one of the most requested items.#2016-11-0213:11pseudAnd if you would then drop lein support so as to send a message to the unbelievers … 🤓#2016-11-0213:12cflemingUmm, that might be a bit extreme 🙂#2016-11-0214:33sandbags@cfleming could you look at files already in the namespace?#2016-11-0214:33sandbagstypically in my experience if i have a cljs file in a namespace (folder) the next i create will also be a cljc, etc...#2016-11-0214:46cfleming@sandbags: Should that read: “if i have a cljc file in a namespace”?#2016-11-0214:53cflemingI’m guessing yes. So yeah, perhaps either that, or just remember what the user last chose.#2016-11-0215:33onetom@pseud this is what i use to make intellij and boot projects friends: https://clojars.org/onetom/boot-lein-generate and here is a full example where u can quickly try it too as a reference: https://github.com/onetom/hoplon-layouts#2016-11-0215:50pseud@onetom - interesting 🙂 Will have to read this over to fully grok, but any little step toward making the process of synchronization more transparent is a good one.#2016-11-0215:59sandbags@cfleming i guess i was addressing that you might have the same namespace in both a CLJ and CLJS#2016-11-0215:59sandbags@cfleming they are different folders ususally in Cursive#2016-11-0216:00cfleming@sandbags Right, but you would normally have a clj and a cljs, and cljc files normally go under clj, right?#2016-11-0216:00sandbagsi’m assuming that you can tell which is which#2016-11-0216:00sandbags@cfleming exactly#2016-11-0216:00cflemingSo if you create a file in clj, I can’t tell whether you want clj or cljc#2016-11-0216:00sandbagsoh, i usually have a cljc folder#2016-11-0216:01cflemingExcept by remembering what you did last time, or something similar.#2016-11-0216:01sandbagsexcept when i don’t have clj & cljc#2016-11-0216:01cflemingOk, I can check that.#2016-11-0216:01sandbagscan you look what else is in that namespace?#2016-11-0216:01cflemingI’m not sure yet, probably.#2016-11-0216:01sandbagsi.e. the first time ask, subsequently default to whatever is already in that namespace?#2016-11-0216:01cflemingAnd if there’s a mix, use the last one, or something similar.#2016-11-0216:02sandbagsi think that sounds reasonable#2016-11-0216:02sandbagstypically i cannot imagine i would mix clj and cljc in the same folder#2016-11-0216:02sandbagsbut even if you do i can’t think of a better approach#2016-11-0216:03cflemingOk, sounds good.#2016-11-0217:49cfleming@bfabry That’s fixed in the latest EAP: https://github.com/cursive-ide/cursive/issues/1560#2016-11-0217:50bfabrymm that's what I'm on#2016-11-0217:50bfabryVersion: 1.4.0-eap3-2016.2#2016-11-0217:50cflemingNo, I mean the one I’m going to release shortly 🙂#2016-11-0217:51bfabryhaha#2016-11-0217:51bfabryawesome thanks#2016-11-0217:51cflemingI should have said “next EAP"#2016-11-0221:32joshgHow does one connect to a remote socket server repl (not nrepl) using cursive?#2016-11-0221:42jrheardwhen speccing functions, is it normal to put the (s/fdef my-fn) above the (defn my-fn) line? i feel like i’ve seen this in one or two official bits of clojure documentation#2016-11-0221:43jrheardif so, will cursive support this? currently i see “my-fn cannot be resolved” when i try to do this#2016-11-0221:43jrheardi realize it would be helpful if i could link to a specific piece of documentation that does what i said on that first line, trying to remember..#2016-11-0221:43jrheardoh i think i saw dnolen do this in the video of his talk from last week#2016-11-0221:44cfleming@joshg Currently there’s no native support for this. I’m planning to add this soon as part of adding support for CLJS REPLs.#2016-11-0221:44joshg@cfleming Got it. Thanks!#2016-11-0221:44cfleming@joshg: As a workaround, you can use https://github.com/mfikes/tubular#2016-11-0221:45cfleming@jrheard Currently there’s no native support for that either 🙂#2016-11-0221:45jrheardhee#2016-11-0221:45jrheardcool, thanks#2016-11-0221:45cflemingBut if it should be supported, let me know.#2016-11-0221:45jrheardwill do! i’ll keep an eye out for actual cognitect documentation that says that this is an official pattern#2016-11-0221:46dnolen@jrheard that's not a pattern#2016-11-0221:46dnolenfdef can appear anywhere#2016-11-0221:46dnolenthis necessarily needs to be the case#2016-11-0221:46dnolenif you want to spec someone else’s thing#2016-11-0221:46jrheardmakes sense#2016-11-0221:47cfleming@dnolen So it’s valid to spec a fn ahead of the fn definition in the same ns?#2016-11-0221:47dnolenexactly#2016-11-0221:47cflemingOk, I’ll fix that.#2016-11-0221:47jrheard❤️ thanks for clearing that up david!#2016-11-0221:47cfleming@jrheard Could you file an issue for that?#2016-11-0221:47jrheardyou got it#2016-11-0221:47cflemingThanks#2016-11-0221:48dnolenit also simplifies stuff like optional type checking#2016-11-0221:48dnolenyou don’t want to enforce an ordering#2016-11-0221:52cflemingOk, no problem.#2016-11-0221:52cfleming@jrheard That said, it’s also valid to put the spec after the fn, so that will work as a workaround in the meantime.#2016-11-0221:53jrheardyup, i’ll continue doing that in the meantime 🙂#2016-11-0221:53jrheardthanks!#2016-11-0222:14misha@denik 1. you are trying to make code look (very subjectively) good by downgrading semantics, which actually (I am pretty sure "objectively") matter more: aligning :content of one element with :margin-top of another gives you nothing other than "looks cool, I don't even need to read it!". 2. your examples are rather naive if you compare it with any just-a-tiny-bit-non-trivial piece of code using any CSS frameforks, where you have 3 divs-deep structures with 50-chars-long class names combos just to align a button. Those rarely fit within 120-chars-wide editor tabs, let alone having 2 of them viewed at once side by side. 3. most of the line changes with subsequent re-formatting will generate tens of lines in commit diff. That's just a waste of people's attention. 4. that's a pain in the ass to implement for such a tiny subjective benefit of "looking cool"#2016-11-0222:26jrheardplease be nice 🙂#2016-11-0223:35misha@jrheard I was asked for detailed explanation : )#2016-11-0310:22cfleming@misha I don’t agree that this changes semantics - I do agree that the alignment can cause diffs to be larger than they would be otherwise. However the same is true of the map value alignment and let binding alignment that exists right now.#2016-11-0310:24cfleming@misha @denik My main problem with this proposal is that it’s hard to identify when you would want it. One of the nice things about Clojure is that you can use normal data structures for everything, but that also means that they can be hard for me to work with.#2016-11-0310:24cflemingIn @denik’s original examples, the method body is really just a bunch of vectors - how could I tell that this is hiccup (or whatever) and know to align it in a certain way?#2016-11-0310:31cfleming@denik Here’s a simple example of when this might break down:
(let [{:keys [a b c d]} something]
  {:a        a
   :b        b
   :c        c
   :d        d})
#2016-11-0310:32cfleming(contrived example of course, but you get the idea)#2016-11-0312:19misha @cfleming that's why I don't use such formatting even now :) (though it does make code examples in the docs, or established, tested, less likely to change code in the libraries tiny bit more readable)#2016-11-0312:20cflemingRight, I use it for maps, but not for lets#2016-11-0312:20cflemingIntelliJ’s diff is good enough that I can easily see what’s actually changed, and it’s only me looking at the diffs so that’s ok.#2016-11-0312:20cflemingBut especially in a mixed team that can be a problem.#2016-11-0312:23mishaBy "semantics" I mean: visual grouping easily gets changed so that attributes of one entity are "closer" to attributes of another, than to the entity itself. This easily provides wrong impression about code structure/ forms relationships#2016-11-0312:24cflemingOk, so it might make code more confusing. I don’t find that myself, and I’d argue it’s not semantics as such, but that’s just quibbling 🙂#2016-11-0312:24mishaI don't even want to start thinking about "how to make it work well with parinfer"#2016-11-0312:24mishaTrue#2016-11-0312:24cflemingYeah, parinfer complicates this sort of thing.#2016-11-0312:25cflemingThere are already a lot of bugs/side effects with things like rename and parinfer.#2016-11-0312:26mishaMaybe not "changes", but "de-emphasizes"#2016-11-0312:27cflemingThat’s fair enough.#2016-11-0312:28cflemingBut my main problem with the proposal is that, even if we all agreed the idea was good, it’s unclear how to decide where and when to apply it.#2016-11-0312:29cflemingI’d like to provide better support for Hiccup et al, but I’m not sure how to detect that some vector is actually supposed to represent Hiccup (or Garden css, or whatever else).#2016-11-0316:08Rachel Westmacottre: diffs, most diff tools should be able to ignore whitespace changes when asked#2016-11-0317:03mishaGuido would be so angry kappa#2016-11-0317:13snoeI think aligning makes sense when the data is tabular (a vector of maps with the same keys or a vec of vectors) but aligning the vals in a map or let subconsciously suggests that the left side names are related to one another. When I have map/let alignment turned on I find myself choosing poorer names on the left side because I don't want one long, descriptive name to push all the values too far away from the other bindings.
{title              ...
 id                 ...
 comments           ...
 published-datetime ...}

{title    ...
 id       ...
 comments ...
 pub-dt   ...}
`
#2016-11-0317:14snoecontrived, but I'd say the top map has better naming, but is harder to read.#2016-11-0317:45jrheard(i find all these arguments compelling - i’m fine with the current alignment/indentation style)#2016-11-0317:54denik@misha: @cfleming points taken. Colin, in your case I don't particularly see where how this breaks down. In a let the scope is he binding vector of the let, so whatever is within would get alignment. Re: the data structure being hiccup or something else, I'd say that's a nice treat but too specific to implement for. As you've correctly identified this indentation style is about aligning map values in arbitrarily deep nested data structures or a bindings. Can you make another example where this falls apart? #2016-11-0317:57cfleming@denik: How do I know the scope of a let is the binding vector and not the list of the let?#2016-11-0317:57cflemingWithout hard-coding that?#2016-11-0320:08denik@cfleming you’d hardcode that in cursive’s indentation policy, not in the code itself. That’s okay, isn’t it?#2016-11-0408:52cfleming@kenny I’ll try to reproduce that, because I’m pretty sure that doesn’t happen for me.#2016-11-0410:21cfleming@denik Let me think about that. I’m still not 100% sure how it should work - I’ll think about it some and see if I can come up with a reasonable strategy.#2016-11-0410:21cflemingIt’s likely to be a low priority change though, fair warning up front.
#2016-11-0418:21kenny@cfleming It happens on both my computer and my coworker's computer. We both have Mac's and are running the latest OS Sierra. I am running 2016.2.5 and Cursive 1.4.0-eap4-2016.2 on my Mac. Testing it on my Ubuntu machine now...#2016-11-0418:25kennyJust updated to eap4 and getting the same behaivor.#2016-11-0418:26kennyFor ease of copying.. Here is the example code:
(defn foo
  [x y]
  (+ x y))

(deftest t-example
  (is (= 2 2))
  (is (= 1 (foo 0 "")))
  (is (= 2 2))
  (is (= 2 2))
  (is (= 2 2)))
#2016-11-0512:05Steve PetersonFound something that I cannot understand. New Leiningen project. I have an almost empty (`(ns user)`) user.clj file in dev folder. In project.clj: :source-paths ["dev"] :repl-options {:init-ns user}. If I start REPL in Cursive and use "Send form before caret to REPL” to send (set! *warn-on-reflection* true) from user.clj, it does return true in the REPL but warnings are not shown. If I instead paste (set! *warn-on-reflection* true) directly in the REPL, warnings are shown. Why the difference?#2016-11-0513:25Alex Miller (Clojure team)The set! will only work when you are in the scope of a dynamic binding where it will retain its local binding#2016-11-0611:37cfleming@jh398 I just replied to someone on email about this - I assume that was you?#2016-11-0611:59jh398@cfleming yes, i got it to work after a lot of tries. the download somehow managed to get through and i was able to installed the latest version#2016-11-0611:59jh398thanks for the quick response!#2016-11-0611:59cflemingNo problem, sorry for the hassle - for some reason IntelliJ is picky about this after upgrading major versions.#2016-11-0612:01jh398no worries, i didnt expect a response on a sunday at all 🙂#2016-11-0617:34nickikHallo. Somehow I can not install cursive, I download it in intellj but after the download window disappears nothing happens and its not installed#2016-11-0617:44cfleming@nickik Have you had Cursive installed previously?#2016-11-0617:45cflemingIf so, probably the issue is that you have a spurious custom repo from an old version of Cursive. Open Settings-&gt;Plugins-&gt;Browse Repositories-&gt;Manage Repositories, and remove any Cursive-related repos you see there. Then back to Browse Repositories, refresh, search for Cursive and install - hopefully that will work.#2016-11-0617:46cflemingIf not, you can also download the plugin manually from https://plugins.jetbrains.com/plugin/8090?pr=, and install it with Settings-&gt;Plugins-&gt;Install from disk…#2016-11-0617:52nickikI have figured it out from the github issue#2016-11-0617:52nickikThank you for your help#2016-11-0617:53nickikI now use the EAP#2016-11-0711:10lsentaHey guys, is there any way to tweak intellij “open file name” for cursive? (the Cmd + Shit + N menu to jump to a file by name)#2016-11-0711:11lsentaI have core.clj(s) everywhere in my code, so the autocomplete is really not handy#2016-11-0711:11lsentais there any way to have the autocomplete use the full package name?#2016-11-0711:11cfleming@lsenta: You can use the Go To Namespace instead#2016-11-0711:11cflemingNavigate->Namespace...#2016-11-0711:12cflemingI actually bind that to what Go To File used to be bound to (Cmd-Shift-O) and bind Go To File to Cmd-Ctrl-Shift-O#2016-11-0711:12cflemingSince I don’t go to files that often#2016-11-0711:13lsentaThanks @cfleming that’ll do it!#2016-11-0716:15sandbagsI just created a new re-frame project and am trying to create a ‘cljc’ folder to sit next to ‘clj’ and ‘cljs’ under ‘src’. But I am not sure how. Those two folders are coloured white and do not appear to work the same way as if i use ‘create folder'#2016-11-0716:15sandbagsif i create a folder ‘cljc’ and then use create clojure namespace underneath it the namespace is created wrong (it misses the top level package)#2016-11-0716:28cfleming@sandbags Select “src”, then “New… -> Directory"#2016-11-0716:29cflemingReading your previous comment, it sounds like you can create the directory, but it’s not marked as the blue source folder, is that right?#2016-11-0716:30cflemingIf so, then assuming you’re using lein you’ll need to add src/cljc to your :source-folders key in project.clj#2016-11-0716:30cflemingAnd sync your project.#2016-11-0716:32sandbagsAh, thank you … that :source-folders bit waas the part I was missing#2016-11-1016:15denikIs there a way to separate (and commit) the build configs for a project?#2016-11-1017:56yonatanelIs cursive going to identify destructuring of default-namespaced map keys? (`:ns/keys` section in http://clojure.org/reference/special_forms#_map_binding_destructuring)#2016-11-1018:02cfleming@yonatanel It should already, do you have a case where that is not working?#2016-11-1018:03cflemingWhich version of Cursive are you running? You can see that in Settings-&gt;Plugins#2016-11-1018:04yonatanel1.3.1-14#2016-11-1018:07yonatanelIt doesn't find the destructured var in a function definition when I refactor the name, and it doesn't auto-complete there as well. (defn f [{:my-ns/keys [a b]}] ...)#2016-11-1023:32cfleming@yonatanel Oh right, that support is in the recent 1.4.0 EAP builds, it’s not in a stable build yet.#2016-11-1114:36jarppeI can't open the diff dialog that shows the expected and actual values when clojure.test/is fails?#2016-11-1114:39jarppeclicking the yellow button sets a breakpoint#2016-11-1114:45yonatanelWhat would it take to integrate Sayid with cursive? https://bpiel.github.io/sayid/#2016-11-1116:57yonatanelIs it just me or in idea 2016.2.5 with cursive 1.4.0-eap4-2016.2 Tools-&gt;REPL-&gt;Commands is gone?#2016-11-1116:57cfleming@yonatanel That menu only appears when you have a REPL running#2016-11-1116:59cfleming@jarppe what does that whole is form look like? It’s obscured by the popup there.#2016-11-1116:59cflemingIt’s odd that you don’t get the link in the tooltip either.#2016-11-1116:59cfleming@yonatanel I’d need to look at Sayid, I’ve never used it#2016-11-1117:09yonatanel@cfleming It can do tracing, printing function parameters and return values and optionally integrates with emacs, but it has an API so that's what I use within the REPL. After the conj talk I bet there will be some more interest :) http://2016.clojure-conj.org/becoming-omniscient/#2016-11-1119:25jarppe@cfleming , doen't really matter, it's same with every form#2016-11-1119:27jarppeIt used to show an option se open the dialog, but something happened and now its gone#2016-11-1119:30kenny@cfleming Were you able to replicate the missing OK markers after tests that throw an exception? It's still annoying me 😩#2016-11-1120:21cfleming@jarppe I remember what this problem is now. I suspect that your namespace is not in the directory hierarchy it should be.#2016-11-1120:22cflemingThere’s an issue open for that.#2016-11-1120:22cflemingSo if you have my-ns.core, it must be in <some source root>/my_ns/core.clj#2016-11-1120:22cfleming@kenny No, sorry 😞#2016-11-1120:23cflemingI’m working on website updates right now, I’ll get to it after that.#2016-11-1122:23verma@jarppe a little offtopic but is that Input font?#2016-11-1208:54jarppe@verma Yes, it is. Well spotted 🙂#2016-11-1209:02jarppe@cfleming I don't think that's the case. I have the same in every project, while my colleagues with same setup in same code base don't.#2016-11-1209:02jarppeI can repeat this with lein new some-project without any modifications.#2016-11-1210:46cfleming@jarppe Hmm, that’s odd - there was some discussion on the mailing list about this, and there might be an issue, but I can’t find it right now.#2016-11-1210:46cflemingI’ll see if I can dig it out.#2016-11-1210:47cflemingThe telltale part of the issue is that it reports: Expected 1, actual (2) (i.e. the actual value is in a list when it should not be).#2016-11-1210:53cfleming@jarppe https://github.com/cursive-ide/cursive/issues/625#2016-11-1210:53cflemingAre you using Humane test output?#2016-11-1210:59jarppe@cfleming No, but something in my ~/.lein/profile.clj is causing this. I removed it and now I get the "Show difference" link and can open the diff dialog.#2016-11-1210:59cflemingWhat do you have in there?#2016-11-1210:59cflemingIf you could narrow it down, or send it over so I can reproduce, that would be great.#2016-11-1211:00jarppewill investigate...#2016-11-1211:02jarppeIn :repl :plugins I have [venantius/ultra "0.4.1"]. If I remove that "Show difference" is shown.#2016-11-1211:06jarppeThanks @cfleming for pointing me to right direction.#2016-11-1211:06cfleming@jarppe Ok, interesting - I’ll try that and see if I can reproduce#2016-11-1211:07jarppeIt seems that venantius/ultra uses humane test output, so that could be the problem#2016-11-1211:27jarppeUpdated ultra to 0.5.0, same problem.#2016-11-1211:32cfleming@jarppe thanks. I’ll try to debug this to see if I can figure it out. In general, both cursive and humane output monkey patch clojure.test a lot, so the combination is unlikely to be good 🙂#2016-11-1215:45denikThey work once, immediately after I typed the var#2016-11-1217:40cfleming@denik I think that’s a CLJC bug#2016-11-1217:45denik@cfleming possibly. Why do you think does it work once right after typing?#2016-11-1217:46cfleming@denik I’m not sure - there are a couple of similar bugs in the CLJC support which I haven’t had time to investigate.#2016-11-1217:46cflemingI will soon though, since it’s been outstanding for a while and they’re very annoying.#2016-11-1217:46denikhttps://www.dropbox.com/s/avvnnmfrlt3x9p0/Screenshot%202016-11-12%2012.46.35.png?dl=0#2016-11-1217:47denikfor reference: @cfleming ^#2016-11-1217:48cflemingThanks!#2016-11-1308:19yonatanelWhile typing keyword names in namespaced keys destructuring it doesn't autocomplete although the keys are known. (defn f [{:my-ns/keys [autocom There's actually an issue for the more general case already: https://github.com/cursive-ide/cursive/issues/1048 (observed on 1.4.0-eap4-2016.2)#2016-11-1311:46cfleming@yonatanel Yes, that’s true - that requires context-sensitive completion, which Cursive doesn’t have yet. I do have a plan to add it though.#2016-11-1411:00borkdudeCursive marks unused imports, this is great. Can I also remove them automatically?#2016-11-1415:49ricardo@borkdude I haven’t found that option.#2016-11-1419:44cfleming@borkdude No, that’s Optimise Imports, there’s an issue for that and I’m hoping to do it soon. That will include sorting imports/requires etc as well.#2016-11-1419:44borkdudeOh well, it wasn’t that much work to do it by hand, but just wondered 😉#2016-11-1419:45cflemingYou can however clean them all up at once. Press Alt-Enter, and you’ll get the intention to remove them.#2016-11-1419:45borkdudeah#2016-11-1419:45cflemingHit right arrow and you’ll get a submenu, and you can clean them all up in a single file at once.#2016-11-1419:47cflemingIf you want to get really tricky, you can use Analyze-&gt;Run Inspection By Name…, search for Unused Import under the Clojure heading, and run it over your whole project. You can then clean the whole project at once by selecting “Apply Fix” in the results toolwindow.#2016-11-1419:50cfleming@denik See https://cursive-ide.com/archive/644.html for some discussion and a proposed solution (which I still haven’t gotten around to)#2016-11-1420:15katox@cfleming I'm pretty sure it happens to me as well - the bug with setting a breakpoint instead of opening a diff. It only happens sometimes. I don't have aviso or cljc in the project. I suspect I behaves like that if the repl is in the debug mode only. #2016-11-1420:16bfabryI'm still getting the thing where if I open a .java file it takes over the whole window and removes my splits and it's starting to drive me crazy#2016-11-1510:12cfleming@katox Hmm. I’ll try to reproduce this, although I’m pretty sure it’s always worked for me.#2016-11-1510:13cfleming@bfabry Sorry 😞. I think that’s an IntelliJ bug, but I haven’t seen it for ages.#2016-11-1510:13cflemingI searched for it in their YouTrack a while ago but couldn’t find anything.#2016-11-1510:14cflemingIt’s a hard one to describe though, it’s possible there’s one in there somewhere.#2016-11-1510:14bfabryyeah having the same issue finding anything#2016-11-1510:24cfleming@bfabry Do you find that if you then close the Java file and open a Clojure one that the splits come back?#2016-11-1510:39bfabryyup#2016-11-1510:39bfabryjust switching back to a clojure file without closing the java file even#2016-11-1510:53stijn@bfabry it's indeed an IntelliJ bug and it's fixed in the latest EAPs#2016-11-1511:05tengstrandHi! We (my team) have used Cursive for nearly three months now. For me it’s really slow to debug. It has been like this sporadically, but the last days it is like this all the time. To go from one break-point to another takes 10-20 seconds when it should take a fractions of a second. I gets a little better if I restart IDEA, but after a while it gets really slow again. I can’t hardly work. We don’t have much code < 5.000 LOC. I use Clojure 1.9, maybe that is the problem? Or the memory settings, I don’t know.#2016-11-1511:05cfleming@stijn Oh, that’s why I haven’t seen it, I’m on 2016.3 EAP#2016-11-1511:06stijnthere were at least 5 tickets when I searched for it#2016-11-1511:06stijnbut can't find it back right now 🙂#2016-11-1511:07stijn@bfabry: if you're not OK switching to EAP, you can enable editor tabs again#2016-11-1511:08cfleming@teng Yes, unfortunately the debugging is very slow sometimes. I have some ideas about why this is, but it’s extremely difficult to actually identify the problem (you can’t profile or anything like that). I believe it’s to do with the number of classes that have to be searched when a breakpoint is hit, but I don’t know why sometimes it’s much worse than others.#2016-11-1511:08katox@cfleming I think one way to reproduce that bug is to create a test where the is-form is on the very last line of the test file.#2016-11-1511:08stijnthat solves the issue, but it works a bit different#2016-11-1511:08cflemingUnfortunately JDI really wants to know the class a breakpoint is set on, and in Clojure that’s basically impossible to determine.#2016-11-1511:08cflemingSo I have to tell it that the breakpoint might be in any class generated from that namespace.#2016-11-1511:11tengstrand@cfleming ok - then I will only use the debugger when I really need it! (until it's fixed)#2016-11-1511:12cflemingMy theory is that this is very slow, but I can’t really test that.#2016-11-1511:13cfleming@katox Interesting, I’ll try that, thanks.#2016-11-1511:53tengstrand@cfleming I was working in a namespace with a :reload-all in the ns. Maybe that made things harder for Cursive and made things go slower.#2016-11-1512:10tengstrand@teng my colleague uses IDEA 216.2.5 Ultimate edition and he has no problems. I use IDEA 216.2.5 Community edition. Maybe that can make some differences too.#2016-11-1517:51bfabryah, interesting. I wonder if I can get EAP builds when on community edition#2016-11-1517:57bfabryI hate how intellij does that thing where it leaves the old version around#2016-11-1518:08bfabryyay! switching to eap stopped it#2016-11-1518:09bfabryof course now I have tool tips bleeding across desktops somehow#2016-11-1518:09bfabry2016.3 looks cool though, particularly like the named args sugar#2016-11-1519:28bfabrycolin any change of that fancyness ending up in cursive?#2016-11-1519:30cfleming@bfabry Yes, absolutely, I looked into it and it’s not hard to do.#2016-11-1519:31bfabryoh wow that would be pretty amazing 🙂#2016-11-1519:35cflemingAny suggestions for other things you might want to see labeled are also welcome#2016-11-1519:35bfabryman, when I think about that feature it's actually amazingly awesome. kwargs are objectively better for readability than positional, but they're annoying to type and take up a lot of space. this solves both those issues#2016-11-1519:40bfabryhaven't got any thoughts on other things that could be labelled off the top of my head, but I'll keep an eye out#2016-11-1620:01danielcomptonLooking forward to the new filetype stuff in Cursive 🙂#2016-11-1620:04bfabrynew filetype stuff?#2016-11-1620:04danielcomptonhttps://github.com/cursive-ide/cursive/issues/893#2016-11-1620:04danielcomptonhttps://github.com/cursive-ide/cursive/issues/904#2016-11-1620:05bfabryah nice#2016-11-1623:34cfleming@danielcompton I thought you’d like that 🙂#2016-11-1623:35cflemingTraveling tomorrow, but will hopefully have time to get a beta out, and then assuming no problems a stable release shortly after so it’s out for the IntelliJ 2016.3 GA#2016-11-1623:36danielcomptonsweet, looking forward to it#2016-11-1707:03yonatanelSomeone here wanted cursive to remove unused imports, but I'm having this problem when not using type hints which is always:#2016-11-1707:06yonatanelOnly when I import .getTime can be resolved, but then the import is unused.#2016-11-1707:51ikitommi@yonatanel the code uses now reflection. You can add (set! *warn-on-reflection* true) to get warnings of these. Add ^Date hint to the latter and it’s all good (into the let after a-date.#2016-11-1708:42yonatanelSorry for the clojure question, but can I do (.getTime ^Date a-date)?#2016-11-1708:45stijnwhat about
(let [^Date a-date (:date m)]
  (.getTime a-date))
#2016-11-1708:47yonatanelNo problem. I'm curious, technically, is (.getTime ^Date (:date m)) possible?#2016-11-1708:53stijn
(.getTime ^java.util.Date (java.util.Date.))
=> 1479372774370
#2016-11-1708:53stijnyes 🙂#2016-11-1708:57yonatanelIn (some-> m :date (.getTime)) getTime is not resolved but in (some-> m (:date) (.getTime)) it is. :thinking_face:#2016-11-1708:59yonatanelFrom http://clojure.org/guides/threading_macros: A bare symbol or keyword without parentheses is interpreted as a simple function invocation with a single argument.#2016-11-1709:04bfabrythat looks like a cursive bug, I don't think either of those is resolvable#2016-11-1709:05yonatanelWhy not? It works#2016-11-1709:08rauh@yonatanel It might get guesses by Cursive, but the clojure compiler will still do reflection#2016-11-1709:08bfabryso would your original snippet, but it would be slow#2016-11-1709:08rauhThere is no chance for clojure to know that the map field :date is a Date#2016-11-1709:08rauhEnable *warn-on-reflection* and you'll see#2016-11-1709:09yonatanel@rauh You are right about reflection, but it should be resolved.#2016-11-1709:09bfabry"not resolvable" warnings in cursive don't indicate "this won't work", they indicate "I don't know if this will work or not but it will be slow"#2016-11-1709:10yonatanelI see. So both should not be resolved...#2016-11-1709:10bfabrywell, I don't know if cursive aims to guarantee that it will always tell you something will be slow, but it would be useful if it does#2016-11-1714:26imreanyone else having performance problems with cursive + intellij community these days?#2016-11-1714:28imresomething in my setup seems to be leaking memory and the longer I have a repl running the slower the whole ide becomes and eventually it runs out of java memory#2016-11-1714:29imrethe only recent change to my workflow was that I started using datomic#2016-11-1714:29imrewhich could also be the culprit#2016-11-1715:08cfleming@imre I actually saw that the other day. What it seemed to be was something holding the head of a seq in the nREPL client code.#2016-11-1715:08cflemingI have some heap dumps but haven’t had time to investigate properly.#2016-11-1715:09cfleming@bfabry Cursive does aim to do that, but has some bugs currently. In particular, it doesn’t do the right thing in a total absence of type hints (should warn always, but that perhaps should be a configurable strict mode).#2016-11-1715:12cflemingIt’s very close to being totally accurate, though.#2016-11-1715:42imre@cfleming let me know if I can send you anything that could help tracking the issue down#2016-11-1716:06yonatanelIs there any way to replace a common keyword namespace on all occurrences, for example when rearranging clojure specs?#2016-11-1718:09misha@cfleming greetings! is this possible in IDEA? https://twitter.com/mraleph/status/799284624115568641#2016-11-1719:41cfleming@yonatanel You can rename a namespace alias, is that what you mean? So you can rename str/trim to string/trim or ::str/keyword` to ::string/keyword#2016-11-1719:42cflemingCurrently you can only rename the last segment of a namespace name, because renaming other segments involves moving things around which is more complicated, and not implemented yet.#2016-11-1719:43cfleming@misha I don’t think so, no. You can use proportional fonts, but I believe the vertical space of every line has to be equal.#2016-11-1719:44cflemingThat would drive me nuts, personally - nothing would ever align.#2016-11-1720:21bfabryalso getting periodic repl slowdowns#2016-11-1807:37roelofwDo I still have to use this page : https://slack-redir.net/link?url=https%3A%2F%2Fgithub.com%2Fboot-clj%2Fboot%2Fwiki%2FFor-Cursive-Users&amp;v=3 to use boot with cursive ?#2016-11-1810:05cfleming@roelofw Yes, that’s the current means of doing so.#2016-11-1810:07roelofwoke, thanks#2016-11-1810:44yonatanel@cfleming I'm not sure why i can't rename an alias like you said but it might be because of my first problem, which is I use alias override from a lib instead of clojure.core, and cursive doesn't resolve that function.#2016-11-1810:44cfleming@yonatanel So you have another alias function which uses alias under the hood?#2016-11-1810:44yonatanelyes#2016-11-1810:44yonatanelI'll reupload#2016-11-1810:44cflemingIs that from a public lib, or something internal?#2016-11-1810:45cflemingAh, I see - from schpec#2016-11-1810:45cflemingSorry, I missed that in your screenshot#2016-11-1810:46cflemingI don’t know why that would not be resolved - I’ll try to reproduce that.#2016-11-1810:48cflemingI’ll also add support to Cursive so that that creates aliases correctly.#2016-11-1810:49yonatanelThanks. In addition, I now tried to use the core alias and renaming 'a to 'aa didn't change all the specs that use it. I have a bunch of (s/def ::a/some-spec (s/and ... that wasn't changed to ::aa/some-spec.#2016-11-1810:51yonatanelIt does work when I change the :require ... :as part when the namespace actually exists, but for specs I use non-existent namespaces just for organizing the specs.#2016-11-1810:55yonatanel@cfleming Are you supporting java 6 for cursive as now mentioned over at #clojure ? I think the newer intellij already requires java 8.#2016-11-1810:55cflemingI see - yes, I suspect that is correct. I’ll have to fix the support for alias to ensure that that symbol correctly refers to the alias.#2016-11-1810:56cflemingYes, I am. Java 8 is only required for v2016+, currently I support v14, v14.1 and v15 as well. I’m about to drop support for v14 and v14.1, but v15 will be supported until next year.#2016-11-1810:56yonatanel@cfleming re alias, how do you do that? Do you link the aliased symbol only to its occurrences after the alias call?#2016-11-1810:56cflemingI support the last two years of IntelliJ versions, basically.#2016-11-1810:57cflemingThat’s not the main reason for lack of boot support though.#2016-11-1810:57cflemingThat’s mostly because boot is very hard to support correctly.#2016-11-1810:57yonatanelOK. I was just curious how this works with intellij versions.#2016-11-1810:57cflemingFor some v15 users on a Mac, Apple JDK6 is still the best JDK to use for running IDEA.#2016-11-1810:58cflemingDue to bugs in Oracle’s Swing/AWT support.#2016-11-1810:59cfleming@yonatanel Re: alias, right, I add support for clojure.core/alias which says that the first symbol actually refers to the namespace alias. I’ll also add support saying that com.gfredericks.schpeck/alias works like the core one.#2016-11-1811:11yonatanel@cfleming Would it be crazy to link symbols from anywhere and not just in alias calls to keyword namespaces?#2016-11-1811:11yonatanelYeah, probably...#2016-11-1811:11cflemingI’m not sure what you mean#2016-11-1811:12yonatanelI'm trying to think of a way you don't have to support a new lib that impersonates alias when someone else decides to write one.#2016-11-1811:14yonatanelOr maybe when renaming a namespaced keyword like ::a/k to have the option to change only the alias. The more I think about it it seems to much to support. Never mind.#2016-11-1811:17yonatanelNice, ctrl+shift+quote maximizes any tool window including the REPL if you're in it.#2016-11-1812:09cfleming@bfabry When you’re getting REPL slowdowns, are you printing a ton of output in the REPL?#2016-11-1812:09cflemingActually, @imre as well - are you printing a lot of output when seeing these slowdowns?#2016-11-1812:10cflemingAnd are you both on the 2016.3 EAP?#2016-11-1812:10imreI'm on: IntelliJ IDEA 2016.2.5 Build #IC-162.2228.15, built on October 14, 2016 JRE: 1.8.0_112-release-287-b2 amd64 JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o#2016-11-1812:11imreCursive: Version: 1.4.0-eap4-2016.2#2016-11-1812:12imre@cfleming sometimes there can be a lot of output due to test being executed resulting in exception stack traces#2016-11-1812:12imreother times I'm just typing large commands into the repl trying to repl-drive something#2016-11-1812:12cflemingWhen I say a lot of output, I’m starting to see memory issues at around 256k lines of output.#2016-11-1812:13imrehmmmm I don't think so#2016-11-1812:13cflemingPretty-printing large sequences of nested maps.#2016-11-1812:13cflemingOk#2016-11-1812:13imrebut the next time I run into the issue I'll try and analyse my repl output window#2016-11-1812:13cflemingGreat, thanks#2016-11-1812:13imredo you think clearing the output for the repl should help?#2016-11-1812:14imreI'll also try that the next time and report back#2016-11-1812:15cflemingI’m not sure. I’ll try that for the problem I’m seeing and see if it works. If it does, I might limit scrollback to 50k lines (configurable) or something.#2016-11-1812:22cfleming@imre Clearing the REPL output definitely helps in the case I’m seeing.#2016-11-1816:32roelofw@cfleming Do I also have boot run with a run configuration or must I open a terminal for it ?#2016-11-1817:02bfabryI'm on 2016.3 eap. I think my repl output is pretty modest#2016-11-1817:29imre@cfleming thanks. just to make sure this part of the problem doesn't get lost - when my repl slows down, the entire ide slows down. Even moving the caret around in the editor window becomes painful#2016-11-1817:30imrehaven't had the problem since yesterday though#2016-11-1820:16cfleming@imre Can you check the memory usage? I always turn the indicator on: Settings-&gt;Appearance &amp; Behaviour-&gt;Appearance-&gt;Show memory indicator. You can click on that to perform a GC. If the slowdown is GC thrashing, the memory will be nearly all used, and clicking will free very little.#2016-11-1820:16cflemingMemory indicator is bottom right, BTW.#2016-11-1820:17cfleming@bfabry It’d be interesting to know that when it happens to you too.#2016-11-1820:17bfabrywill turn that on#2016-11-1820:47imrewill do, thanks Colin#2016-11-1821:10kenny@cfleming Do you know how to change the upper limit on the RAM? I have tried editing Help &gt; Edit Custom VM Options but the Xmx number does not reflect the number shown in the UI bar.#2016-11-1821:17cfleming@kenny That should be it, see https://intellij-support.jetbrains.com/hc/en-us/articles/206544869-Configuring-JVM-options-and-platform-properties#2016-11-1821:17cflemingYou’ll have to restart after changing it, of course#2016-11-1821:18cflemingI guess that unless you set the min and max to the same value, it’s possible that the JVM will initially allocate less, and then expand it on demand - that might be what you’re seeing.#2016-11-1821:18kennyAh#2016-11-1821:19kennyWell, the value I'm seeing is not the min or the max#2016-11-1821:19cflemingTry setting both to 1G or whatever, and see if it changes then.#2016-11-1821:19cflemingThat probably explains it.#2016-11-1821:20kennyThe min is at 1g right now but the bar shows "287 of 725M". Shouldn't it be "287 of 1024M" or something closer to 1g, not 725M?#2016-11-1821:20kenny725M seems so specific#2016-11-1821:20cflemingI see 725M too, and I’m pretty sure I have it set to 1G. I don’t know what the difference is due to - possibly that’s what used to be the permgen?#2016-11-1821:21cflemingI know the JVM usually has a fairly high constant overhead too, perhaps IntelliJ is factoring that out?#2016-11-1821:21cflemingI don’t know.#2016-11-1821:21kennyWill try changing min to 2g to see if changes are reflected#2016-11-1821:22cflemingOk, let me know what happens#2016-11-1821:22kennySame 725M number after restarting#2016-11-1821:23bfabrydamn, having that button there now, I can see myself reflexively habitually clicking it anytime something seems slow#2016-11-1821:23kennyThat's why I just enabled it lol#2016-11-1821:23cfleming@bfabry Hehe, you’ll learn to ignore it after a while, until things go wrong#2016-11-1821:24kennyYeah, I have no idea where that 725M is coming from. Maybe some other RAM number?#2016-11-1821:25cflemingI don’t know. I’ll investigate later - it’s bedtime here.#2016-11-1821:26kennyNo worries. Certainly not important, more of a curiosity 🙂#2016-11-1910:20dhruvHey guys, is there a way to prevent a Run Configuration from stealing focus when the REPL loads?#2016-11-1919:19cfleming@dhruv No, there isn’t right now, but it’s something several people have complained about.#2016-11-2003:22dhruv@cfleming No worries, thanks for letting me know#2016-11-2011:36yonatanelWhere can I see a changelist between updates of the EAP?#2016-11-2011:46yonatanelI see com.gfredericks.schpec/alias is now resolved, but refactor-&gt;rename on an alias doesn't change keywords like ::aliased/key#2016-11-2013:14yonatanelAlso, it thinks every aliased namespaced keyword is the same as non-namespaced, in highlighting and refactoring:#2016-11-2015:05cfleming@yonatanel Ok, it looks like com.gfredericks.schpec/alias not resolving might have been some corruption in the indexes - they can get a bit funky from time to time. It still doesn’t know that the first symbol refers to an alias, which is why the renaming isn’t working.#2016-11-2015:06cflemingThose aliased namespaces being all equal is a bug, I suspect it’s because the aliases aren’t created correctly and probably they all have the namespace part nil.#2016-11-2015:13yonatanelCould it happen with core alias?#2016-11-2015:14cflemingI don’t understand - what do you mean?#2016-11-2015:25yonatanelIf I wasn't using schpec/alias but normal alias, could the indexes still be corrupted?#2016-11-2021:06cflemingYes, the index corruption happens because of bugs, either mine or JetBrains (not sure - I use the indexes in ways not many other people do, so I probably expose bugs in their code, which is extremely complex)#2016-11-2021:07cfleming@yonatanel ^#2016-11-2108:42yonatanelIs this familiar to anyone? Lots of Error evaluating - class java.net.SocketException: Socket closed after closing the REPL, I think on every key stroke in editor window. I closed the REPL after editing became very slow.#2016-11-2108:52cfleming@yonatanel I usually see that with a remote REPL once the connection has been dropped for some reason - either the remote end has gone away, or some network error#2016-11-2109:01yonatanelI use the Run nREPL with leiningen option#2016-11-2109:02yonatanelIt only happened this one time so I can't really add any more info#2016-11-2204:22be9I use clojure.java-time library (https://github.com/dm3/clojure.java-time) in several projects, and for some reason functions in its namespace cannot be resolved. This holds true for every project.#2016-11-2204:26be9so it all works, but can’t be resolved by cursive for some reason#2016-11-2204:29be9Could it be that the name (`java-time`) is a top-level namespace without dots? Not a common thing in Clojure world#2016-11-2207:57danielcomptonYeah that would be my guess. Just to check, does the code actually run?#2016-11-2208:05danielcompton@be9 it's because it uses Potemkin import vars so Cursive doesn't understand it #2016-11-2209:24cfleming@danielcompton @be9 Cursive does actually understand Potemkin’s import-vars. I’ll look to see if I can see why that’s not working.#2016-11-2209:47yonatanelIntellij is rather stuck after messing with defmacro in REPL. Is there a way to report the problem before I kill it?#2016-11-2209:52yonatanelKilled it... It got crazy, with wrong macroexpand results.#2016-11-2209:53be9@danielcompton the code does run#2016-11-2212:35yonatanel@cfleming I want to change indentation of macros like as-> but they are not listed in Form Parameters tab of code style options.#2016-11-2213:57cfleming@yonatanel See https://cursive-ide.com/userguide/formatting.html#2016-11-2214:02yonatanel"Coming Soon: A much better way to do this." :D#2016-11-2214:12cflemingHehe#2016-11-2214:12cflemingYes#2016-11-2214:16yonatanelAm I missing something? After setting indentation to 2 it only starts at the second form:
(-> 1
    inc
  inc)
#2016-11-2214:41yonatanelWhen I choose "Indent" instead of 2 it works#2016-11-2215:21yonatanel@cfleming I wrote my own threading macro. How do I tell cursive to count one more arg when checking arity? Perhaps it doesn't even have to check anything inside a macro it doesn't know?#2016-11-2215:54cfleming@yonatanel You can use https://cursive-ide.com/userguide/macros.html and set it to -> or ->>, assuming your macro has the same layout as one of those.#2016-11-2308:04roelofwIs there a way I can debug this reduce code :
((fn [s] (reduce (fn[acc n] (if (not= n (last acc)) (conj acc n))) [(first s)] s )) [1 1 2 ]) 
#2016-11-2308:05roelofwIm expecting that acc is a vector but when I use conj the new entries are placed at front instead of at the end#2016-11-2308:09bfabry((fn [s] (reductions (fn[acc n] (if (not= n (last acc)) (conj acc n))) [(first s)] s )) [1 1 2 ]) => ([1] nil (1) (2 1))#2016-11-2308:10bfabryso acc is [1], then nil (here's the problem), then (1) then (2 1)#2016-11-2308:12roelofwThanks, never knew that reductions exist#2016-11-2308:13bfabryhandy function 🙂#2016-11-2308:14roelofwit seems that I need a else#2016-11-2308:15rauhIf you still want to learn how to debug: Break up the function into multiple lines, then set a breakpoint, and then start the debugger with cursive (in the cursive docs)#2016-11-2308:17roelofwI did , but I could not find out how to see it#2016-11-2308:18roelofwbut I found another way , use reductions#2016-11-2308:19rauhYes I see, that'll safe you this time, but it might be better for you to learn the debugger for future problems
#2016-11-2308:21roelofwI will do#2016-11-2317:15pupenoDebuggers shouldn’t be line based with a language such as Clojure.#2016-11-2319:45yonatanel@roelofw Or try Sayid for tracing everything: https://bpiel.github.io/sayid/#2016-11-2319:47roelofw@yonatanel Thanks for the tip#2016-11-2323:24katox@pupeno I remember NetBeans having expression based debugging for about a decade, maybe JetBrains should start to think about it as well #2016-11-2323:47pupeno@katox really? I never seen an expression based debugger before and I’ve been telling people that’s how it should work for a decade or so… well… since I started playing with Lisps, were lines are not that meaningful. JetBrains tend to be very responsive, so, we should probably ask. But I’d like to as @cfleming if IntelliJ IDEA support is necessary or is it just a Cursive thing.#2016-11-2323:58katox@pupeno I think it was something more limited - like setting a line breakpoint + you could "step over" individual expressions. Still better than a full line which is a lot in Clojure.#2016-11-2400:01katox@pupeno I'd also appreciate a full REPL in a debugging session instead of a modal dialog bog but that'd probably be a ton of work. Plus data inspection is better within that dialog box right now. That'd be a nice thing to have in the REPL all the time of course, like in firebug output or chrome dev tools#2016-11-2408:46cfleming@katox I’d be interested to see that, because it’s not a JetBrains limitation, it’s a JDI limitation. The JVM debugging API is intrinsically line based.#2016-11-2408:46cflemingIntelliJ does do some tricks in recent versions to fake it somewhat, but it’s a little ugly.#2016-11-2408:52katox@cfleming It could be a hack, but I think it's still there. See http://wiki.netbeans.org/DebuggerImprovements#2016-11-2408:54kennyEarlier we talked about the heap size bar in the bottom right corner not displaying the correct number for allocated RAM. Today I noticed that it is showing roughly the correct number on my Macbook. Previously I was on my Ubuntu machine. Possibly a bug in the Linux IntelliJ build?#2016-11-2408:56cfleming@kenny I don’t think so, because I see the same number that you were seeing on my Mac#2016-11-2408:57cflemingI meant to reach out to JetBrains about that but haven’t so far#2016-11-2408:59cfleming@katox Interesting. IntelliJ also provides something like that in recent builds, which helps with Java 8 etc. I haven’t had time to investigate how it works, though. JVM bytecode still only contains line numbers AFAIK, even in Java 8#2016-11-2409:00katoxbtw my IDEA linux bottom bar shows "198 or 1981M" (2016.3 EAP)#2016-11-2410:33yonatanel@katox Any problem with the 2016.3 update? i wonder if I should upgrade.#2016-11-2410:41katox@yonatanel it works fine on my machine#2016-11-2414:02rauhSo when I use ^ after a def my symbol doesn't get indented at all:
(def ^:x
y)
which is slightly annoying. Is this a bug?
#2016-11-2422:43danielcompton@rauh https://github.com/cursive-ide/cursive/issues/1066#2016-11-2505:57hagmonkI seem to have a project that stubbornly refuses to use regular Clojure indentation in Cursive#2016-11-2505:58hagmonkIt’s doing 4 spaces instead of 2, despite the default and project settings being configured for 2 spaces. And despite other projects working with 2 spaces just fine.#2016-11-2608:22rauhI would kinda like for "Grow selection" to add another stop at "Map entry" (ie, the key value pair), currently after a key or value it expands to "all values in a map". What do people think?#2016-11-2618:42lsentaHi guys, is there a way to stop cursive from changing the directory marks?#2016-11-2618:43lsentawhen IntelliJ starts, all my custom “mark as src directory”, “mark as excluded”, etc are trashed by the lein loader#2016-11-2620:58danielcompton@lsenta are you using lein or boot?#2016-11-2620:58lsentaboot with the generate thingy#2016-11-2620:58danielcomptonCursive sets your source, test dir, etc to what your project.clj says #2016-11-2621:01lsentaYea I know, but it’s not very good perfect at it, I’d rather fix this once and for all with a couple of clicks#2016-11-2621:02lsentaFor example :resources-path [”resources/”] -> resources folder is marked as source root#2016-11-2621:09lsentaAnd with boot+generation, the project.clj has almost no information on the structure of the project#2016-11-2709:10sandbags@cfleming thank you!! 🙂#2016-11-2709:10sandbags(i just created a new namespace)#2016-11-2713:16yonatanelIs there any shortcut to switch lines but only of parameters without the parenthesis, for example reordering required namespaces or map keys?#2016-11-2713:30rauh@danielcompton Little late: Thanks for the link! I +1'd it.#2016-11-2714:24imre@rauh I use ctrl+m and then ctrl+leftright to mark and select map entries etc#2016-11-2714:24imreWorks ok#2016-11-2716:10yonatanel@imre What's ctrl+m for?#2016-11-2716:13imreIn my editor it's "mark" or something like that#2016-11-2716:13imreMarks beginning or end of selection#2016-11-2716:14imreYou can then extend/shrink it using normal navigation#2016-11-2721:12cfleming@lsenta The idea is that your build tool config file (project.clj, in this case, even though it’s generated from boot) should represent your project’s state, otherwise you risk having different behaviour in IntelliJ and when using lein on the command line. Why can’t you add the directories you need to :source-dirs or whatever?#2016-11-2721:13cfleming@rauh Yes, this would be nice. I believe there’s an issue for it somewhere, but I can’t easily search right now.#2016-11-2721:13cfleming@sandbags No problem! Glad it helps.#2016-11-2721:14cfleming@yonatanel Do you mean to reorder a map key/value pair within the map?#2016-11-2721:15cflemingYou can do this now. The cursor needs to be right before the key, then move form up/down will move the key/value pair. Like this:#2016-11-2721:15cfleming
{:a 1
 :b 2
 |:c 3}
#2016-11-2721:15cflemingWhere | is the caret. Move form up will produce:#2016-11-2721:16cfleming
{:a 1
 |:c 3
 :b 2}
#2016-11-2721:16cflemingThis also works for other braced pair kinds like let bindings.#2016-11-2721:16cfleming@imre You might like that too, if you’re not using it already.#2016-11-2721:47yonatanelThanks!#2016-11-2722:17imreThanks @cfleming, already using it!#2016-11-2800:54danielcomptonNot sure why, but after updating to 2016.3 I needed to re-enter my Cursive license#2016-11-2800:57danielcomptonAh, I had already run 2016.3 so it didn't offer to transfer my preferences#2016-11-2806:29lsenta@cfleming here’s what I had with the lein project#2016-11-2806:35lsentaTo answer your question, I’m pretty sure even if I learn lein & cljsbuild inside out, there’s no way I can get cursive to do what I want.#2016-11-2806:40lsentaNow, I moved to boot: I use the generate plugin to produce a project.clj, obviously it’s even worse since most of the paths are computed at runtime.#2016-11-2806:59lsentaI couldn’t find a reference to :source-dirs in the doc, is the regular way to do this is to throw everything under :source-paths?#2016-11-2807:00lsentaclj, cljs, sass files, externs, and everything else?#2016-11-2807:08pupenoThe latest version of Cursive seem to get very confused when sources point to a checkout directory.#2016-11-2807:55yonatanelThis is probably a newbie thing but I turned on slurp and now ctrl+left/right moves whole sexprs. In the Clojure Keybindings settings none of the bindings are checked. Previously some were.#2016-11-2808:50cfleming@lsenta Yes, sorry - :source-paths and :test-paths is what you want. There’s also :java-source-paths if that’s relevant (https://github.com/technomancy/leiningen/blob/master/sample.project.clj#L295-L298)#2016-11-2808:51cflemingLein does include the concept of resource paths, but basically treats them the same as source paths anyway IIRC (I’d need to check that to be sure)#2016-11-2808:52cflemingAnd yes, your problem with boot there is why boot support is so hard to add.#2016-11-2808:52cflemingIf you can’t get Cursive to do what you want, I’d like to understand why.#2016-11-2808:55rauhSo I disabled "Save files on frame deactivation" so figwheel would NOT kick in. But switching over to the REPL frame and it still saves & reloads.#2016-11-2808:57rauhAlready restarted IJ#2016-11-2809:00lsenta@cfleming - lein: I have to duplicate all my paths (from cljsbuild & sass), I’m stuck with your definition of resources, I’m pretty sure I can’t define test resources - boot: all of the above + the need to write some generation script on top of what already exists#2016-11-2809:01lsentaWhat I don’t understand is that wether it’s lein+plugins or boot, making sense of the paths looks like solving the halting problem#2016-11-2809:02lsentaWhile a checkbox [ ] sync marks with project.clj would be just fine#2016-11-2809:07lsentaFWIW, I’ve been doing this for 6+months, I’m asking only now that I moved to boot and cursive trash 100% of the information I want#2016-11-2809:08lsentaI’d be surprised to be the only one#2016-11-2811:13imreanyone here using idea 2016.3? any nice things in there for us cursive users?#2016-11-2812:02ricardo@imre: I am, but haven’t noticed anything in particular (haven’t done much digging, though). No problems either.#2016-11-2814:12yonatanel@cfleming If I send a command to REPL before it finish initializing, I get this:
Error evaluating - class java.net.SocketException: Socket closed
Exception starting REPL: java.lang.InterruptedException
Process finished with exit code 137 (interrupted by signal 9: SIGKILL)
#2016-11-2814:13imrethanks @ricardo I'll try it 🙂#2016-11-2815:27cfleming@imre It looks a little nicer, but there’s nothing specific in there yet for Cursive. I’m planning to add support for the parameter hints: https://github.com/cursive-ide/cursive/issues/1596#2016-11-2815:27cflemingBut it works fine, no issues that I’m aware of.#2016-11-2815:30cfleming@lsenta You don’t have to duplicate your cljsbuild paths, Cursive will pick those up. You only have to add any source paths that are missing to that list.#2016-11-2816:19gjnoonan@imre I’m also running 2016.3, no issues thus far#2016-11-2816:19gjnoonan@cfleming that would be really nice 🙂#2016-11-2816:21imrethanks all, downloaded and trying it now 🙂#2016-11-2816:21imreUI does look a tad nicer#2016-11-2816:22imrebeen using fira code for a while, good to see that integrated by default#2016-11-2816:27gjnoonanYeah, I tend to use Hasklig however#2016-11-2816:53yonatanelWhat's your assoc indentation setting?#2016-11-2817:24gjnoonan@cfleming I’m starting work on a Plugin to add datomic support to IDEA’s database tools, just checking you don’t have something for this in the pipeline before I began#2016-11-2817:25cfleming@gjnoonan No, I don’t have anything concrete planned#2016-11-2817:29gjnoonanSweet 🙂#2016-11-2902:43kenny@cfleming I did a fresh install of IntelliJ and it turns out the RAM settings were not getting persisted for some reason. Now the RAM bar in the bottom right shows the correct amount of RAM and everything is running much smoother. I backed up my settings, deleted all my IntelliJ config folders from previous installations, and imported the backed up settings into the new IntelliJ installation. I guess deleting those old config folders did the trick? Glad everything is fixed now 🙂#2016-11-2909:30rauhWhen I switch over to the REPL window from my main window Cursive/Intellij will always save my files. even though I have "Save files on frame deactivation" disabled. Intellij does NOT save my files if I switch to other Intellij windows, such as "Find'. It also behaves correctly when I switch to other frames like the browser#2016-11-2909:31cfleming@kenny That’s very strange. I’ll try to fiddle with that now, because I saw exactly the same number you did.#2016-11-2909:31cfleming@rauh Yes, it does. This was a change I made a while ago, because it was very surprising for people sometimes when that didn’t happen#2016-11-2909:32cflemingSorry, I missed your message the other day - you don’t want this because you don’t want Figwheel to kick in, is that right?#2016-11-2909:32rauhYes, I have some bad state that doesn't rerender properly and I need to debug it. But as soon as figwheel kicks in, everything is good and I can't debug my components state#2016-11-2909:33rauhso I need to not reload.#2016-11-2909:33cflemingHmm.#2016-11-2909:33cflemingI can’t think of a good way around that unfortunately, unless you write your debug code in the editor and send the forms to the REPL without switching to the REPL editor.#2016-11-2909:34cflemingIt’s not ideal, for sure, but it should work.#2016-11-2909:34rauhYeah it's not a huge problem, and I tend to not have to bugs all the time (thankfully 🙂 )#2016-11-2909:34rauhIf it's too complicated then no worries.#2016-11-2909:34cflemingYeah, it’s an unusual use case - I wonder if the REPL saving should obey that flag, though.#2016-11-2909:35rauhIMO it should, can you not get that flag easily through some API?#2016-11-2909:35cflemingYeah, I should be able to. Could you file an issue so I don’t forget about that?#2016-11-2909:35rauhWill do! Thanks#2016-11-2909:35cflemingThanks!#2016-11-2909:39rauhFor the slack records/log: https://github.com/cursive-ide/cursive/issues/1597#2016-11-2909:39cflemingGreat, thanks#2016-11-2910:13yonatanelHow do you manage multiple projects (e.g microservices) at the same time? Is there some way to have multiple repls or something like that? Some of these are on separate repositories.#2016-11-2910:53cfleming@yonatanel Yes, you can import multiple Leiningen projects into the same IntelliJ/Cursive project. They will be imported as IntelliJ modules. You can then have multiple REPL configurations, and those configurations specify the project they should use.#2016-11-2910:54yonatanelYes, I see there are REPL tabs for more than one#2016-11-2910:55yonatanelIf they can be pulled apart I'm gonna need a bigger screen :)#2016-11-2912:19kernelp4nicHi! There is a way to pretty-print with color on the repl? I know @cfleming was trying to do this automatically#2016-11-2912:22kernelp4nicI'm going to try aprint (https://github.com/razum2um/aprint) btw#2016-11-2912:31kernelp4nicdoesn't work either, for some reason I think this was working before#2016-11-2912:35kernelp4nicah! found it, I was printing a datomic.query.EntityMap#2016-11-2912:36kernelp4nicif I print a simple map or convert the EntityMap into a normal clj map aprint works as expected#2016-11-2914:27yonatanelFor the past few minutes I couldn't reset my keybindings and got stuck with paredit or something like that. Had to start over from "Default for XWIN"#2016-11-2914:59yonatanelOK I think I misunderstood the clojure keybindings panel. never mind#2016-11-2915:28denikAs of recently, unable to run tests in cursive, I get this error trying to eval a test under my caret: Error evaluating - class java.lang.NullPointerException: #2016-11-2915:29cfleming@denik Do you get anything more useful in your log? Help-&gt;Show log in Finder#2016-11-2915:33denik@cfleming yup
2016-11-29 10:32:21,314 [71187199]  ERROR -             cursive.repl.nrepl - Error evaluating
java.lang.NullPointerException: null
 at cursive.repl.actions$path_dependency_map$fn__9298.invoke (actions.clj:290)
    clojure.lang.PersistentHashMap.kvreduce (PersistentHashMap.java:232)
    clojure.core/fn (core.clj:6536)
    clojure.core.protocols$fn__6531$G__6526__6540.invoke (protocols.clj:174)
    clojure.core$reduce_kv.invoke (core.clj:6562)
    cursive.repl.actions$path_dependency_map.invoke (actions.clj:289)
    cursive.repl.actions$load_file_BANG_.invoke (actions.clj:325)
    cursive.repl.actions$load_file$fn__9344.invoke (actions.clj:401)
    cursive.repl.nrepl$submit$fn__3432.invoke (nrepl.clj:126)
    clojure.lang.AFn.call (AFn.java:18)
    java.util.concurrent.FutureTask.run (FutureTask.java:266)
    java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1142)
    java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:617)
    java.lang.Thread.run (Thread.java:745)
#2016-11-2915:40cfleming@denik Does File-&gt;Invalidate caches help with this? It looks like you have a namespace that’s a little funky somewhere - it might be that the indexes have corrupted, or you might actually have something like a namespace which requires one that doesn’t exist, or something like that.#2016-11-2915:46denik@cfleming thanks, that resolved it! Not sure if theres something funky in the codebase. Would think that should show up during compilation.#2016-11-2915:47cfleming@denik Yeah, if the cache invalidation fixed it, it was probably an indexing bug.#2016-11-2915:47cflemingYou’re off the hook 🙂#2016-11-2918:06roelofwCan cursive tell me how many time a function needed to run ?#2016-11-3005:08moizsj@cfleming whats the validity duration of the Cursive license? want to make sure I don't miss renewing mine.#2016-11-3005:39moizsjalso, i get this error when i generate stubs 11:05:50 AM Error generating stubs for module ***: Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=256M; support was removed in 8.0#2016-11-3008:24saeidscorp@roelofw what do you mean? call count? if that's what you mean, you need to use a profiler library.#2016-11-3011:28roelofwI mean if a functions stops , I see something like " Estabish time : 2 ms"#2016-11-3011:50saeidscorp@roelofw isn't (time (some-function ...)) what you need? it measures running time of the function call and prints it into stdout. it also returns the return value of expression, so you can wrap any function call or expression you want with (time ...).#2016-11-3013:26roelofwThanks , @saeidscorp#2016-11-3020:48danielcomptonNot sure if it's related to the update to 2016.3 but I've noticed IntelliJ oscillating between 5% and 50% CPU usage while it is idle#2016-11-3020:58danielcomptonSeems to be related to some file IO I'm doing in the REPL#2016-11-3021:06saeidscorpdoes anyone use here use Parinfer? how can you live with that unpredictable/unreversible behaviour? 😆#2016-11-3021:08bfabry@saeidscorp I switched back from parinfer to paredit after like a day#2016-11-3021:08saeidscorp@bfabry like me. 😒#2016-11-3021:09erichmondsame#2016-12-0106:59rauhsame... Well, after a week#2016-12-0111:12cflemingSo I actually still use parinfer, but it does indeed drive me nuts sometimes. I’m still planning to try to create something like it which is less intrusive and more predictable.#2016-12-0111:13cflemingWhat I like most about it is that I can do line-based operations (delete a line, duplicate a line) without thinking about parens. Probably the best thing to do is just to customise those actions to fix the parens up afterwards.#2016-12-0111:14cflemingI’m conflicted about it, because I feel like it’s almost really great.#2016-12-0111:17saeidscorp@cfleming it's not great at all. with paredit you can be certain that about what will happen when you press a key combination. parinfer is on a controversy itself, even if you add paren mode to cursive, it still slows down typing.#2016-12-0111:17cfleming@saeidscorp Paredit is also deterministic, that’s an important part of its design.#2016-12-0111:18cflemingI should also point out that the Cursive implementation has problems which are not inherent to parinfer itself.#2016-12-0111:18cflemingFor example, cutting and pasting doesn’t work well because IntelliJ tries to smartly indent when you paste, which doesn’t help things.#2016-12-0111:22saeidscorp@cfleming will paren-mode be eventually part of cursive? :thinking_face: do you have any plan?#2016-12-0111:24cfleming@saeidscorp It’s fairly easy to add. I deliberately didn’t add it because I don’t like the fact that you have to switch. My plan was to try to work out which mode to apply automatically, like this: https://github.com/DogLooksGood/parinfer-mode/blob/master/HOW_TO_WRAP_SEXP.org#more-ideas#2016-12-0111:24cflemingNot necessarily using those exact rules, but something similar.#2016-12-0112:25imreBeen getting a lot of this lately:#2016-12-0112:26imreCompilerException java.lang.IllegalStateException: Alias foo already exists in namespace something.bar-test, aliasing production-code.foo, compiling ...#2016-12-0112:27imrewhen I try to execute tests in something.bar-test#2016-12-0112:28imreeven reloaded workflow won't help#2016-12-0112:29imreI expect the problem's between the keyboard and the chair but wondering if anyone's faced this?#2016-12-0112:30imreexplicitly executing (remove-ns 'something.bar-test) seems to solve it#2016-12-0116:37potetm@imre Sounds like you might actually have a duplicate alias somewhere. tools.namespace just does a remove-ns and a cleanup of *loaded-libs* during unloading.#2016-12-0122:26weiJust upgraded to Cursive 1.4.0-2016.3 and getting this error when trying to run the REPL: ‘IDE SDK’ is bad configured (sic). any ideas on how to troubleshoot this?#2016-12-0122:42wei^ nevermind, figured it out, needed to re-set the Java SDK#2016-12-0209:08imre@potetm nah, double-checked that. toolsns reload works OK btw. it's when I try to use cursive to execute tests after a tools ns reload is when the error comes out#2016-12-0209:08imrecursive displays "loading such and such file..." then the error#2016-12-0210:57yonatanelI'm learning om and noticed that although om.dom/div is a function and parameters will be indented according to the first one, the first param is the properties and the second is the body (children), so it seems more appropriate to indent it like a macro with a body param, by 2 spaces. Does this sound correct? I don't think there's a way to config that.#2016-12-0211:39cfleming@yonatanel You can use https://cursive-ide.com/userguide/formatting.html under “Code style settings” and set the indentation for “om.dom/div” to 1#2016-12-0211:40cfleming@imre I’m at the conj sorry, so I can’t investigate that easily - when I get back I’ll ping you.#2016-12-0211:40imrethanks @cfleming and have fun#2016-12-0212:02yonatanel@cfleming om.dom/div is not a macro so I don't get the option to change its setting. Anyway have fun at the conj.#2016-12-0212:03cfleming@yonatanel That option works for functions too#2016-12-0212:04yonatanelNot here. I'll try to play with it.#2016-12-0212:08yonatanelWorks for defui which is a macro. Not for functions :(#2016-12-0213:43roelofwWhy do I see here a lot of not resolved here :
(ns paintings.api-get
  (:require [clj-http.client :as client])
  

(defn read-numbers
  "Reads the ids of the paintings"
  []
  (let [ids (->> (client/get "" {:as :json})
                 :body
                 :artObjects
                 (map :id))
        ids (reduce (fn [results id] (conj results (.substring id 3))) [] ids)]
    ids))

(defn read-data-painting
  "Reads the title, description, date , collection, colors and url of a image"
  [id]
  (let [art-objects (-> (str "" id "?key=14OGzuak&format=json&type=schilderij&toppieces=True")
                        (client/get {:as :json})
                        :body
                        :artObject)
        description (:description art-objects)
        date (get-in art-objects [:dating :year])
        collectie (first (:objectCollection art-objects))
        colors (:colors art-objects)
        ]
    {:id id :description description :date date :collectie collectie :colors colors}))

(defn read-image-url
  "Reads the image-url"
  [id]
  (let [art-objects (-> (str "" id "/tiles?key=14OGzuak&format=json")
                        (client/get {:as :json})
                        :body
                        :levels
                        )
        url (filter #(= (:name %) "z4") art-objects)
        tiles (:tiles (first url))
        ]
    {:id id :tiles tiles}))


(defn do-both-in-parallel [ids]
  (let [paint-thread (future (pmap read-data-painting ids))
        image-thread (future (pmap read-image-url ids))]    
    (pmap merge @paint-thread @image-thread)))    

) 
#2016-12-0213:44roelofwthe client/get and the read-data-painting and read-image-url are all not resolved#2016-12-0219:11rauhSo I just created a very very quick&dirty script that parses any CSS file and generates a list of keywords from the CSS classes in that file. Pretty nice to get autocompletion for all css classes in Cursive when using cljs. Ping me here and I'll link it#2016-12-0301:42cfleming@rauh That sounds great, I would definitely like to see that#2016-12-0305:59rauh@cfleming Here it is: https://gist.github.com/rauhs/51312236097df2b594e4151f0d567307#2016-12-0318:13shaun-mahoodIs there a way to map a keyboard shortcut to #_ ?#2016-12-0410:20curlyfry@shaun-mahood You could make a macro: https://www.jetbrains.com/help/idea/2016.3/using-macros-in-the-editor.html#2016-12-0416:43shaun-mahood@curlyfry: Thanks, I'll give that a try!#2016-12-0419:13andrehi, i have IntelliJ IDEA 162.1812.17 and 1.4.0 cursive, and i can't resolve def macro#2016-12-0419:14andrealready reseted cache, but doesn't work anyway#2016-12-0419:14andrethere are no resolve as def option#2016-12-0419:14andreonly edit and disable#2016-12-0419:16andreand in the edit i can't edit, all fields not editable#2016-12-0419:32andrein cljs file#2016-12-0420:33rauh@andre Do you have cljs in "project structure" -> "lbiraries"?#2016-12-0420:34andre@rauh what does it mean?#2016-12-0420:34andrecljs jar?#2016-12-0420:34rauhYeah#2016-12-0420:35andreof course#2016-12-0420:36andreclojurescript 1.9.89#2016-12-0509:17yonatanelI get this a lot: Access is allowed from event dispatch thread only#2016-12-0509:22imre@yonatanel I also get that often these days when I click on the generate stubs banner for datomic#2016-12-0510:30cfleming@yonatanel @imre Do you have a stacktrace for that? It’s probably a new check in 2016.3.#2016-12-0510:31imreI've submitted a few error reports with the built in dialog#2016-12-0510:31cflemingOk, thanks, I’ll look for them.#2016-12-0510:31imrethanks#2016-12-0510:31imrebtw the ns reloading issue seems to be persisting#2016-12-0510:32imrenot sure how to produce a stack trace#2016-12-0510:32imrebut I'll try to get a minimal working example up#2016-12-0510:33andrehi, do you have any info about resolve def macro in cljs in latest cursive and idea?#2016-12-0510:33andredoesn't work for me 😞#2016-12-0510:33cfleming@andre Can you send a screenshot of what you’re trying to do?#2016-12-0510:35andreit works at work in 14.1.3#2016-12-0510:36andrebut at home in latest versions i have the same behaviour but color-input cant be resolved#2016-12-0510:36yonatanel@cfleming I also submitted a few days ago#2016-12-0510:36cflemingOk, so what’s happening is that that menu is a little confusing. You don’t want the submenu to the right, you want to select the “Resolve re-frisk.core/def-view” with enter.#2016-12-0510:37andreOMG!#2016-12-0510:37cflemingFWIW that also confuses me on a regular basis.#2016-12-0510:37andreJetBrains are you serious? 🙂#2016-12-0510:37cflemingI think I do it like 50% of the time when trying to configure indentation#2016-12-0510:38andrethank you#2016-12-0512:58yonatanelDoes anyone here works with figwheel and if so, how do you integrate with cursive? I'm running it in nREPL with lein instead of clojure.main which seems recommended. Am I missing something?#2016-12-0513:06andrei'm running using figwheel-sidecar and clj script with clojure.main#2016-12-0513:18dhruvhey col - not strictly cursive related, but have you considered minifying/optimising/cdn'ing the content on http://cursive-ide.com? i'm your neighbour (aus - 100mb down) and it takes a good 7 seconds to load most pages on the site. this is particularly evident on /userguide/ i know you're busy kicking ass on the plugin itself, so yell out if i can offer a hand on site optimisation!#2016-12-0522:46cfleming@drhuv Yeah, I need to do a pass optimising the userguide - I did on the landing page a while back, but it could probably be trimmed some more. Some of the images on the userguide are pretty big because of the animations.#2016-12-0522:47cflemingI’d like to CDN them, but then it’s hard to use my EV cert without it getting expensive.#2016-12-0522:47cflemingIIRC CloudFront only allows custom certs in their 600/month plan.#2016-12-0522:47cflemingAlthough I haven’t looked for a while.#2016-12-0522:48cflemingWhoops, that should be @dhruv ^^#2016-12-0523:03shaun-mahood@cfleming: If you haven't looked at it, CloudFlare looks pretty reasonable cost wise - good info at https://www.troyhunt.com/cloudflare-ssl-and-unhealthy-security-absolutism/ and https://www.troyhunt.com/should-you-care-about-the-quality-of-your-neighbours-on-a-san-certificate/ if you want to look further into whether it makes sense.#2016-12-0523:12cfleming@shaun-mahood Thanks, I’ll take a look.#2016-12-0613:58pradeepcheersNew to clojure and I’m using cursive. I cannot found an option for inline compilation. I tried CMD + Enter but doesn’t seem to work!#2016-12-0614:03gerrit@pradeepcheers you mean eval the selected form? then you can use the Send top form to REPL-action or Send form before caret to REPL#2016-12-0614:07pradeepcheersI mean I want see the the output in line#2016-12-0614:14pradeepcheers@gerrit the image is from the cursive website where the compilation is inline similar to lighttable but I can’t get it to work 😞#2016-12-0614:26saeidscorp@pradeepcheers that's for demonstration purposes only. that specific functionality is unique to Light Table.#2016-12-0614:27pradeepcheers@saeidscorp, thanks#2016-12-0614:27pradeepcheerslooks like it is just a comment with expected output!#2016-12-0614:27pradeepcheers😝#2016-12-0614:33jamesProto-repl (https://atom.io/packages/proto-repl), Nightcode (https://sekao.net/nightcode/), and Nightlight (https://sekao.net/nightlight/) all support inline REPL evaluation too.#2016-12-0614:34jamesWell, technically Nightcode and Nightlight display the result of the eval in the gutter to the left of the line, rather than inline in the editor. But that feels pretty similar.#2016-12-0615:25pradeepcheersThanks James I switched to proto-repl. Much easier to understand when autoeval file is enabled.#2016-12-0616:26cfleming@james That’s interesting, I didn’t realise Nightcode put the value in the gutter. Do you have a screenshot of that handy, by any chance?#2016-12-0616:29jamesFrom the website#2016-12-0616:51cfleming@james Thanks, I should definitely have checked the website.#2016-12-0616:54jamesYou're welcome, and no problem. 🙂#2016-12-0618:49shaun-mahood@curlyfry: Macro works, I ended up using the keystrokes # _ <esc> <rightarrow> <leftarrow> <esc> which got rid of the auto complete, and bound that macro to what used to be the line comment mode. Thanks for the help!#2016-12-0618:53curlyfry@shaun-mahood Cool! Come to think of it, I'll probably add that macro too :)#2016-12-0619:56kenny@raymcdermott I have this problem as well and it is a known problem. You can follow & :thumbsup: the issue: https://github.com/cursive-ide/cursive/issues/1069#2016-12-0619:57raymcdermottok, thanks @kenny good to know it’s on the backlog#2016-12-0619:59kenny@raymcdermott You can work around the problem by doing alt+enter on defonce and selecting resolve as def#2016-12-0619:59kennyI’ll add that to the issue#2016-12-0620:00raymcdermottHT @kenny#2016-12-0717:08imresince using datomic in a project, I'm getting frequent hangs during intellij Indexing on startup - the only solution is to kill the process then reimport the project, losing all my project settings#2016-12-0717:08imreany way I could get more info on why this is happening?#2016-12-0721:12timgilbertFWIW, I'm using datomic in a Clojure project with no problems...#2016-12-0721:13timgilbertOn [com.datomic/datomic-pro "0.9.5404"]#2016-12-0721:13timgilbertSorry, I know that's not very helpful#2016-12-0721:43shaun-mahood@imre: What version of intelliJ and Cursive are you using?#2016-12-0721:55imre@shaun-mahood latest cursive (the one released a day ago approx), 2016.3 x64 on arch linux#2016-12-0721:56shaun-mahood@imre: Maybe try going back to 2016.2 - I just about upgraded today but realized that the Cursive site still doesn't say anything about supporting it yet.#2016-12-0721:59imreThanks, but it did happen with .2 too#2016-12-0722:00imreI hoped the new releases would fix it#2016-12-0722:00shaun-mahoodOh then that won't work 🙂#2016-12-0722:36cfleming@shaun-mahood That’s just me not having a proper process for updating the site as I support new versions. Until recently it said that Cursive supported the new v15 EAP 😞#2016-12-0722:37cfleming@imre When does this happen? When importing the project for the first time, or when syncing when re-opening the project?#2016-12-0722:37cflemingWhat can you see using a process monitor - is IntelliJ using 100% of a core, or something similar?#2016-12-0722:38cflemingA thread dump might be useful: https://intellij-support.jetbrains.com/hc/en-us/articles/206544899-Getting-a-thread-dump-when-IDE-hangs-and-doesn-t-respond#2016-12-0722:38cflemingYou might have some auto-generated ones as described there - if so, could you send them to me?#2016-12-0809:01imre@cfleming sent you a dm with details#2016-12-0813:40yonatanelI disabled resolutions by mistake. How to I turn it back on?#2016-12-0819:15bradfordHi! I'm trying to install on IntelliJ 2016.3, Ubuntu. I go to "browse repositories", click "install" when "cursive for v15" appears (built 2016-05), and then I see the download dialog complete. Nothing happens after that, though, and the plugin doesn't appear in the main "plugins" screen#2016-12-0819:18bradfordweirdly, a different version of Cursive appears for a second (with lots of reviews), and then it turns into "cursive for v15" with no reviews that was uploaded "46 years ago"#2016-12-0819:18bradfordPerhaps I'm on a closed time-like loop? Calling CERN 😉#2016-12-0819:19bradfordhttps://imgur.com/4QuixCTl.png#2016-12-0819:32danielcomptonCan you check that the old Cursive repository isn't on that computer?#2016-12-0819:32danielcomptonAnd show which repositories are on there?#2016-12-0819:35bradfordThe repo I have is http://updates.cursive-ide.com/plugins-15.xml#2016-12-0819:36bradfordI'll remove that 😉#2016-12-0819:39danielcomptonYep, that should improve things 🙂#2016-12-0900:11bfabrymight be my imagination but repl memory leak seems worse in latest cursive. any thread dumps or whatever I can provide to help track down?#2016-12-0900:18danielcompton@bfabry I've noticed it too#2016-12-0909:56val_waeselynckI'm seeing this error repeatedly: Cannot init ReplState component state: encoded string too long: 73822 bytes#2016-12-0909:57val_waeselynckDoes not seem to stop the REPL working but the error message is a bit annoying#2016-12-0909:57val_waeselynckIs there anything I can do to mitigate it ?#2016-12-0911:16cfleming@val_waeselynck I’ve seen a few like that come through in the tracker. I’m not sure why this has suddenly started happening, it might have been an underlying IntelliJ change. If you delete <project>/.idea/replstate.xml, you’ll lose your REPL history but it should fix the problem.#2016-12-0911:18cfleming@bfabry @danielcompton: Sorry about that, I’m going to try to track that down today.#2016-12-0911:19val_waeselynck@cfleming thanks, tried that, no problem so far#2016-12-0911:22cfleming@val_waeselynck Great, let me know if the problem comes back.#2016-12-0920:58cfleming@bfabry and others, hopefully the memory issues are fixed in the latest EAP build, 1.4.2-eap1#2016-12-0920:58cflemingLet me know how it goes#2016-12-0921:10bfabrywhooo, thakns#2016-12-0921:10bfabryhaven't seen any in 4h this morning, so prob fixed#2016-12-0922:48cfleming@bfabry Nice. If there are no issues I’ll push a stable build of that in the next couple of days.#2016-12-0923:34jasonjcknhow do I hot load a whole files of code ?#2016-12-0923:34jasonjcknlike C-c C-k in emacs#2016-12-0923:41kidpolloI have that precise shortucut in my setup 😛#2016-12-1100:44hagmonkI’ve started using cursive for a clojurescript project, and I’m no longer getting code completion#2016-12-1100:45hagmonkanyone know how to debug this? I’ve tried invalidate caches / restart.#2016-12-1100:48hagmonkoh, turns out regular completion is working, but a cljsjs dependency I added is not showing up.#2016-12-1110:07yonatanelHow do I know what's in an update? I'd like to look out for the new things and see if bugs that i've noticed before are gone#2016-12-1120:49danielcomptonThere's a cursive mailing list that gets release notes, not sure where else#2016-12-1122:35olslashthe twitter account always links to the mailing list posts for release notes which is a convenient way to find them#2016-12-1122:35olslashhttps://twitter.com/cursiveide#2016-12-1216:03mishagreetings! cursive can launch figwheel repl, but can it connect to a running one?#2016-12-1216:04mishare-natal (react native) starts figwheel, and I am looking for (easy opieop) ways to see/use that running repl from cursive#2016-12-1216:04shaun-mahood@misha: I'm pretty sure it can, let me test on my machine and I'll let you know how.#2016-12-1216:05misha❤️#2016-12-1216:05cfleming@misha If it starts an nREPL server, then yes, it can - use the Remote REPL run config option.#2016-12-1216:07misha@cfleming is there an easy tell? like does FW print something specific out, or has something in a project file, etc.? Going through all the FW docs now
#2016-12-1216:15shaun-mahood@misha: There's an nrepl port that you can add to the figwheel config in your project.clj#2016-12-1216:17misha
The lein figwheel is capable of launching an nREPL server that your tooling can connect to by using the :nrepl-port configuration parameter. This is not the strategy recommended below.

I am now recommending that you forgo using lein figwheel and instead run lein repl and then launch figwheel from the Clojure nREPL session. This will allow you to reuse all of your project.clj's nrepl configuration.
#2016-12-1216:18shaun-mahoodYeah, it's not as nice for tooling but work pretty well if you want it working quickly - particularly if you aren't able to use the instructions on that page#2016-12-1216:18mishaif I don't have any prior nrepl configuration - is doing it "hard way" worth it?#2016-12-1216:19mishaokok, for now I'd settle for reading from/sending to repl w/o leaving cursive.#2016-12-1216:19shaun-mahoodI'm just testing it - I spent a lot of time a year or so ago using figwheel and cursive the old way and I remember it working just fine, but I should probably check what it does now before recommending it 🙂#2016-12-1216:20shaun-mahoodOk yeah it still works fine - 1 minute and I'll send you the super easy version#2016-12-1216:22shaun-mahoodIn your project.clj, add :nrepl-portto your root figwheel map (not under a build) In cursive, add a new Clojure REPL -> Remote config, point it to your nrepl host and port as configured in figwheel Start Figwheel Start your remote config Profit!#2016-12-1216:22mishais it Christmas already? 🙂#2016-12-1216:24misha
:profiles {:dev
                   {:cljsbuild
                    {:builds
                     {:ios
                     {:source-paths ["src" "env/dev"]
                      :figwheel     true
                      :compiler     {:preloads      [devtools.preload]
                                     :source-map    true
                                     :output-to     "target/ios/not-used.js"
                                     :main          "env.ios.main"
                                     :output-dir    "target/ios"
                                     :infer-externs true
                                     :optimizations :none}}}}}
#2016-12-1216:25misha@shaun-mahood this is the truncate version of project.clj, and there is no mention of FW other than this true val.#2016-12-1216:28shaun-mahood@misha: We should take this to #lein-figwheel - can you post the entire project.clj there?#2016-12-1216:46misha@shaun-mahood cursive remote repl settings does not give me current project as an option for context module. how critical is that?#2016-12-1216:49shaun-mahood@misha: I have no idea 🙂 What options is it giving you, just blank?#2016-12-1216:50mishasome of mine locally built .jars#2016-12-1216:55mishaok, ios-level settings did not work. root-level settings did launch nrepl, and I connected to it. but it does not see anything in ns I switch to: CompilerException java.lang.RuntimeException: Unable to resolve symbol: thanks, @shaun-mahood the search continues#2016-12-1217:00shaun-mahood@misha: Can you do basic clojure operations?#2016-12-1217:04mishayes, (+ 1 1) works, (in-ns 'my.project.ns) seems to work too, but it after that it fails to evaluate anything within it.#2016-12-1217:06mishaI suspect the issue is - whole project is a cljs one, and there is no "server side" code to form any meaningful context off#2016-12-1217:13shaun-mahood@misha: I've done the same thing with CLJS only projects before with no problem - maybe it's re-natal specific, you could ask someone in #cljsrn and maybe they can help you more. I'm out of knowledge 🙂#2016-12-1217:17misha@shaun-mahood I messed up module names in project.clj: repl setup screen does give me current project as a context, however that does not make repl able to eval anything within my namespaces... thanks again#2016-12-1218:35misha@shaun-mahood in case you are interested, I just stopped launching FW repl from .sh script, and instead launch it from cursive, instead of trying to connect cursive to running FW#2016-12-1218:36shaun-mahood@misha: Good plan, glad it all works for you now#2016-12-1221:29clarkhey folks, outside of the hack that generates a project.clj for every run of boot, does anyone know where I could look to see if boot support is in the works?#2016-12-1221:55timgilbertThere is this github ticket: https://github.com/cursive-ide/cursive/issues/692#2016-12-1221:55timgilbert...no news about official support in it, though#2016-12-1222:02clark@timgilbert nice, thank you#2016-12-1222:02clarkI am helping to get a new team up to speed on cursive, and would like to go to boot instead of lein#2016-12-1222:02clarkthis being one of the questions (blockers?) on that front#2016-12-1222:13shaun-mahood@clark: Colin (Cursive developer) is very active in here, I'm sure he'll answer when he's able to#2016-12-1222:14clark@shaun-mahood very cool, thank you!#2016-12-1313:57cfleming@clark I’m hoping to do this soon, since lots of people are asking for it.#2016-12-1313:57cflemingI don’t have a public roadmap, but I’m working on that too.#2016-12-1314:12cfleming@jasonjckn Sorry, I missed your message earlier. See here: https://cursive-ide.com/userguide/repl.html under “Interaction with the editor"#2016-12-1318:32pupenoAnybody having any problems doing Clojure with Cursive on Mac OS Sierra?#2016-12-1318:36cfleming@pupeno I’m not aware of any#2016-12-1318:36pupeno@cfleming are you running Mac OS Sierra?#2016-12-1318:36cflemingNo, I’m not, but no-one has reported issues#2016-12-1318:37cflemingI will be running it soon, though#2016-12-1318:38pupenoI’ll wait till then… 😉 I’m becoming conservative lately.#2016-12-1318:39cflemingHehe, especially since there doesn’t seem to be a compelling reason to upgrade#2016-12-1319:03kenny@pupeno @cfleming I have been running Cursive on Mac OS Sierra for a while now and have had no issues.#2016-12-1319:16pupenoGood to know.#2016-12-1320:42kanweiNo issues on sierra here either#2016-12-1321:03kennyI have been getting some extreme lag while typing in the REPL. If I try typing the same code in the editor I have no latency.#2016-12-1321:15kennyIt seems like the REPL latency occurs when the code is multiline#2016-12-1322:36cfleming@kenny Are you on the 1.4.2 EAP?#2016-12-1322:36kenny1.4.2-eap1-2016.3#2016-12-1322:37cflemingOk, I thought it might have been the memory issues fixed in that build.#2016-12-1322:37cflemingAnything else funky in your project/setup I should know about? Is that a remote REPL?#2016-12-1322:38kennyYeah. Remote REPL using the lein port. It is connected to a boot repl#2016-12-1322:39kennyIt gets to the point where it is completely unusable to type in the REPL. I just end up editing the form in the editor and using the send form to REPL command.#2016-12-1322:40cflemingCan you see anything in the task manager? CPU use in the IDE/server process? What about memory use in the IDE? IIRC you have the memory widget on, right?#2016-12-1322:40kennyIt also freezes the entire IntelliJ. So if I try editing something in the REPL pane I can’t click or type anywhere else until it unfreezes#2016-12-1322:41cflemingInteresting, so it’s something blocking the EDT. Can you check for automatic thread dumps? https://intellij-support.jetbrains.com/hc/en-us/articles/206544899-Getting-a-thread-dump-when-IDE-hangs-and-doesn-t-respond#2016-12-1322:42kennyYeah memory widget is on. It’s at about 300mb out of 4gb.#2016-12-1322:42kennyI’ve had it happen before where the REPL gets really slow but the memory usage also spikes. The most recent update seems to have fixed that though.#2016-12-1322:43cflemingYeah, that was what I suspected, but if you’re already on that build then it must be something else.#2016-12-1322:43kennyI’ll try the thread dump right now#2016-12-1322:44cflemingOk, do check for the automatic ones, too.#2016-12-1322:46kennyI’ll send in PM#2016-12-1322:46cflemingOk, or even better by email#2016-12-1322:46kennyWhat’s the email again?#2016-12-1322:46cflemingThey won’t get eaten by the slack God then.#2016-12-1322:46cfleming<mailto:/cdn-cgi/l/email-protection|/cdn-cgi/l/email-protection>#2016-12-1322:48kennyLots of automatic freeze dumps 😛#2016-12-1322:48cflemingHehe, good good#2016-12-1322:48cflemingJust some recent ones that you think coincide with the problem would be good.#2016-12-1322:52kennySent#2016-12-1323:05kennyActually I take it back. It still happens when the text is only on one line.#2016-12-1401:36olslashcan anyone shed light on this error (when running a default lein repl run/debug config): Error running run: '1.8' is bad configured#2016-12-1401:37olslashi remember this worked on my other machine with the same project, this is a fresh install#2016-12-1401:42olslashgot it, for future reference the "JDK home path" in "project structure" was wrong#2016-12-1404:20Oliver GeorgeRandom wish: when developing in clojurescript I often want to edit a library I depend on (esp, debugging statements). That of course is read only (jar). Moving it into my code means: (1) copy files to ./src (2) update project.clj deps to remove lib and add the libs deps.#2016-12-1404:21Oliver GeorgePerhaps Cursive could make it easier.#2016-12-1404:53kenny@olivergeorge You can use Boot’s checkouts feature to make that workflow much easier. You will need to clone the library to your local computer, add the library to :checkouts in you build.boot and then run an auto-build task in the library (e.g. boot pom jar install). Now any time you make changes to that library's source code, it will be updated in the REPL.#2016-12-1404:54timgilbertOr with lein you can use the project checkouts feature, works great with Cursive#2016-12-1409:47Oliver GeorgeThanks @kenny & @timgilbert. I'm not using boot but have tried the lein checkouts feature an age ago. Good to know there are options.#2016-12-1516:08eggsyntaxHey folks, I'm getting a Your project requires namespaces which need stubs to be generated error which won't go away. I found an issue (https://github.com/cursive-ide/cursive/issues/1599) which suggests that this means there are errors which can be seen in an error log & resolved. Could someone point me to said error log?#2016-12-1516:08eggsyntaxThere's nothing relevant in the "event log", which is the only thing I found.#2016-12-1516:13cfleming@eggsyntax Help-&gt;Show log in Finder/Explorer#2016-12-1516:13eggsyntaxCool, thanks Colin 🙂#2016-12-1516:13cflemingThere are a couple of outstanding bugs with this that I haven’t had time to track down yet.#2016-12-1516:14eggsyntaxSure, NP! Cursive is looking great so far, haven't tried it since very early versions until yesterday.#2016-12-1516:15cflemingGreat, glad it’s working for you - let me know if you find anything in the log.#2016-12-1516:15cflemingI’m in and out for the next couple of days but will be back to normal soon.#2016-12-1517:47yonatanelWhen External libraries are not updated with newer versions from project.clj, what could be the problem?#2016-12-1517:55yonatanel@cfleming The refresh icon didn't work (a certain dependency wasn't updated). Only adding a synch pre-repl action really updated the dependency.#2016-12-1610:26Rachel WestmacottDoes anyone know a way to highlight log messages (eg. error / warning) in the Cursive REPL?#2016-12-1610:29olslashi imagine you could configure ultra to do it?#2016-12-1610:30olslashim looking because that sounds like a useful thing to know how to do#2016-12-1612:52cfleming@peterwestmacott Output coming out of stderr is highlighted differently. The colours are controlled by the settings at Settings-&gt;Editor-&gt;Colors &amp; Fonts-&gt;Console Colors#2016-12-1612:53cflemingBut you can only really distinguish error output from normal that way.#2016-12-1803:17onetom@cfleming merry xmas! (just bought a personal license :)#2016-12-1804:00cfleming@onetom Thanks, and thanks!#2016-12-2016:40eggsyntaxAnyone know what key that little arrow-against-wall represents?#2016-12-2016:40eggsyntaxIt's used as a kbd shortcut for an action, but I can't figure out what the hell it is 😜#2016-12-2016:57eggsyntaxTab key facepalm#2016-12-2019:28cfleming@denik Thanks, will check that out.#2016-12-2019:28cfleming@denik In fact, could you file an issue so it doesn’t get lost?#2016-12-2019:46denik@cfleming I’m on it. (Maybe put the link to the issues page into this channel’s description?)#2016-12-2019:47denikhttps://github.com/cursive-ide/cursive/issues/1617#2016-12-2019:47cfleming@denik Good call, thanks#2016-12-2019:49cflemingI actually don’t know how to change that.#2016-12-2019:49cflemingIt gives me the option to edit the channel’s “purpose”, but the text there doesn’t match the current value.#2016-12-2019:51cflemingThere we go.#2016-12-2019:54cflemingTIL GitHub has a link shortener#2016-12-2019:56skelterare there known issues with IntelliJ 2016.3 and Cursive ?#2016-12-2019:58cfleming@skelter A very few people have found a strange bug where the plugin refuses to start#2016-12-2019:58cflemingBut for most people it works with no issues - I’m not aware of any other problems.#2016-12-2019:59skelterPerhaps I am one of those people. When I install it, it silently, well, silently goes away. When I restart IntelliJ, It is not installed and I have the option to install it. The repo it is using is https://updates.cursive-ide.com/plugins-2016.1.xml#2016-12-2020:00cfleming@skelter That repo is old, if you remove that everything should work. I haven’t used the custom repos at http://updates.cursive-ide.com for a long time.#2016-12-2020:00skelterah ok. will try that#2016-12-2020:01cflemingRemove the repo, then back to Browse Repositories and refresh, and then Cursive should update/install.#2016-12-2020:01cfleming@skelter ^^#2016-12-2020:01skelter@cfleming roger. trying it now#2016-12-2020:04skelter@cfleming Success!#2016-12-2020:04cfleming@skelter Nice!#2016-12-2020:05cflemingCursive should clean those old repos up automatically, I haven’t managed to work out why it sometimes doesn’t.#2016-12-2020:08skelterwould not surprise me if our mad-scientist laboratory situation confused IntelliJ#2016-12-2023:12eggsyntax^ This is all I get for documentation for clojure.core functions...is there some standard thing that has to be done to get that working?#2016-12-2023:13eggsyntaxSame result if I tell it to show me source code. cmd-P for show function sig/params does work, though.#2016-12-2101:00cfleming@solussd Is that even valid destructuring? I’d need a pen and paper to check it 🙂#2016-12-2101:01cfleming@eggsyntax That’s very strange. If you navigate to defn does it take you to the right place?#2016-12-2101:01eggsyntaxWithin the dropdown for the function sig?#2016-12-2101:02cflemingNo, if you Cmd/Ctrl-click#2016-12-2101:03eggsyntaxIt does.#2016-12-2101:03cflemingHmm. Could you try File-&gt;Invalidate Caches and Restart?#2016-12-2101:04cflemingIt’ll take a while to reindex, but that might fix the problem - it looks like your indexes have gotten funky.#2016-12-2101:04eggsyntaxAye, cap'n.#2016-12-2101:04eggsyntaxCool, I'll let you know how it goes 🙂#2016-12-2101:13eggsyntaxThrew an exception when I told it it could go ahead & generate stubs, sent you the exception report.#2016-12-2101:16eggsyntaxDunno if it's related, but I get a dependency resolution error whenever I start it:
Error synchronising ti.harmonium:0.1.0-SNAPSHOT: Failed to collect dependencies for [#object[org.sonatype.aether.graph.Dependency 0x60ce1a9a "adzerk:boot-cljs:jar:1.7.228-1 (test)"] #object[org.sonatype.aether.graph.Dependency 0x6bc025c5 "adzerk:boot-cljs-repl:jar:0.3.2 (test)"]
etc etc, looks like it lists all or most of my dependencies.
#2016-12-2101:17eggsyntaxIt's a moderately large existing project.#2016-12-2101:29eggsyntaxSame problem repeats after restart: generating stubs throws exception.#2016-12-2101:43eggsyntaxIs it necessary/advisable to inform Cursive of your local ~/.m2 repository? Wondering if that might be what's causing the dependency resolution error.#2016-12-2102:02cfleming@eggsyntax No, that’s built in. That error is probably what’s causing the problem, I’m not sure what that means though - it’s an error from aether (underlying lein)#2016-12-2102:02cflemingIf you do lein deps :tree on the command line in your project dir, what does that show? Does it work correctly?#2016-12-2102:22eggsyntaxHmm, looks like not. Must be an issue with the way we're generating project.clj (it's a boot project; we're generating project.clj from build.boot). So very possibly not a cursive issue at all, sorry about that. I'll get together in the morning with the guy who set that up, see if we can troubleshoot it between us. Thanks!
Could not transfer artifact ews:ews:pom:0.1.2 from/to local-deps (local-deps): No connector available to access repository local-deps (local-deps) of type default using the available factories FileRepositoryConnectorFactory, WagonRepositoryConnectorFactory
This could be due to a typo in :dependencies or network issues.
If you are behind a proxy, try setting the 'http_proxy' environment variable.
#2016-12-2102:24cfleming@eggsyntax Ok, that does look like the problem. Good luck!#2016-12-2102:25eggsyntaxThanks 😄#2016-12-2113:39wilkerluciohello, I'm having a problem with one of projects, I wasn't working on it for a couple of weeks, and now I can't generate stubs for it anymore#2016-12-2113:39wilkerlucioeverytime I try I get:#2016-12-2113:39wilkerlucio
Error generating stubs for module dcex-cljs: Exception in thread "main" java.io.FileNotFoundException: Could not locate cljsbuild/compiler__init.class or cljsbuild/compiler.clj on classpath., compiling:(/private/var/folders/mr/fvbhxwjj40z34nq09dqgvr2w0000gn/T/form-init3269253985982537794.clj:1:125)
					at clojure.lang.Compiler.load(Compiler.java:7441)
					at clojure.lang.Compiler.loadFile(Compiler.java:7367)
					at clojure.main$load_script.invokeStatic(main.clj:277)
					at clojure.main$init_opt.invokeStatic(main.clj:279)
					at clojure.main$init_opt.invoke(main.clj:279)
					at clojure.main$initialize.invokeStatic(main.clj:310)
					at clojure.main$null_opt.invokeStatic(main.clj:344)
					at clojure.main$null_opt.invoke(main.clj:341)
					at clojure.main$main.invokeStatic(main.clj:423)
					at clojure.main$main.doInvoke(main.clj:386)
					at clojure.lang.RestFn.applyTo(RestFn.java:137)
					at clojure.lang.Var.applyTo(Var.java:700)
					at clojure.main.main(main.java:37)
#2016-12-2113:40wilkerlucioit used to work before, I had no changes on this project for a while, doesn someone know how to go around this?#2016-12-2116:46Joe R. Smith@cfleming it is and, believe it or not, I do have nested maps of data where the keys for some of the data are the values of keys in other data at some other level of the nested map.#2016-12-2120:11danielcomptonNot sure when this happened (2016.3?) but it looks like IntelliJ is getting a different fish prompt than iTerm2#2016-12-2120:12danielcomptonIt's almost certainly something wacky in my dotfiles, but thought I'd throw it out first in case others had noticed it too?#2016-12-2200:54cfleming@solussd Ok, could you file an issue for that, please?#2016-12-2200:55cfleming@danielcompton I’m not sure TBH, I see a different prompt too but I’ve never cared enough to investigate#2016-12-2200:55cfleming(also using fish)#2016-12-2211:24sandbagsIs there a solution to making Cursive work better with functions defined by macros?#2016-12-2211:25sandbagsall of mine seem to come up as not resolved#2016-12-2211:25sandbagsi'm wondering if there is any way to make these Cursive friendly#2016-12-2215:32eggsyntaxWhoops, just realized my post yesterday went in the wrong channel entirely; deleting.#2016-12-2218:26bfabry@sandbags the new generate stubs feature is probably the answer there, I think it's planned to be generalised so you can use it with your own stuff#2016-12-2218:39sandbags@bfabry thanks. i had a quick google and couldn't come up with anything describing this feature. Is there a good reference?#2016-12-2218:50bfabry@sandbags this release note is the best I think https://cursive-ide.com/archive/2199.html#2016-12-2220:45cfleming@sandbags It depends how your macros are defined. If you just have def-style macros then https://cursive-ide.com/userguide/macros.html is what you want.#2016-12-2220:46cflemingIf you’re defining functions, then @bfabry is correct, the stubs functionality will be your best bet, but that’s not customisable right now until I work the kinks out.#2016-12-2223:11sandbags@cfleming thanks for the link, in this case I am generating a whole set of functions in each macro call.#2016-12-2300:39cfleming@sandbags In that case you’ll need stubs, or a proper extension API. Both in the works.#2016-12-2301:33jasongilmanI noticed cursive uses namespace abbreviation in tabs. Is there a library that provides that behavior? I've been looking around and I've see things in Java logging packages but not separated out.#2016-12-2301:35cfleming@jasongilman No, it’s something I wrote myself#2016-12-2301:35jasongilmanok thanks#2016-12-2301:36cfleming@jasongilman:
private static String truncatedName(String nsName) {
    String[] segments = nsName.split("\\.");
    for (int i = 0; i < segments.length; i++) {
      String candidate = joinSegments(segments, i);
      if (candidate.length() <= MAX_TRUNCATED_LENGTH) {
        return candidate;
      }
    }
    return joinSegments(segments, segments.length - 1);
  }

  private static String joinSegments(String[] segments, int fullAfter) {
    String separator = "";
    StringBuilder builder = new StringBuilder();
    for (int i = 0; i < segments.length; i++) {
      String segment = segments[i];
      builder.append(separator);
      if (i < fullAfter) {
        builder.append(segment.charAt(0));
      } else {
        builder.append(segment);
      }
      separator = ".";
    }

    return builder.toString();
  }
#2016-12-2301:37jasongilman🙂 Thanks!#2016-12-2301:37cflemingMAX_TRUNCATED_LENGTH is 16 by default#2016-12-2305:12moizsj@cfleming cant see the 1.4.2 update. any ideas?#2016-12-2401:35cfleming@teng What’s the exception?#2016-12-2401:40cfleming@moizsj Sorry about that - downloading it manually from here: https://plugins.jetbrains.com/idea/plugin/8090-cursive and installing with Settings-&gt;Plugins-&gt;Install from disk… should work.#2016-12-2401:43cfleming@moizsj I guess you’re not receiving EAP builds?#2016-12-2404:52moizsj@cfleming: yes I have that turned off.#2016-12-2705:30moizsj@cfleming turning on EAP allowed me to see the update. thanks.#2016-12-2709:02cfleming@moizsj Really? That I didn’t expect.#2016-12-2709:02cflemingI thought you’d have to download it manually.#2016-12-2723:18denik@cfleming how can the indentation for :require in ns forms be changed?#2016-12-2723:18denikit doesn’t match emacs defaults#2016-12-2723:24cfleming@denik There’s no good way to do that right now, unfortunately. If you can file an issue with the differences I’ll see if I can fix them.#2016-12-2723:40denik@cfleming https://github.com/cursive-ide/cursive/issues/1621#2016-12-2723:41cfleming@denik Does Settings-&gt;Editor-&gt;Code Style-&gt;Clojure-&gt;General-&gt;One space list indent fix that?#2016-12-2723:42denik@cfleming no#2016-12-2723:43cflemingOk, it must be hard-coded then. I’ll fix that.#2016-12-2802:02denik@cfleming thanks 🙂#2016-12-2813:40marciol@cfleming can I use cursive within Intellij Rubymine?#2016-12-2822:26cfleming@marciol No, unfortunately - it relies on the IntelliJ Java support, which RubyMine doesn’t have.#2016-12-2822:27cflemingJetBrains have a project to fix that, so that RubyMine can support JRuby better - at that point, Cursive will work there.#2016-12-2910:56pupenoThe auto formatter of code seems to get confused with defs that have multi-line metadata #2016-12-2911:27cfleming@pupeno Do you have an example?#2016-12-2911:28pupenoI'm on a mobile, but let's try:#2016-12-2911:28pupeno(def ^{:doc "fooo Bar" foo "bar") #2016-12-2911:38rauh@pupeno Known problem: https://github.com/cursive-ide/cursive/issues/796#2016-12-2911:56marciol@cfleming good to know#2016-12-2912:09pupenoAh, OK. #2016-12-3019:30roelofIs there a way I can debug lein run so I can debug a 400 error#2016-12-3019:30roelofIt looks one of the variables of a function is malformed#2016-12-3019:30roelofor is has the wrong parameters#2016-12-3022:19spiedenanyone know how to clear the repl history? i reduced the max size but it’s still crawling#2016-12-3022:20spieden@roelof might be easier just to launch a debug REPL and run the same entrypoint#2016-12-3022:21spiedenspecifically the reverse search crawls#2016-12-3110:03cfleming@roelof You should be able to create a Leiningen run configuration and debug that.#2016-12-3110:04cfleming@spieden You can close IntelliJ and delete .idea/replstate.xml#2016-12-3110:04cflemingSorry, crappy I know#2016-12-3110:05cflemingOh wait, do you mean the output pane?#2016-12-3110:07roelofThanks, I solved it with the help of the repl#2016-12-3110:08cflemingYou can clear that using the rubbish bin icon#2016-12-3111:43olslashis a fix in the tracker for the issue in the last comment here? https://github.com/cursive-ide/cursive/issues/1303#2016-12-3111:43olslashcouldnt't find a dedicated issue#2016-12-3111:43olslashhappens to me a lot though#2016-12-3111:51olslashi guess the owner comment basically makes it a wontfix, seems like you guys dont have much control over parinfer itself#2017-01-0100:00cfleming@olslash I’m definitely planning to fix these cases, but I haven’t done so yet.#2017-01-0105:05olslashcool 🙂#2017-01-0219:26devurandomHi!#2017-01-0219:27devurandomI am using the "Debug REPL" and would like to see a stack trace when an exception happens. How do I do that? RIght now, when I evaluate a form in the REPL and an exception happens, it seems that the debugger is not being invoked and the REPL just returns to the regular input mode.#2017-01-0219:30devurandomWhat I'm doing right now is I insert something like (when (nil? link) (println "BOOO!")) into my code and put a breakpoint onto the println. But that feels like 1990...#2017-01-0222:10olslash@devurandom if you go to "view breakpoints" on the left part of the debugger window#2017-01-0222:11olslashhttps://monosnap.com/file/Lqh4tQAJab95eUa6CNoSzTAFbwAD40#2017-01-0222:23devurandomWow, works like a charm! Thanks @olslash !#2017-01-0222:23olslashtook me a minute to find last time 🙂#2017-01-0320:35bfabry@cfleming decided to try out that exception debugging fancyness, and got some unexpected behaviour. function locals seem to be null?#2017-01-0320:35bfabryhttps://www.dropbox.com/s/ixot5psra2uyjzs/Screenshot%202017-01-03%2012.35.16.png?dl=0#2017-01-0320:38bfabrycome on slack you can't inline a dropbox screenshot? https://www.dropbox.com/s/ixot5psra2uyjzs/Screenshot%202017-01-03%2012.35.16.png#2017-01-0320:38bfabryguess not#2017-01-0320:48cfleming@bfabry It’s probably locals clearing doing that, which can be tricky. Are you AOTing your code?#2017-01-0320:49bfabrynope#2017-01-0320:50bfabryit's running in debug mode with the little thingy at the top saying "locals will not be cleared"#2017-01-0320:51bfabrynope as in no aot sorry, that was unclear#2017-01-0320:51cflemingOne sec#2017-01-0320:54cflemingIf you enter *compiler-options* in your REPL, what does it show?#2017-01-0320:55bfabry
*compiler-options*
=> {:disable-locals-clearing true}
#2017-01-0320:55cflemingSeems pretty conclusive 🙂#2017-01-0320:55bfabryhaha#2017-01-0320:55cflemingSo the tricky thing is that that option takes effect when Clojure is compiling code, not when the code is executed.#2017-01-0320:56cflemingIf you reload the namespace which has the problem and then try again, does that help?#2017-01-0320:56bfabryinteresting. it was a fresh repl and loaded namespace, it's the first time I've started the repl in debug mode#2017-01-0320:57bfabrybut#2017-01-0320:57bfabryreloading it did fix it#2017-01-0320:57bfabryHMMM#2017-01-0320:57bfabrylemme check something#2017-01-0320:58cflemingSure. Do you have code loading in your REPL using injections, or something?#2017-01-0320:59bfabryI don't think so...#2017-01-0320:59cflemingI’ve seen this myself sometimes, but I haven’t investigated because I AOT code and I thought that was the issue. I’ll have to check that again.#2017-01-0321:00cflemingBack in a moment#2017-01-0321:00bfabryI'm guessing it's getting required in by my custom user.clj, which is compiled prior to that option being set#2017-01-0321:01bfabryyup, that's it#2017-01-0321:02bfabrygod dammit, the whole clojure core loading user.clj early has screwed me over like 3 times in the last few months#2017-01-0321:05bfabrynow I've gotta try and remember the jira issue for that thing again#2017-01-0321:07bfabryARGH and now I'm mad at ME because I found the commit where I last encountered this and it just says "work around clojure bug" without a link to the friggen bug!#2017-01-0321:18cflemingHehe#2017-01-0321:18cflemingI hate that - I just spent a bunch of time tracking down a bug which I had solved previously, but the commit message didn’t help at all.#2017-01-0321:18bfabryHA there it is, TADA https://github.com/technomancy/leiningen/issues/1787#2017-01-0321:19bfabryuser.clj is loaded prior to anything else#2017-01-0321:19bfabrylast time my issue was that it's loaded prior to javac running, meaning if your project includes java code it blows up with class not found exception#2017-01-0321:19bfabrynew issue is that it gets loaded prior to your locals clearing var being set#2017-01-0321:24bfabryaight, well, I don't know why I bothered tracking that down because it seems basically unsolvable. no doubt changing the load time of user.clj would break so many things. I just need to remember not to require things in there#2017-01-0321:26cflemingI’ll check to see if I can inject before that point somehow.#2017-01-0321:26bfabrykind of frustrating. it's useful to require things in there. seems like that namespace/file is serving double purposes#2017-01-0321:26cflemingAssuming user.clj is only used for dev, you could actually set the compile flag in there.#2017-01-0321:27cfleming(alter-var-root #'*compiler-options* assoc :disable-locals-clearing true)#2017-01-0321:27cflemingYou’ll get occasional OOMs if you hold onto seqs, but during dev that’s not an issue.#2017-01-0321:28cflemingIIRC you can also set those flags via system properties which might be an option, but I’d have to look at the code again to be sure.#2017-01-0321:28cflemingAnd also to ensure that they get set before user.clj is loaded.#2017-01-0322:19bfabry@cfleming my fix: https://clojurians.slack.com/archives/clojure/p1483481654009051#2017-01-0322:20cflemingNice#2017-01-0403:03danielcomptonIs there a way to treat a build.boot file as a Clojure one?#2017-01-0403:03danielcomptonSo I can get syntax highlighting and paredit#2017-01-0404:05cfleming@danielcompton Currently it’s a bit nasty - I think you have to map .boot files to Clojure, and then put build.boot inside a source root and symlink it to the root of the project.#2017-01-0404:07danielcomptonCool, that's in Preferences > Editor > File Types for anyone else following along#2017-01-0404:16cflemingFWIW boot support will probably be the next major functionality I add to Cursive#2017-01-0408:41stijn@cfleming how can I renew my license? I looked it up and have purchased a commercial license on 2015-12-10 but didn't receive a request for renewal?#2017-01-0409:00pseudIf I try to create a run configuration for my frontend app, it fails unless I launch it as a regular JVM process. I tried configuring it as a leiningen project like so: Run -> Run... Clojure REPL -> Local Run nREPL with Leiningen Project: <myproject:0.1.0-SNAPSHOT Profile: base,dev Parameters: dev/repl.clj No environment variables set, working dir cannot be changed (but is set to the root of the source code directory). I get the following error out of that... https://paste.ubuntu.com/23738026/#2017-01-0409:10cfleming@stijn You’ll be able to soon - I extended the current update period to 10 Jan for anyone whose licence period ended earlier than that: https://cursive-ide.com/archive/2217.html#2017-01-0409:11cflemingBasically, for non-work reasons I didn’t have the renewal functionality done - I’m just finishing it off now.#2017-01-0409:14cfleming@pseud That’s odd. cljsbuild is not on your classpath. I’m not sure it should be though - is it there if you do lein classpath?#2017-01-0409:14cflemingDoes your dev/repl.clj invoke it somehow, and pull in that dep using some lein mechanism?#2017-01-0409:15stijnOK! 🙂#2017-01-0409:15pseudTrue enough, lein classpath |grep cljsb didn't return anything (had to grep as the regular input was a large, unreadable block of text#2017-01-0409:16cfleming@stijn I’ll let you know when you can beta test 🙂#2017-01-0409:17cfleming@pseud So the question is, why is the REPL trying to find it? I’m not sure about that. You could try debugging the process and breaking on FileNotFoundException, and looking up the stack frames to see which namespace it’s trying to load.#2017-01-0409:18pseudWell, it works nicely enough if I configure the project to run as a regular JVM process. Ditto if I just issue lein repl. Is Cursive trying to be clever somehow ?#2017-01-0409:18cflemingWell, there’s all sorts of cleverness there, but mostly to try to make the Cursive REPL do what lein repl does.#2017-01-0512:44cemerickI am seeing really good completion on namespaces, vars, etc., in regular editors, but not in the REPL input editor. There, completion options seem to be limited to java packages, classes, etc., but not java methods (e.g. (Math/| doesn't yield any suggestions, but it does in a regular editor).#2017-01-0512:44cemerickDo I have something mis-configured?#2017-01-0512:48manutter51@cemerick clj or cljs?#2017-01-0512:51manutter51I just tried on my local machine and I get autocomplete options for (Math/ in the JVM repl#2017-01-0512:52manutter51(I was going to try the figwheel repl, but that’s commandline not IDE duh)#2017-01-0512:53cemerickSorry, no, only talking about clj right now#2017-01-0512:54cemerickthis is on my main project, I'll try something simpler#2017-01-0512:57cemerickooohkay, so a simpler project yields useful completions#2017-01-0516:54favilaIs there a no-thinking hotkey to cycle focus between repl and active editor window?#2017-01-0516:55favilaI know about ctrl-tab, but that requires thinking#2017-01-0517:13cemerick@favila there's a jump-to-REPL-editor action#2017-01-0517:13cemerickthe easiest thing I know of for the converse is to hit the shortcut for tool window you use rarely twice#2017-01-0517:14cemerickso alt-2 alt-2 will jump from anywhere to the favorites tab, then close it and return you to the last editor you were in#2017-01-0517:15favilaok that's not too bad#2017-01-0517:16favilaan alternative I think is ctrl-shift-tab ctrl-tab (in any order)#2017-01-0517:16favilajust ctrl-tab will always do the wrong thing#2017-01-0517:16cemerickhttps://youtrack.jetbrains.com/issue/IDEA-116865 is the most relevant issue I think#2017-01-0517:17favilaholy crap that is perfect#2017-01-0517:17faviladid not know that
#2017-01-0517:18favilathis must be the underlying principle behind dismissing those modal-while-focused windows#2017-01-0517:18rauhDepends on your OS too; In linux you do ALT+~#2017-01-0517:18cemerickit'd be great if "go to REPL editor" could bounce you to the complimentary location tho @cfleming#2017-01-0517:18favilaI'm on linux and esc seems to work#2017-01-0517:18favila@cemerick @cfleming yes agreed#2017-01-0517:19favilaif already has focus, could cycle back to editor#2017-01-0517:19favilaah ESC and F12 are complementary#2017-01-0517:19cemerick@favila oh, look at that. esc does work. It didn't for me on linux (windows now)#2017-01-0517:19favilaesc=jump to editor F12=jump to last tool#2017-01-0517:20favila(including repl it seems)#2017-01-0517:20favilahonestly that's exactly what I need#2017-01-0517:20favilaby happy coincidence, I usually keep editor and repl on the same sides of the screen as the esc and f12 keys#2017-01-0517:21rauhWell there is also the cmd "Jump to REPL editor"#2017-01-0517:21favilayeah, but I'd rather remember the more generic one#2017-01-0517:22favilaI ctrl-tab + KEY a fair amount already#2017-01-0517:22rauhYeah I agree, that's why I use ALT+~#2017-01-0517:23rauhit's even more generic since that's the shortcut for "Inter-application window cycle"#2017-01-0517:23rauhFor instance, you could use that in GIMP or other apps that have multiple windows#2017-01-0517:23favilafor me that only switches between project windows#2017-01-0517:23favilai.e. windows the window manager knows about#2017-01-0517:23favilaI usually have my repl docked#2017-01-0517:24rauhOh oops, I forget about that detail. Yeah I have mine floating#2017-01-0521:23cfleming@cemerick @favila @rauh There was a fair amount of discussion about this when I implemented the “Jump to…” commands - the choices are basically have one command cycle (so where the cursor ends up is relative to where you are now) or absolute “Jump to here” commands. I ended up with absolute because it means you can always jump to e.g. the REPL without having to hunt around to figure out where the caret is.#2017-01-0521:24cflemingIt also works better with the IntelliJ rule that ESC always takes you back to the editor from any toolwindow (which sucks for IdeaVim users, sadly)#2017-01-0521:25cflemingAnd it works better with the fact that users also want to go to the REPL output pane to cut and paste output, but not often enough for it to make sense as a permanent part of the cycle command.#2017-01-0521:26favila@cfleming for the record, I am completely satisfied by the ESC and F12 pair, I just didn't know about them#2017-01-0521:26cfleming@favila Great - I didn’t know about F12 either#2017-01-0521:56cemericklikewise, last time I tried this (on linux, if that matters), esc back to the editor didn't work#2017-01-0521:56potetmAnybody else get issues "saving settings" when using spaces?#2017-01-0521:56potetmI'm assuming that's more an IntelliJ thing rather than a Cursive thing, but I thought I'd check.#2017-01-0521:57cfleming@cemerick That’s very strange, the ESC thing is a cast-iron IntelliJ rule. I assume ESC works elsewhere?#2017-01-0522:16cemerickcfleming Yeah. Now that I think of it, may have been the ideavim conflict in action. This was months ago.#2017-01-0522:17cfleming@cemerick Ok. I don’t have a good theory for why your completion isn’t working BTW. I’ll dig out that code later on today and see if I can come up with an idea.#2017-01-0522:17cflemingAs far as I know, no-one else has that problem.#2017-01-0522:45cemerickSounds about right. I'm always a bug pioneer 🙃 #2017-01-0619:34ambrosebs(identity '^:foo a) ;; incorrect arity 2 for clojure.core/identity#2017-01-0619:35ambrosebsdo other people get this warning?#2017-01-0619:37kenny@ambrosebs Remove the quote. (identity ^:foo a)#2017-01-0619:38potetmHe wants the metadata attached to the symbol.#2017-01-0619:39potetme.g.
(let [a 1]
  (meta (identity ^:foo 'a)))
=> nil
(let [a 1]
  (meta (identity '^:foo a)))
=> {:foo true}
#2017-01-0619:41kennyTIL. That is not documented in the reader docs.#2017-01-0619:41potetmYeah it happens for me too @ambrosebs. Pretty sure its a bug?#2017-01-0619:41potetmYes: https://github.com/cursive-ide/cursive/issues/782#2017-01-0619:43potetmYeah I have no idea if it's a feature or a happy accident. My thought was the same as yours at first kenny, but I figured ambrosebs knows the clojure pretty gud, so I checked 🙂#2017-01-0619:44kennyYeah, I haven't seen that before. I'm curious if it is officially supported or if the behavior will be removed in a future version of Clojure.#2017-01-0621:48Alex Miller (Clojure team)I think that all flows from the reader rules, even though it’s not obvious#2017-01-0621:49Alex Miller (Clojure team)^:foo is applied to the next thing read#2017-01-0621:49Alex Miller (Clojure team)’x is expanded to (quote x)#2017-01-0621:51Alex Miller (Clojure team)so (identity ^:foo ‘a) expands to (identity ^:foo (quote a)) - note that the meta is applied to the list, so after evaluation you’re left with just the symbol a with no meta#2017-01-0621:52Alex Miller (Clojure team)and (identity '^:foo a) expands to (identity (quote ^:foo a)) which returns a symbol with meta for the same reasons#2017-01-0621:52potetmRight that makes sense. I thought that might be the case.#2017-01-0623:12ambrosebsIs there only one dev on Cursive atm?#2017-01-0701:45cemerick@ambrosebs AFAIK#2017-01-0702:09cfleming@ambrosebs Yes, it’s just me.#2017-01-0702:12cflemingThat bug is interesting - Cursive knows about metadata but probably not quoted metadata. I’ll fix that.#2017-01-0811:12paulspencerwilliamsHi. I might be mistaken, but I thought Cursive allowed 'Sending' arbitary commands from namespaces to the repl without loading the commands containing NS first? I create a new NS, type in (+ 1 2) and send it to the repl#2017-01-0811:12paulspencerwilliams
(+ 2 1)
CompilerException java.lang.RuntimeException: Unable to resolve symbol: + in this context, compiling:(/Users/will/src/bookmenow/test/bookmenow/test/wat.clj:3:1) 
#2017-01-0818:11notanon@paulspencerwilliams when i switch my repl to another ns, i get a bug like that Paul , suddenly it cant find clojure.core stuff#2017-01-0818:12notanoni've been working around by using lein's
:repl-options { :init-ns myns.core }
which will start the repl in myns.core
#2017-01-0818:12notanonnot sure if that's your problem or not though paul#2017-01-0818:14notanonthere's a keymap you can set called "Send top form to REPL" that sends the top-most self-contained s-expression under your curse to the repl. I use this all the time. i believe the option for whether you evaluate in the repl's namespace or the namespace of where you sent the code from is an option under settings somewhere. i choose to evaluate in the ns the repl is already in.#2017-01-0818:25notanonI replicated my issue, not sure if it's exactly the one you're having Paul.
Starting nREPL server...
C:\dev\jdk\bin\java -Dfile.encoding=Cp1252 -XX:-OmitStackTraceInFastThrow ...
Connecting to local nREPL server...
Clojure 1.9.0-alpha14
nREPL server started on port 49659 on host 127.0.0.1 - 
*ns*
=> #object[clojure.lang.Namespace 0x4a3b4ff5 "c4e.datomic"]
(+ 1 1 1)
=> 3
(in-ns 'c4e.core)
=> #object[clojure.lang.Namespace 0x43d49221 "c4e.core"]
(+ 1 1 1)
CompilerException java.lang.RuntimeException: Unable to resolve symbol: + in this context, compiling:(C:\Users\notanon\AppData\Local\Temp\form-init4674551064871749428.clj:1:1) 
#2017-01-0818:27notanonYou can see that I can find +, then i switch ns suddenly I can't find the symbol + any longer. This doesn't happen between every ns switch, for this project it seems to be my core ns that is the issue. In other projects I couldn't switch to anything else without the issue.#2017-01-0819:41paulspencerwilliams@notanon that's the one.#2017-01-0819:44notanoni probably should have reported this a couple months ago when i noticed it 😞 sorry#2017-01-0819:45notanoni never really had a problem using :repl-options { :init-ns myns.core } in my project.clj to just start in the ns i wanted, but i'm sure not everyone is happy with that arrangement#2017-01-0907:40pupenoI forgot, how do I manually specify a Clojure for a project?#2017-01-0908:11bfabryhave you tried this with just the leiningen repl? This just looks like the behaviour you get when you switch to an ns that hasn't had any file loaded yet#2017-01-0908:11bfabryie,
11326-storage:link_account_exporter bfabry$ boot repl
nREPL server started on port 62513 on host 127.0.0.1 - 
REPL-y 0.3.7, nREPL 0.2.12
*snip*
boot.user=> (+ 1 1)
2
boot.user=> (in-ns 'foo)
#object[clojure.lang.Namespace 0x91d0c6b "foo"]
foo=> (+ 1 1)

clojure.lang.Compiler$CompilerException: java.lang.RuntimeException: Unable to resolve symbol: + in this context, compiling:(/var/folders/42/zcfb2hds38l3shl7lqnjw2gh0000gp/T/boot.user1365942284796056852.clj:1:1)
             java.lang.RuntimeException: Unable to resolve symbol: + in this context
foo=>
#2017-01-0910:35cflemingA few people have asked about this, and I’m pleased to announce that you can once again give me money! The free update periods will be ending soon for the early adopters, and you can renew now at https://cursive-ide.com/renew.html. If you’re feeling brave and don’t mind beta testing the renewal process, feedback about any problems before everyone starts hitting it would be much appreciated. If you renew before your update period finishes, your new update period will end a year from when your current one ends, so you won’t miss out.#2017-01-0910:36cfleming@stijn ^^#2017-01-0910:39stijn😄#2017-01-0910:39stijnI will try it today#2017-01-0910:39cfleming/cdn-cgi/l/email-protection\!#2017-01-0910:40cflemingUgh#2017-01-0910:40cflemingThat pretty much sums up my day#2017-01-0910:40stijnhaha#2017-01-0918:10danielcomptonWorked well for me#2017-01-1006:28pupenoHow do I manually set the Clojure version in projects in which Cursive cannot automatically tell?#2017-01-1006:54cfleming@pupeno I don’t understand what you mean - the Clojure version is determined by the Clojure jar you have attached to your project.#2017-01-1007:01pupenocfleming: I haven’t attached anything. Normally Cursive figures it out automatically from project.clj, but I’m working on a repo with no such thing (cljsjs)#2017-01-1007:02pupenoSo, I get every symbol as unrecognized.#2017-01-1007:02cflemingBut even CLJS projects normally have Clojure attached.#2017-01-1007:03cflemingI don’t know what cljsjs projects normally look like.#2017-01-1007:03cflemingCan you show me an example?#2017-01-1007:03pupenoIt’s the cljsjs repo: https://github.com/cljsjs/packages#2017-01-1007:04pupenoIt’s using Boot.#2017-01-1007:04pupenoBut even then, it’s a collection of directories, each one is its own project.#2017-01-1007:07pupenoI had this happened before with other projects and you told me to just set it up somewhere in the config, in IntelliJ. Sadly, I forgot where 😞#2017-01-1009:39cfleming@pupeno: I don’t remember that, AFAIK there’s no way to do that.#2017-01-1009:40cflemingThe general idea using boot right now is to generate a project.clj from it and import that.#2017-01-1009:45pupenoReally? Odd. #2017-01-1013:32michaelrHi#2017-01-1013:33michaelrI've noticed the auto complete suggestions popup has recently often been hiding the code that I were typing. Does anyone else experience this?#2017-01-1013:38michaelrI can reproduce this behavior by invoking the popup manually (Ctrl-Space) and then hitting Ctrl-Space again.#2017-01-1104:44cfleming@michaelr Can you post a screenshot of what you’re seeing?#2017-01-1108:10michaelr@cfleming sent you a video in direct message#2017-01-1108:57cfleming@michaelr Thanks - that’s annoying. I’m not sure there’s much I can do about that unfortunately, I don’t think it’s a Cursive thing. Do you use IntelliJ for other languages? Do you see it there too?#2017-01-1109:00michaelr@cfleming Sometimes Java or Scala.. let me check with these.#2017-01-1109:04michaelr@cfleming Yes. Same problem with Java code#2017-01-1112:27michaelrchecking with IDEA support#2017-01-1114:55timgilbertHi @cfleming, I'm trying to renew a pre-order personal license and https://cursive-ide.com/renew.html tells me "order not found". I'll dm you the details#2017-01-1114:55sandbagsIs it a bug that copy-as-kill doesn't work in a read-only file?#2017-01-1115:15timgilbert(As an FYI, I fixed my problem renewing the license, turned out I was confusing the number in the "LICENSE" text block with the order number, which is a different number that appears in the subject line of the Cursive email receipt. PEBKAC.)#2017-01-1115:19sandbagsI am sure I am suffering the same bug in a different context, i just haven't spotted it yet#2017-01-1307:51pupeno@cfleming I renewed my license and it went smooth, without any issues.#2017-01-1307:53cfleming@pupeno Thanks!#2017-01-1312:00misha@cfleming greetings! is there a way to change style of a "form at caret"? e.g. make it bold, like here: https://cdn-images-1.medium.com/max/996/1*D1AFTkwdK3KElSLTRB0fog.png#2017-01-1312:53cemerick@misha that's a nice idea#2017-01-1314:03misha@cemerick: kudos to @dottedmag#2017-01-1314:45cemerick@misha was that his suggestion originally?#2017-01-1315:40misha@cemerick: https://blog.dottedmag.net/instant-highlighting-of-parentheses-in-emacs-bb060514a92#.9ytknwp6r#2017-01-1315:41cemerickok; highlighting matching braces is obvious, but I'd never considered how useful highlighting the current expr would be#2017-01-1315:44cemerick@misha, @dottedmag I created an issue for this here https://github.com/cursive-ide/cursive/issues/1635#2017-01-1316:01misha@cemerick: changing background color is known too, but making text bold is surprisingly helpful and pleasantly looking #2017-01-1317:36msshaving trouble getting a vanilla cljs repl (no figwheel) up and running. I created a repl configuration with the use clojure.main in a normal jvm process option with the added before launch step of synchronize leiningen projects. after booting my repl and switching from clj to cljs evaluation, I tried evaulating an ns declaration. unfortunately, none of my dependencies seem to be on the classpath (e.g. FileNotFoundException Could not locate goog/events__init.class or goog/events.clj on classpath. clojure.lang.RT.load (RT.java:458)). do I need to do anything special to expose those? am I missing something completely about how cursive supports cljs?#2017-01-1321:23cfleming@cemerick @misha Looks like this was requested a while ago: https://github.com/cursive-ide/cursive/issues/824. The bold is nice though.#2017-01-1321:23cflemingI’m also planning to add the ability to highlight then and else clauses of if statements differently.#2017-01-1321:24cfleming@mss I think that should work. Can you see ClojureScript as a dependency in your project view under External Dependencies? Also, does it appear in the classpath that’s printed at REPL startup?#2017-01-1321:29mssthanks for the tip. so when running Analyze -> Analyze Dependencies, cljs/core appears as a Production Class. also appears in the classpath printed at repl startup#2017-01-1321:33mssthe vanilla cljs file requires work fine btw. e.g. pprint can be invoked in an ns declaration no problem#2017-01-1321:34mssit’s my other cljs dependencies (pulled down via lein) and deps of deps (closure libs e.g. goog.events) that the editor can’t seem to resolve#2017-01-1322:02dragoncube@cfleming you’ve probably been extremely busy with renewal site lately, but is there any progress or roughly idea when it would be done on roadmap effort we discussed on Clojure Conj? 🙂#2017-01-1322:24mssfwiw the error seems to suggest it’s trying to load my cljs deps as clj deps (hence the init.class and filename.clj on classpath message)#2017-01-1322:25mssdon’t know why the cljs repl would assume that those deps (which are js) would expose files like that#2017-01-1323:49cfleming@mss sorry I’m babysitting right now, I’ll look in detail later. Is your project somewhere I can look at it?#2017-01-1323:53mssno worries, appreciate the help whenever you can get to it. unfortunately the source isn't easily perusable, but will dm you steps to reproduce as best as I can#2017-01-1419:27mingpAre there any recommendations for key-bindings to use with Cursive? Seems like by default a lot of things (especially REPL evaluation/interaction) remain unbound.#2017-01-1421:29cfleming@dragoncube I’m investigating a product that might help with that, if not I’ll just do something more basic like a wiki#2017-01-1421:33cfleming@mingp Take a look at https://cursive-ide.com/userguide/keybindings.html#2017-01-1421:52mingp@cfleming Thank you. I'll go look into that.#2017-01-1616:55ricrobertsHi. Does anyone know if there's anything special I need to do to get Load File in Repl (cmd-shift-M by default) to work in files in the checkouts dir? When I edit a file in a checkout and try to load it in the repl, i get an error saying it’s not in scope. I can switch to a namespace in the checkouts and send individual function definitions etc to the repl just fine.#2017-01-1616:56ricrobertsThanks!#2017-01-1623:31cfleming@ricroberts Hmm, that’s possibly a bug. Could you file an issue, please?#2017-01-1709:25ricrobertsHi. Will do.#2017-01-1709:37karol.adamiechi, how can i set up cursive repl to start lein ring server-headless? i would like to have one jvm process consuming memory not two like at the moement. i tried to put arg into Edit Configuration:->Common options:->Parameters: ring server-headless 8000 but restarting the repl seems not to start a server on 8000…. Am i missing something?#2017-01-1711:26cflemingA few people have asked about getting the Cursive website onto a CDN. As a result of a power outage taking out my server for 6 hours or so yesterday, I did an emergency migration to AWS/CloudFront. I’ve been meaning to do it for a while and I was hoping to do it in a more relaxed fashion, but it should be done now - DNS is currently propagating.#2017-01-1711:27cflemingI have some more loose ends to tie up tomorrow (mostly redirects from other domains) but the main site should be good and fast from everywhere.#2017-01-1711:57reefersleepIs it a known problem that you cannot add dots when refactoring namespaces? I get x.y is not a valid identifier when I try to refactor the name of a namespace from y to x.y#2017-01-1711:58reefersleepOr is there something I'm missing 🙂#2017-01-1712:30manutter51The dot implies that you’ve created a subdirectory x and moved y into it. The refactoring tool doesn’t seem to handle moving the file and/or creating the subdirectory, so that would explain why the dot is disallowed.#2017-01-1716:24karol.adamiechi, how can i set up cursive repl to start lein ring server-headless? i would like to have one jvm process consuming memory not two like at the moement. i tried to put arg into Edit Configuration:->Common options:->Parameters: ring server-headless 8000 but restarting the repl seems not to start a server on 8000…. Am i missing something?#2017-01-1716:26manutter51@karol.adamiec I do it the other way around: I start the ring server first, and then set up a Remote REPL to connect to the server#2017-01-1716:26karol.adamiecwell that would work for me as well#2017-01-1716:27karol.adamiechow do i start a remote repl ? lein ring server-headless seems to not expose nrepl?#2017-01-1716:28karol.adamiecdo you have incantation at hand?#2017-01-1716:28manutter51hmm, I think it’s built in to the luminus template I use, let me see if I can scare it up in the source#2017-01-1716:31manutter51Getting some good hits searching for “repl”, but I gotta run. Maybe do “lein new luminus ring-repl” plus whatever options you want to enable? Shouldn’t be too hard to pull the remote repl settings out of that#2017-01-1716:32karol.adamiecthx, i found that you have to pass :nrepl key to lein ring server#2017-01-1716:32karol.adamiecshould work out now 🙂#2017-01-1716:32manutter51:thumbsup:#2017-01-1719:17narekIt looks like the unused binding highlighting is not working for me, has anyone seen this?#2017-01-1721:10cfleming@narek Check if the inspection is turned on, Settings-&gt;Editor-&gt;Inspections-&gt;Clojure#2017-01-1723:54dragoncube@cfleming you may consider this too: https://blog.trello.com/going-public-roadmapping-with-a-public-trello-board#2017-01-1723:56cfleming@dragoncube Yeah, that’ll be my backup plan#2017-01-1723:56dragoncube@cfleming ok 🙂#2017-01-1803:26narek@cfleming inspections is turned on. I have tried cycling it too and it doesn't work. It also seems to be inconsistent about when it does and does not work.#2017-01-1803:27cfleming@narek Ok, can you send a screenshot the next time you see it not working?#2017-01-1803:27cflemingFeel free to send by PM or email if that’s easier/more private.#2017-01-1807:08olslashhey @cfleming, I'm trying to work with the author of the IDEA envfile plugin (lets you load environment vars from a .env file in run configurations) to add support for lein repl/debugger configs#2017-01-1807:08olslashHe did some research here https://github.com/Ashald/EnvFile/issues/20#issuecomment-273397331 explaining some little changes he needs in order to support it#2017-01-1807:08olslashany chance you guys can take a look?#2017-01-1819:14bfabry@cfleming mailing list archive down https://cursive-ide.com/archive/#2017-01-1820:34cfleming@bfabry Ouch, thanks - things got moved around recently, I’d forgotten about the archive.#2017-01-1820:37bfabrynp#2017-01-1904:51yusupis http://cursive-ide.com down ?#2017-01-1904:51yusup@cfleming#2017-01-1907:50cfleming@yusup I think it’s ok - what are you seeing?#2017-01-1907:51yusupunable to connect#2017-01-1907:52yusupweird, I am from China and I use socks proxy for everything.#2017-01-1907:52yusupYoutube, Twitter all works fine, but not http://cursive-ide.com#2017-01-1907:52yusupI can access http://cursive-ide.com without socks proxy.#2017-01-1907:53yusupYesterday, there was no such issue.#2017-01-1907:54yusupI tried curl on my VPS. It failed with connection refused. Maybe this is related to my VPS(Google Compute Engine).#2017-01-1907:55yusupmy bad.#2017-01-1909:54cfleming@yusup Hmm, I’m not sure. I just moved my website from my own server to AWS, perhaps that change caused your issue.#2017-01-1910:01yusupI can access without proxy , so all good. 🙂#2017-01-1914:52danielgrosseI have a weird problem. I have a namespace, which seems not to be compiled on start. When I try refresh the namespace in cursive, the error of missing javaclass is thrown. Now I have to recursively have to go through each dependency and reload the file in cursive. It is only for this namespace and its dependencies. All other are loaded normally. Currently the namespace isn't a dependency in the project, if this helps.#2017-01-1915:15danielgrosseAh, a directory had a - not a _. facepalm#2017-01-1915:26sandbagsOkay this is unexpected. Should my REPL process be able to hang IDEA itself?#2017-01-1915:26sandbagsI'm using a Lein REPL within Cursive (macOS 10.12.2)#2017-01-1915:27sandbagsI'm rewriting some code that was blowing the heap in the REPL and now it appears (i'm not sure what else could have done it) to have beachballed IDEA itself#2017-01-1915:43sandbagsodd, it seems like it's using IDEA VM memory#2017-01-1915:43sandbagsthere's something going on here that i don't understand#2017-01-1916:31snowellSo cursive is still informing me of “errors” when I use transducers. For example, I have a comp and one of its args is (mapcat vals).#2017-01-1916:32snowellCursive highlights (via red underline) the mapcat with an “Incorrect arity” message#2017-01-1916:33snowellThough I just realized it’s telling me incorrect arity for cljs.core/mapcat…which might just mean I have to update my cljs and this has nothing to do with cursive...#2017-01-1917:00snowellYeah, that was it. Don’t mind me...#2017-01-1919:58cfleming@danielgrosse Ugh, sorry, I’ve been meaning to create an inspection for that.#2017-01-1919:59cfleming@sandbags That sounds strange - which Cursive version are you on?#2017-01-1919:59cflemingThere were a couple of memory leaks fixed a while back, but this might be another one.#2017-01-1920:01sandbags@cfleming i am on 1.4.3-2016.3#2017-01-1920:02sandbagsi mean, it seems clear to me that i am missing something about memory management/GC and maybe I am creating a lot of short-lived objects and starving the GC#2017-01-1920:02sandbagsbecause i've blown the heap several times with this code and... i don't think i should have#2017-01-1920:02cfleming@sandbags Ok, you have those fixes then. Do you see the memory use going wild in IntelliJ itself? You can show a memory indicator by going to Settings->Appearance & Behaviour->Appearance->Show memory indicator. That will show a memory use graph at the bottom right, and you can provoke a GC by clicking on it. When the problem occurs, if you see that memory indicator showing most of your memory being used and clicking on it doesn’t manage to free much, then a memory leak (or just high memory use of some kind) is almost certainly the problem.#2017-01-1920:03sandbagsi've switched to accumulating frequencies at a lower-level rather than allowing 22 million element lists to build up#2017-01-1920:03sandbagsbut even then memory built up rather than staying flat#2017-01-1920:03cflemingBut like you say, that shouldn’t affect IntelliJ.#2017-01-1920:03sandbagswell that was the odd thing, i even got a warning dialog from intellij asking me to up the heap size#2017-01-1920:03sandbagsit created the .vmoptions file thingy#2017-01-1920:04sandbagsyet i wouldn't imagine code running in the REPL should have any effect on the IDEA process, unless there is something about the debug invocation that is conflating them somehow#2017-01-1920:05sandbagsbut i should have thought that was just about some kind of trace diagnostics in the VM#2017-01-1920:55cfleming@sandbags Ok, if IntelliJ warns you then there could well be a memory leak. The ones I fixed recently were in the REPL client and in the REPL output display area.#2017-01-1920:55cflemingCan you take a heap dump when the problem is occurring?#2017-01-1920:55sandbagsAh perhaps so#2017-01-1920:56sandbagswell unfortunately i've modified the code since then to keep heap usage to an absolute minimum#2017-01-1920:56cflemingBut again, that’s in your process, not IntelliJ#2017-01-1920:56sandbagssince i was also blowing the heap of the JVM#2017-01-1920:56cflemingAh ok#2017-01-1920:57cflemingWell, if you see the problem again, try to get a heap dump from the IntelliJ process and we can take a look at it.#2017-01-1920:58cfleminghttps://intellij-support.jetbrains.com/hc/en-us/articles/207241235-Reporting-performance-problems#2017-01-1920:58sandbagswill do#2017-01-1920:58cflemingIt might be a good idea to add those options now so you’re ready if you see the problem again.#2017-01-1921:00sandbagsdone#2017-01-1921:16sandbags& thanks#2017-01-2010:06karol.adamiec‘Your project requires stubs to be generated’ i get that from time to time. What is it? important?#2017-01-2010:58joshkhhow might i go about running "lein less auto" automatically using cursive/intellij ?#2017-01-2010:59joshkhi already have figwheel/sidebar REPL running from within intellij, it'd be nice not to have a terminal open just to compile my css 🙂#2017-01-2011:18joshkhoh, oops, i can just use intellij's terminal. nevermind!#2017-01-2016:40moizsj@cfleming are there known memory leak issues when using the debugger? Post a couple of debug cycles in Cursive, IntellIJ gets really really slow. And I'm forced to restart. Cursive 1.4.2-15 IntelliJ 15.0.6.#2017-01-2016:54timgilbertHey, probably a dumb question, but what's the easiest way to do a lein run from cursive when I have a -main function defined in my project?#2017-01-2016:57timgilbert@karol.adamiec: I get that when Cursive wants to generate autocompletion and stuff for projects I don't have source access for, like the datomic client libraries. No reason not to do it AFAIK#2017-01-2104:44bastiHi, can I somehow just evaluate the form where my cursor is in?#2017-01-2105:02bastiah figured another way, so I can just select the whole form and then send to the REPL sweet#2017-01-2109:08danielcomptonThere is a command to evaluate form under point too#2017-01-2118:11bastisure? can’t find it 😞 There’s just evaluate form before caret#2017-01-2118:16bastiSo I configured a keyboard shortcut for Jump to REPL but can’t jump back to my source file#2017-01-2118:28bastiah found it, it’s just esc 🙂#2017-01-2211:29pupenoAnybody else using Cursive on Windows?#2017-01-2214:30seriogaI use#2017-01-2214:48pupeno@serioga do you use paredit?#2017-01-2214:49seriogamostly and parinfer sometimes#2017-01-2214:49pupenoWhat have you done regarding key shortcuts?#2017-01-2218:33vinnyataidedoes cursive supports cljr-refactor funcitons like add-missing-dependency or add-missing-libspec?#2017-01-2221:23bfabry@vinnyataide it does not use clj-refactor, so does not support all of its features. it definitely supports the first one though and I'm not sure what the second is#2017-01-2221:23vinnyataideit adds the lib to the depedencies map#2017-01-2221:23bfabryoh looked it up, yeah it supports add-missing-libspec but I don't think it supports add-missing-dependency#2017-01-2221:23vinnyataideit's better than looking into github/clojars#2017-01-2221:23vinnyataideall right#2017-01-2221:24bfabryit comes up as the intellij quickfix, so you just hit opt+enter#2017-01-2221:24vinnyataidewindows pc 😛#2017-01-2221:24bfabryalt+enter then#2017-01-2221:24vinnyataideok thanks#2017-01-2221:33serioga> What have you done regarding key shortcuts? @pupeno still trying to adopt 🙂 what exactly does not work?#2017-01-2221:38vinnyataide@serioga whole meta key keymaps#2017-01-2300:32pupenoI'm experimenting with two different set of key maps, I published them in cheatography #2017-01-2309:51pupenoHere are my proposed key maps: https://www.cheatography.com/pupeno/lists/cursive/#2017-01-2309:51pupenoI'm not a long time IntelliJ user, so, I don't know whether those are good style or not. #2017-01-2309:52cfleming@pupeno I’m planning to finally make the change to have keybindings by default in Cursive, I’ll definitely take a look at that when I get to it.#2017-01-2309:52pupenoI've been using the no conflict sequence for a couple of months and I'm not a fan. I'm switching to the one with some conflicts but closer to the Mac shortcuts. #2017-01-2309:53cfleming@joshkh You can do that by creating a Leiningen run config - that will give you the output in a toolwindow at the bottom of the screen.#2017-01-2309:54pupeno@cfleming I'm introducing people to Clojure and Cursive and someone was confused about having to remove the Leinengen plug in. #2017-01-2309:54cfleming@moizsj So I haven’t managed to track these down, but yes, there are. I’m not sure if it’s my fault or not. I see a lot of memory being held via links from data structures created by the debug layer itself, but it doesn’t happen with e.g. Java so it’s probably something I’m doing wrong somehow.#2017-01-2309:54pupenoThey tried but couldn't find it, as it was a fresh install, and then they saw that they could create a Leinengen project (due to Cursive) so, they thought their install was corrupted. #2017-01-2309:55cfleming@vinnyataide Yes, @bfabry is correct, Cursive supports add-missing-libspec (in a slightly different way to Cider, but the same idea), but not missing dependency yet. I’m planning to add that very soon though.#2017-01-2309:56cfleming@pupeno Yeah, I really wish I could get that taken down. I’ll contact the original developer and see if I can.#2017-01-2309:57cflemingHe updated the Github site to say it was obsolete and pointed to Cursive, but the plugin is still out there.#2017-01-2309:57pupenoCan a plug in detect the presence of another plug in? It'd be nice if intellij provided a way to declare conflicts. #2017-01-2309:57cflemingNo, sadly.#2017-01-2309:57cflemingIt really would be great.#2017-01-2309:59pupenoYeah. #2017-01-2310:08serioga> whole meta key keymaps @vinnyataide look like this solution works to use Win as Meta https://stackoverflow.com/questions/32921994/how-to-make-windows-key-the-intellij-idea-command-meta-key-under-windows?rq=1 > Help -> Edit Custom Properties... -> keymap.windows.as.meta=true#2017-01-2310:29moizsjok @cfleming is there an issue for this?#2017-01-2313:15pupeno@serioga there are some serious issues with that. IntelliJ gets the key down and key up events but not the key press so it's inferring when it's being pressed and it can lead to issues. On Windows 7 at a customer's, it only works if another modifier key is pressed too. #2017-01-2314:12pupeno@cfleming my offer to help with the shortcuts still stand. Specially if you don't have a Windows machine nearby. #2017-01-2315:43cemerick@cfleming FYI, https://cursive-ide.com/archive/ is 404#2017-01-2321:37cfleming@moizsj No, I don’t think so - one would be welcome.#2017-01-2321:37cfleming@pupeno Thanks!#2017-01-2321:37cfleming@cemerick Yeah, this is after my emergency server move the other day - working on it.#2017-01-2401:28cemerick@cfleming never once did I consider that the pprinting was being done client-side#2017-01-2401:29cfleming@cemerick Yeah, I suddenly realised that that might not have been obvious#2017-01-2401:30cemerickI figured you were adding a shaded fipp dep to every classpath and using it in cursive middleware, etc#2017-01-2401:30cflemingNo, I just lex (and parse in a very primitive way) the output string coming back from nREPL.#2017-01-2401:30cfleming(or whatever else is returning values to me).#2017-01-2401:31cflemingAgain, it’s swings and roundabouts - what I have will work for CLJS as soon as I get a dedicated CLJS REPL going.#2017-01-2401:32cflemingBut it’s harder for the user to customise - I can expose knobs, but customised renderers are trickier.#2017-01-2401:33cemerickyeah, it's a very uncomfortable notion, insofar as I'm so used to always having pprint or an equivalent available#2017-01-2401:33cemerickI'll forgive you when a webkit output view shows up 😜#2017-01-2401:33cflemingWell, as far as I can tell, you should be able to use the middleware I sent and just disable pprinting in Cursive#2017-01-2401:33cflemingHehe#2017-01-2401:33cemerickyeahyeah, should be a snap#2017-01-2401:34cemerickI'm still confused re: the syntax highlighting though.#2017-01-2401:34cemerickit sounded like you were using fipp in order to get that somehow, but clearly that's not the case#2017-01-2401:34cflemingNope, I have my own lexer#2017-01-2401:34cemerickso why bother with all the trouble of client side pprinting at all?#2017-01-2401:35cflemingWell, if pprinting is enabled, I lex and (somewhat, basically just data structures) parse using Cursive’s existing machinery, then use a custom fipp on that.#2017-01-2401:35cflemingIf it’s not, I just lex and highlight.#2017-01-2401:36cflemingOther advantages are that the syntax highlighting colours are what the user expects (they’re the same as in the editor, which will not be the case if using e.g. puget)#2017-01-2401:36cflemingAnd it’s just generally less intrusive on the user app - after all this time, I’m still not used to the idea that dev tooling has to be injected into the running app.#2017-01-2401:37cflemingNot doing that reduces all sorts of version conflicts etc that Cider has suffered from#2017-01-2401:38cemerickvery fair#2017-01-2401:38cflemingPlus, it will work with non-nREPL things.#2017-01-2401:39cflemingWhen I ever get around to adding them.#2017-01-2401:43cemerickdo you have any sense of the socket repl stuff? I actually don't really have a dog in the fight anymore, but I had been figuring there'd be more activity at some point#2017-01-2401:46cflemingI’m planning to add support shortly.#2017-01-2401:47cflemingIt’s surprisingly tricky from a UI point of view. It involves explaining to users the difference between RPC and streaming REPLs, making them choose one and then supporting the various tradeoffs depending on what they choose.#2017-01-2401:47cflemingTechnically, it’s pretty easy.#2017-01-2416:41karol.adamiecquestion about test integration. seems to me that cursive somehow holds on to old test definition. After overwriting example test = 1 0, with sth that passes it still reports that original as failing? how can i reset short of stopping the lein process that remote repl works on? redefines seem not to work...#2017-01-2416:44karol.adamiecstopping process and starting helps and it goes away. do not know how often one can run into that, maybe i am unlucky. Is there something specific at play with regards to test integration that might shed light on such behaviour?#2017-01-2419:01felipehummelDo you guys know if I can get the form/something under caret in a REPL command? Something like (pprint $form)
#2017-01-2419:18rauh@felipehummel You can def do that with a macro#2017-01-2419:31felipehummel@rauh how? What should I put in the command to be executed?#2017-01-2419:32rauhYeah that part is little tricky#2017-01-2419:32rauh1. Grow selection 2. Copy. 3. Focus REPL window 4. Paste#2017-01-2419:33rauh#3 "Jump to REPL" is provided by Cursive. I have a macro that uses it#2017-01-2419:54felipehummelOh, I guess I wasn't clear. I'm talking about this: https://cursive-ide.com/userguide/repl.html#repl-commands I'd like a command that gets whats under my caret (or something similar) and pass it to a function. Like: (my-pretty-print-function $form-under-caret)#2017-01-2420:05rauh@felipehummel Oh I see, I wrote a macro like that (actually calling clojure.repl/doc on the symbol) but it's not pretty and was a little flaky#2017-01-2421:05cfleming@felipehummel So currently you can only get the selection with ~selection (although I think I just saw a bug in that - gah). If you’d like more possibilities, please file an issue - I’m definitely interested in hearing about use cases.#2017-01-2421:07felipehummelThe use case I was thinking about was to show a pretty-printed version of a Prismatic Schema in the repl. We use extensively schemas and sometimes we want to take a quick look at the schema definition. As schemas are normally combined/merged with one another, going to the definition of the schema doesn't always give the answer.#2017-01-2421:33tmarbleNewbie cursive user here.. I'm trying to connect to a remote REPL and I get the "REPL run configuration is incorrect - no module selected" error. However in the REPL configuration Context Module dropdown there are no choices??#2017-01-2421:36cflemingHi @tmarble, what that probably means is that none of your modules have Clojure attached to them.#2017-01-2421:36cflemingHow did you set this project up?#2017-01-2421:36tmarbleHi Colin!#2017-01-2421:36tmarbleI just tried to import https://github.com/martinklepsch/tenzing out of the box#2017-01-2421:37cflemingInteresting, I think the issue is that that project.clj has no Clojure dependency.#2017-01-2421:38cflemingMy memory is failing me on how eval-in-leiningen is handled, one sec.#2017-01-2421:38tmarbleIn task-options! I set repl {:port 8082} and then configured that port in the "MyREPL" config which is based on Remote#2017-01-2421:38tmarble@cfleming boot, not lein#2017-01-2421:39cfleming@tmarble Sadly, Cursive currently doesn’t support boot out of the box - it’s very near the top of my list, though. How people usually handle this is to do this: https://github.com/boot-clj/boot/wiki/For-Cursive-Users#2017-01-2421:39cflemingThat generates a project.clj using the deps from your boot build, which Cursive can then import.#2017-01-2421:40cflemingThe problem is that tenzing already has a project.clj - I don’t know why that would be.#2017-01-2421:41tmarblehmm i must have deleted project.clj... let me regenerate it and try again#2017-01-2421:48superstructorI do above with boot, only issue I have with it is I regularly forget to run boot lein-generate so the deps in Cursive are out of date until I remember to run it again.#2017-01-2421:48tmarblethe project.clj in the repo is for the lein-template... the generated example (from lein new) only has build.boot#2017-01-2421:49cflemingUmm - so this is a boot project which creates a lein template which creates boot projects?#2017-01-2421:49cfleming🙂#2017-01-2421:49tmarblehahaha, yeah#2017-01-2421:50cflemingOk, so that project.clj is really like a static resource, and is not the project definition for tenzing itself.#2017-01-2421:51cflemingWait - but it also doesn’t have a build.boot file?#2017-01-2421:52tmarbleI just generated a new example, did lein-generate and Cursive is indexing now..#2017-01-2421:52cflemingWhat are you trying to do - work with tenzing itself?#2017-01-2421:53tmarblenope... just figure out how to get Remote REPL to work in cursive. In this example just one (1) CLJS REPL... Ultimate goal is to have CLJ REPL (web server) and CLJS REPL (Weasel connected browser REPL)#2017-01-2421:53tmarbleOK, yay!, now Edit Configurations Clojure REPL -> Remote has the Context Module#2017-01-2421:54cflemingNice!#2017-01-2422:00tmarbleHmm.. i ran 'boot dev' per the tenzing instructions... and it says nREPL started on 8082... but when I try to start the Cursive REPL it appears to start a new nREPL on a different port?#2017-01-2422:01cfleming@tmarble It shouldn’t if you’re using a Remote REPL - can you send a screenshot of your REPL run config?#2017-01-2422:01tmarblesure#2017-01-2422:04tmarble@cfleming see http://info9.net/downloads/tenzing3.png#2017-01-2422:04tmarbleOH.. in the REPL window it says LOCAL!#2017-01-2422:04tmarblehmmm.. how to I make that Remote??#2017-01-2422:08cflemingYou shouldn’t have to - your REPL run config looks ok, but it seems to be running a local config instead of a remote one.#2017-01-2422:08tmarbleHow come? 😛#2017-01-2422:08cflemingThis is a project you just created from a template, right? Nothing sensitive in there?#2017-01-2422:09tmarblecorrect#2017-01-2422:09tmarblewant me to push it to github?#2017-01-2422:09cflemingOk, can you zip the project up and send it to <mailto:/cdn-cgi/l/email-protection|/cdn-cgi/l/email-protection>?#2017-01-2422:09cflemingSure, or that - either is fine.#2017-01-2422:09cflemingIf you push it I’ll need the config that lives under .idea#2017-01-2422:10tmarblei'll give you the whole shebang#2017-01-2422:21tmarble@cfleming https://github.com/tmarble/tenzing3#2017-01-2422:22tmarbleFollowing import i did 'Add project' 'Add SDK', opened a terminal, ran 'boot dev', then made the new Remote REPL configuration and tried to connect to it#2017-01-2422:22cfleming@tmarble Arg - one thing that’s missing is the REPL config itself. Could you open your run config, select “share” and then add the file and push it?#2017-01-2422:23tmarblesure#2017-01-2422:23cflemingBy default run configs aren’t added to the project, they’re user-local.#2017-01-2422:24tmarblepushed#2017-01-2422:33cfleming@tmarble Ok, that all looks good. I can’t run boot dev for some reason, I get “Unable to resolve symbol: update in this context, compiling:(pandeiro/boot_http/impl.clj:156:36)"#2017-01-2422:34cflemingBut when I run the REPL it says: Connecting to remote nREPL server... Error connecting to localhost:8082 - class java.net.ConnectException: Connection refused#2017-01-2422:34cflemingWhich is as it should be.#2017-01-2422:35cflemingI’m wondering if your REPL config has got itself into a funky state somehow. Could you try deleting it and recreating it, just to be sure?#2017-01-2422:35tmarblesure#2017-01-2422:35tmarblefirst let's get your boot dev working#2017-01-2422:36tmarbledo you have things setup in ~/boot (see my Boot/ directory) -- save what you have if already present#2017-01-2422:36tmarble~/.boot#2017-01-2422:36cfleming
~/d/cursive-bugs> ls ~/.boot
boot.properties cache           lib             tmp
#2017-01-2422:37cflemingBut I don’t use boot for anything except sporadic testing, yet#2017-01-2422:37tmarblecp Boot/{boot.properties,profile.boot} ~/.boot/#2017-01-2422:37cflemingSo I can delete all of that with no problem#2017-01-2422:37tmarbleshouldn't need to delete#2017-01-2422:38tmarblethen, in a terminal, do boot dev again#2017-01-2422:38cflemingOk, done - boot is supposedly deving#2017-01-2422:38cflemingDownloading things...#2017-01-2422:38tmarbleit'll take 30 seconds AFTER it says listening on 8082 before it's truly ready#2017-01-2422:38tmarbleends with Elapsed time: ....#2017-01-2422:39cflemingYep, I’ve made it that far#2017-01-2422:40tmarbleNow try to connect the Remote REPL#2017-01-2422:40cfleming
Connecting to remote nREPL server...
Clojure 1.8.0
(+ 1 2 3)
=> 6
#2017-01-2422:40tmarbleyay!#2017-01-2422:40tmarbleok, now my turn... i'll delete the project#2017-01-2422:41tmarbleit's ok if it deletes all of .idea, right?#2017-01-2422:42cflemingYeah, that will all be recreated when you import.#2017-01-2422:43tmarbleImport project... tenzing3#2017-01-2422:43tmarbleThe project file .idea already exists, would you like to overwrite it?#2017-01-2422:43tmarbleI assume yes#2017-01-2422:43cflemingYes please#2017-01-2422:44tmarbleopen terminal, run boot dev#2017-01-2422:44tmarbleEdit configurations...#2017-01-2422:45tmarbleDo I edit the Defaults / Clojure REPL / Remote -or- just add a new REPL config?#2017-01-2422:46cflemingAdd a new one#2017-01-2422:46cflemingThe defaults are used as a template for new configs when you create them.#2017-01-2422:46tmarblecrap... no Context module#2017-01-2422:47cflemingOk, I’m going to import the project instead of opening your files, one sec#2017-01-2422:47cflemingActually, I’ll send you a PM, this is getting pretty specific to your case#2017-01-2517:05felipehummel@cfleming I just tried the ~selection in a REPL command and it gave me a unable to resolve symbol. It was suppose to work?#2017-01-2521:35cfleming@felipehummel Well, it’s supposed to but sadly as I say there’s a bug in it. I’ll fix that for the next version.#2017-01-2521:36cflemingWhich form would you like to be able to select - the top level form, or the surrounding sexp?#2017-01-2612:40vandr0iyHi all! I just added org.clojars.cvillesteele/lein-git-version plugin to my project and set its path to etc. This would mean that it'd generate a file with ~projectname.version namespace that contains various git info and put it in my ~projectroot/etc folder every time I launch lein $whatever from the shell. My problem with this is the fact that if I launch lein repl from terminal it starts, while it doesn't from cursive, which says Error reading /home/me/myproject/project.clj: etc/version.clj (No such file or directory). Does cursive have different $PATH than the default shell?#2017-01-2616:29felipehummel@cfleming in my case I guess the surrounding sexp. For example: (s/defn my-fn-with-schemas :- s/Int [param1 :- models/ComplexEntity] ...). If the caret is at the middle of ComplexEntity I want to use models/ComplexEntity so I can pretty print it in the repl.#2017-01-2709:48pupenoIt’s a .boot file in a cljsjs package.#2017-01-2709:48cfleming@pupeno I think that moving it into a source directory and symlinking it should help. Then if you add (in-ns ‘boot.user) at the top I think that should help as well.#2017-01-2709:49pupenoI marked it’s directory as a source directory.#2017-01-2709:51cflemingOk.#2017-01-2709:51cflemingDoes the in-ns help?#2017-01-2710:33pupenoIt didn’t make any difference in syntax highlighting or code formatting. Not sure about intelisense.#2017-01-2710:51cfleming@pupeno That’s very strange. I’ll try to edit a file like this tomorrow.#2017-01-2710:52cflemingOh, one question - are you generating a project.clj as described here: https://github.com/boot-clj/boot/wiki/For-Cursive-Users?#2017-01-2710:52pupenoIt’s an unusual project. You can find plenty of examples here: https://github.com/cljsjs/packages#2017-01-2710:53pupeno@cfleming no, I wasn’t even aware of that.#2017-01-2710:54cflemingOk, in that case the problem is that you probably don’t have any deps in your project. Do you see any under External Dependencies in your project?#2017-01-2710:57vandr0iyCould anybody tell me, please, where should I ask in order to obtain some support from the cursive devs?#2017-01-2710:58pupeno@vandr0iy here’s a good place to ask. there’s also a mailing list.#2017-01-2710:59vandr0iythanks; I asked yesterday either here and on github, but not on the mailing list yet...#2017-01-2711:01pupenoAlso, stack overflow is a good place to ask questions in general.#2017-01-2711:03vandr0iyyeah, well, I know, - but my issue is very cursive specific. Basically, I'm unable to start a REPL in cursive - while it works in shell - ever since I installed one particular leiningen plugin#2017-01-2711:04cfleming@vandr0iy Sorry, I’ve been pretty busy today#2017-01-2711:04cflemingI think someone else had that problem with that specific plugin a while back#2017-01-2711:04cflemingOne sec#2017-01-2711:05cflemingOh yeah, I remember the problem.#2017-01-2711:06cflemingSo that plugin invokes git, and it assumes that the CWD is that of the project. Cursive invokes lein in-process, so the CWD is incorrect, because Java does not allow the CWD of a running Java process to be changed.#2017-01-2711:07cflemingCursive does a lot of magic to make most things that rely on this to work (things like slurping version files in your project.clj etc), but there’s no way to make that work.#2017-01-2711:08cflemingThe plugin could be fixed, I believe there’s a dynamic var that it could use to work out the CWD it needs, and then it could set that on the git process it invokes.#2017-01-2711:08cfleming@pupeno All those deps are from the JVM, they’re not Clojure ones. If you collapse the 1.8 entry do you have any more?#2017-01-2711:09pupeno@cfleming no, that’s all there is.#2017-01-2711:10vandr0iy@cfleming well, I don't use that plugin in code, I can only configure it. So, what you're saying is that, if I just don't set up any custom directory location for the file it generates everything should work?#2017-01-2711:12cfleming@vandr0iy I don’t think so, no - the problem is that that plugin runs git to get the version it should write into the project.clj from a git tag, right?#2017-01-2711:12cflemingAnd git needs to be run in the project directory. The plugin assumes that CWD is the project directory, but that is not true under Cursive.#2017-01-2711:13cfleming@pupeno If you manually add the boot jar to that project as a dep, that file will look nicer.#2017-01-2711:16cflemingSorry folks, I’ve got to get to bed.#2017-01-2711:21vandr0iy@cfleming it runs git to get the version info - but it doesn't touch project.clj - instead it creates another file, called version.clj(or whatever you want to call it); which is the one that returns the error by not being found by cursive... also, the project I'm working on is quite particular, because its top level folder contains 2 projects in different languages (frontend and backend) which is also the git root, - and one of those 2 projects is the clojure project that has the cursive problem I mentioned before. So, the real issue is the fact that Git root is different from the project main directory?#2017-01-2712:44manutter51@vandr0iy what happens if you specify an absolute path for the directory (`/home/me/myproject/etc` instead of etc)? Will it let you do that?#2017-01-2713:01vandr0iyIt doesn't work with a ~/myproject/etc, but it does with /home/me/myproject/etc @manutter51#2017-01-2909:50andrzejsliwaHi Guys#2017-01-2909:51andrzejsliwaI wonder if there is a way to make auto require with cursive?#2017-01-2909:51andrzejsliwasimilar to clj-refactor#2017-01-2912:05jumaris there a way how to make Cursive recognize js/require et al. ?#2017-01-2912:05jumarLet’s say I have following line of code (def react-native (js/require “react-native”))#2017-01-2912:05jumarit marks “js/require” as unresolved#2017-01-2912:12pgmcgeehey guys, i just started playing around with cursive, and on a simple program: https://www.refheap.com/124794, i’m getting “defroutes cannot be resolved”, “GET cannot be resolved”, and “route/not-found cannot be resolved"#2017-01-2912:13pgmcgeeanyone know why cursive isn’t properly parsing the :requires#2017-01-2912:28pupenopgmcgee how is defroutes defined?#2017-01-2912:29pupeno@andrzejsliwa what is auto require?#2017-01-2916:17yonatanelIs there a way to see multimethod implementations and move to them from defmulti or from defmethod?#2017-01-2916:36pupenowhat do you mean by move them?#2017-01-2916:44eslachanceWould anyone perhaps know what would cause my code to not be loaded in REPL when I start it? Aka when I hit that Run 'REPL' button, it starts, but nothing in my namespace is loaded. I have to select everything and run it. But this only happens in one project, not the other. Maybe a config I have different? Not sure what, though.#2017-01-2916:46eslachance(Obviously I'm in IntelliJ and use Cursive)#2017-01-2916:49yonatanel@pupeno I mean "autoscroll" to them#2017-01-2916:52yonatanel@eslachance You probably need something like this in your project.clj file (the :repl-options part):
:profiles
  {:uberjar
   {:aot :all}
   :dev
   {:source-paths ["dev"]
    :repl-options {:init-ns your.dev.ns}}}
#2017-01-2916:53eslachanceHmm. my :profiles is identical in both project.clj however.#2017-01-2916:54eslachanceahhhh maybe it's this: :main ^:skip-aot dtbot.core#2017-01-2916:54eslachancethat's the one that works.#2017-01-2916:57eslachanceLet's try it anyway.#2017-01-2916:58eslachanceOh yeah! Look at that. That was it.#2017-01-2916:59yonataneljust because you didn't define :main?#2017-01-2916:59eslachanceApparently so. This is a library so it doesn't "do" anything on its own. It just defines a lot of stuff 🙂#2017-01-2917:01eslachanceJust to put things into perspective, I'm pretty new to clojure and I'm attempting to write a complete library for Discord Bots so... I have challenges ahead of me.#2017-01-2917:02yonatanelI wouldn't have thought a lib needs :main, but I'll keep that in mind next time something doesn't work.#2017-01-2917:03eslachanceWell, this is more a question of being able to use the lib from its own repl. Until now I'd been loading a "client" that used the library but doing lein install from the lib and reloading my client every time defeats the awesomeness of having a REPL in my IDE in the first place >.<#2017-01-2917:04eslachanceI daresay I probably just need to figure out a better workflow for development.#2017-01-2917:05eslachanceBut this is quite off topic of this channel.#2017-01-2917:22yonatanel@eslachance This is not cursive related at all, but I should have realized it much earlier. When init-ns is not defined, REPL uses :main: https://github.com/technomancy/leiningen/blob/master/sample.project.clj#L359#2017-01-2917:26eslachance:thinking_face:#2017-01-2917:26eslachanceI still have a lot to learn for sure.#2017-02-0112:35wilkerluciohello, is there a way to remove a keyword from cursive index? often times I typo a keyword for the first time, then I fix it, but the old still on index making it confusing on auto-complete time#2017-02-0113:55imrewill file/invalidate caches not do this?#2017-02-0114:58stijnany tips & tricks for an awfully slow repl window?#2017-02-0114:59stijnwhen editing#2017-02-0115:07stijnit seems to happen when I type (d/d and the repl tries to suggest requiring datomic.api#2017-02-0115:40imredoes it get better if you click on the bin? "clear output for current repl"#2017-02-0115:40imreI've had that problem with datomic#2017-02-0119:07okworiDoes anyone know why am getting this on IntelliJ IDEA sometimes No nREPL ack received#2017-02-0120:01genecHi, I just downloaded the intellij community ed and the installed cursive. following along with the website to setup the nrepl and the screenshots don't match and my lein nrepl options are greyed out, so I'm stuck on how to set this up#2017-02-0120:01danielcomptonCan you share a screenshot?#2017-02-0120:02genec@danielcompton sure, just a minute..#2017-02-0120:08danielcomptonOpen up project structure > modules#2017-02-0120:09danielcomptonIt looks like you might not have your Clojure project added as a module?#2017-02-0120:12genecI created the project with lein new app cursive-test#2017-02-0120:13genecthen opened it in intellij#2017-02-0120:49manutter51@genec I do (1) create with lein new … (2) Use “New -> From Existing Sources…”#2017-02-0120:49manutter51it should let you pick Leiningen as the project type, and then that will set up all your options correctly so you can do the REPL stuff#2017-02-0120:50manutter51I remember having similar issues when I first started because I was just opening up project dirs directly instead of using New -> From existing sources.#2017-02-0120:59genec@manutter51 bingo thank you! - the dialogs have changed a bit and you need to select the project.clj (not just the project directory). On the welcome screen you have to select import project and then select the project.clj file to import. Hope this helps some others who want to try intellij / cursive#2017-02-0121:03manutter51I don’t have to select project.clj. Just File -> New -> Create project from existing sources…, and then select the directory, then Import Project from External Model and click Leiningen.#2017-02-0121:03manutter51I’m using IntelliJ Ultimate, not the community edition, might be differences.#2017-02-0121:04manutter51Anyway, glad you’re past the hurdle at least.#2017-02-0121:08genecthanks for the help, is there any way to send a line or block of code from the editor to the repl? (without using the mouse/menu?) I'm used to F# and being able to alt+enter to execute lines of code.#2017-02-0121:10manutter51Yeah, if you look in Preferences under Keymap -> Clojure bindings there’s a bunch of shortcuts, including sending code to the repl#2017-02-0121:11manutter51plus stuff for navigating s-expressions#2017-02-0121:12genecwow - thanks#2017-02-0121:14manutter51:thumbsup:#2017-02-0121:15geneci think i need to upgrade to set the keybindings "current keymap cannot be modified"#2017-02-0122:46cfleming@genec No, that’s because you’re using a default keymap, and they’re immutable.#2017-02-0122:47cflemingYou have to copy it - see https://cursive-ide.com/userguide/keybindings.html#2017-02-0122:48cfleming@wilkerlucio Unfortunately no, I’m going to look at that index soon since it’s a bit funky.#2017-02-0122:48cflemingIt takes a long time to refresh.#2017-02-0122:49cfleming@simon That can happen if your app takes a very long time to initialise - try increasing the timeout at Settings-&gt;Languages &amp; Frameworks-&gt;Clojure-&gt;REPL startup timeout#2017-02-0122:49cflemingYou can also get that message if your app totally fails to start for some reason.#2017-02-0122:59okwori@cfleming Thanks! Increased the timeout, Works good now!#2017-02-0208:55onetomI have the Pretty print REPL return values option turned on, but stuff like this is still printed on one line:
#:leg{:type :deal.type/debt, :name "THB2", :notional 0.09910630621016026M, :approvers (80036268446 80000000011 80000000011 80002468449 80000196969 80000000115 80005377614 80000000010 80000002185 80000001790 80528517827 80216627550 80000065180 80000000006 80266192270 80004259760 80000005519 80000000001 80006428687 80000004925 80000000009 80008505703 80000008015 80000097148), :events (:xfer :init :xfer :init :xfer :init :init :init :init :xfer :init :xfer)}
is there any magical reason for it?
#2017-02-0208:56onetomah, without that #:leg tag it works. i guess i should use the EAP version then#2017-02-0208:59onetomok, sorry for the noise, i see it's already filed as an issue: https://github.com/cursive-ide/cursive/issues/1648#2017-02-0209:14rackdonHi, I’m trying this plugin and I have seen that allows running test with Run tests in current NS in REP. My problem is that I don’t have this option available… Anyone have the same problem?#2017-02-0209:14rackdonI also added a keymap but this option does not work for me 😔#2017-02-0209:24onetomi use it all the time#2017-02-0209:26onetomyou have to have a REPL open first, otherwise those options are disabled#2017-02-0209:27onetom@rackdon ^^^#2017-02-0209:27rackdonyep, I have the repl running#2017-02-0209:28onetomcan we screenshare somehow quickly? using https://appear.in for example?#2017-02-0210:33val_waeselynckjust moved a project to a new work station. When trying to run the REPL from Cursive, I get an error: 11:30 Error running REPL: '1.8' is bad configured.#2017-02-0210:33val_waeselynck@cfleming any idea what may have caused that ?#2017-02-0210:34val_waeselynckI have no problem running a REPL with lein repl#2017-02-0210:36stijnmy guess: you don't have a JDK that's called 1.8#2017-02-0210:37stijnFile > Project Structure you can see the available SDKs#2017-02-0210:46val_waeselynck@stijn worked, thanks!#2017-02-0211:09cfleming@rackdon Those options don’t work with clojure.main REPLs - are you running one of those, or an nREPL one?#2017-02-0211:10rackdonohhh @cfleming you’re right. The problem was there. Thank you very much!!!#2017-02-0223:13liamdis there a way to debug an app started with lein ring server-headless?#2017-02-0223:13liamdset breakpoints and all taht#2017-02-0300:58cfleming@liamd Yes, there are two ways, depending whether you want to run it within the IDE or in a terminal.#2017-02-0300:59cflemingIf you want to run it in the IDE, then you should be able to create a lein run config, turn on trampoline and just debug it.#2017-02-0301:01cflemingIf you want to run it in a terminal, it’s a little more complicated. First, create a remote debug Run Config (called “Remote” - this is not the remote REPL option). Copy the “Command line arguments for running remote JVM”, and then put those in your Leiningen project.clj (under :jvm-args IIRC, but I’m not 100%). You might want to change suspend=y in the arguments, this will cause the JVM to pause at startup until the debugger connects.#2017-02-0301:02cflemingThen you can run your app as normal on the command line, the JVM will start in debug mode and you’ll be able to run your Remote config to connect to it.#2017-02-0304:23onetomis there a way to tell the Cursive Remote nREPL to evaluate some expressions on connection? i want to run this (set! *print-namespace-maps* false), but since it's a dynamic var, every REPL connection has its own copy... i tried this in my build.boot but no effect:
(repl :server true    :eval '(set! *print-namespace-maps* false))
#2017-02-0304:24cfleming@onetom Note that that will not do what you want - see here for discussion: https://groups.google.com/d/topic/cursive/BF0r1qsPm-w/discussion#2017-02-0304:24cflemingThe TLDR is that Cursive pretty-prints on the client side, and it’s not currently configurable.#2017-02-0304:25cflemingWhen I get a moment I’m going to think about whether that’s just a terrible idea or not.#2017-02-0304:25onetomand there is no way to control that client side, right?#2017-02-0304:25cflemingNot at the moment, no, sorry#2017-02-0304:25onetomthanks!#2017-02-0304:26onetomcan i configure which clojure version is that client side using?#2017-02-0304:27onetombecause i would to try it with alpha14, which might already pretty-print correctly#2017-02-0323:02hlshipIs there an easy way to get Cursive to run all tests in all test namespaces? I find that cycling through the namespaces one at a time is a problem (likely to miss one) but having to do it at the command line is a problem (load times and all that).#2017-02-0323:25cfleming@hlship No, but I’m planning to add this soon.#2017-02-0323:26cfleming@onetom No, but I’ll fix that issue for the next release.#2017-02-0323:26cflemingCursive uses fipp, which is independent of the Clojure version.#2017-02-0408:29lsenta@hlship Have you tried using something like https://github.com/jakemcc/lein-test-refresh to run all your tests, all the time in a REPL?#2017-02-0408:30lsentaI'd use cursive to run the tests in the namespace I'm currently working on, and keep an eye on the whole test suite from the command line.#2017-02-0409:03rauh@onetom FYI: There is a hack so you can avoid printing the namespaced maps:#2017-02-0409:03rauh
(alter-var-root #'clojure.core/lift-ns (fn [_] nil))
(defmethod print-method clojure.lang.IPersistentMap [m, ^java.io.Writer w]
  ((var clojure.core/print-meta) m w)
  ((var clojure.core/print-map) m (var clojure.core/pr-on) w))
#2017-02-0423:10cfleming@nicoschneider Can you send me a copy of your logs? Help-&gt;Show log in Finder…, and mail it to <mailto:/cdn-cgi/l/email-protection|/cdn-cgi/l/email-protection>#2017-02-0423:21nicoschneider@cfleming I already resolved it. The problem was caused by an incompatible EAP plugin that did nothing good anyway, so, sorry for the disturbance#2017-02-0423:21cflemingOh ok, great. Which plugin was it, out of curiosity?#2017-02-0423:23nicoschneider“Halik Early Access” (https://meet.halik.io/), it read kinda interesting in the plugin dialog. Seemed to do nothing, I just forgot to uninstall it a while back.#2017-02-0423:24cflemingOh interesting - Halik did indeed look cool. I’m in contact with the author and I’m waiting for him to open source it.#2017-02-0423:24cflemingI’d like something like that in Cursive.#2017-02-0423:25nicoschneiderAbsolutely!#2017-02-0516:07pupenoI find Cursive gets a bit confused when there's another Cursive project in checkouts#2017-02-0520:39cfleming@zerocooljs Someone else reported this too. I’ve created a dev build with some logging to try to track this down.#2017-02-0520:40cflemingGo to https://plugins.jetbrains.com/idea/plugin/8090-cursive, and where you see the list of published versions, click on “dev”. Download a copy of 1.5.0-snapshot1 for the version of IntelliJ you’re using, and install it using Settings-&gt;Plugins-&gt;Install from Disk…. Once you’ve restarted, go to Help-&gt;Debug Log Settings… and enter cursive.stubs into the box. Then reproduce the problem, and send me the log from Help-&gt;Show log in Finder/Explorer to <mailto:/cdn-cgi/l/email-protection|/cdn-cgi/l/email-protection>.#2017-02-0520:41cflemingNote that this will send me the classpath from your current project, which will probably include things like the project name in paths etc, and any super-secret deps you might have attached. If that’s a problem, let me know.#2017-02-0520:41cfleming@pupeno Define “confused"#2017-02-0522:27zerocooljs@cfleming I just send you the email with the logs#2017-02-0522:27zerocooljsplease tell me when you fix the issue#2017-02-0522:59pupeno@cfleming I added free-form to checkouts in free-form-example and I got a new file, free-form-1.iml in the free form folder. Then it apparently moved a file from runCommands from free-form to free-form-examples.#2017-02-0523:00pupenoAnd generally, it added awareness of the free-form project to free-form-examples when it was only a temporary move, so, I had to revert a bunch of changes in config files.#2017-02-0617:40roelofit it wise for production code (hobby) to use eap builds or can I better use the stable builds ?#2017-02-0618:20roelofand can I open a namespace instead of switching to it. I sometimes need (ns ... ) instead of (in-ns .... ) ?#2017-02-0618:29wilkerluciohello, question: is it possible to search on Cursive REPL output?#2017-02-0620:58cfleming@wilkerlucio Yes, you should be able to Tools-&gt;REPL-&gt;Jump to REPL output pane and then search as normal.#2017-02-0621:15wilkerlucio@cfleming humm, after I go to that menu I see the REPL being selected, I tried to cmd+f but doesn't seems to do anything, and just typing moves the cursor to the REPL input part, what I'm missing?#2017-02-0621:16cfleming@wilkerlucio After selecting that, is your caret in the input part or the output part?#2017-02-0621:16wilkerlucioafter selection on output#2017-02-0621:16wilkerluciosame as if I click in any part of the REPL output#2017-02-0621:19wilkerluciocmd+f?#2017-02-0621:19cflemingYeah#2017-02-0621:19wilkerlucioweird#2017-02-0621:20cflemingIf I use the jump action, or click in the output pane, and then Cmd-F, I can search there like normal.#2017-02-0621:20cflemingTyping does move focus to the input area.#2017-02-0621:20cflemingBut Cmd-F does not.#2017-02-0621:20wilkerluciocmd-f doesn't jump to input, it just doesn't do anything#2017-02-0621:21cflemingThat’s really weird.#2017-02-0621:21wilkerlucioyou think it can be different key bind for it?#2017-02-0621:21cflemingWhat if you use the Edit menu item?#2017-02-0621:22wilkerlucioups, I think I might have found it#2017-02-0621:22wilkerluciocan you please tell me what command is set on your cmd+f?#2017-02-0621:22cflemingFind...#2017-02-0621:23cflemingIf I look under Edit->Find, I see Find… mapped to Cmd-F#2017-02-0621:23wilkerlucioSorry, my bad, I did replaced my cmd+f to be "Replace..." because it's more convenient overall#2017-02-0621:23cflemingAh, that might explain it 🙂#2017-02-0621:24cflemingReplace probably doesn’t work in a read-only buffer, since you can’t replace anything obviously.#2017-02-0621:24wilkerlucioyeah, would be good fallback if it goes to Search when it's not available, but it#2017-02-0621:24wilkerlucioits a clear edge case#2017-02-0621:25wilkerluciothanks for staying with me on this @cfleming 🙂#2017-02-0621:25cflemingNo worries!#2017-02-0621:26cfleming@roelof You can use EAP builds just fine, as long as they don’t have bugs which affect you.#2017-02-0621:26cflemingI’m not sure I understand your ns question though.#2017-02-0721:48hlshipTwo element PersistentVector, but it only displays a single value from it. And, of course, I need the index 1 element!#2017-02-0721:58cfleming@hlship What that almost certainly means is that the other value is null.#2017-02-0721:59cflemingIntelliJ has a debugger option which hides null values in collections, one sec...#2017-02-0721:59hlshipThat’s somewhat reassuring.#2017-02-0722:00cflemingSettings-&gt;B, E, D-&gt;Debugger-&gt;Data Views-&gt;Java-&gt;Hide null array elements#2017-02-0722:00cflemingSo you already had that turned off?#2017-02-0722:01hlshipNo, just turned if off. Left the screen grab for the next poor sob who hits this.#2017-02-0722:01cflemingYeah, that’s an annoying default, that one.#2017-02-0803:49onetomi've just started using clojure.spec but as i see there is no explicit support for it yet. what's the recommended way to resolve the clojure.spec/fdef macro?#2017-02-0804:01onetomif i resolve it as def then i must make sure the fdef comes before the function definition, otherwise it masks out the actual function definition, right?#2017-02-0806:29roelofHow can I enable EAP builds with cursive ?#2017-02-0809:42gravI’m starting up my Figwheel CLJS repl using the Use clojure.main in normal JVM process option in the Run Configurations. That means I do not have any test integrations. Is it possible to have this together with Figwheel somehow?#2017-02-0809:43grav@roelof It’s at the bottom of this page: https://cursive-ide.com/userguide/ (Choosing to receive EAP (beta) builds)#2017-02-0811:32roelofThanks, there seem to be no eap builds at the moment#2017-02-0820:01favila@nicoschneider in your code, put cursor on the symbol you want to custom-resolve, alt+enter (or click the lightbulb) and click "Resolve XXX as ..."#2017-02-0820:02favilayou can only add entries from the editor view, not this settings page
#2017-02-0820:02nicoschneider@favila nice, thanks! typical atlassian?? ;D @onetom is the interested party tho, i think 🙂#2017-02-0820:02nicoschneideri mean, there’s a minus button :face_with_rolling_eyes:#2017-02-0820:03favilayeah, it's just for showing and deleting#2017-02-0820:03favilanot sure how atlassian is involved?#2017-02-0820:03nicoschneiderjetbrains, sorry#2017-02-0820:03favilaI didn't know about that setting page until now#2017-02-0820:03nicoschneidergetting my services all confused ;D#2017-02-0820:04favilathis is a cursive feature, so you have Colin to "blame" for that#2017-02-0820:05favilaI suspect there's some technical reason why ad-hoc entry of items is harder, but I don't know#2017-02-0823:52cfleming@favila @onetom @nicoschneider I’d like to be able to claim some deep underlying motivation, but the truth is it’s just something I haven’t got around to.#2017-02-0902:43tianshuI'm trying to install cursive for clojure development. Cursive will download leiningen(although there's lein available on PATH) but failed. Now I want to manually put the leiningen leiningen-2.7.1-standalone.jar somewhere that Cursive can locate it. How can I achieve?#2017-02-0902:43cfleming@doglooksgood Cursive will use the one in ~/.lein/self-installs like lein itself does.#2017-02-0902:44tianshumy ~/.lein/self-installs is empty, maybe this is because my leiningen is installed via homebrew? I will have a try#2017-02-0902:45cflemingInteresting, do you know where homebrew leaves it?#2017-02-0902:45cflemingI wonder if there’s any way to have Cursive pick those up too.#2017-02-0902:45tianshuYes I know#2017-02-0902:46tianshuNow I copy this jar to ~/.lein/self-installs and It works, thanks!#2017-02-0902:46tianshuthe jar installed by homebrew is located at /usr/local/Celler/leiningen/2.7.1/libexec/#2017-02-0902:48tianshuBTW, It's there any trick to help me figure out where the file from and path the file will be placed when I know there's process is downloading something?#2017-02-0902:48cflemingHmm, I wonder if I can figure that out somehow without hard-coding it.#2017-02-0902:48cflemingWhich OS are you using?#2017-02-0902:49tianshumacos#2017-02-0902:50cflemingThere are various answers here: https://apple.stackexchange.com/questions/14409/how-to-monitor-file-access-for-an-os-x-application - looks like Instruments might be the tidiest option if you have XCode installed.#2017-02-0902:50tianshuThanks, I'll take a look!#2017-02-0902:55tianshu@cfleming Just realized you are the author of Cursive, awesome!#2017-02-0902:58cfleming@doglooksgood I am!#2017-02-0902:58cflemingI’m planning to work on the Parinfer impl soon too, don’t worry 🙂#2017-02-0902:58tianshuwhy Cursive not ship a second completion system from REPL. maybe that can have better perform for macros?#2017-02-0902:59cflemingIt does when you’re working in the REPL, but that doesn’t work when you’re in your editor.#2017-02-0902:59cflemingThe problem is that IntelliJ needs to resolve symbols all the time, for things like inspections.#2017-02-0903:00cflemingEmacs etc only need that info on a user action (doc lookup, navigation etc)#2017-02-0903:10tianshuJust not comfortable to see that there's a lot of stuffs can not resolve. I've see https://cursive-ide.com/userguide/macros.html And I want to use it on following code:
(defstate |datasource  ;; | is my cursor
  :start
  (make-datasource db-spec)
  :stop
  (close-datasource datasource))
the datasource is unable to resolved here, but nothing popup after press Alt-Enter .
#2017-02-0903:20cfleming@doglooksgood You want your caret on the defstate#2017-02-0903:20cflemingI just realised that’s ambiguous in the screenshots, I’ll clarify that doc.#2017-02-0903:26tianshuthat works, but where the information will be stored, If someone else clone the repo, how can he got this configuration. should I commit .idea and *.iml?#2017-02-0903:28cflemingSo this is a problem right now, see: https://groups.google.com/d/topic/cursive/FcHwzTpPUuo/discussion#2017-02-0903:28cflemingI’m still not sure what the best solution is.#2017-02-0903:28cflemingEventually this will be handled with a public API and a repo users can contribute to.#2017-02-0903:28cflemingBut there’s also a need for project-specific customisations.#2017-02-0903:38tianshumaybe a repo is not the solution for in-house macros. and commit configuration with project is somehow most convenient way for team.#2017-02-0904:44tianshuThe parinfer on Cursive works great, I prefer to use it with paredit.#2017-02-0911:17tianshudoes cursive have feature for aligning code?
(let [x    1
      yyyy 2]
  xx)
#2017-02-0911:21tianshuI thought it will format map literals, but not let binding form.#2017-02-0912:37danielcomptonYep code style settings#2017-02-0912:37danielcomptonAlign let bindings iirc#2017-02-0912:51gravIs it possible to get IDEA to halt when a unit-test throws an exception?#2017-02-0914:12tianshu@danielcompton thanks!#2017-02-0920:02cfleming@grav What do you mean “to halt” - to stop the running tests?#2017-02-0920:03gravHalt is the wrong expression -I mean to leave me hanging in the debugger. Actually I did find kind of a solution, namely to enable breaking on all exception. But that means that all other exceptions also trigger the debugger#2017-02-0920:10cemerickIs anyone using IdeaVim happily? AFAICT, it's…pretty poor#2017-02-0920:11cemerickThere's very positive comments about it here and there (and very strong reviews FWIW), so I wonder if there's something badly wrong in my env#2017-02-0920:16grav@cfleming So for instance, running the foo-test below will break on both the handled and unhandled exception. I only want to break on the unhandled one in (defn foo …#2017-02-0920:16grav
(ns foo-test
  (:require [clojure.test :refer :all]))

(defn foo []
  (throw (Exception.))
  "foo")

(deftest foo-test
  (let [expected (try (throw (Exception.))
                      (catch Exception e "foo"))
        x (foo)]
    (is (= x expected))))
#2017-02-0920:49cfleming@cemerick I’m not a vim person myself, but I’ve heard “about the same level of emulation as evil-mode” from people who sound like they know what they’re talking about.#2017-02-0920:49cflemingAre there specific things you’re missing?#2017-02-0920:51cfleming@grav Ok, so you have an exception breakpoint set, right?#2017-02-0920:52cflemingGo to Run-&gt;View Breakpoints…, then select your breakpoint. There are options there for only breaking on caught or uncaught exceptions.#2017-02-0920:52cflemingIs that what you’re after?#2017-02-0920:53cemerick@cfleming Interesting. I was using evil for some years, and I would not say that.#2017-02-0920:55cemerickReally simple stuff seems missing and/or really wrong. %, d%, c%, all the specific bracket edit stuff (`ci[`, etc)#2017-02-0920:55cemerickI know everyone has their own 80% of vim they use, but that seems like really basic things for any lisper using vim#2017-02-0920:56cflemingI have it on my to-do list to figure out what all that stuff really means.#2017-02-0920:56cflemingBut I’m planning to patch IdeaVim to work better with Cursive at some point.#2017-02-0920:56cemerickI ended up disabling it because it was frustrating enough (and slowed every typing action, a separate issue)#2017-02-0920:56cflemingIn particular, ESC in the REPL editor needs fixing.#2017-02-0920:56cemericknever even got that far, honestly#2017-02-0920:56cflemingHmm, interesting.#2017-02-0920:57cemerickeven stuff for plain text editing, e.g. in .md buffers#2017-02-0920:58cemerickgq was always a no-op, % never worked (again, outside of cursive buffers), and Shift-up or down bizarrely seemed mapped to something like-but-not-quite pageup/down#2017-02-0920:58cemerickanyway#2017-02-0920:58cemerickI've sort of made my peace with not having vim keybindings for Clojure stuff, but I sorely need to work out an alternative editor for things like markdown, etc#2017-02-0920:58cemerickwas hoping to make intellij a one-stop shop#2017-02-0920:58cflemingIf you like I can put you in touch with the guy I was talking to about it.#2017-02-0920:59cemerickmeh 😛#2017-02-0920:59cflemingHe may have solutions for you.#2017-02-0920:59cemerickI have a week or two of serious heads-down to get through, not going to fart around with tools any#2017-02-0921:00cflemingOk, if you decide to try again let me know, I’m definitely interested in making the experience better, but am totally unqualified to do so on my own.#2017-02-0921:32cyclocross@cemerick i’ve used ideavim for years outside of cursive for years without issues. At least for my 80% of vim 🙂#2017-02-0921:33cyclocross% for instance works flawlessly for me. Ideavim in the repl is broken in many ways best i can tell. But i use paredit for clojure and turn off vim.#2017-02-1008:30cemerickcyclocross: Interesting, okay. I guess I'll try again in a while.#2017-02-1008:31cemerickhow is performance? I felt significant keystroke response latency, esp moving around in normal mode.#2017-02-1014:24cyclocrossI’ve not had a performance problem with Ideavim, I see no lag whatsoever when moving around, searching, jumping to marks etc. I suspect your problems are from a plugin somewhere. Are you using just basic intellij with cursive?#2017-02-0921:51cfleming@cyclocross Is IdeaVim in the REPL broken in more ways than just the ESC problem?#2017-02-0921:52cflemingI know that’s pretty fundamental, but it’s the only problem I’m aware of there.#2017-02-0921:58cyclocross@cfleming Y, it’s really hard to tell what else is wrong if anything, since i’m stuck in insert mode 🙂 But inserting text seems fine.#2017-02-1002:36tianshuIs there a shortcut for toggle CLJ/CLJS REPL#2017-02-1002:36tianshuthe button is too small, hard to click.#2017-02-1002:37cfleming@doglooksgood No, but generally it switches itself when it needs to.#2017-02-1002:37cflemingNote that that toggle doesn’t affect the state of the REPL at all, i.e. it does not switch the REPL from clj to cljs#2017-02-1002:38cflemingIt’s there because cljs REPLs are often layered over clj ones. So when you run your cljs REPL inside a clj REPL, Cursive had no way to know when that had happened.#2017-02-1002:38cflemingIt now tries to detect that case by looking for known output strings, but it’s not perfect.#2017-02-1002:40tianshuIf I use figwheel, I should start figwheel, then type (cljs-repl) in REPL, and It switches to cljs. What should I do if I want to type some clojure code, quit cljs by :cljs/quit?#2017-02-1002:41cflemingRight now, yes, or you could start another clj REPL - you can have multiple REPLs open in tabs.#2017-02-1002:41cflemingI’m working on a combined clj/cljs REPL but there isn’t one yet.#2017-02-1002:43tianshuIt seems that when cljs REPL start, the clj REPL is still there. so maybe: when the cljs REPL connected, cursive should make another connect to that nREPL?#2017-02-1002:45cflemingYes, that’s what I’m planning, but it’s hard to do automatically without having an integrated REPL solution. For example, many cljs projects don’t use nREPL.#2017-02-1002:45cflemingBut you can do that by starting Figwheel in one REPL, and then connecting another REPL to its nREPL server using a Remote REPL run config.#2017-02-1002:49tianshuIf I understand correctly, this button here now is a indicator instead of a switcher#2017-02-1003:01cfleming@doglooksgood Well, sort of. Cursive does use its state - how completion works in the REPL depends on that switch, because CLJS completion is different to clj completion. Cursive will also prevent you from loading Clojure code into a CLJS REPL.#2017-02-1003:02cflemingHowever Cursive does try to switch it, so it’s like an indicator of what Cursive thinks your REPL is doing (which does affect behaviour) which you can fix if it gets it wrong.#2017-02-1003:05tianshuthanks for explaining in detail!#2017-02-1003:06cflemingNo problem! It would be even better if I documented it 🙂#2017-02-1007:48grav@cfleming Re: breaking - no I haven’t set any breakpoints myself. I’ve set “Break on all exceptions”, but I actually want “Break on all uncaught exceptions", regarding my example snippet#2017-02-1015:59rauhIs there a way to get the full stacktrace when using "Print last exception" command?#2017-02-1018:16hlshipIs disabling of locals clearing known to work? In my experience, with the debugger, I still see locals getting cleared all the time, regardless of the setting of the button.#2017-02-1018:17hlshipFYI: IntelliJ IDEA 2016.3.4and Clojure 1.9-alpha-14.#2017-02-1018:22Alex Miller (Clojure team)from a compiler perspective, it works afaik#2017-02-1018:23Alex Miller (Clojure team)and I do see locals when I use Cursive debugger#2017-02-1018:54hlshipI’m glad it works for someone! I wonder what’s going on in my environment?#2017-02-1018:57manutter51@hlship plugin conflict? I had some weird interactions between Cursive and the Elixir plugin a while back. It was early versions, and hasn’t been a problem for the last several releases, but for a while I couldn’t use Cursive if the Elixir plugin was there.#2017-02-1019:17hlshipHard to say, but I’m not using many plugins. I’m watching what’s going on, when it works and when it doesn’t. May be related to reloading code.#2017-02-1103:24cfleming@hlship are you using AOT?#2017-02-1104:01cfleming@hlship If you are AOTing, one thing to bear in mind is that locals clearing only takes effect when code is compiled, so you’d have to AOT with that flag set. Otherwise you can just reload the namespaces you want to debug, and the flag will take effect then because the code is compiled at that point.#2017-02-1118:56hlshipNo, no using AOT. Yes, I think it seems better when reloading code, also sometimes breakpoints don’t work until code is reloaded. Lots of leaky abstractions going on!#2017-02-1121:07cfleming@hlship I wonder if your code is getting loaded before Cursive can set that flag. IIRC you can set that flag via system properties, but I can’t check the details right now.#2017-02-1200:27maksimrvHello, I have a question about a repl for clojurescript doge I use leiningen in a project, so start a repl is pretty easy. Inside the repl's window, I have changed clj on cljs and now I can evaluate a simple expression which does not require browser environment, for example (+ 2 2). But when I try to evaluate something like (.log js/console "Hy!") I get expected exception No such namespace: js. So my question how could I connect a browser to the started from IDEA repl? And if it possible add connection step to the Run configuration Thanks!#2017-02-1208:07cfleming@maksimrv This was actually just discussed yesterday: https://clojurians.slack.com/archives/cursive/p1486694190001705#2017-02-1220:51onetom@lucascs welcome! happy to see you here!#2017-02-1223:17lucascsonetom: Thanks! =D#2017-02-1308:14gravI get this one Cannot init ReplState component state: encoded string too long: 97607 bytes#2017-02-1308:14gravwhen starting a repl. Only hit in Google points to an old conversation from this channel, which doesn’t seem to have a solution: https://clojurians-log.clojureverse.org/cursive/2016-12-09.html#2017-02-1308:49cfleming@grav Yes, the solution is in there: If you delete <project>/.idea/replstate.xml, you’ll lose your REPL history but it should fix the problem.#2017-02-1308:49cflemingSeems like it fixed it for him.#2017-02-1308:50gravThanks! I’ll report if it doesn’t work 😉#2017-02-1308:53gravSeems it got fixed by itself, somehow (I restarted IDEA at some point). This is my current replstate.xml:
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
  <component name="ReplState" timestamp="1486975892603">{:repl-history {:ide [], :local [], :remote []}}</component>
</project>
and the error is gone.
#2017-02-1316:32maksimrv@cfleming Thanks, But my question is sort of a newbie. I don't understand how to create a run configuration for Clojure script repl(brepl). I use mies[1] as template. I select Clojure REPL -> 'Local repl' -> 'Run nRepl with leiningen' -> Run. It starts repl with badge clj, so when I try to send code from Clojure script file to the repl it shows the error message, I'm smart and I switch clj to cljs (I understand that this switch does not start clojurescript repl but it allows me send code to the repl). But when I try to eval (.log js/console ) I see error ‘no such namespace js'. I have red about integration Cursive with brepl and there steps like: 1. Run brepl from terminal 2. Open browser on specific url 3. Connect to repl using 'Remote repl' 4. Eval (run) and (browser-repl) So is it possible run brepl without terminal and browser steps? Like it did for Clojure repl, no extra steps 🙂 Thanks [1] - https://github.com/swannodette/mies#2017-02-1319:26kidpolloI had to re-image my computer. I reinstalled Intellij after the computer was re-imaged and installed cursive. After restoring settings.jar I cant do anything because I get this error from cursive all the time. Error running Unnamed: '1.8' is bad configured#2017-02-1319:27kidpolloanyone else have a problem like this?#2017-02-1319:30favilamissing jdk setting?#2017-02-1319:31favilaproject structure -> SDKs#2017-02-1319:31favilamake sure you have a '1.8' jdk entry#2017-02-1319:31favilaand that its paths look reasonable#2017-02-1319:32favila@kidpollo ^#2017-02-1319:32kidpollohmm I thought I configured it the first time let me check#2017-02-1319:33kidpollough you are right#2017-02-1319:33kidpollothe project had outdated jdk stuff#2017-02-1319:34kidpolloI thought that did not persist#2017-02-1319:48favilaAFAIK the sdk config is global, but specific to an install#2017-02-1319:48favilabut the project files contain a reference to an sdk name, so they know which jdk to use to run stuff#2017-02-1320:33cflemingYeah, that’s right - if you check a project out from source control or whatever, you’ll need to create an SDK with the same name as you used previously.#2017-02-1320:37cfleming@maksimrv So right now, there’s no built in one-step CLJS REPL, but that’s one of the next things I’m going to work on.#2017-02-1417:39timgilbertHey, is there a way to have a repl configuration automatically send a few commands down the wire after it gets initialized? (Not a big deal, I'm just a bit too lazy to always type in my user-defined (go!) task as soon as I connect)#2017-02-1420:48jumar@timgilbert I’m not sure, but you can always create a “Live Template” for your commands and make it a little bit easier#2017-02-1421:02timgilbertOh, I'll try that, thanks#2017-02-1422:50cfleming@denik I’m working on a way to make that less intrusive now.#2017-02-1422:50cflemingWhat happens when you click generate?#2017-02-1422:56denik@cfleming it goes away and comes back later#2017-02-1422:56denikor it appears for every new file#2017-02-1423:09cflemingSo you don’t get an error when generating the stubs?#2017-02-1423:10cfleming@denik ^^#2017-02-1423:15denik@cfleming seems like I don’t. I remember the issue from a couple months back and haven’t used it since then. Are the stubs supposed to be visible? Because clicking generate also did nothing in the file.#2017-02-1423:15denik@cfleming maybe the message / analysis was outdated?#2017-02-1423:17cfleming@denik I’m not sure. I’ll create a dev build with more logging around this, if you don’t mind trying it to see if we can diagnose the problem.#2017-02-1423:19cfleming@timgilbert You should be able to do that using a user.clj, no Cursive interaction necessary. See e.g. https://stackoverflow.com/a/36239223/155368#2017-02-1423:37timgilbertThanks @cfleming, will look into that#2017-02-1502:18tianshu@maksimrv Are you using figwheel?#2017-02-1511:12danielgrosseAs there are tests possible via the Tools> REPL command, I want to know, if it is possible to run unit tests within Intellij which are constantely rerunning#2017-02-1513:37achikinHi everyone!#2017-02-1513:38achikinI have lein-sassc in my leiningen project and cursive can’t run it, failing with error Cannot run program “sassc”: error=2, No such file or directory#2017-02-1513:39achikinI know this have been discussed before. Is there any solution for it now?#2017-02-1514:03tianshuIf I print something in a web request handler, after I request, where can I find the print message?#2017-02-1514:58tianshuparinfer is hard to use without paren mode...#2017-02-1521:58cfleming@danielgrosse Not yet, that’s something I’m planning to add soon.#2017-02-1521:59maksimrv@doglooksgood No, I have tried mies[1]. As I understand, it’s minimal setup for clojurescript. Now I use jarohen/simple-brepl, which requires to run the repl in terminal, after that run repl in IDEA, then type some expression like simple-brepl in IDEA’s repl, then write some code in the source file which connects to the repl by socket and then finally I open my project in the browser 🙂 Only after these steps I can execute commands in repl [1] mies - https://github.com/swannodette/mies/blob/master/src/leiningen/new/mies/project.clj#2017-02-1522:03cfleming@achikin Unfortunately it looks like lein-sassc doesn’t let you provide a full path to the sassc binary#2017-02-1522:04cflemingI’m not sure how shell/sh treats your environment.#2017-02-1522:06cfleming@doglooksgood Does it not come out in the REPL output?#2017-02-1522:30achikin@cfleming Thank you for the answer! I’ve removed lein-sassc from :hooks and repl starts ok. We wanted to remove it from hooks anyway, because it runs on every task (migrate, etc)#2017-02-1600:54kennyHas there been any solution to the awful namespaced maps printing in the Cursive REPL with clojure 1.9.0? It hurts my eyes to stare at a long list of namespaced maps 😩#2017-02-1601:11tianshu@cfleming yes, It doesn't come out. It seems like the print only appear when I execute code in REPL or send code to REPL.#2017-02-1602:39cfleming@kenny Yes, it’s fixed and will be in the next build.#2017-02-1602:43kenny@cfleming Oh that's awesome. Thank you!#2017-02-1604:05cflemingHi everyone, I’ve uploaded a dev build with some fixes to the stub generation, and more useful logging when things go wrong. If you’ve been having problems with it, please give it a try and let me know if it helps.#2017-02-1604:06cflemingGo to https://plugins.jetbrains.com/idea/plugin/8090-cursive, and where you see the list of published versions, click on “dev”. Download a copy of 1.5.0-snapshot2 for the version of IntelliJ you’re using, and install it using Settings-&gt;Plugins-&gt;Install from Disk….#2017-02-1604:06cflemingIf you’re still having problems, go to Help-&gt;Debug Log Settings… and enter cursive.stubs into the box. Then reproduce the problem, and send me the log from Help-&gt;Show log in Finder/Explorer.#2017-02-1604:07cflemingNote that this will send me the classpath from your current project, which will probably include things like the project name in paths etc, and any super-secret deps you might have attached. If that’s a problem, let me know.#2017-02-1604:07cflemingcc: @denik @wilkerlucio#2017-02-1604:08cfleming@kenny That build also has the formatting fix if you want to try it.#2017-02-1604:21kenny@cfleming Okay, I'll give it a try. Will I still get notified of updates automatically if I do the manual install?#2017-02-1607:14cfleming@kenny Yes, you will.#2017-02-1614:52Joe R. SmithIs it possible to set indentation rules for unrecognized symbols?#2017-02-1614:53Joe R. Smiththe intellij “lightbulb” helper thing will only show “create function” as as long as the symbol in the function position is unresolvable#2017-02-1619:08wilkerlucio@solussd I don't think so, because it has to index the symbol globally, otherwise it would have to have specific rules for each namespace. if your issue is because the symbol is coming from a macro or something, you can use (declare your-symbol) so cursive will have some place to point it at#2017-02-1620:20Joe R. Smith@wilkerlucio my issue was boot symbols from the implicitly required boot.core namespace. My “fix” was to explicitly require the symbols and add a symlink to my build.boot file in my src directory.#2017-02-1621:36hairfireI'm doing research into Cursive for our company. I've managed to do integrated debugging (e.g., Step Into, Step Over) in Clojure code. Can one do the same kind of debugging in ClojureScript/Figwheel? Thanks!#2017-02-1621:37cfleming@hairfire Not yet, unfortunately. I am planning to add that (in a “sometime this year” sort of timeframe) but it’s not there yet.#2017-02-1621:37cflemingThere are external tools like dirac and cljs-devtools, which are tricky to set up but very powerful. Depending on your use case they might work well for you.#2017-02-1621:37hairfireOk, thanks! BTW, Cursive is really good!#2017-02-1621:38cflemingThanks! I’m glad you like it!#2017-02-1713:22okworiI noticed the function valueOf of enum type throws an arity error when a single String value is supplied as it is expecting two parameters but it works on run time. Can someone help fix this? It really nice if you don't see some red warning on your code.#2017-02-1715:42zyloxhey guys, i'm trying to pick up cursive and i had a question about its symbol resolution. I see there is a closed issue to make it support prismatic schema, which i used heavily in the projects im dealing with. Problem i'm having is we have used schema.potemkin/import-vars on the majority of the library as an attempt to provide a light wrapper. This seems to break the symbol resolution of cursive (not unjustly either). What i'm wondering is if there is any way i can muck about with the config for that to make it point at my wrapper instead. I noticed some comments on issues mentioning there are xml files that can be mucked with, but i'm on os x and for the life of me cant find these files. TL;DR: is it possible to manually redirect the symbol resolution?#2017-02-1715:51mishagreetings, does anyone know why I get std lib functions recognized in figwheel-in-cursive repl in one project, but not in another? (same project.clj files' content with regard to cljs-build/fw)#2017-02-1715:59misha(and yes, it it an unrecognized symbol highlight, not an arity error.) though unrecognized forms work just fine, I am curious what triggers "visual" recognition.#2017-02-1718:13tjtoltonso, cursive comes with its own installation of leiningen, right? Where does its .lein info go?#2017-02-1810:07seantempestaI was thinking about combining my clojurescript project (client) and my clojure project (server) into the same project so I can share some code, but I’m worried I’ll have problems with cursive. If I start two repl’s, will everything work? How will I be able to send code to the repl? Meaning, how would cursive know which repl to send code to?#2017-02-1908:49cfleming@simon Can you send a short code example I can try?#2017-02-1908:50cfleming@zylox Interesting, I didn’t know schema had it’s own version. Could you file an issue to support that and I’ll add it? Cursive already supports the native Potemkin one, hopefully should be trivial.#2017-02-1908:51cfleming@misha No, I’m not sure - that’s very odd.#2017-02-1908:51cfleming@tjtolton Cursive will actually download leiningen on first use if it’s not already installed. It will put them in .lein/self-installs just like lein does.#2017-02-1908:53cfleming@seantempesta That should work fine. Cursive will use the currently active REPL, i.e. you’ll have to switch the tabs to send to one or the other. I’m planning a combined REPL that will send to one or the other depending on file type, but that’s not there yet.#2017-02-1908:54seantempesta@cfleming: Cool. Thanks for the info. And keep up the great work! I probably wouldn’t be using Clojure without Cursive!#2017-02-1908:55cfleming@seantempesta Thanks! (I’m mentally rewriting your “with” to “without” 🙂 )#2017-02-1908:55seantempestawoops!#2017-02-1918:38maksimrvHi, does cursive support paredit-backward-kill-word? I can not find this in shortcuts It will be nice have something like this http://mumble.net/~campbell/emacs/paredit.html but only for cursive#2017-02-1920:55cfleming@maksimrv No, Cursive doesn’t support this right now.#2017-02-1920:55cflemingI have https://cursive-ide.com/userguide/paredit.html, but it only covers the basic commands.#2017-02-1920:55cfleming@simon Thanks! Will take a look.#2017-02-2008:08cflemingComing up in Cursive: https://twitter.com/CursiveIDE/status/833585675161137153#2017-02-2020:14denikcfleming: what do you think about ordering version numbers in desc order?#2017-02-2020:19cfleming@U050CJFRU It actually does that since I took that screenshot.#2017-02-2015:56jordibsIn windows cursive repl when I start repl I get this message "Port xxxx is already being used." I used severals ports and the result is the same... Could anybody help me, please? thanks.
Figwheel: Starting server at 
Port xxxx is already being used. 
Are you running another Figwheel instance? 
If you want to run two Figwheel instances add a new :server-port (i.e. :server-port 3450)
to Figwheel's config options in your project.clj
Figwheel System not initialized.
Please start it with figwheel-sidecar.repl-api/start-figwheel!
I'm no running a another Figwheel instance
#2017-02-2021:14zyloxDoes anyone have any experience using cursive with multiple projects that are managed via maven instead of lein?#2017-02-2021:17cfleming@zylox I know there are some people using Maven - I’m not aware of any problems with it.#2017-02-2021:19zyloxi dont know if this qualifies as a "problem", just something i used with counterclockwise and was wondering if a parallel existed here . I'll try to articulate what im looking for better, one sec...#2017-02-2021:19zyloxalso im admittedly new to the intellij space as well#2017-02-2021:20cflemingSure, let me know if you have specific questions - it’s not something a lot of people do, but it should work.#2017-02-2021:20cflemingFWIW I’m using Cursive with Gradle and that works fine.#2017-02-2021:20cflemingIn case that’s an option for you.#2017-02-2021:23zyloxWith counterclockwise, if i had project a that relied on project b, and both were imported into eclipse, i could fire up a repl in a namespace in project a, lets call it namespace a.1. If namespace a.1 :requires namespace b.1 (a namespace in project b), i could modify namespace b.1 and immediately load it into my repl.#2017-02-2021:24zyloxWe have a large amount of clojure projects managed by maven at the moment. If we changed to anything (which is unlikely) it would likely be leiningen anyway, in which case i could use checkouts for this im pretty sure.#2017-02-2021:26zyloxnow i know there probably isnt a direct parallel to this as intellij inherently seems to deal with project management differently, i was only able to add multiple projects by adding them as maven projects in the maven projects window, but googling didnt turn up anything so i figured asking couldn't hurt. Surely i'm not the only one to have attempted this.#2017-02-2021:31cflemingI see - I’d have to try that. I’ll try to set up a test project this afternoon.#2017-02-2021:31cfleming@zylox ^^#2017-02-2021:34zylox@cfleming Ah ok cool. i'd offer up some example projects but all our stuff is internal >.<#2017-02-2021:39cfleming@zylox Ok, cool. So have you tried this? Are you seeing a specific problem with it?#2017-02-2022:04zyloxwell i guess if i had to say there was a specific problem, it would be i don't fully understand how to work with multiple projects inter-operably using cursive. Upon further investigation it would seem that my projects in intellij are not picking each other up at all (aka using the versions from the remote maven repo), even after i build and locally install the projects from the terminal using mvn clean install, even though i just tested it in eclipse, lein, and the maven repl and they all worked....i'm starting to think i must have set up something wrong....#2017-02-2022:04zyloxill keep investigating#2017-02-2022:05cfleming@zylox Have you just come from CCW?#2017-02-2022:06cflemingThere’s an Eclipse migration guide that might help - it’s Java focused but helps with the terminology.#2017-02-2022:06zyloxi use ccw and lein depending on the task#2017-02-2022:06cfleminghttps://www.jetbrains.com/help/idea/2016.3/eclipse.html#2017-02-2022:07zyloxah this. Yes ive touched on it before but ill read through it again.#2017-02-2022:07zyloxcant hurt#2017-02-2022:08cflemingOk. So one question, when you’re talking about multiple projects, are you talking about Eclipse-style projects (i.e. 1 Maven project), or an IntelliJ project with multiple modules (each of which represents a Maven project)?#2017-02-2022:08zyloxwhen im saying project i mean it in the maven sense, though i have them imported as modules i think at the moment using the maven projects window#2017-02-2022:08cflemingOk, so you have all your Maven projects in the same IntelliJ project/window.#2017-02-2022:09zyloxcorrect#2017-02-2022:09zyloxwell the currently relevant ones#2017-02-2022:09cflemingAre the dependencies between them correct? You can check this in File->Project Structure->Modules.#2017-02-2022:10cflemingWhat you want to see is if Maven project A depends on Maven project B, that module A has a module dependency on module B, not that A is using a library produced by B#2017-02-2022:13zyloxok checking (i assume under the dependencies tab). this will take a bit, lots of dependencies#2017-02-2022:13zyloxand seemingly no search#2017-02-2022:13cflemingPerhaps this might be easier if you set up a simple project to start with, with just a couple of Maven deps, rather than starting with your full deal.#2017-02-2022:14zyloxi agree#2017-02-2022:14zyloxi should do that#2017-02-2022:14cflemingThen if you do that, and it’s not working as you expect, you can just send it over and I’ll take a look.#2017-02-2022:15zyloxI'll work towards that, thanks for the help. Wonderful tool, i really hope it works out for me and others on my team.#2017-02-2022:17cflemingNo worries, I’m glad you’re liking it!#2017-02-2022:17cflemingLet me know how you get on, it’s a use case I’m interested in supporting if it doesn’t work correctly now.#2017-02-2022:18cflemingIf it would be useful to do a hangout or something with a screen share, let me know.#2017-02-2022:21zyloxWell, in the short term it seems that intellij, and only intellij (this isnt in the pom or anything i triple checked) is looking for a version of this dependency that doesnt even exist (1.7, 1.6 is the most recent) so im going to go with some wires got crossed at some point. I'm going to wipe the slate and start over. At this point it doesnt seem to be related to cursive at all, probably just user error (sigh)#2017-02-2022:23zyloxAnd assuming i get past this error, ill definitely be glad to flesh out the use case. We have nearly 100 projects in clojure and as you might being able imagine , the need to modify small parts of them and load them into the repl quickly and easily is a important part of that workflow.#2017-02-2022:24zyloxanyway, thanks again#2017-02-2103:27cjmurphy"No modules containing clojure.main" <- I used to be able to create a local REPL easily but now get this. Is there a solution?#2017-02-2103:30cjmurphyIf I go to the project structure I can see that there's a module there. But I can't select it when trying to create a local REPL configuration.#2017-02-2103:31cjmurphyPerhaps there's something I need to change in the project.clj?#2017-02-2103:35cjmurphyI registered the lein project, which I thought might help. However the suggested stub generation crashes.#2017-02-2103:40cjmurphyI invalidated caches and restarted, but still get the stub generation crashing. The exact message is "Error generating stubs for module demo".#2017-02-2108:44moizsjdoes anyone here use Cursive with CLJS+Figwheel+Reagent? if yes, howz your experience been? maybe @timothypratley ?#2017-02-2109:30cfleming@cjmurphy So, two problems - the modules containing clojure.main issue is usually when you’re trying to use a module that doesn’t have Clojure itself as a dependency.#2017-02-2109:30cflemingCould you check that?#2017-02-2109:31cflemingThe stub problem would hopefully be fixed in the dev build, see: https://clojurians-log.clojureverse.org/cursive/2017-02-16.html#2017-02-2109:32cfleming@moizsj Yes, I used that when building the licence renewal page.#2017-02-2109:32cflemingIt worked nicely!#2017-02-2109:32cflemingI didn’t often bother with a REPL, but figwheel was great.#2017-02-2109:41moizsjgood to know Colin! @cfleming#2017-02-2111:21cjmurphy@cfleming: The first issue ("No modules containing clojure.main") fixed itself when I registered the lein project, as was suggested when I looked at the project.clj file. I'm going off an Untangled project, so the dependencies from project.clj should all be fine. Untangled developers all use IDEA/Cursive, so it should be pretty quick to get any project going. Perhaps the generating stubs problem is from more recent Cursives, and they are all on an older version.#2017-02-2111:30cjmurphy@cfleming: 'Figwheel configuration error' that 'The required key :cljsbuild is missing'. But :cljsbuild is there in the project.clj <-- that's why the stubs are not generated - I can see from the log. So perhaps not a Cursive problem really.#2017-02-2111:57cjmurphyActually it all seems to be fine just using lein from the command line, so perhaps it is a Cursive problem after all.#2017-02-2114:45timothypratley@moizsj it works great 🙂 Having arity checking etc in Cursive is very helpful, and navigation etc work well.#2017-02-2119:51cfleming@cjmurphy Did you try the dev build for the :cljsbuild problem?#2017-02-2119:53cfleming@cjmurphy Actually @wilkerlucio had the same problem. I believe it’s fixed now in the dev build, but Slack has eaten the discussion I had with him around it. Let me know if that doesn’t fix the problem.#2017-02-2120:07cjmurphy@cfleming: My particular problem was known by Untangled folks. This was the bad line: (def figwheel-config (fig/fetch-config)). Doing too much in a def, and building the stubs causes the defs to be run.#2017-02-2121:53grav@moizsj I'm using Cursive + Figwheel + Reagent daily, and it works quite well!#2017-02-2122:07cfleming@cjmurphy Ahhhh.... I remember now 🙂#2017-02-2122:50cjmurphyI'm working with an IDEA project that has many project.clj within it. I know how to get the IDE to ask me to register a particular project.clj. After it has done that everything seems to be concentrated on that project.clj. Is there an easy way to unregister a project.clj? That way I will be able to switch between working with different project.clj.#2017-02-2123:20cjmurphyI've realised you can register many. And that this IDEA project has many project.cljs with the same name! Them having the same name seems to stuff Cursive about so I can fix that...#2017-02-2123:29cfleming@cjmurphy Hmm, why do your projects all have the same name?#2017-02-2123:30cflemingI’m not sure how well Cursive would handle that - by name I guess you mean the lein artifact name?#2017-02-2123:30cjmurphyI'm just going off an existing IDEA project i.e. not one I created. But am fixing it now.#2017-02-2123:32cflemingYou can definitely create a project with multiple lein projects, see: https://cursive-ide.com/userguide/leiningen.html under “Working with multi-module projects"#2017-02-2123:32cjmurphydefproject untangled/demo "1.0.0" <-- they all (actually most) say demo, but I'm changing them.#2017-02-2123:33cflemingI see. I think that should work, but I’m not sure I’ve ever tested it.#2017-02-2123:34cjmurphyIts a 'cookbook' - so lots of separate project.clj files. I'll fix then see if I can work with one, then another. Thanks for the doc reference.#2017-02-2203:51cjmurphyNo more problems but can I just ask about the stubs generation? Is it a new thing, or was it always there and I never noticed it before. If the advantage to having stubs generation is marginal, can it be turned off?#2017-02-2204:55moizsj@grav @timothypratley thanks for the inputs. glad to hear. I only do clj dev and have always been a backend dev. But cljs might just be the right vehicle for me to explore frontend dev.#2017-02-2206:08brabsterHey folks, I use Emacs (sorry!) and my colleague uses Cursive - works fine but there's a few differences in the way indentation works between the two that's a pain! Is there a way to get Cursive to use the same indentation style as Emacs and apply it automatically?#2017-02-2208:55cfleming@brabster No offence taken 🙂#2017-02-2208:55cflemingDo you have an example of the differences you want to fix?#2017-02-2220:40brabstercfleming: I'll have to ask my colleague for specifics and get back to you 🙂#2017-02-2220:45brabster@U0N55HTD0 are you out there somewhere with an example of something that doesn't indent correctly#2017-02-2220:48garethdaviesSpooky, I've just been playing with the clojure code style setting in cursive and think the "one space list indent" solves our problems for forms that are unknown to the editor. I can post the two differences shortly.#2017-02-2221:16garethdaviesHere is some code before I made the "one space list indent": https://github.com/taffowl/dev-files/blob/master/before.png#2017-02-2221:17garethdaviesBasically for each new custom form we would have to specify the indentation. After changing the option in the code styles it now behaves how I expect: https://github.com/taffowl/dev-files/blob/master/after.png#2017-02-2221:19garethdaviesApologies I'm not sure how to attach pictures in slack threaded mode.#2017-02-2222:51cflemingOk, so that’s not the one space list indent - that looks like “Default to Only Indent” to me, do you have that switched on?#2017-02-2222:52cflemingHere’s what the one space list indent would do - it would change:#2017-02-2222:53cfleming
(filter
  even?
  (range 10))
#2017-02-2222:53cflemingto:#2017-02-2222:53cfleming
(filter
 even?
 (range 10))
#2017-02-2222:53cflemingWhich Emacs will do by default.#2017-02-2222:55cflemingOtherwise, if you have custom macro forms, you’ll have to specify those as Indent, correct.#2017-02-2222:55cflemingI believe the same is true of Emacs, though#2017-02-2222:55cflemingOr do you use the new indenting metadata?#2017-02-2518:12brabsterThanks for the hints @cfleming , we'll give them a try and see how we do! Don't think we use indenting metadata unless emacs/cursive does it for us#2017-02-2209:21cjmurphy@cfleming: Can stubs generation be turned off? Is there doco I can read up on what it is all about?#2017-02-2209:48cfleming@cjmurphy Are you still having problems getting that to work?#2017-02-2209:50cfleminghttps://groups.google.com/d/topic/cursive/ycMZAF29RZQ/discussion is probably the closest thing to doc#2017-02-2209:50cfleming@doglooksgood Yeah, that’s ancient, from the original lein plugin.#2017-02-2209:50cflemingLein doesn’t have a very usable icon, unfortunately.#2017-02-2209:53cjmurphy@cfleming: No all is fine. Just would have been good to have turned it off for a while. Curious as much as anything.#2017-02-2209:54imre@cfleming just get the mo from https://leiningen.org/#2017-02-2209:54cfleming@imre Yeah, I’ve thought about it 🙂#2017-02-2209:54cflemingIt has to be 14x14 pixels unfortunately. Perhaps just the moustache?#2017-02-2209:55imrethat's what I'm saying yeah 🙂#2017-02-2209:55cflemingHehe, nice#2017-02-2209:55imredoes need a bit of photoshop work#2017-02-2209:56cfleminghttps://www.google.com/search?site=&amp;tbm=isch&amp;source=hp&amp;biw=1424&amp;bih=1080&amp;q=moustache+icon&amp;oq=moustache+icon#2017-02-2209:57cflemingPerhaps moustache + eyebrows 🙂#2017-02-2209:58cfleminghttps://icons8.com/web-app/40763/imperial-mustache#2017-02-2209:59cflemingI suspect at 14x14 it’s not going to be very obvious what it is.#2017-02-2210:02cfleming@cjmurphy Ok. I’m planning changes to make it less intrusive in this series of EAPs.#2017-02-2214:51zyloxi tried minifying the leiningen logo and it remained surprisingly recognizable.#2017-02-2216:32cemerick@cfleming FWIW, this has become very painful https://github.com/cursive-ide/cursive/issues/1426#2017-02-2218:20ikitommiChanged some time ago to use namespace search when searching for things. Matches more easily the path. Would be super awesome if that also would have different colors / images for clj, cljc and cljs namespaces#2017-02-2400:05bfabryhmmm#2017-02-2400:05bfabryhow do I make cursive/intellij "know" about all of the classes provided by a new dependency#2017-02-2400:05bfabryI've updated a dependency and a huge number of the classes have changed packages, and I'd like to get as much automatic fixing as possible#2017-02-2400:40zyloxare you using leiningen?#2017-02-2400:40zyloxbecause refresh maybe?#2017-02-2400:42zylox@bfarbry#2017-02-2400:42zyloxthough im pretty new to it too so shrug#2017-02-2400:42zyloxhttps://cursive-ide.com/userguide/leiningen.html "Refreshing Leiningen dependencies" section#2017-02-2400:44zyloxunless you mean auto changing imports....i got nothing there#2017-02-2400:50bfabryrestarting intellij seemed to be the answer#2017-02-2401:58superstructoris there any way in Cursive to get sensible highlighting and symbol resolution for defmethod ?#2017-02-2409:06serioga> is there any way in Cursive to get sensible highlighting and symbol resolution for defmethod ? @superstructor https://cursive-ide.com/userguide/macros.html See “Customising symbol resolution”.#2017-02-2409:20superstructor@serioga thanks, resolving defmethod as defn thanks only works when methods don’t have a name which is good for stack traces e.g. (defmethod country “nz” [args] “was nz”) works but (defmethod country “nz” country-nz [args] “was nz”) does not work.#2017-02-2410:25ckarlsenSuddenly selected text/code is ‘moveable’. I’m on 2017.1EAP and snapshot from 16.02. To reproduce: Just select any code/text, hold cmd and move mouse around. Same thing happens on my linux workstation (with left click)#2017-02-2410:27ckarlsendisabled ‘enable drag and drop functionality in editor’ and problem fixed#2017-02-2410:27ckarlsenbut i’ve never enabled that flag, so I blame one of the recent intellij EAPs#2017-02-2415:57isakanyone know why cursive says "js/window.addEventListener cannot be resolved"? does cursive know about anything js specific?#2017-02-2416:16manutter51@isak might be related to this? https://github.com/cursive-ide/cursive/issues/626#2017-02-2416:21isak@manutter51 well it is able to resolve many symbols, but it seems like 0 javascript symbols, even stuff that would be in the base set of externs#2017-02-2416:21isaki tried restart/invalidate, but i'm in the same state#2017-02-2416:22isakoh wait, if I change it to js/addEventListener, then it works#2017-02-2505:12borisHere’s an easy one for you - does cursive support in-editor window results like i have working in atom w/protorepl ? Looked everywhere and can’t seem to confirm or deny. Sending to repl working fine.#2017-02-2505:12borisi.e. “Send blah to REPL” printing results next to the form I just sent, not just in the REPL window#2017-02-2506:41cfleming@boris It doesn’t do this right now, but I want to add that soon. It’s hard in IntelliJ to have the collapsible inline forms for composite data structures, so I’ll have to have a workaround for that.#2017-02-2506:44boris@cfleming great thanks. More a nice to have for me although any kind of data structure browsing would be nice even if not inline.#2017-02-2509:10cfleming@boris Cool. It’ll almost certainly be a gutter icon on the left hand side, which will open a browser when you click on it.#2017-02-2513:23curlyfry@cfleming That would be awesome :) I feel a bit spoiled by the data structure browsing in cljs-devtools when I work in JVM Clojure. Though the thing I'm missing the most from cursive is still an "extract function" refactoring.#2017-02-2515:55carocadquick question guys, do I need a special configuration for Cursive to recognize cljs symbols?#2017-02-2515:57carocadI went over the re-natal getting started and added the project to Cursive but I am getting lots of ... cannot be resolve.#2017-02-2515:58carocadI understand react native components being a new thing but I thought that Cursive had support for Clojurescript out of the box. Yet I get js/require cannot be resolve 😞 Any advices, please?#2017-02-2522:53cfleming@carocad Cursive’s resolution of JS symbol is a bit hit and miss unfortunately. I’m going to try to improve it soon. The detection of built-in symbols is based on a set from Tern (http://ternjs.net/) but the one from TypeScript might be better.#2017-02-2617:46carocad@cfleming ok no problem. Just wanted to make sure because I was not able to find much documentation on the subject.#2017-02-2617:51carocadOne thing that I wanted to "report", I just realized that (at least in cljs) if a symbol simply 'aliases' another one, then the documentation gets lots in the process 😞 . This happened to me while working with re-frame where I wanted to see the docs for reg-sub (https://github.com/Day8/re-frame/blob/master/src/re_frame/core.cljc#L58) but cursive didnt display anything since it is the original symbol the one that actually has a docstring.#2017-02-2617:52carocadJust letting you know, dont know if I should create a ticket for it though. Hope it helps#2017-02-2618:52favila@carocad this is true in clj too#2017-02-2716:52isak@cfleming what about using this? https://github.com/google/closure-compiler/tree/master/externs#2017-02-2719:40cfleming@isak Oh, good find, thanks - that looks great#2017-02-2719:41cflemingI’ll check the TypeScript ones, there’s potential I might be able to use the types if present. Looks like Closure uses jsdoc types though.#2017-02-2719:43dm3@cfleming any chance you could comment on https://github.com/cursive-ide/cursive/issues/711?#2017-02-2719:44cfleming@dm3 Sure - so yes, Cursive understands Potemkin. There’s a hack you can use if the import-vars there works like Potemkin’s.#2017-02-2719:45cflemingCursive contains functionality to treat some forms in the same way as some existing form: https://cursive-ide.com/userguide/macros.html#2017-02-2719:46cflemingCurrently that has a hard-coded list of forms that you can resolve as, but under the hood it can be anything.#2017-02-2719:46cflemingWhich I’ll probably expose shortly.#2017-02-2719:47dm3hm, I’m still confused - do I have to do anything special to make Cursive recognize imported vars the same way it does the original ones?#2017-02-2719:48cflemingIn the meantime, you can hack your resolve config file as discovered by @favila here: https://github.com/cursive-ide/cursive/issues/1440#issuecomment-232776904#2017-02-2719:48dm3yeah, I don’t use Cursive myself - it’s people complaining about my library#2017-02-2719:49cflemingIf you modify the config file to treat clojure.java-time/import-vars (or whatever the var is) as potemkin/import-vars (or whatever that one is, I don’t have the code right here)...#2017-02-2719:49cflemingAh, I see#2017-02-2719:49dm3so potemkin/import-vars is hardcoded somewhere in Cursive, is that right?#2017-02-2719:49cflemingYes#2017-02-2719:50cflemingIn an extensible way, but yes#2017-02-2719:51cflemingCould you create a new issue for that so it’s not mixed with the intern issue, and put the full clojure.java-time var in there, and I’ll add that?#2017-02-2719:51cfleming@dm3 It’s just a copy of the Potemkin one, right?#2017-02-2719:52dm3yes#2017-02-2719:52dm3hm#2017-02-2719:53cflemingInternally this is all based around an extension api, which I will open up at some point - then you’d just be able to make a fairly trivial PR to a public repo, and everyone would get that support.#2017-02-2719:53cflemingRight now, I have to add it.#2017-02-2719:53dm3yeah, I see how that would work 🙂#2017-02-2719:53dm3ok, I’ll create the issue for now#2017-02-2803:44danielcomptonDoes anyone know how to turn off inspections from showing up in thecode navigator sidebar?#2017-02-2803:44danielcomptonI have the TODO plugin installed with the inspections turned off#2017-02-2803:45danielcomptonbut they still show up in the sidebar#2017-02-2806:47tianshuIs it possible to disable auto complete in remote REPL?#2017-02-2807:19cfleming@doglooksgood No, but it would be easy to add - is it too slow?#2017-02-2807:19cflemingDo you have a slow connection to the server?#2017-02-2807:19tianshuYes, too slow:joy:#2017-02-2807:19tianshumaybe the connection is a little bit slow#2017-02-2807:20cflemingOk. I could switch in that case to local completion, from your local project. Not perfect, but requires no network traffic and better than nothing.#2017-02-2807:24tianshuIt's better to provide an option.#2017-02-2807:24cflemingYou mean allow the user to select? Yes, of course - I could provide remote, project and none as options.#2017-02-2807:26tianshuthat will be awesome!#2017-02-2807:26tianshuBTW, another question. Is it possible for cursive to auto switch back to clj when we use :cljs/quit?#2017-02-2807:27cflemingIt does try to do that already - does that not work for you?#2017-02-2807:50tianshumaybe I need a update?#2017-02-2810:45cfleming@doglooksgood No, it’s been like that for ages. It works by scanning the output, and it’s looking for the string “> :cljs/quit”. Perhaps it should just look for the keyword on its own. Can you paste a snippet of the output when closing a CLJS REPL?#2017-02-2811:10tianshuof course, wait a minute#2017-02-2811:15tianshu@cfleming will this help?
(cljs-repl)
Launching ClojureScript REPL for build: dev
Figwheel Controls:
          (stop-autobuild)                ;; stops Figwheel autobuilder
          (start-autobuild [id ...])      ;; starts autobuilder focused on optional ids
          (switch-to-build id ...)        ;; switches autobuilder to different build
          (reset-autobuild)               ;; stops, cleans, and starts autobuilder
          (reload-config)                 ;; reloads build config and resets autobuild
          (build-once [id ...])           ;; builds source one time
          (clean-builds [id ..])          ;; deletes compiled cljs target files
          (print-config [id ...])         ;; prints out build configurations
          (fig-status)                    ;; displays current state of system
  Switch REPL build focus:
          :cljs/quit                      ;; allows you to switch REPL to another build
    Docs: (doc function-name-here)
    Exit: Control+C or :cljs/quit
 Results: Stored in vars *1, *2, *3, *e holds last exception object
Prompt will show when Figwheel connects to your application
To quit, type: :cljs/quit
=> nil
:cljs/quit
=> nil
#2017-02-2821:58cfleming@doglooksgood Yes, thanks. I’ll try to fix that.#2017-02-2822:09cfleming@doglooksgood Ok, should be better in the next release.#2017-03-0110:05stijn@cfleming I'm seeing some real repl slowness when typing (quoted) datomic queries. It's worsened when I require datomic.api. Is this a known issue or should I report it?#2017-03-0111:38sandbagsI have a slightly baffling problem: In my project I can run lein cljsbuild once or lein repl and it works fine. But when I try and start a local REPL in Cursive I get an error:#2017-03-0111:38sandbagswhich seems to be about not being able to find the compiler#2017-03-0111:39sandbagsThis is a re-frame+compojure project (created with the re-frame template). I've used the same template several times and not run into this before. I'm puzzled why cljsbuild works though.#2017-03-0111:39sandbagsanyone have any clues?#2017-03-0111:40sandbagsi guess i can just run the REPL from the terminal, kind of spoils the fun though#2017-03-0111:55sandbagsThere is a very long thread about it here https://github.com/emezeske/lein-cljsbuild/issues/204 but I'm not sure if they are saying it should be fixed#2017-03-0112:01sandbagslein trampoline repl fails from the terminal with the same error, but this appears to be exactly the error they are saying is fixed back in 2016#2017-03-0112:15sandbagsI tried adding lein-cljsbuild as a :dev dependency which was, I thought, the workaround suggested in that thread but that doesn't seem to have helped#2017-03-0119:12cfleming@stijn That might be https://github.com/cursive-ide/cursive/issues/1668, which I’m looking at at the moment.#2017-03-0119:20cfleming@stijn Let me know if that looks like your problem - the memory issue looks like it was a false alarm.#2017-03-0119:21cfleming@sandbags I’ll take a look later on, but there’s not much I can do about that one, at least last time it was a downstream issue. Are you definitely using the latest cljsbuild?#2017-03-0120:15stijn@cfleming sounds like the same symptoms yes. it worsens when I started using quoted forms#2017-03-0121:14cfleming@stijn Hmm, this might be related too: https://groups.google.com/d/topic/cursive/KrsLYxKflmg/discussion#2017-03-0122:01ckarlsen@cfleming no idea if related to that particular bug, but i've noticed one thing. If I open up a fresh REPL and type something stupid ala ([1 2 3] | ) and hold enter for a few seconds where cursor is - it's responsive. However, if I type (-> [1 2 3] | ) and do the same thing it's suuuuper slow#2017-03-0123:06sandbags@cfleming according to lein ancient I am but I note that I seem to be using 1.1.4 and their github page lists 1.1.5, I'm not actually sure where that 1.1.4 dependency comes from#2017-03-0123:06sandbagsit appears by magic in lein deps 🎄#2017-03-0123:07sandbagsrather than as a dependency of anything i can see#2017-03-0123:07sandbagsbut i have to confess that, at this point, strong drink has been taken#2017-03-0123:07sandbagsoh it's referred to directly as a plugin#2017-03-0123:07sandbagslet me try 1.1.5#2017-03-0123:08sandbagsperhaps ancient doesn't do plugins by default (or, indeed, at all)#2017-03-0123:08sandbagssame error with 1.1.5#2017-03-0123:11sandbagsi could have sworn i tagged my error report onto the end of that github issue#2017-03-0123:12sandbagsah, different issue but the right bug#2017-03-0123:13sandbagsok i think i am going to sign off now before i do something dangerous#2017-03-0123:20psalaberria002I just noticed that unused aliases are not greyed out anymore. I am using 1.4.3-2016.3 It was a very useful feature. Any idea how to get that back?#2017-03-0200:38hlshipSo I haven’t checked recently, but does Cursive support managed dependencies yet?#2017-03-0200:52cfleming@psalaberria002: They should be greyed out, but a couple of users have reported problems with that.#2017-03-0200:52cflemingUnfortunately I don’t have a good solution, I’ve never managed to reproduce the problem.#2017-03-0200:52cfleming@hlship Yes, it should do.#2017-03-0200:53cfleming@sandbags You definitely want the latest version, AFAIK the last release was the one that fixed the bug#2017-03-0200:54psalaberria002@cfleming thanks. too bad you can’t reproduce it. I can live with it. Good job on Cursive 😉#2017-03-0200:55cflemingThanks!#2017-03-0207:17sandbags@cfleming i've tried 1.1.5 which is AFAICS the latest version and that still seems to be bugged#2017-03-0208:44cfleming@sandbags Not sure sorry - AFAIK cljsbuild is more or less without a maintainer right now - @danielcompton might know more.#2017-03-0208:55stijn@cfleming I don't think it's related to the google groups discussion. When I copy paste the function into a file, everything works as normal. It's only the repl editor that slows down#2017-03-0209:04cfleming@stijn Ok. I’m working on the REPL issue, and hope (but no promises) to have a dev build tomorrow.#2017-03-0209:14danielcomptonSorry, don't have any more insight on this#2017-03-0221:13dnolen@cfleming hrm I don’t really understand the Run Clojure Application feature#2017-03-0221:13dnolenI don’t want to run a script I just want to invoke some main method#2017-03-0221:14dnolenbut Run generates clojure.main “” -m my.main#2017-03-0221:14dnolenwhich blows up#2017-03-0221:14dnolenif script is empty, why emit anything?#2017-03-0307:08cfleming@dnolen Sorry, that’s old crappy code - I’ve been meaning to fix it up but it doesn’t get used much.#2017-03-0316:43gfredericksdoes anybody know or have a good guess whether the cursive formatter is configurable enough to do roughly this with ns forms? https://stuartsierra.com/2016/clojure-how-to-ns.html#2017-03-0316:43gfredericksmy team uses a linter for that style and I think cursive formats it a different way by default#2017-03-0316:55shaun-mahood@gfredericks: What do you want Cursive to do for you related to that post? I use cursive and follow this way manually without any problems, though I haven't got it linted or really pay that much attention to the spacing of things.#2017-03-0316:59gfredericks@shaun-mahood I think the main issue is how the clauses below :require etc. are indented (two spaces when the standard says one)#2017-03-0316:59gfredericksif yours indents one space then that gives me confidence I can figure out how to configure it to do the same thing; though if you didn't have to configure it at all that confuses me a little#2017-03-0317:06shaun-mahood@gfredericks: Ok, mine indents 2 there (2 is the default) but there's a super easy configuration change for indent depth - it has both a global setting and form specific settings, though I don't see ns or require on the list of options - but I'm on a bit older of a version than current and haven't changed that config at all, so there may be someone else who has it figured out. You want it to be 2 spaces between ns and require, and 1 space after require right?#2017-03-0317:06gfredericks@shaun-mahood correct#2017-03-0317:08shaun-mahoodThe config is pretty straightforward to check, you should just download it and see if you can figure it out - it's a pretty fantastic editor 🙂#2017-03-0317:08gfredericksdoes it have org-mode#2017-03-0317:11Alex Miller (Clojure team)you can probably run cursive inside emacs if you need to#2017-03-0317:11gfredericksI'm a level 5 emacs user: I only run it in a terminal window#2017-03-0317:12gfredericksso I would need a plain-text version of IntelliJ#2017-03-0317:16Alex Miller (Clojure team)I assume that’s level 5 of 100#2017-03-0317:26gfredericksthe emacs levels just keep going#2017-03-0317:49manutter51what level is it when you run emacs in a terminal window in intellij?#2017-03-0318:09gfredericksThat is a level of intellij usage that is expressed in quaternions#2017-03-0318:30cflemingSoftware must eat itself!#2017-03-0318:30cfleming@gfredericks I’m still mostly asleep, will check that a bit later on. Someone mentioned last week that they had a problem with that.#2017-03-0318:34cflemingThere is a lists-indent-1-space rule, which is there purely to placate the vengeful Emacs god#2017-03-0318:34cflemingBut IIRC the ns form formatting doesn’t obey it.#2017-03-0318:36gfredericks@cfleming coolthx#2017-03-0319:56cfleming@gfredericks https://github.com/cursive-ide/cursive/issues/1676#2017-03-0319:57gfredericks@cfleming great! #2017-03-0320:01kennySo I have "Check for EAP builds" enabled and I am not getting the usual Cursive update dialog for 1.5.0-eap1. I am running 1.4.3-2016.3 on both my Mac and Ubuntu.#2017-03-0320:03kennyTo be clear, I'm not getting updates on my Mac or Ubuntu.#2017-03-0320:03cfleming@kenny Is it possible your licence update period has expired? You can check it in Help-&gt;Register Cursive.#2017-03-0320:04kennyOoooo yeah, you're right. I had no idea. Maybe a dialog for license expiration would be helpful 🙂#2017-03-0320:05cflemingActually, there is one - did you not get a reminder notification?#2017-03-0320:05kennyI certainly didn't see one#2017-03-0320:06cflemingThere was some confusion because I had to delay the initial renewal period, and I suspect some users didn’t receive notifications because of that.#2017-03-0320:06cflemingI should probably send reminder emails as licences expire too.#2017-03-0320:06kennyThat'd be awesome.#2017-03-0320:07kennyIs the renewal price always the same?#2017-03-0320:07cflemingNo, it starts out at 50% of the initial purchase price, and gradually goes up to 75% over the following year.#2017-03-0320:08cflemingBecause presumably the longer you wait, the more new stuff you get when you upgrade.#2017-03-0320:09kennyI need the namespaced map printing fix 🙂#2017-03-0320:09cflemingAnd hopefully the REPL slowdown fix is next week too.#2017-03-0320:10cflemingSorry that one took so long to look at, I was rather embarrassed when I saw the date on your email when I finally looked at it.#2017-03-0320:11kennyEh, it's alright. We get busy and emails disappear 😆#2017-03-0320:12cflemingHehe - I should have created an issue. That said, they have a tendency to languish as well.#2017-03-0320:12cflemingI’m actually planning to make a plugin to help with issue triage.#2017-03-0320:14kennyI am renewing my license right now and I noticed a difference in price. When I click “Show Price” on the renew page it says $53 but on the popup dialog it shows $50.#2017-03-0320:14cflemingThat’s not good.#2017-03-0320:14cflemingGo ahead and pay $50, I don’t mind - I’ll check that, though.#2017-03-0320:16kennyYup, my receipt shows I paid $50 as well.#2017-03-0320:16cflemingOk, I’ll take a look, thanks#2017-03-0320:24shaun-mahood@cfleming: I need to renew as well, says $107 but is going to change me US $99.50. I'll wait until you fix it and renew then.#2017-03-0320:26cfleming@shaun-mahood Thanks - I won’t mind if you renew in the meantime 🙂#2017-03-0320:27shaun-mahoodIt's a corporate purchase ;)#2017-03-0404:17cfleming@kenny @shaun-mahood: Bug fixed - thanks for the report!#2017-03-0404:33shaun-mahoodOh sure, you fix that one right away :)#2017-03-0408:43cfleming@shaun-mahood Haha, I could claim that I was worried that the corporate discounts weren’t being correctly applied too, but a) that’s not very credible and b) I’m sure I would have heard about that pretty quickly 🙂#2017-03-0616:08shaun-mahood@cfleming: Worked! I have to say that it's a much more enjoyable experience than paying for Visual Studio 🙂#2017-03-0619:08vikeriA question about syntax highlighting in the REPL, it does not seem to work for the output when using a Nodejs repl through `Use clojure.main in normal JVM process´. I vaguely recall this being an issue when I tried it a while back. Does anyone know what the issue is?#2017-03-0619:09favilaI see some super-odd behavior with code with this pattern:
(defn aaaa []) ;; displays as "used var"

(defn bar []
  (aaaa)) ;; "Jump to source" goes to the "declare" below

(declare aaaa)
#2017-03-0619:10favilaBut even stranger, if the var name is > 4 characters, the first declaration is reported as "unused' (greyed-out, whatever):
(defn aaaaa []) ;; displays as "UN-used var"

(defn bar []
  (aaaaa)) ;; "Jump to source" goes to the "declare" below

(declare aaaaa)
#2017-03-0619:11favila(I grant that the declare should not be there. It's a mistake I found in my code.)#2017-03-0619:13favila(In general, I think "jump to source" should ignore declares and go to the actual var, and declare should instead be considered a "use" of the var. I know that's not actually what's going on.)#2017-03-0620:34cfleming@vikeri No, that doesn’t work right now, because of the way the clojure.main REPL works.#2017-03-0620:34cflemingI’m getting close to implementing a proper CLJS REPL, and it will work at that point.#2017-03-0620:36vikeri@cfleming Okok! Good to hear#2017-03-0620:39cfleming@favila Yes, there are all sorts of edge cases here, and I’m really not sure how to handle var redefinition either. Currently Cursive assumes that the last definition is the actual one, but I agree that declare shouldn’t be taken into account there.#2017-03-0620:40cflemingI’m not sure how to handle declare either, perhaps it should be a usage.#2017-03-0620:40favilaThe thing that really surprises me is var length making the "unused" detection act differently#2017-03-0620:53cfleming@favila Here’s how that works. The unused var detection isn’t perfect (the same is true of public vars in Java BTW), but it should never produce false positives. Basically what it does is it does a simple word search on the name of the var, which is indexed and fast. If that returns more than some threshold number of values (10 IIRC) then it bails and does nothing. If there are sufficiently few results, then it does a full resolve on those to see if any of them actually refer to the var.#2017-03-0620:53cflemingSo vars with more unusual names will get better results for this inspection.#2017-03-0620:53cflemingThis is just for the online in-editor one, obviously a full unused decl offline inspection can take as long as you want.#2017-03-0621:46cfleming@shaun-mahood Thanks!#2017-03-0716:52pseudI have a library, qbits.hayt which cursive flat out refuses to work with (keeps complaining "<x> cannot be resolved" - the repl (inside intellij) knows better, lein deps :tree knows better. I've tried invalidating my caches & restarting a few times, I've tried restarting the program, I've tried refreshing from the "leiningen" tool window. No dice#2017-03-0716:53pseud(Library in question is qbits.hayt.)#2017-03-0720:35gfrederickshow do I figure out whether https://github.com/cursive-ide/cursive/issues/1676 is released yet?#2017-03-0720:46kenny@gfredericks It's not yet#2017-03-0720:47gfredericks@kenny how did you determine that?#2017-03-0720:48kennyBecause that issue was created after the last EAP was released so there is no way it could be released right now.#2017-03-0720:49gfrederickshow do you determine when the last EAP was released?#2017-03-0720:49gfredericksand what does EAP stand for?#2017-03-0720:49kennyhttps://groups.google.com/forum/#!forum/cursive#2017-03-0720:49kennyEarly Access Program#2017-03-0720:50kennySpecifically this post https://groups.google.com/forum/#!topic/cursive/DYOqfuEHhAs#2017-03-0720:51kennyI'd assume most people don't have EAP enabled, so the answer to your question also depends on what you consider released (which probably isn't an EAP build).#2017-03-0720:52gfrederickshe announces regular releases on that list as well?#2017-03-0720:53kennyI believe he will#2017-03-0720:54gfredericksokay, that's good enough for me; thanks#2017-03-0722:46cfleming@gfredericks You can also find out about releases by mainlining Twitter#2017-03-0722:47cfleming@pseud Do you have a link? If your symbols are created via macros then Cursive may not understand them, but there is probably config that will help.#2017-03-0806:36rauh@cfleming , they're all aliased by a macro.#2017-03-0806:37rauhBtw, really would love specter stubs generation for specter. 🙂#2017-03-0808:41cfleming@rauh I haven’t looked at specter but have been meaning to - I’ll check it out after 1.5.0#2017-03-0815:14mattsfreyquestion - I continually get the top banner "Your project requires namespaces which need stubs to be generated", no mater how many time I go through the motions of hitting "Genrrate Now" the banner still remains.. any idea how to get rid of this banner?#2017-03-0816:19zyloxOk so i'm having a bit of a brain lapse and cant seem to figure out how to make the repl start up as a java 6 repl#2017-03-0816:19zyloxanyone have any tips#2017-03-0816:19zyloxmy java compiler is set to 1.6#2017-03-0816:20zyloxand im using maven as my build manager, not lein, so the repl is using the option "use nRepl in normal JVM process"#2017-03-0820:36cfleming@mattsfrey Do you get an error of any kind when you hit Generate?#2017-03-0820:36mattsfreyno#2017-03-0820:36cflemingAlso, which version of Cursive are you using? There are some fixes to this functionality in the latest EAP#2017-03-0820:36mattsfreyit seems to succeed but the banner remains#2017-03-0820:37cfleming@zylox File-&gt;Project Structure, then select Project, and change the Project SDK.#2017-03-0820:38cflemingAdd a new one if Java 6 doesn’t appear there.#2017-03-0820:43zyloxthank you, another guy on my team actually just figured that out#2017-03-0820:43zyloxso good timing haha#2017-03-0820:47zyloxthanks @cfleming#2017-03-0823:35cfleming@mattsfrey Which version of Cursive are you using? There are some fixes to this functionality in the latest EAP#2017-03-0908:04yonatanelIs there a way to send commands to multiple REPLs at once?#2017-03-0909:45cfleming@yonatanel No, there isn’t right now.#2017-03-0909:58yonatanel@cfleming Is it possible to invalidate keywords from autocomplete? I get all my past typos etc.#2017-03-0909:58yonatanelI mean without losing local history#2017-03-0909:58cfleming@yonatanel Not right now, but I’m planning to fix that - that index is funky in several ways.#2017-03-0909:59yonatanelAh, ok. I remember you said something about the index#2017-03-0909:59cflemingIt takes a while for new entries to get added, and there’s also an issue where completions from other open projects are sometimes added.#2017-03-0909:59cflemingPlus, of course, old ones don’t seem to get removed.#2017-03-0921:01cfleming@kenny Are you still using the dev build? How’s it going?#2017-03-0921:01cflemingAny more flickering problems or lockups?#2017-03-0921:32danielcompton@cfleming the index being shared between projects is actually kinda handy often for us, I didn't realise it wasn't intended 🙂#2017-03-0922:06kenny@cfleming I am running the dev build. Though the past week I have mostly been doing frontend development, so my actual REPL time has been pretty limited. I’ll be switching to backend Clojure work in a day or so and I’ll be able to provide more feedback if the flickering occurs again.#2017-03-0922:07kennyYeah, I agree with the shared index between projects.#2017-03-0922:24cfleming@kenny Ah, ok, I’ll fix that.#2017-03-0922:25cflemingActually, is that with a Clojure nREPL, or is it with a CLJS REPL?#2017-03-0922:25cflemingLooks like maybe CLJS?#2017-03-0922:29kennyIt’s in cljs but it’s just in the normal editor, no REPL.#2017-03-0922:29cflemingOk, that’s unrelated to the dev build, then.#2017-03-0922:30kennyYeah that was a general bug report. Sorry for the confusion 🙂#2017-03-0922:30cflemingNo worries. Since it basically worked for you, I think I’m going to push an EAP build, and work out the kinks in the next one. I’ve had no feedback other than yours so I’ll go with that.#2017-03-0922:32kennyCool. I kinda expect EAP builds to have some kinks anyway.#2017-03-0922:32cflemingYeah, that one might have been “I broke everyone’s REPL”, which is a little more than the average kink.#2017-03-0922:32cflemingBut it doesn’t look like that’s the case.#2017-03-0922:33kennyIn the little bit of time I played with it, I didn’t have that problem.#2017-03-0922:33kennyI’m still running the dev build with no issues. But again, I haven’t had much REPL time.#2017-03-1001:13danielcomptonWhen I'm entering deps in my project.clj, the autocomplete looks like it's half selected, and then if I press the down arrow it selects the actual dependency. I can tab complete from both, but it was a bit unexpected. Is this to do with how IntelliJ does tab completion and selections?#2017-03-1003:35cfleming@danielcompton I’m not sure - what is not what you’re expecting there?#2017-03-1004:41danielcomptonI guess I was expecting the autocomplete suggestion to be in blue like it is when you press the arrow key#2017-03-1004:41danielcomptonBut it might be like that everywhere #2017-03-1012:25wilkerluciohello, can someone tell me where can I find that menu with the repositories list to index the dependencies?#2017-03-1012:34yonatanel@wilkerlucio Do you mean ctrl+alt+S and search for "maven" or "repositories"?#2017-03-1012:41wilkerlucio@yonatanel thanks, that is it 🙂#2017-03-1012:45yonatanel@wilkerlucio Intellij just notified me recently that my repositories are not updated, so I remembered where it is :)#2017-03-1016:51kaukoIs it possible to define my own grammar for macros I've added?#2017-03-1016:51kaukoI found this, but it doesn't quite do it for me#2017-03-1016:51kaukohttps://cursive-ide.com/userguide/macros.html#2017-03-1016:55kaukoHonestly the built-in defn grammar almost works for me, but not quite!#2017-03-1017:02deasI see stack overflowing during symbol resolution with latest ClojureScript sources. Known issue?#2017-03-1018:23mattsfreyupdating to latest and regenerating the stubs seems to have fixed the issue with the lingering notification bar#2017-03-1021:18isakis there a way to turn off the thing where every value in a map gets indented to the same column? this makes behavior doesn't always make sense, and can create massive diffs for small changes#2017-03-1021:41zyloxim intested in that too @isak . i think in most cases it makes sense but my team is never going to get on board with it#2017-03-1021:47zyloxsure looks like it#2017-03-1022:07isak@shaun-mahood wow this is great, thank you!#2017-03-1022:33yonatanel@kauko What is your grammar?#2017-03-1101:16cfleming@kauko Not yet, sorry, although I am planning that.#2017-03-1101:17cfleming@deas No, is there a particular file in the latest CLJS sources that provokes it?#2017-03-1101:17cfleming@mattsfrey That’s great, thanks for letting me know#2017-03-1101:18cfleming@shaun-mahood That’s the one, thanks!
#2017-03-1113:58kauko@cfleming just wanted to say I was able to change my macro so that it works well with the defn grammar. So you're probably right in saying the current built-in grammars are able to handle most cases#2017-03-1113:59kaukoIt's obviously kind of annoying that my editor choice affects my code, but in this case both versions of the macro were equally good#2017-03-1114:00kaukoso doesn't really matter in the end I had to change it#2017-03-1116:03chilleniousis https://github.com/onetom/boot-lein-generate still the way to go if one wants to develop Clojure + Boot + Cursive?#2017-03-1117:32deas@cfleming wrt stack overflow: Not quite sure how to reproduce it. Have seen the issue with v14 and v15. Actually sent the stack using the process built into intellij. Does that reach you?#2017-03-1117:42deas@cfleming Still got the stack overflow around in the logs. No trace of the file triggering the issue, though.#2017-03-1118:32onetom@chillenious i think so#2017-03-1118:34onetomLet me know in a github issue / pull request if there are any missing features#2017-03-1120:47cfleming@deas I’ll look in the tracker for that, thanks#2017-03-1120:48cfleming@kauko Sure, it’s definitely not ideal, but glad you could make this case work!#2017-03-1302:42cfleminghttps://twitter.com/CursiveIDE/status/841117085732298752#2017-03-1307:25yonatanel@cfleming full support for renaming namespaced keywords :)#2017-03-1307:59rauh1. Stub generation for any libraries (so the developer can chose) 2. Automatically switch + send the forms to the right REPL (cljs/clj mixed projects)#2017-03-1311:53shanAnyone had an issue where intellij doesn't show you the a test diff in a new window?#2017-03-1312:31shanFound out it was the venantius/ultra plugin in our profiles.clj file that was messing with the cursive output#2017-03-1316:40favilaI'm trying to hack on clojurescript itself, so I want a repl without figwheel etc tooling on top. Is there a way to get a clojurescript repl in cursive without any other dependencies?#2017-03-1318:03shaun-mahood@favila: I’ve not tried it, but I think if you use use clojure.main in normal JVM process and combine it with the instructions at https://clojurescript.org/guides/quick-start#browser-repl you should be able to get something working.#2017-03-1319:04wilkerluciohello, I'm trying to download the Cursive Datomic stubs, but the link is failing with 404: https://cursive-ide.com/datomic-stubs-0.9.5153.jar#2017-03-1319:05wilkerlucioif someone have this file locally, can you please share it here?#2017-03-1320:38cfleming@wilkerlucio You shouldn’t need them any more with the new stubs functionality - is there a reason you do?#2017-03-1320:39wilkerlucioah, really, I didn't realized that, maybe worth updating the docs#2017-03-1320:39cfleming@yonatanel What is missing from that support that you’d like?#2017-03-1320:39cfleming@wilkerlucio Yes, my docs need some love 😞#2017-03-1320:40cfleming@rauh 1. Yes, this is planned once the stubs generation is stable, 2. That’ll be part of “Better CLJS REPLs"#2017-03-1400:51yonatanel@cfleming Last time I checked you could only change the last part of a namespaced keyword. Sometimes I just want to rename the whole thing.#2017-03-1401:16cfleming@yonatanel No, that’s worked for a while now#2017-03-1406:09onetom@cfleming I think the datomic stub jar is still useful because it has doc strings, so F1 works#2017-03-1406:25tapI want to try 1.5.0 features, but generate and auto complete on project.clj don’t seem to work. How to I determine what’s wrong with my configurations?#2017-03-1407:36pupenoFor the Cursive fans, you may want to show your support here: https://www.producthunt.com/posts/cursive-3#2017-03-1410:04cfleming@onetom The stubs generation feature should generate docstrings too, if it doesn’t that’s a bug worth an issue.#2017-03-1410:05cfleming@tap do you have the beta installed?#2017-03-1410:07cflemingDid you generate the indexes for your maven repos when prompted? Settings-&gt;Build, Execution, Deployment-&gt;Build Tools-&gt;Maven-&gt;Repositories#2017-03-1410:10tapYeah, I don’t have maven integration installed. Will install it#2017-03-1410:13cfleming@tap Yeah, that will be the problem#2017-03-1410:16tapOk. Those features work now after installed maven integration and restarted. Thanks#2017-03-1417:22onetom@wilkerlucio i've just tested with [com.datomic/datomic-free "0.9.5561"] and i can indeed see datomic.api function help after stub generation i had stale experience apparently.#2017-03-1417:23onetom@cfleming dependency auto-completion is awesome! it's a pity im using boot 😕 maybe is shouldn't when it's not absolutely necessary?...#2017-03-1418:56spiedenis it possible to do stub generation within a project? i.e. i have a namespace with a bunch of macro defined vars used by other namespaces w/in the same project#2017-03-1418:58spieden@onetom depends on how sophisticated your build needs are i guess#2017-03-1422:40cfleming@spieden Not yet, but I’m planning to add that.#2017-03-1422:40cfleming@onetom I’m planning to work on boot support soon, and I’ll try to get the completions in there too.#2017-03-1422:41cflemingI’m not sure what you mean by: “maybe is shouldn't when it's not absolutely necessary?..."#2017-03-1514:23timgilbertI'm getting errors about being "unable to index remote maven repositories" since upgrading; the repos in question are private S3 repos that we deploy our own jars to via lein-essthree#2017-03-1514:24favilaSame issue with s3wagon private#2017-03-1514:26favilaI think those simple wagons don't build global indexes of their contents like the real maven repo servers do#2017-03-1514:27favilaThey also have locking problems#2017-03-1514:27timgilbertYeah, was trying to follow these instructions to index manually, but it didn't make a difference: https://stackoverflow.com/questions/5349261/how-to-index-a-maven-repo-without-nexus-artifactory-etc#2017-03-1514:27timgilbert...those are pretty old though#2017-03-1514:29favilaGonna try that on our repos later#2017-03-1515:28timgilbertWell, I tried generating an index with https://github.com/apache/maven-indexer 5.1.2 via https://mvnrepository.com/artifact/org.apache.maven.indexer/indexer-cli/5.1.2-4333789#2017-03-1515:29timgilbert...but I still see an error in IntelliJ under the "repositories" tab#2017-03-1515:29timgilbert"Wagon exception connecting to" my repo#2017-03-1515:29timgilbertI'll open a ticket for it#2017-03-1515:30timgilbertOr add to the existing one actually : https://github.com/cursive-ide/cursive/issues/1064#2017-03-1515:36favilaI don't have this issue, I use s3-wagon-private and cursive can download those deps just fine#2017-03-1515:38timgilbertHmm, yeah, I can download them OK but not index them, seemingly#2017-03-1515:39timgilbert...though maybe intellij is just getting them from my local repo, now that I think about it#2017-03-1515:45favila@timgilbert how did you mount the s3 as a drive so the indexer could run on it?#2017-03-1515:46timgilbertI didn't. What I'm doing is deploying datomic-pro jars out to S3, so I've got a little shell script that installs it to a local directory via maven and then syncs that to S3#2017-03-1515:47timgilbertMost of it is this little block:
tmp=$(mktemp -d -t 'datomic-jar-deploy')
mvn deploy:deploy-file \
    -Dfile=${jar} \
    -DgroupId=com.datomic \
    -Dversion=${version} \
    -DartifactId=datomic-pro \
    -Dpackaging=jar \
    -Dmaven.repo.local=${tmp} \
    -DpomFile=pom.xml \
    -DcreateChecksum \
    -Durl=file:${tmp}

runMavenIndex $tmp

aws s3 sync ${tmp} ${S3_MAVEN_ROOT} \
    || die "aws s3 sync ${tmp} ${S3_MAVEN_ROOT} failed: $?"
#2017-03-1515:48timgilbert...plus this to do the indexing:
function runMavenIndex() {
  local repo=$1
  java -jar ${INDEXER_JAR} -r ${repo} -i ${repo}.index -n "my-repo-name"
}
#2017-03-1515:49faviladon't you need to run the index against the entire contents of s3, not just the particular artifact you are uploading?#2017-03-1515:50favilaalthough I would still expect an index to work, just only have one entry in it#2017-03-1515:50timgilbertWell, yeah in theory, but I've only got a few other jars I care about so I wanted to get this working first#2017-03-1515:52timgilbertI could see it also working as a "download full s3 repo; index locally; sync back to s3" sequence, not super efficient but presumably workable#2017-03-1515:53timgilbertBut without IntelliJ getting the index file to start with that seems moot#2017-03-1519:59souenzzoIs there any integration with eastwood? Some like "eastwood this ns"?#2017-03-1600:25bherrmannboo. cursive in CE isnt opening my new vase project....#2017-03-1600:25bherrmannI’m trying to open the project.clj from the splash dialog… I get the open as project, choose delete existing metadata.... then get a big nothing....#2017-03-1600:26bherrmannIntelliJ IDEA 2016.3.5 Build #IC-163.13906.18, built on March 6, 2017 JRE: 1.8.0_112-release-408-b6 x86_64 JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o#2017-03-1600:26bherrmannCursive: Version: 1.4.3-2016.3#2017-03-1601:08cfleming@bherrmann Is there an example I can look at? Vase is Paul DeGrandis’ new thing, right? Is there a lein template or something I can create a project from?#2017-03-1601:10shaun-mahood@cfleming: Links in https://github.com/cognitect-labs/vase for the lein template#2017-03-1601:11cfleming@timgilbert @favila: I’ll take a look at this. This is built on the IntelliJ Maven functionality, so there might be better doc for that.#2017-03-1601:11cfleming@shaun-mahood Thanks!#2017-03-1601:44bherrmannIt is possible that is has nothing to do with vase#2017-03-1601:45bherrmannor cursive… I did get a message about the leinigen plugin having a problem#2017-03-1601:48bherrmann$ lein new vase xjxj#2017-03-1601:49bherrmannstart Intellij, choose Open, choose xjxj/project.clj, Get “project.clj is a project file” - click “Open as Project"#2017-03-1601:49bherrmannthen I get a big box of silence.#2017-03-1601:55bherrmannOk, when I open an older project. I get an error in the event dialog....#2017-03-1601:55bherrmanncom.intellij.openapi.actionSystem.impl.ChameleonAction cannot be cast to com.intellij.openapi.actionSystem.DefaultActionGroup java.lang.ClassCastException: com.intellij.openapi.actionSystem.impl.ChameleonAction cannot be cast to com.intellij.openapi.actionSystem.Default\ ActionGroup at de.janthomae.leiningenplugin.navigator.LeiningenProjectNavigatorPanel.<init>(LeiningenProjectNavigatorPanel.java:30) at de.janthomae.leiningenplugin.navigator.LeiningenProjectNavigator.addPanel(LeiningenProjectNavigator.java:58) ...#2017-03-1601:57bherrmannactually… this is 2017 so I can share a screenshot...#2017-03-1601:58bherrmann(so this might be a red herring, it is for a project which appears to work ok.)#2017-03-1601:59cfleming@bherrmann Do you have the old Leiningen plugin installed?#2017-03-1601:59cflemingIt looks like you do.#2017-03-1601:59cflemingYou need to remove that, since Cursive bundles its own and they will conflict.#2017-03-1602:00bherrmannsays Leiningen Version: 0.0.3#2017-03-1602:00bherrmannok.#2017-03-1602:00bherrmannI will remove it.#2017-03-1602:00cflemingYeah, uninstall that plugin, Cursive has lein support baked in.#2017-03-1602:00cflemingYou’ll probably need to re-import your project.#2017-03-1602:00bherrmannok#2017-03-1602:04bherrmannsuper! it and I am in a happy place again.#2017-03-1602:05bherrmannWould be nice if it smacked me around with a dialog or such when/if that incompatible plugin is isntalled#2017-03-1602:05bherrmannalthough I vaguely now recall instructions to that effect....#2017-03-1602:06bherrmannI guess you dont have easy access to that information… or you would have done that… to save yourself time talking to noobs#2017-03-1602:11cfleming@bherrmann Yeah, I could actually do that for that plugin - the bigger problem is a couple of conflicting Clojure plugins, which I can’t detect as easily.#2017-03-1620:18wildermuthnHi there. What are the stubs that Cursive is generating? I see various things in the issue queue about it, but I can’t seem to find info about what they are and why they are used.#2017-03-1620:23shaun-mahood@wildermuthn: Not sure if this covers what you need, here are the release notes from when it was added. https://groups.google.com/d/topic/cursive/ycMZAF29RZQ/discussion#2017-03-1620:26wildermuthnah, thanks!#2017-03-1620:27wildermuthnI see, this is particular to certain libraries. Cool.#2017-03-1701:13cfleming@wildermuthn Yes, it will be configurable to any namespace once it’s stabilised.#2017-03-1717:39bfabryI seem to have lost more clojure.core functions and anything defined in my user.clj from repl autocompletion/recognition since 1.5.0-eap#2017-03-1717:49genecany idea why when I type a simple expression in the repl, it works fine, but if I try highlighting and running it from the editor it fails? (reduce + [1 2 3]) => 6 (reduce + [1 2 3 4 5]) CompilerException java.lang.RuntimeException: Unable to resolve symbol: reduce in this context, compiling:(C:/github/clojure/reactor/src/reactor/utils.clj:6:1)#2017-03-1718:43rauh@genec Eval the (ns ..) form at the top of your file#2017-03-1718:43rauhSee:
(in-ns 'nonexisting-namespace)
(inc 0)
=> Unable to resole namespace error....
#2017-03-1718:47genec@rauh Thank you!#2017-03-1722:03a2_himmelafter an intellij update i can't type in the REPL input windowpane any more--the tooltip says "This window is read-only". Any ideas?#2017-03-1722:05shaun-mahood@a2_himmel: What version of IntelliJ and Cursive are you on now?#2017-03-1722:06a2_himmel@shaun-mahood Intellij Community Version: 2016.3.5 Build: <tel:163.13906.18|163.13906.18> Released: March 6, 2017#2017-03-1722:07a2_himmel@shaun-mahood Cursive Version: 1.4.3-2016.3#2017-03-1722:09shaun-mahood@a2_himmel: I'm on the same versions of both (running Windows 10) and I haven't run into that. You could try creating another REPL config, or re-importing the project (assuming that's not super painful) to see if that fixes it.#2017-03-1722:11a2_himmel@shaun-mahood thanks shaun, that worked! have a good weekend#2017-03-1801:39cfleming@bfabry Have you lost all symbols from clojure.core, or just some of them?#2017-03-1802:44cfleming@bfabry Also, how are you defining symbols in your user.clj? Is that just some defns for reloaded, or something?#2017-03-1807:39bfabrythe symbols in user.clj might be a lost cause (though they worked previously) as my user.clj is off the source-path and then loaded using repl-options at startup to avoid the "oh hey user.clj is loaded prior to the cp being set up properly" problem#2017-03-1807:39bfabryI can't find any symbols in clojure.core that don't come up as 'unresolved' in the repl, including + etc#2017-03-1812:50achikin@a2_himmel double check that repl is connected. It happens to me from time to time when I forget to connect.#2017-03-2001:02cfleming@bfabry Your user.clj symbols should still be loaded. I think you have something else going on, since the clojure.core thing is extremely suspicious too.#2017-03-2001:02cflemingAre you working in user, or another ns?#2017-03-2001:49bfabryuser#2017-03-2108:12pelletierHi there! Given the two following Clojure files:
; file myprotocol.clj
(ns myprotocol)

(defprotocol MyProtocol
  (method-one [this arg]))

; file mytype.clj
(ns mytype
  (:require [myprotocol])
  (:import [myprotocol MyProtocol]))

(deftype MyType []
  MyProtocol
  (method-one [_ arg] (str "arg is:" arg)))
Cursive is having issues resolving method-one https://cl.ly/47383n1t370w Any idea what's up?
#2017-03-2108:24cfleming@pelletier When you’re implementing a protocol, you need an extra this parameter.#2017-03-2108:26pelletiernot sure what you mean#2017-03-2108:27pelletier(method-one [this arg] ...) ?#2017-03-2108:27cflemingAh, no, sorry, you’re right#2017-03-2108:29cflemingI think the problem is that you don’t need the import. What you’re doing there is implementing the interface generated by the protocol, and the method there will be called method_one.#2017-03-2108:30cflemingI think you can delete the import, (:require [myprotocol :as p]) and then (deftype MyType [] p/MyProtocol ...)#2017-03-2108:30pelletierha#2017-03-2108:30pelletiernice#2017-03-2108:30pelletiergot it#2017-03-2108:30pelletierthanks 👍#2017-03-2108:30cflemingNo worries!#2017-03-2113:56zyloxoh...that explains a lot#2017-03-2118:49cflemingIt would probably be a good idea to have a warning that you’re implementing a protocol interface rather than the protocol itself.#2017-03-2118:51cfleminghttps://github.com/cursive-ide/cursive/issues/1689#2017-03-2120:32yonatanelThe Tools->REPL menu acts weird on a lib when I try to run tests. Sometimes the action to run tests is enabled and sometimes not, sometimes I can move to the tests namespace in REPL and sometimes not. What's the surest way to make it work consistently? I don't mind adding a bunch of redundant configuration if necessary.#2017-03-2120:33yonatanelBy moving to tests ns I mean requiring it or (in-ns ...) to it.#2017-03-2121:47danielcomptonI've noticed in the most recent EAP's that Refresh Leiningen Projects only works when you are in a project.clj file#2017-03-2121:47danielcomptonThe old behaviour allowed it from anywhere (I think)#2017-03-2121:47danielcomptonIs this an intentional change?#2017-03-2121:48danielcomptonhttps://xkcd.com/1172/#2017-03-2200:02thosmosjust installed cursive into a fresh IdeaC 2017.1 on Ubuntu 16.04 and after restarting, IdeaC fails to load and hangs#2017-03-2200:03cfleming@thosmos Which version did you install?#2017-03-2200:04thosmosnot sure, it was the one that shows up when you search plugin repositories from within IdeaC#2017-03-2200:05thosmoswill try again#2017-03-2200:05cflemingI think that might be https://github.com/cursive-ide/cursive/issues/1210 - this is fixed in the latest EAP build, but not the release builds.#2017-03-2200:07cfleming@thosmos If you don’t have Cursive configured to install EAP builds, you can install this one one-off by downloading https://plugins.jetbrains.com/plugin/download?updateId=33304 and then installing it using Settings-&gt;Plugins-&gt;Install from Disk...#2017-03-2200:11thosmosthat didn't fix it#2017-03-2200:12thosmosif I remove the plugin from ~/.Idea/config/plugins then it loads fine#2017-03-2200:12thosmosis there a place to download older versions of IdeaC? I can't find anything but 2017.1 on their website#2017-03-2202:06cfleming@thosmos https://www.jetbrains.com/idea/download/#section=linux, check the “Previous versions" link.#2017-03-2202:06cflemingI’m concerned that it’s hanging, though 😞#2017-03-2202:06thosmosoh! I missed that#2017-03-2202:06cflemingIt works fine on 2017.1 for me.#2017-03-2202:07cflemingActually, I’m still on the EAP, I didn’t notice the release - I’ll get the release and check.#2017-03-2202:21cfleming@thosmos So it works fine for me with the 2017.1 release, and I’m pretty sure others have had it working for a while too.#2017-03-2202:22cflemingDo you have many other plugins installed?#2017-03-2202:22thosmoson ubuntu 16.04?#2017-03-2202:22cflemingNo, but I’d be very surprised if there were some platform interaction - I’ve literally never had a problem with that, barring a few Swing UI issues.#2017-03-2202:23cflemingIt’s much more likely to be some incompatibility between plugins - that has happened from time to time before.#2017-03-2202:24thosmosi didn't have anything other the the default ones installed. maybe it was something about the project I had loaded, which was non-clojure#2017-03-2202:24thosmosi'll try again#2017-03-2202:24cflemingCould you check for auto-generated thread dumps, as described here: https://intellij-support.jetbrains.com/hc/en-us/articles/206544899-Getting-a-thread-dump-when-IDE-hangs-and-doesn-t-respond?#2017-03-2202:33thosmosit worked this time. I created a blank project first, so that once the plugin was installed, it would open to the blank project instead of my other one.#2017-03-2202:33thosmosseems like it was something in my other project#2017-03-2202:40cfleming@thosmos Ok, let me know if the problem occurs again and we can investigate.#2017-03-2202:40thosmosok thanks for your responsiveness#2017-03-2202:52cfleming@danielcompton No, that’s not expected - I think that’s a side effect of making the action available in the menus#2017-03-2202:53cfleming@yonatanel Generally, those actions are only available when you have an active REPL#2017-03-2208:29yonatanel@cfleming It was active. I'll keep working with it and see.#2017-03-2209:27achikinCan’t understand how Thread element under cursor works#2017-03-2209:27achikinI have a form say (a (b (c d)))#2017-03-2209:27achikinWhen i place cursor on d and press a hotkey - it gives me (a (b (-> d (c))))#2017-03-2209:28achikinWhen I select the whole form and ask cursive to thread it - it gives me error Element must be within a list#2017-03-2209:29achikinOr Cannot thread element at this position#2017-03-2209:32achikinAha, got it.#2017-03-2209:33achikinBut it leaves braces even if there are no parameters in forms (-> 1 (+) (-) (+))#2017-03-2209:47cfleming@achikin Right, that should be a config setting - personally I like that.#2017-03-2213:51yonatanel@cfleming I think to run tests they must be open in the current edit tab, otherwise my only option is to run the last test command.#2017-03-2213:52yonatanelAND initially you have to also be in that namespace in repl.#2017-03-2217:32polymerisIDEA 2016.2.5#2017-03-2217:35polymerisputting :as params on its own line (as it should be), seems to fix it#2017-03-2217:55carocad@cfleming quick question. does the cljs environment support automatic recognition of file namespace on form evaluation? I find myself constantly going to the top of the file and evaling the ns form so that everything gets def'ed on the correct ns 😞#2017-03-2221:35cfleming@yonatanel Yes, you can re-run the previous tests you ran, or run one or all tests from the current ns.#2017-03-2221:36cflemingYou shouldn’t have to be in that NS in the REPL, though.#2017-03-2221:36cflemingIf you’d prefer that to work in some other way I’m open to suggestions.#2017-03-2221:37cfleming@polymeris That looks bad, could you file an issue for that please?#2017-03-2221:38cfleming@polymeris Actually, I filed https://github.com/cursive-ide/cursive/issues/1690#2017-03-2221:39cfleming@carocad I’m not sure what you mean - do you mean that when you send a form from the editor, that it gets evaluated in the file namespace?#2017-03-2316:40carocadyes exactly. Lets say I am in file core.cljs with ns example.core and then I switch to another file fabric.cljs with ns example.fabrich and eval a form there. The evaled symbol is reported as #example.core/my-symbol not as #example.fabric./my-symbol which is what I was expecting#2017-03-2316:41carocadI must say though that I have quite a special configuration. I have a react-native app with a figwheel repl connected to cursive so I dont know if that has some effect on it#2017-04-0718:05carocad@cfleming are you use to thread conversation? 🙂#2017-04-0722:16cfleming@carocad Yes, but I did miss this one, I’m not sure how#2017-04-0722:18cflemingThere’s a config setting for this: Settings-&gt;Languages &amp; Frameworks-&gt;Clojure-&gt;Evaluate forms in REPL namespace - does that help?#2017-04-0722:18cflemingHow are you connecting your Figwheel REPL - using nREPL?#2017-04-0812:13carocadno worries. I am using the setup in this wiki: https://github.com/bhauman/lein-figwheel/wiki/Running-figwheel-in-a-Cursive-Clojure-REPL#2017-04-0812:15carocadunfortunately the option that you told me to enable didnt fix the problem 😞#2017-04-0812:15carocadin case it might help, here is the project.clj that I am using. https://github.com/n7a235/phone.app.hive/blob/master/project.clj#2017-04-0812:16carocadit is still a very unstable thing so I wouldnt bet on it but it could provide you more information#2017-03-2223:16cfleming@bfabry Are you still having that problem with the REPL completion?#2017-03-2223:33bfabryI am, but I've been caught up with other stuff. I'll try some things next week to fix it#2017-03-2223:44cflemingOk, no worries.#2017-03-2223:45cflemingLet me know when you have some time to debug it.#2017-03-2310:14stijnis there a way to run or connect to a Node.js REPL. I can't seem to find any documentation on that.#2017-03-2310:22stijnok, got it to work with these instructions: https://github.com/cursive-ide/cursive/issues/835#2017-03-2310:23stijnthey are a bit outdated though, as you don't need to add clojurescript jar as a library anymore#2017-03-2315:30isakI keep getting messages about "Your project requires namespaces which need stubs to be generated." Anyone know what this is?#2017-03-2400:17bastiCan I configure the layout of the REPL window whereas the output is displayed at the bottom and the input field at the top?#2017-03-2400:55cfleming@isak See: https://groups.google.com/d/topic/cursive/ycMZAF29RZQ/discussion#2017-03-2400:55cflemingIf you’re having problems with this, there are several fixes in the 1.5.0 EAPs, which are out now. I’m hoping to do a stable release next week sometime.#2017-03-2400:56cfleming@basti No, unfortunately that’s not possible.#2017-03-2401:46Lone Rangerhaving same issue 😅 not sure what I'm doing wrong#2017-03-2402:21Lone Rangerokay, think I at least partly figured it out... I think it's just freaking out about macros#2017-03-2402:22Lone Ranger
(defn app-container [cursor component]
  (reify
    om/IRender
    (render [this]
      (dom/div nil
        (dom/h1 nil "Lab notebook")
        (dom/button #js {:className "btn btn-warning"
                         :onClick undo}
          "Undo")
        (dom/span nil (str (count @apphistory)))
        (dom/div #js {:style #js {:marginTop "12px"}}
          (om/build item-table cursor))))))
#2017-03-2402:22Lone Rangereverywhere it says dom/whatever (this is for om) I'm getting the yellow syntax highlighting#2017-03-2402:24Lone Rangerthere's nothing defined in om.dom for those things so (new to Clojure, can't quite trace what happens when you call dom/whatever, it's just magic to me right now)#2017-03-2612:29rarousThese functions are generated by macro.#2017-03-2402:24Lone RangerOr maybe I'm wrong and it just couldn't generate the stub code?#2017-03-2402:47Lone Rangerokay... what I said apparently isn't entirely true since I just tried it with the om tutorial and it generated stubs just fine#2017-03-2415:14borkdudeDoes Cursive support renaming directories and namespace names + requires alike?#2017-03-2416:28borkdudeDoesn’t seem so. Emacs it is 😉#2017-03-2416:33dnolendoes Cursive work with Intellij 2017.1?#2017-03-2416:34dnolenI looked around at the mailing list and I didn’t see anything obvious#2017-03-2416:35borkdudeI just upgraded IntelliJ and then it said my Cursive upgrade period is over :-S#2017-03-2416:36borkdudeI’m hardly using it anyway, but I bought a license just to support the amazing work in this area 😄#2017-03-2416:50timgilbert@dnolen: seems to work, have been running it for a day or two with no problems#2017-03-2417:09dnolen@timgilbert ok cool#2017-03-2417:40kanweiYup works in 2017.1 just fine here#2017-03-2417:47dnolencool making the jump then 🙂#2017-03-2418:58cfleming@borkdude No, that’s next on my refactoring list.#2017-03-2418:59cfleming@goomba I posted a link above which explains how the stubs work. There are some problems with them which are (hopefully) fixed in the latest series of EAP builds. They should be stable next week.#2017-03-2419:12Lone RangerGreat, thank you. You did cursive? Impressive and daunting task. Take all my money!!#2017-03-2420:10cfleming@goomba I only need a small bit of it, thanks 🙂#2017-03-2601:44rayk@cfleming - Colin I am getting an intellj warning each time I change my project.clj "Leiningen projects need to be imported" with link "Import Changes". I have have search far and width for a setting to auto import but can not find one. I am using the EAP of cursive with intellj 2017.1. Thanks in advance.#2017-03-2601:44cfleming@rayk There’s no auto-import right now#2017-03-2601:45cflemingFor the moment, just make the changes and then hit the link.#2017-03-2601:46raykKool... I am glad it was not an option somewhere I could not find. Thanks... the warning message is not ready a problem...#2017-03-2708:27moizsj@cfleming Hey Colin. Any chances of this coming soon? https://github.com/cursive-ide/cursive/issues/1439#2017-03-2714:38Lone Rangermorning morning... qq: does intellij ultimate vs intellij community have any impact on cursive features?#2017-03-2715:25tord@goomba: If you are only doing Clojure development, I'm pretty sure there is no difference.#2017-03-2716:05Lone RangerI wouldn't think so but would like to make sure 🙂#2017-03-2717:05genecI'm having trouble setting up the cursive keybinding shortcuts, settings > keymap > clojure keybinding > cursive as the apply button is grayed out. It doesn't seem to match the cursive website instructions. I have been able to map ctrl-enter to "send form before caret to repl"#2017-03-2717:08genecWill anyone be at clojure west this week who would want to do a cursive setup / best practices un-session?#2017-03-2717:24zyloxare you on the default profile?#2017-03-2717:25zyloxsometimes intellij is really bad abour telling you when you have to copy a profile (in my opinion) to be able to change it#2017-03-2722:28cfleming@moizsj I haven’t planned it, but it’s certainly one that is getting more useful with spec#2017-03-2722:29cfleming@goomba No, there’s no difference right now (deliberately). There’s a possibility that the CLJS support might integrate with IntelliJ’s JS support at some point, but I’ll only do that if Cursive could work in a cheaper IDE providing that support (i.e. WebStorm etc)#2017-03-2722:30cflemingCurrently it can’t because the Java support is not a pure plugin, so it can’t run in WebStorm or the other IDEs. They have a project to fix that but I believe it’s stalled.#2017-03-2722:31Lone Rangergotcha gotcha#2017-03-2722:31Lone Rangerjust wanted to make sure I wasn't missing out on anything, thanks 🙂#2017-03-2722:36cfleming@genec Can you send a screenshot of the keybindings screen you’re looking at?#2017-03-2722:37cfleming@serioga So, there is some support for that, and I’d expect it to work if you have no symbol resolution issues.#2017-03-2722:38cflemingGoing to the decl of .getElementById won’t be very useful in general, it’s just a stub#2017-03-2722:38cflemingBut I guess the Rx stuff would be.#2017-03-2722:53cfleming@rauh You’re still getting that arity error in the REPL?#2017-03-2722:53cflemingCan you try (meta #‘cursive.repl.runtime/completions) and see what it comes back with?#2017-03-2723:02a2_himmelin cursive/intellij, on ctrl-alt-L (format code), I'm getting hideous 6 character wide indents, even though my editor/code style settings for Clojure files is 2. Any ideas on this? Is there a separate setting for Cursive? For ClojureScript?#2017-03-2723:03cfleming@a2_himmel Can you send a screenshot of a form formatted like this?#2017-03-2723:05cflemingThe issue is that your symbols are not being resolved for some reason.#2017-03-2723:05cflemingWhich is why they’re all marked in yellow.#2017-03-2723:05a2_himmelhmmm, yeah, i've been ignoring that for now#2017-03-2723:06cflemingThis is CLJS?#2017-03-2723:06a2_himmelyeah, in a re-natal om-next template project#2017-03-2723:06cflemingYes, it must be, just saw the js/#2017-03-2723:07cflemingOk, look in your project toolwindow, and expand out your External Libraries - is ClojureScript in there?#2017-03-2723:07cflemingThis is a lein project?#2017-03-2723:08a2_himmelit's not in there#2017-03-2723:08a2_himmeland it is a lein project#2017-03-2723:08cflemingOk, open your lein toolwindow (_View->Tool Windows->Leiningen) and check to see if your project is registered there.#2017-03-2723:08a2_himmelno#2017-03-2723:09cflemingOk, in the project toolwindow, right click your project.clj, and select “Add as lein project"#2017-03-2723:09a2_himmeladded it there, looks good!#2017-03-2723:09a2_himmelnow only the js/ commands are in yellow, as well as the ReactNative stuff#2017-03-2723:09cflemingOr through the lein toolwindow, right.#2017-03-2723:09cflemingOk, and reformatting should look nicer#2017-03-2723:10a2_himmelit does, thank you#2017-03-2723:10cflemingGreat.#2017-03-2723:10cflemingThe js/* stuff is a bit hit and miss, some will work but there’s no type inference or anything like that, which would help a lot with that.#2017-03-2723:13a2_himmelcool. i'm pretty new to the toolchain, though i've been reading up on clojure for a year. making something for mobile in it is kind of like being a kid in a candy store, i'm trying to take it all in without getting overwhelmed#2017-03-2723:13cflemingNice, I’m excited for React Native too, but I haven’t had time to play around with it yet.#2017-03-2808:04seriogawell, it does not work for me (that's why I ask) 😞 I have no symbol resolution issues.#2017-03-2809:28yonatanelIs there a reason not to use Synchronize Leiningen Projects in the REPL run configuration? I find that running is not faster without it.#2017-03-2817:11bastiHey, I do have a mies cljs project and started the node.js REPL, but I'm unable to remote connect with cursive. Is there something I'm doing wrong? 😕#2017-03-2818:55hannahare you connecting to the same port that the repl is running on?#2017-03-2820:20bastiyes I am 🙂#2017-03-2820:20souenzzoNot sure if cursive or midje problem, but cursive detect midje.sweet/contains and midje.sweet/just as arity 2, but they are "var arity"#2017-03-2820:28jstewI'm thinking about giving cursive another try. Does it support boot? The main cursive page seems to suggest that it does not.#2017-03-2820:47cfleming@yonatanel You probably don’t need it, but assuming that all your deps are cached locally it probably doesn’t make things noticeably slower#2017-03-2820:49cfleming@basti The remote REPL config is only for nREPL at this stage, and the node.js REPL doesn’t support that AFAIK#2017-03-2820:57cfleming@basti For a node.js REPL at the moment, you have to do something similar to the CLJS Quick Start, and use a clojure.main REPL.#2017-03-2820:58cfleming@jstew It doesn’t support boot natively yet, no. The usual workaround is to use a boot task which creates a project.clj, and then you just pretend to Cursive that you’re using lein.#2017-03-2820:58cfleming@jstew See https://github.com/boot-clj/boot/wiki/For-Cursive-Users#2017-03-2823:09jstewthanks!#2017-03-2917:49kestrel7Since upgrading to IntelliJ 2017.1 I’ve been getting the following when launching the REPL, any ideas? Class JavaLaunchHelper is implemented in both /Library/Java/JavaVirtualMachines/jdk1.8.0_40.jdk/Contents/Home/bin/java (0x1008054c0) and /Library/Java/JavaVirtualMachines/jdk1.8.0_40.jdk/Contents/Home/jre/lib/libinstrument.dylib (0x1008cd4e0). One of the two will be used. Which one is undefined.#2017-03-2917:51kestrel7In fact it also happens when I run any lein task as well.#2017-03-2919:12raroussame here#2017-03-2920:37cfleming@kestrel7 @rarous Yes, I see that too. It seems to be something quite low-level in the OSX Java implementation, but I don’t know what it means.#2017-03-2921:16redingerI noticed that on upgrading, and found this on SO: https://stackoverflow.com/questions/43003012/objc3648-class-javalaunchhelper-is-implemented-in-both
#2017-03-2921:16redingerI’ve decided to wait it out, but there are suggestions there for working around it#2017-03-2921:24kestrel7@cfleming @redinger think I'll wait it out as well. Thanks. #2017-03-3008:12achikinBtw regarding https://github.com/cursive-ide/cursive/issues/1698 how do you find out a repl port through leiningen? Sometimes I lunch a repl that generates a lot of logs and I can’t find out the port in the log output.#2017-03-3008:19danielcomptonLein creates a .nrepl-port file when it starts up#2017-03-3008:19danielcomptonOr something similar#2017-03-3008:19danielcomptonOr look at the welcome message, it prints it there too#2017-03-3008:20tengstrandThe plugin Changes Bar does not work with Cursive. It’s my favourite plugin, so I really miss it. Any plans to fix this?#2017-03-3008:36cfleming@achikin Right, as @danielcompton says, lein creates a file containing the port. This is what Cursive uses when you select the lein option as suggested in that issue, and I assume what Cider uses.#2017-03-3008:37cfleming@teng I’m not familiar with that plugin, what’s the problem?#2017-03-3008:38tengstrand@cfleming After you have installed the plugin and restart Idea, then Idea can’t open a project again (you get an error message), so you have to uninstall the plugin to make it work again.#2017-03-3008:41tengstrandThe cool thing with "Changes Bar” is that you can work with several change lists within Idea which is very handy.#2017-03-3008:43cfleming@teng What is the error message/stacktrace?#2017-03-3008:44achikin@danielcompton @cfleming thank you!#2017-03-3008:47cfleming@teng Can you check the log for an exception? Help-&gt;Show log in Finder/Explorer#2017-03-3009:15cfleming@teng I see that error but it’s nothing to do with Cursive as far as I can tell#2017-03-3009:16cflemingThe Changes Bar plugin is trying to load an icon, it fails (looks like it’s misspelled: /runConfigurations/testOuput.png) and that exception during startup causes the plugin to fail.#2017-03-3009:17tengstrand@cfleming Ok, thanks. The reason that I thought it had something to do with Cursive was that the plugin worked before, when I programmed in Java.#2017-03-3106:15jimmycan we sort and remove duplicate deps ( in :require and :import ) in cursive ?#2017-03-3107:02cfleming@nxqd Not yet, but that’s coming soon.#2017-03-3107:03jimmy@cfleming great, it's good to know 😄#2017-03-3107:11lsentaHow do you use reader conditionals + parinfer + code reformatting?#2017-03-3107:11lsentaMy requires get all messed up#2017-03-3108:49cfleming@lsenta Got an example?#2017-03-3109:04lsenta@cfleming I talked too fast, the code end up weirdly formatted but not broken.#2017-03-3109:06lsenta
(ns ...
  (:require ...
            [taoensso.timbre :as log :include-macros true]
    #?(:clj
            [clojure.core.async :as async :refer [<! >! go]]
       :cljs [cljs.core.async :as async :refer [<! >! go]]))
  #?(:cljs
     (:require-macros [cljs.core.async.macros :refer [go]])))
Are the line return and non alignment expected?
#2017-04-0206:08lsenta@cfleming
(ns budb.test.helpers
  (:require
    [taoensso.timbre :as log :include-macros true]
    #?(:clj
       [clojure.core.async :refer [<! >! go go-loop put! <!! timeout]]
       :cljs
       [cljs.core.async :refer [put! chan <! >! timeout close! take! alts!]])))
#2017-04-0206:08lsentaOr
(ns budb.test.helpers
  (:require
    [taoensso.timbre :as log :include-macros true]
    #?(:clj [clojure.core.async :refer [<! >! go go-loop put! <!! timeout]]
       :cljs [cljs.core.async :refer [put! chan <! >! timeout close! take! alts!]])))
#2017-04-0206:08lsentaAfter autoformat, the code becomes
(ns budb.test.helpers
  (:require
    [taoensso.timbre :as log :include-macros true]
    #?(:clj) ;; <<<< PROBLEM
    [clojure.core.async :refer [<! >! go go-loop put! <!! timeout]
       :cljs [cljs.core.async :refer [put! chan <! >! timeout close! take! alts!]]]))
#2017-04-0207:23cfleming@lsenta Thanks, I’ll take a look on Monday#2017-03-3121:55rauhSince the last update I'm getting a 100% CPU usage my clojure process when I connect a CLJ repl to it. I can see the NREPL thread running at 100% of my process. Killing the REPL windows in cursive brings it back down to 0.#2017-03-3122:00rauhI don't think I had the #1554 issue before the update#2017-03-3122:04rauhAlso seems to be constantly loading new classes (or define classes probably)#2017-03-3122:14rauh(not a clojurescript repl)#2017-03-3123:38cfleming@rauh Ugh, ok, thanks, I’ll take a look on Monday#2017-04-0104:35rauh@cfleming Sound good, no rush. I have 4 cores 🙂 . Ping me if you need more info#2017-04-0106:18jimmyI got this error while running test in current repl: It is not in scope for the module used to start the REPL . Didn't remember what I change, yesterday things seem to work fine.#2017-04-0210:42cfleming@rauh Just to check, you’re getting 100% usage in the nREPL server, i.e. your app, not Cursive - correct?#2017-04-0210:42rauhYes!#2017-04-0210:43cflemingOk, thanks, I’ll try to reproduce tomorrow.#2017-04-0218:54qqqIs Cursive programmable in clj/cljs like emacs is programmable in elisp ?#2017-04-0219:28mkeathley@qqq Not quite. Cursive is essentially a very sophisticated plugin for the intellij platform. Because the Intellij platform is build in Java, Clojure interop is relatively easy. I don’t believe there’s any possible way to extend cursive at this moment, however you can write your own clojure specific extensions on your own#2017-04-0222:42cfleming@qqq No, but I’m planning to open up an extension API. It’s probably a while away though.#2017-04-0223:55qqq@cfleming : looking forward to it, optimal dev would be spacemacs on cursive 🙂#2017-04-0309:19cfleming@rauh https://github.com/cursive-ide/cursive/issues/1701, so I don’t forget#2017-04-0309:20cfleming@nxqd Sorry, I missed your message - that means that the module you’re loading that code from isn’t on the classpath of your REPL#2017-04-0309:20jimmyah no worry, I have solved the problem. Thanks anyway.#2017-04-0309:38rauh@cfleming Sounds good, let me know if I can help. I could probably log the repl msgs in a custom nrepl server.#2017-04-0310:08cfleming@rauh Ok, I’ll let you know if I can’t reproduce easily.#2017-04-0313:10tjtoltonHow do I get the run configuration in IntelliJ to use alternate lein plugins#2017-04-0313:10tjtoltonlike, if I want the equivelant of "lein figwheel"#2017-04-0313:10tjtoltonhow do I set that up in the run config?#2017-04-0315:20quartzI’m not sure that’s possible, you might have to do it programatically in a file and load that file on your repl/jar like as a source#2017-04-0315:20quartzYou can even make that process depend on what profile you run#2017-04-0315:20quartz@tjtolton#2017-04-0315:21tjtoltonhahaha#2017-04-0315:21tjtoltonthat's pretty silly, but not too hard#2017-04-0315:21tjtoltonthanks!#2017-04-0315:21quartzI'll get you an example sec#2017-04-0315:21quartzhttps://github.com/bhauman/lein-figwheel/wiki/Running-figwheel-in-a-Cursive-Clojure-REPL#2017-04-0315:22tjtoltonoh wow, that's a pretty great example!#2017-04-0315:24quartzmetal#2017-04-0322:24cfleming@tjtolton Having that be automatic for Figwheel (not arbitrary plugins) is coming soon#2017-04-0322:54cfleming@wilkerlucio: Question about https://github.com/cursive-ide/cursive/issues/1693#2017-04-0322:55cflemingSo I have this modified so that the namespace is stored in the REPL history, and is used by REPL commands and also the REPL history search.#2017-04-0322:56cflemingThe question is what to do with commands which are entered in the REPL editor window, and are implicitly executed in the current REPL namespace.#2017-04-0322:56cflemingShould those also store the namespace they were executed in, or should they always just execute in the current ns?#2017-04-0322:56cflemingAny opinions welcome.#2017-04-0400:27wilkerluciogood question, IMO I think it should retain the last namespace where it was executed, I think this most likely what user wants, I find hard to find a case where I want the same command to run in a different NS that it ran before#2017-04-0400:27wilkerlucio@cfleming ^^#2017-04-0400:30cfleming@wilkerlucio Makes sense, thanks!#2017-04-0400:31wilkerlucioyou'r welcome, thank you for taking the time to improve that 🙂#2017-04-0400:32cflemingNo worries, that will be in the next build#2017-04-0419:37puzzler@wilkerlucio A common situation: I type an expression at the REPL and realize I'm in the wrong namespace because it doesn't work as expected. I switch namespaces and re-evaluate the expression from the history. So this is a concrete example where you don't want the namespace stored with the command.#2017-04-0419:39wilkerluciook, fair enough, but you think this is more common than switching the namespace and still want to run the same command on the new one?#2017-04-0419:40wilkerlucioto be honest, I don't care much about this scenario, I usually run commands from inside (comment) blocks on my code, so I rarely run then on the wrong namespace#2017-04-0419:41wilkerluciobut still, in the case you mentioned, you would only have to go to REPL and use up, return to rerun on the current one, and from then you could use the Run Last REPL command, sounds reasonable?#2017-04-0419:42puzzlerI use arrow keys in the REPL to access history, not Run Last REPL command, so as long as arrow keys aren't causing commands to run in some other namespace than the one implied by the context of the REPL, that's what matters to me.#2017-04-0419:43puzzlerIt would be confusing to access an old command and not know what namespace it is going to run in.#2017-04-0419:43wilkerluciowe can confirm with @cfleming , but on my understanding this change would only affect the Run Last REPL Command thing, nothing about running from the REPL input should change#2017-04-0419:44wilkerlucioI agree if that changes would be confusing#2017-04-0422:19kennyHow do you guys work with a project that contains multiple sub-projects? For example, take the below directory structure:
.
├── project1
├── project2
└── project3
I can create a bunch of modules for each sub-project but that doesn’t work too well when all the sources are stored in a single Git repo. What is the suggested way to deal with this problem?
#2017-04-0506:03cfleming@puzzler @wilkerlucio Right, this change will only affect the namespace used when running REPL Commands, or when using the “Execute immediately” from the REPL history search#2017-04-0506:04cflemingExecuting from the REPL editor will always use the current REPL ns.#2017-04-0506:05cfleming@kenny Why does it not work well to have multiple modules under a single git repo? That’s what I do with Cursive, and it works fine.#2017-04-0516:28isakIs there an easy way to get Cursive to stop searching through clojurescript compiled files and .cache output?#2017-04-0516:28isak(with control-shift-F dialog)#2017-04-0520:04cfleming@isak You can exclude those directories. Cursive should do that automatically if those output dirs are configured in your project.clj, though. How do you have those configured there?#2017-04-0520:49isak@cfleming Ah, cool. For some of dev only builds, they are in a figwheel.edn file only, and not in the project file. Could this be the issue?#2017-04-0520:50isakMy figwheel.edn is like the one here: https://github.com/bhauman/lein-figwheel/tree/master/sidecar#2017-04-0521:44cfleming@isak Indeed, Cursive doesn’t read figwheel.edn files, and it seems like it should. I’ve filed https://github.com/cursive-ide/cursive/issues/1703#2017-04-0522:16cfleming@isak So does figwheel.edn contain the same info you would put in project.clj, but it’s only used when you’re just using sidecar? e.g. using something like the CLJS quickstart?#2017-04-0522:20isak@cfleming yea, it is a path of the project.clj taken out into its own file. I'm not sure if it is only for sidecar, or if it can be used for normal figwheel also.#2017-04-0522:20cflemingOk, thanks, I’ll check with Bruce#2017-04-0522:21cflemingAlthough if you’re not seeing those paths set up, it looks like it’s not being merged into the project.#2017-04-0522:21isakWhat I've done is to only have my prod builds in project.clj, to make cljsbuild work, but cljsbuild does not really make sense to use for development anymore since figwheel#2017-04-0522:22cflemingYeah, I get that.#2017-04-0522:22cflemingOk, I’ll see if I can get some clarification from Bruce and I’ll work out what Cursive needs to do there.#2017-04-0522:22isakfor figwheel sidecar, we use a script/figwheel.clj file to start a figwheel repl.#2017-04-0522:22isakSounds good 👍#2017-04-0610:58vikeriCan Cursive leverage Intellij’s Javascript intelligence when using javascript interop? More specifically I’m using (js/require "realm") and it would be great if cursive would understand that.#2017-04-0611:00cfleming@vikeri Not right now, no. I’m also hesitant to build too much around that because it won’t work for anyone using the Community Edition. I am planning to make Cursive’s JS indexing smarter, though.#2017-04-0611:00cflemingHopefully at some point Cursive will be able to work in e.g. WebStorm, but that doesn’t work right now.#2017-04-0611:00cflemingJetBrains have a project to enable that, but it’s currently stalled AFAIK.#2017-04-0611:01vikeriOkok, couldn’t one disable the x cannot be resolved warning for javscript interop then?#2017-04-0611:01cflemingYeah, I actually think there’s an issue for that.#2017-04-0611:02cflemingI’m planning to investigate to see how good I can get it, and then probably disable any warnings I can’t fix.#2017-04-0611:23vikeriOkok! Cool!#2017-04-0715:29Rachel Westmacottweirdly the “select all” keyboard shortcut cmd + a appears to be intermittently broken in my current cursive#2017-04-0715:29Rachel Westmacottnot sure if its an intellij thing#2017-04-0720:37Lone Rangerquestion in general#2017-04-0720:38Lone Rangersometimes auto-complete/code-detection works, other times, not. Is there a consistent way to make sure that stuff like this doesn't happen:#2017-04-0720:41kenny@goomba JS integration is not perfect unfortunately, so you will end up with things highlighted like that.#2017-04-0720:42Lone Rangerokay, so that's just a js issue? I'm fine with that#2017-04-0720:43Lone Rangerstuff like this I guess is the hairier issue:#2017-04-0720:43Lone Rangernow, that stuff is all created with macros#2017-04-0720:44Lone Rangerit's probably not reasonable to expect macro support yeah?#2017-04-0721:27Rachel Westmacott@goomba have you tried alt-enter “resolve as… (defn)” on q/defcomponent#2017-04-0721:28Lone RangerNo I haven't, I'll give that a shot #2017-04-0721:29Rachel Westmacottout of interest, what is q aliasing?#2017-04-0721:41Lone Rangerah, quiescent#2017-04-0721:43Lone Ranger#2017-04-0721:44Lone Rangersadly it doesn't have much community support but I really appreciate the functional approach (for front end development)#2017-04-0721:49Lone Rangerbut I may be forced to use something else due to my lack of skillz and tutorials 😞#2017-04-0817:18Lone Rangerso to answer my own question from earlier#2017-04-0817:20Lone Rangerthe trick is to right click on 'external libraries' and then "refresh leinigen projects"#2017-04-0817:20Lone Rangerand then everything works right as rain#2017-04-0817:20Lone Rangerthat doesn't solve my lack of skillz issue but it's a step in the right direction 😅#2017-04-0915:13denikAnd on the other hand I can’t figure out how to use lein profiles when running a clojure.main repl#2017-04-0915:21denikAlso tried using lein-exec in params with no success#2017-04-1003:51denikAlso, is there a way to add profiles from project.clj for cursive to check the dependencies of?#2017-04-1003:52denikIt looks like it only cares about top level and “dev”#2017-04-1003:54cfleming@denik re: profiles, you mean when it’s syncing deps to the project?#2017-04-1003:55cflemingYou can do that in the Leiningen toolwindow. View-&gt;Tool windows-&gt;Leiningen. Open out the Profiles dropdown, and then select the profiles you’d like to use. Then press the refresh button.#2017-04-1003:56cflemingre: your run problem, you can’t use run like that in this config. This config panel is only the rough equivalent of lein repl.#2017-04-1003:58cflemingYou can run an arbitrary lein command using a leiningen run config, so Run->Edit configurations…, press +, select “Leiningen”.#2017-04-1003:58cflemingUnfortunately this doesn’t tie the REPL in in any useful way.#2017-04-1003:59cflemingHow are you trying to run the REPL? Are you using something like the CLJS quick-start?#2017-04-1004:00denik@cfleming thanks profiles solved the deps problem#2017-04-1004:00denikfor the repl I’m using lein-figwheel’s cursive setup#2017-04-1004:01cflemingOk, that creates a script using figwheel-sidecar, right?#2017-04-1004:01denikyes#2017-04-1004:01cflemingActually, sorry, I see what you’re doing there in the config screenshot.#2017-04-1004:01cflemingYou want to use a clojure.main REPL, third option.#2017-04-1004:02cflemingThen I think you can put script/figwheel.clj in your parameters.#2017-04-1004:03denikthe problem with clojure main is that it doesn’t seem to pickup profiles#2017-04-1004:03cflemingIf not, you can just run it without that, and (load-file "script/figwheel.clj")#2017-04-1004:03cflemingNo, but you shouldn’t need that now you’ve corrected the profiles used to sync your project.#2017-04-1004:04cflemingclojure.main will just use the dependencies that are added to your project. If you’ve successfully synced the project with the frontend-dev deps, they’ll be there when you run clojure.main.#2017-04-1004:04denikrunning it…#2017-04-1004:07denikwow, everything works now! thanks @cfleming, had no idea cursive was so flexible#2017-04-1004:07cflemingNo worries, glad it’s working!#2017-04-1004:07cflemingFWIW the next thing I’m going to work on (after bugs in the current EAP cycle) is native Figwheel integration.#2017-04-1004:07cflemingSo this will hopefully just be one-click at that point.#2017-04-1110:38yonatanelAny plans to make Cursive extensible, let's say with its own plugins? For example extending REPL interaction with Sayid.#2017-04-1110:39yonatanelI don't know if intellij plugins can have plugins themselves...#2017-04-1110:43cfleming@yonatanel Yes, I’m planning that but it’s a long-term thing - no ETA sorry#2017-04-1110:45yonatanel@cfleming Do you mean the standalone cursive?#2017-04-1110:49imre😋 standalone cursive#2017-04-1110:49imresorry, that wasn't an answer, just me drooling#2017-04-1111:02cfleming@yonatanel No, having Cursive extensible#2017-04-1111:03cfleming@imre I’m curious, what would be the advantage of a standalone one?#2017-04-1111:24imre@cfleming I'm actually a little torn about this one 🙂#2017-04-1111:25imreI'd imagine standalone nice and lean, without all the fluff and complexity a generic tool like idea has#2017-04-1111:26imreon the other hand, if you have a good multi-tool, you rarely have to leave it as the emacs/vim fans would tell you#2017-04-1200:03bfabrypersonally wouldn't want to see cursive standalone, all that java shit is super useful for those of us using clojure rather than clojurescript#2017-04-1200:04cfleming@bfabry It would include all of that too - it would more or less be the IntelliJ community edition with a few things removed, and Cursive preinstalled.#2017-04-1200:05cflemingThe main benefit for me would be a one-click install (useful for total newbies) and that I could customise the setup experience (i.e. prompt the user whether they want a simpler UI etc).#2017-04-1200:07bfabrywell if it stayed with all the java stuff then not really fussed either way. If I had to vote on that vs say argument name hints I'd go the latter any day, but then I'm not a newbie and I don't know what your drop-off rate or support rate for a difficult install is#2017-04-1200:08cflemingNeither do I really, and it’s always a tough call - one of Cursive’s main benefits is being easy to get started with, but that takes a lot of work which I could be dedicating to other things.#2017-04-1200:08cflemingSeveral people have asked about using Cursive in academic settings, or for e.g. ClojureBridge, and it’s not good for that right now.#2017-04-1207:33yusupis anyone having any problems with the laterst eap5 version ?#2017-04-1207:34yusupafter update , I cant start a REPL anymore. It hangs up after “saving cache”.#2017-04-1207:36yusupcursive version, 1.5.0-eap5-2017.1#2017-04-1207:48tapI believe Colin is investigating it https://twitter.com/CursiveIDE/status/852013619692814340#2017-04-1207:50yusupthanks, going back to stable version now#2017-04-1208:41cfleming@yusup This issue is only in the latest EAP, eap-4 works fine. The link is in the mailing list thread: https://groups.google.com/d/topic/cursive/F8V2b103Ul4/discussion#2017-04-1208:41cfleming(assuming you’re on 2017.1, that is)#2017-04-1208:41yusupyeah, already reinstalled , and it is working again.#2017-04-1208:41yusupthanks#2017-04-1210:45tap@cfleming This might not be a cursive bug. I just want to run it by you in case you may have any thoughts about it. The problem I have is figwheel doesn’t see modification of some of my cljs files. It happens when I start figwheel sidecar in cursive’s repl, or start it in lein repl in terminal and connect to it as a remote repl. If I don’t connect cursive to it, figwheel works fine. I tracked down an found that the problematic cljs files appear under target/classes/ path. If I remove those files, the issue is resolved. Do you have any thoughts?#2017-04-1210:45tapI’m on 1.5.0-eap4#2017-04-1221:48cfleming@tap I’m not sure I understand - your problem is that you have some CLJS files under target/classes, and you’re modifying them and expecting Figwheel to pick those changes up?#2017-04-1221:49cflemingI can’t think of anything that should prevent that just by connecting the Cursive REPL - Figwheel watches the FS and is essentially totally independent of Cursive.#2017-04-1300:35tap@cfleming No. I’m sorry I explained badly. I’ll try again. I have cljs files under src/cljs and I config dev output to be at resources/public/out. But when I start local cursive repl or connect cursive to lein repl, these things happen. 1. When I modify file under src/cljs, Figwheel doesn’t update some (a few) files under resources/public/out as usual. 2. When I modify a problematic file, it looks like Figwheel know that the file is modified. It tries to recompile and push that file to browser. There’s a recompilation messages appear in log and update sign show up on browser. But that modification doesn’t show up on the browser, even after hard refresh. 3. I noticed that the problematic files appear under target/classes path. If I remove these files, the issue is fixed and figwheel is back to work as usual. 4. The problematics files are always the same files 5. Things above don’t happen when I use cider-jack-in or cider-connect#2017-04-1300:42tapThe issue is minor now as I found the workaround (Remove cljs files under target/classes). If you can’t relate it with anything cursive does internally immediately, then never mind. I know you are quite busy fixing more serious issues. Thanks for taking a time reading.#2017-04-1300:45cfleming@tap The only thing I can think of is that Cursive is copying those files there as part of a compile process, and that Figwheel for some reason ignores changes to files that it also finds under the compile output path.#2017-04-1300:45cflemingHow do you run your REPL?#2017-04-1301:17tapThe issue occur for both ways - Curisve Local REPL > “Run nREPL with Leiningen”. No other configurations. - lein repl in macOS’s termianal. Then Remote REPL > “Use Leiningen REPL port”#2017-04-1301:17tapI have to run. Can we continue here https://github.com/cursive-ide/cursive/issues/1710?#2017-04-1302:17cfleming@tap Sure.#2017-04-1313:40Lone Rangerjust wanted to say thanks again @cfleming! Lovin' the work. Makes my job fun.#2017-04-1320:14cfleming@goomba Thanks! I’m glad it’s working well for you.#2017-04-1407:52lsenta@cfleming I'm back with another parinwtfer instance, in a project.clj:
:hooks [;leiningen.cljsbuild ; removed cljs so that sass doesnt run it
          leiningen.resource]

  :clean-targets ^{:protect false}
 [:target-path :compile-path :resource-paths
  [:resource :target-path] [:sass :target-path]]
I comment and move the hook
:hooks []
  ;leiningen.cljsbuild ; removed so that sass doesnt run it
  ;leiningen.resource ; remove so that test-refresh doesnt run it

  :clean-targets ^{:protect false}
 [:target-path :compile-path :resource-paths
  [:resource :target-path] [:sass :target-path]]
reformat, cursive/parinfer closes the defproject after the meta:
:hooks []
  ;leiningen.cljsbuild ; removed so that sass doesnt run it
  ;leiningen.resource ; remove so that test-refresh doesnt run it

  :clean-targets ^{:protect false}) ;; <<< CLOSE the defproject
VV now wraps the rest of the defproject. 
[:target-path :compile-path :resource-paths
 [:resource :target-path] [:sass :target-path]
#2017-04-1505:33tianshuif cursive becomes standalone, how about the tools that intellij provided, such as database tools, inject language, etc?#2017-04-1507:31cfleming@doglooksgood If Cursive is standalone, it will still be available as a plugin. All those features will require IntelliJ still.#2017-04-1507:31cflemingThe same licence will work for standalone or for the plugin.#2017-04-1507:32tianshuthat's awesome#2017-04-1507:33tianshuwill cursive provide basic java/javascript support?#2017-04-1507:34cflemingA standalone Cursive would be basically the IntelliJ Community edition, with a few unnecessary things removed, Cursive pre-installed and some of the basic flows made more Clojure-specific.#2017-04-1507:34cflemingSo yes, it’ll have the Java support, but not the JetBrains JavaScript support.#2017-04-1509:58slipsetSo, I just downloaded Intellij and installed Cursive.#2017-04-1509:59slipsetI already had an existing clojure/clojurescript project, so I imported that.#2017-04-1510:00slipsetWhat I would really appreciate was if Cursive then would create the necessary run-configs for me, and pop up a window saying something like “Hi! Would you like to me to start a repl for you?”#2017-04-1510:01slipsetBonus points if Cursive would see that I’m using figwheel and pop open a cljs-repl as well, although that’s apparently not needed as much in Cursive as in Cider, since Cursive uses static code analysis.#2017-04-1510:15slipset@tap/@cfleming https://github.com/cursive-ide/cursive/issues/1710 sounds like something my colleagues are experiencing. Right now we’re on easter holidays, but I’ll investigate further when we’re back at work.#2017-04-1511:11cfleming@slipset Yes, I’m planning both of the steps you suggest, and the next big feature is better CLJS REPLs.#2017-04-1511:11cflemingLet me know if that issue is affecting you, too.#2017-04-1511:12slipsetSeems like it was (according to @psalaberria002)#2017-04-1511:13cflemingOk. I’m going to have another go at not adding those configs by default, because they seldom make sense for Clojure.#2017-04-1511:18slipsetAlso, it seems like I need to mark quite a few of my directories as “excluded” so that they don’t pop up when I look for files.#2017-04-1511:19cflemingWhat sort of directories are they?#2017-04-1511:19cflemingOutput/target dirs?#2017-04-1511:19slipsetout, target, .cljs_rihno_repl (which might be a leftover from some emacs stuff)#2017-04-1511:20slipsetalso, because figwheel, I needed to mark resources/public/js/{figwheel-builds}-out as excluded#2017-04-1511:21cflemingIs that directory configured in project.clj, figwheel.edn, or is it implicit?#2017-04-1511:22slipsetIt seems like it’s implicit#2017-04-1511:23cflemingOk. I’ll add a note to https://github.com/cursive-ide/cursive/issues/1703#2017-04-1511:23slipsetnice!#2017-04-1511:24cflemingI’ll check those other dirs when back at work, standard ones like target should get excluded, unless you’ve overwritten the relevant config in project.clj#2017-04-1511:24slipsetDon’t think so.#2017-04-1511:25cflemingOk, I’ll refresh my memory on where that config comes from, and we can check why that’s not working.#2017-04-1701:18Oliver GeorgeI think I've worked out the killer clojure-spec feature for Cursive... hiding them. I find I want specs in my code because it picks up a lot of bad function calls and nil puns. Problem is that adding specs to every function is verbose and adds friction as I refactor. What I want is specs which are sprinkled on (e.g. right click a fn arg and specify a pred) and only see the spec by hovering the mouse. I'd never open the accompanying spec file.#2017-04-1701:19Oliver GeorgeYa, know. Just when you have a quiet moment Colin. #loveyourwork#2017-04-1701:34Oliver George(equally, hiding pre/post and asserts would reduce clutter)#2017-04-1703:47cfleming@olivergeorge So that’s actually pretty easy using code folding. Could you file an issue for that one and I’ll look into it? If you have a simple example of the sort of thing you’d like to hide that would be great too.#2017-04-1706:43Oliver GeorgeWould you like something specific to the spec side of things? I think covers the point about pre/post/asserts https://github.com/cursive-ide/cursive/issues/1406#2017-04-1707:51cfleming@olivergeorge Sorry, I had forgotten about that one. If you have some simple spec examples that would be good too - do you just want s/fdef collapsed by default?#2017-04-1707:51cflemingFeel free to use that same issue, no need for a new one.#2017-04-1709:12Oliver GeorgeNo worries. I'll have a think about it. #2017-04-1712:02tianshu@cfleming Is it possible to disable resolution and syntax check for one symbol?#2017-04-1715:31tianshuand I also think auto-completion should be enable in .edn file, maybe#2017-04-1719:47danielcomptonIs there a way to change the stack trace repl printer? My stack traces are typically ~100 lines long, so I always need to scroll back up to the top to see the problem#2017-04-1722:00cfleming@danielcompton If you have clj-stacktrace or aviso/pretty loaded in your REPL, they’ll be used.#2017-04-1722:00cflemingAre your stack traces not being folded?#2017-04-1722:00danielcomptonNo, but I'm using a remote REPL into a boot repl#2017-04-1722:01danielcomptonthat might have something to do with it#2017-04-1722:01danielcomptonI thought boot automatically included aviso/pretty#2017-04-1722:01cflemingI’m not sure - can you create a gist of a problematic exception?#2017-04-1722:01cflemingThis is clj or cljs?#2017-04-1722:04danielcomptonclj#2017-04-1722:04danielcomptonI'll try put something together#2017-04-1722:04cflemingThanks#2017-04-1722:05cfleming@danielcompton Note that pretty has to actually be required in your app to work, i.e. the namespace has to be loaded. Is it possible boot bundles it but doesn’t load it unless you ask it to?#2017-04-1722:09danielcomptonhmm, perhaps. I've added it myself to my deps and required it in my dev namespace and it seems to be working now#2017-04-1722:14cflemingOk, cool. I’m still interested in an example of a stacktrace that isn’t folding correctly, if you have one.#2017-04-1723:08cfleming@doglooksgood No, it’s not - how would you like that to work?#2017-04-1801:58tianshusometimes none of given macro resolution options is suitable, I want to disable resolution for this case.#2017-04-1807:30slipsetSo CIDER has this marker in the gutter which shows if a form is “currently evaluated”, eg a marker that is visible iff the form is up to date with what is evaluated.#2017-04-1807:31slipsetIn line 34 above, you see the little green bars indicating that the form has not been changed since it was last evaluated.#2017-04-1807:44cfleming@slipset That’s neat. So when you load a file, it is all green and then as you edit the green is removed top-level-form by top-level-form?#2017-04-1807:45slipsetyes#2017-04-1807:45slipsetand whenever you do a ’Send (...) to REPL, it becomes green again.#2017-04-1807:46slipsetTook me some time to get used to it in CIDER, but now I cannot live without.#2017-04-1807:46cflemingThat’s probably fairly easy to implement, as long as I can find some space in the gutter. Could you file an issue for that?#2017-04-1807:47slipsetwill do!#2017-04-1815:41zyloxthat would be pretty cool to have#2017-04-1908:53Rachel WestmacottI have a weird problem. When I switch from one file to another, the keyboard shortcuts for some actions appear to apply to the file I am no longer looking at.#2017-04-1908:53Rachel WestmacottI’ve tried ‘select all’ and ‘cycle collection type’ and they both apply to the no-longer-visible file.#2017-04-1909:22cfleming@peterwestmacott I’ve never seen anything like that. Does it happen with other languages too? It sounds like an IntelliJ level problem.#2017-04-1909:23Rachel Westmacottyeah, that’s what I suspect#2017-04-1909:23Rachel Westmacottit is properly weird#2017-04-1909:23Rachel WestmacottI’ve noticed it a few times since the 2017.1 update to IntelliJ#2017-04-1909:23Rachel WestmacottI’m only really writing Clojure at the moment (:-D) so I’ve not noticed it elsewhere#2017-04-1909:25Rachel Westmacottit seems like some level of “focus” gets stuck on one file, and whatever other file I switch to, certain editor actions get sent back to the stuck file.#2017-04-1909:25Rachel Westmacottit’s more surprising than problematic#2017-04-1909:49cflemingWhen you switch to the new file, do you see the caret in that editor?#2017-04-1909:51cfleming@peterwestmacott ^^#2017-04-1910:06Rachel Westmacottyes#2017-04-1910:06Rachel Westmacotteverything appears normal#2017-04-1910:06Rachel Westmacottbut some commands appear to be sent to a different file#2017-04-1910:07cflemingHmm, that would definitely be an IntelliJ bug then.#2017-04-1910:13Rachel Westmacottit seems to be pretty fundamental to the editor - thanks for thinking about it - keep up the good work!#2017-04-2110:07onetomim getting into a new clojure project and i would like to structure it as a monorepo. how should i go about handling it from intellij? so the directory structure would be something like:
monorepo/
├── .git
│   ├── HEAD
│   ├── config
...
│   └── refs
│       ├── heads
│       └── tags
├── backend
│   └── project.clj
├── expolre
│   ├── case-1
│   │   └── project.clj
│   └── case-2
│       └── project.clj
└── frontend
    └── project.clj
#2017-04-2110:08onetomthe issue i see is that i have multiple lein projects within one git root, but i can't seem to add those as project modules#2017-04-2110:09onetomif i would create an intellij project for each of those dirs with project.clj files, then the git root would be outside of the intellij project root#2017-04-2110:53cfleming@onetom That should be no problem. If you use File-&gt;New project from existing sources…, then choose your monorepo dir and lein, then you should get the option to import projects recursively. That will set your project root at the git root, and the modules will be in the correct place.#2017-04-2110:57onetomThat sounds promising. What do I do when I have a new module? When I tried to add one I was only ourselves with the option of adding a Clojure project, not a Leiningen one. And the dialog was also suggesting it's for creating a library package in a Java sense#2017-04-2110:58onetomI'm afk atm but I will experiment it it more once I got home. #2017-04-2110:59cflemingYou can add a new module either from Cursive using File-&gt;New-&gt;Module… or add it from the command line, and then right-click the project.clj in the project view and “Add lein project” (I think, don’t have Cursive open here).#2017-04-2111:00cflemingBasically, it’s easy to add and remove modules as you like, and Cursive will adapt the project as required and work out cross-module deps etc.#2017-04-2111:01onetomOh I was trying it from the project dialog cmd-;#2017-04-2111:01cflemingI’m not sure if you can do it from there.#2017-04-2111:03onetomAre these options documented anywhere or I'm just too handicapped to find the docs?#2017-04-2111:04cfleminghttps://cursive-ide.com/userguide/leiningen.html, under “Working with multi-module projects”#2017-04-2111:05cflemingI think the screenshots are slightly out of date, they’re from an older version of IntelliJ.#2017-04-2111:21onetomi see. now i remember i read it years ago. it's a slightly different example because the vcs root also contains a project and you are talking about dependent projects.#2017-04-2111:25onetomi think my confusion is rooted in the fact that in reality i have boot projects not lein projects, so initially i don't have project.clj files. i tried to open the directory with the plain File/Open... menu item, just so i can edit the build.boot files and add my lein-generate boilerplate to them, to allow me generating the initial project.cljs. BUT if i do so, intellij automatically creates a module named after the root dir of the monorepo. when i try to add modules to it with the "New Module" menu item, the new module do not appear immediately. i have to close the project dialog and open it again. looks like some bug in intellij, which hasn't been fixed for years now.#2017-04-2111:26onetomand even before I would try the New Module menu I've instinctively tried to click on the Clojure option, which now I've noticed is under the divider called ---Framework---#2017-04-2111:28onetomwhich btw, i have no idea what does it do, since nothing seems to be changed after i've added it. (i've skipped the add libraries option though in the following dialog, so i guess it would just register/download a basic set of jars necessary to run clojure?)#2017-04-2111:40onetomJust out of curiosity, if I have such a multi module project, are the IntelliJ indexes for a specific version of a dependency generated for every module which uses that exact dependency?#2017-04-2111:42onetomIn other words am I better off from memory usage perspective having one multi-module IntelliJ project open than having a separate project for every module?#2017-04-2112:25slipsetI’m trying to rebind Navigate-> Declaration to CMD-. Intellij inserts an A in the field instead of the CMD sign and a . If I try to rebind to CMD-, it works as expected. Is it me, Intellij, or Cursive?#2017-04-2112:26onetom@slipset if you could show a screenshot i could try it on my side to see if it's reproducible or not#2017-04-2112:29onetomsame here on intellij 2017.1.1#2017-04-2112:29slipsetSo, it’s not me 🙂#2017-04-2112:29onetomit's me too 🙂#2017-04-2112:30onetombut it doesn't mean it's the same for anyone else other than the 2 of us 🙂#2017-04-2112:32onetomi tried it with the cursive plugin disabled and i got the same result#2017-04-2112:32onetomwhat's interesting is that the dialog becomes taller after pressing cmd-. it seems like it's trying to show a message similar to the message we get when pressing cmd-,#2017-04-2112:33onetom"Already assigned to:..."
#2017-04-2112:33onetombut it's probably some other message, because it's invisible#2017-04-2112:34onetomso my guess is it's a jetbrains issue.#2017-04-2112:36onetomit doesn't depend on which action am i trying to add the cmd-. keyboard shortcut to. i tried it on Editor actions / Backspace for example.#2017-04-2112:36onetomit would make sense to try it in some of the other ide's but i don't have anything else installed#2017-04-2112:36slipsetI’m on OSX btw#2017-04-2112:37onetomthe CMD key kinda gave that away#2017-04-2112:37slipsetyeah, just wanted to make it explicit.#2017-04-2204:21onetom@slipset btw, the original meaning of cmd-. is pretty good (folding the top-level-form under the caret) why do u want to use it for going to the declaration? what environment uses cmd-. for that purpose? i've tried all the major editors for editing clojure (except eclipse) and i found learning the cursive keybindings the most economical choice GIVEN i don't work much with any other language#2017-04-2204:43cfleming@onetom That’s Emacs does that#2017-04-2204:46cfleming@onetom - so WRT your question above, that’s a bit tricky. I think the best way to handle this would be to generate your project.clj files from build.boot, and then import those. If you’d like to do it step by step, you can use the IntelliJ option to create an empty project, and then add the modules one by one.#2017-04-2204:47cflemingActually, I just tried that, and I see what you mean - it doesn’t show the module right away, that does look like an IntelliJ bug.#2017-04-2204:47onetomphew, so it's not just me 🙂#2017-04-2204:48onetomim still not sure what should i do to make the newly added module appear. if i close the project window and re-open it, then it does appear, but sometimes that's not necessary#2017-04-2204:48cflemingActually, I lie - it’s a Cursive bug.#2017-04-2204:48onetomoh, because it's specific to lein modules?#2017-04-2204:48cflemingIt looks like that flow does something different to the usual flow. I’ll fix that on Monday.#2017-04-2204:49cflemingI still think the best option is the single import from the project root directory, searching recursively for project.clj files.#2017-04-2204:49cflemingBecause I’ve tested that a lot, and it definitely works.#2017-04-2204:50cflemingAre you generating multiple project.clj files from one build.boot?#2017-04-2204:50onetomunderstood. i will do so. i think it's just confusing for new projects, so existing cursive users can live with it, but it would be very off-putting for new adopters.#2017-04-2204:50onetomno, every sub-dir has its own build.boot#2017-04-2204:51cflemingYes, the IntelliJ project setup is intrinsically complicated. It’s very flexible, but it’s hard to make that simple at the same time.#2017-04-2204:51onetombut i was thinking about having a top-level one actually. that would be an interesting approach too#2017-04-2204:52cflemingboot doesn’t really have any multi-module support, right?#2017-04-2204:53onetomim not familiar with lein enough still, so i don't exactly understand what multi-module means. boot does have a checkout built-in task which explodes dependent jars into a boot temp folder (outside of the project dir) and adds it to the sources path set.#2017-04-2204:54cflemingSo multi-module basically means one conceptual large project made up of smaller sub-projects, each of which is a lein “project” (or Maven, Gradle, whatever).#2017-04-2204:55cflemingCursive is like that, for example.#2017-04-2204:55cflemingIn IntelliJ’s terminology, Cursive is one project, and the sub-projects are modules.#2017-04-2204:55cflemingConfusingly, lein uses “project” for a single part of that.#2017-04-2204:56cflemingi.e. lein really has an assumption that you’ll only ever have one project.clj, which is not great IMO#2017-04-2204:58onetomin intellij's approach the reason to group modules into projects is because you want to combine them into one artefact at the end? vs simply editing all the source code of a microservices system in one window?#2017-04-2204:59cflemingNo, it means that you can easily edit the code of multiple modules in the same project, with cross-module refactoring, navigation etc#2017-04-2205:00cflemingCursive creates multiple artifacts. They’re later combined into a single one for deployment, but that’s not required.#2017-04-2205:01onetomso you can do such refactoring on keywords for example even if the modules won't end up in the same artefact and the same runtime process?#2017-04-2205:01cflemingRight#2017-04-2205:01cflemingI have to go, sorry - let me know how you get on with the multi-module import.#2017-04-2205:01onetomit's really amazing#2017-04-2205:01onetomthanks a lot and have a good day!#2017-04-2205:02cflemingYes, you can find usages of symbols across the whole project.#2017-04-2205:02cflemingAnd Cursive actually fixes things up so checkouts are not required for interdependent modules.#2017-04-2205:02cflemingThanks, you too!#2017-04-2206:22rasomHi, @cfleming. I know that this is not exactly channel’s topic, but maybe you have a quick answer. I’m trying to create a plugin for intellij using https://github.com/cursive-ide/gradle-clojure, It successfully passes compilation but when I run it with ./gradlew runIde I get:
java.lang.ExceptionInInitializerError
	at clojure.lang.Namespace.<init>(Namespace.java:34)
    at clojure.lang.Namespace.findOrCreate(Namespace.java:176)
    at clojure.lang.Var.internPrivate(Var.java:151)
    at MyClassDefindedInClojure.<clinit>(Unknown Source)
    ...
Caused by: java.io.FileNotFoundException: Could not locate clojure/core__init.class or clojure/core.clj on classpath.
...
So, my dumb question is: should i add clojure to the classpath somewhere inside compileClojure configuration or in some other place to make it work? If so, where exactly? Thanks in advance.
#2017-04-2603:19cfleming@U0GB2S42H Sorry for the long delay here, yes, you should add Clojure as a compile dependency. I assume you’re using gradle-intellij-plugin? If so, that will bundle it up into the lib dir of your plugin, and it’ll be available at runtime.#2017-04-2604:00rasomThank you for answer, Colin. I’ve added it, and you are right, it is bundled into plugin’s lib dir… But nevertheless, I still have this error.
buildscript {
    repositories {
        mavenCentral()
        maven { url '' }
    }
}

plugins {
    id "org.jetbrains.intellij" version "0.2.8"
    id "com.cursive-ide.clojure" version "1.1.0"
}

intellij {
    version '15.0.4'
    pluginName 'rfd'
    updateSinceUntilBuild = false
}

apply plugin: 'org.jetbrains.intellij'

repositories {
    mavenCentral()
}

dependencies {
    compile group: 'org.clojure', name: 'clojure', version: '1.8.0'
}

compileClojure {
    aotCompile = true
}
That was my last try
#2017-04-2604:39rasomWhen I comment out dependencies i get Error: Could not find or load main class clojure.main at :compileClojure#2017-04-2607:52cflemingOk, so I think the problem is probably that you have to set the Compiler.LOADER var to your PluginClassLoader.#2017-04-2607:54cflemingHere’s some black magic for that. Put it in an ApplicationComponent called InitComponent:
public void initComponent() {
    initClojure();
    ...
  }

  public static void initClojure() {
    synchronized (LOCK) {
      if (!initialised) {
        ClassLoader loader = InitComponent.class.getClassLoader();

        ClassLoader oldLoader = Thread.currentThread().getContextClassLoader();
        try {
          Thread.currentThread().setContextClassLoader(loader);

          // dummy to force RT class load first, since it has a circular static
          // initializer loop with Compiler
          new RT();

          Compiler.LOADER.bindRoot(loader);

          try {
            RT.var(ClojureUtils.CORE_NAMESPACE, REQUIRE_FUNCTION).invoke(INITIALISE_NS_SYMBOL);
            RT.var(INITIALISE_NS, INITIALISE).invoke();

          } catch (Exception e) {
            logger.error("Error initialising:", e);
          } finally {
            Var.popThreadBindings();
          }

          initialised = true;
        } catch (Exception e) {
          logger.error(e, e);
        } finally {
          Thread.currentThread().setContextClassLoader(oldLoader);
        }
      }
    }
  }
#2017-04-2607:59cflemingI actually need to write a blog post about this, since a few people have asked me about it now.#2017-04-2608:29rasomThank you again, Colin, will try this later. And about blog post, that would be great!#2017-04-2608:48rasomCan you elaborate this?
RT.var(ClojureUtils.CORE_NAMESPACE, REQUIRE_FUNCTION).invoke(INITIALISE_NS_SYMBOL);
RT.var(INITIALISE_NS, INITIALISE).invoke();
I suppose that ClojureUtils.CORE_NAMESPACE = clojure.core REQUIRE_FUNCTION = require INITIALISE = true/false but not sure about INITIALISE_NS_SYMBOL and INITIALISE_NS
#2017-04-2609:23rasomok, i think i figured
RT.var("clojure.core", "require").invoke(Symbol.intern("my.ns"));
RT.var("my.ns", "init_function").invoke();
#2017-04-2610:12cflemingThat’s right. It’s getting late here, I’ll write more tomorrow.#2017-04-2703:34rasomthank you#2017-04-2722:59cflemingActually, I’ll try to blog about this in the near future since several people have asked be about this recently.#2017-04-2804:38rasomWill appreciate this, it still doesn’t work on my side. I tried that code but without success. I’m going to make another attempt on weekend and... waiting for blog post 🙂#2017-04-2814:53rasomJust tried again, it works, thank you again, @cfleming#2017-04-2313:31onetomis there a way to access the DOM api documentation from IntelliJ while editing a .cljs file? for example if i press F1 over .-fontFamily, the help window shows: Element.prototype.style.fontFamily so it clearly recognizes it correctly but thats all it shows.#2017-04-2313:33onetommaybe i just dreamed it but i think i saw more help than that before. it might have been in some other editor, eg visual studio code or atom; cant really remember#2017-04-2319:30cfleming@onetom I think that should work, yes - does that element have documentation?#2017-04-2319:31cflemingYou should be able to navigate to it, or show the definition of it.#2017-04-2322:01danielcompton@onetom I think you can add it from Project Structure too:#2017-04-2323:33cfleming@danielcompton It should work, but that one didn’t for me the other day - there must be something about that flow that’s slightly different.#2017-04-2400:15cfleming@onetom I just checked, Element.prototype.style.fontFamily has no doc - that’s the issue.#2017-04-2400:15cflemingThat comes from some built-in definitions that are hard-coded into Cursive from TernJS.#2017-04-2400:15cflemingI’m planning to switch to better ones soon from Google Closure.#2017-04-2500:02Oliver GeorgeHi @cfleming, I'm loving the ctrl-click to jump from function definition to usage and back again. Can we have the same for registered keywords please.#2017-04-2500:03Oliver GeorgeFor example, in re-frame you register a handler with a key ::blah and then call (dispatch [::blah]) in your views. Often it's handy to jump to the handler from the view but that means alt-f7 to search through all keyword usages.#2017-04-2500:03Oliver GeorgeI suspect the same technique would make it easy to traverse clojure-spec definitions#2017-04-2502:38kenny@olivergeorge You can upvote the issue here: https://github.com/cursive-ide/cursive/issues/1549#2017-04-2604:46Oliver GeorgeThanks#2017-04-2507:41gravCursive insist on me generating stubs … after which it insists on me generating some more stubs …#2017-04-2507:47cfleming@grav Which Cursive version are you on?#2017-04-2507:48gravLatest non-eap#2017-04-2507:48gravBut I just upgraded to eap#2017-04-2507:48gravSo I’ll try again! 🙂#2017-04-2507:55gravNo, same thing#2017-04-2508:04gravIf it fails to generate stubs, will it disable some statical analysis? Because I’m lacking unused variables currently#2017-04-2523:46cfleming@grav Bummer, I hoped that the latest EAP would fix that for you.#2017-04-2523:46cflemingYes, it just means that you won’t get completion, resolution etc for the affected namespace, probably something like datomic, midje or om.#2017-04-2604:02cfleming@grav Could you go to Help-&gt;Debug Log Settings…, enter cursive.stubs in there, try to generate the stubs and then send me the log file from Help-&gt;Show log in Finder/Explorer?#2017-04-2604:05cfleming@grav You don’t get an error message, right?#2017-04-2610:45grav@cfleming it’s pm’ed 🙂#2017-04-2610:45gravAnd no, no error message. The “Your project requires” message just pops up again#2017-04-2719:26mikepencehi all. is it still true that you can't set breakpoints in cursive for cljs files?#2017-04-2719:28cfleming@mikepence Yes, it is, sadly.#2017-04-2719:30mikepencebummer#2017-04-2801:53souenzzothere is plans to figwheel repl integration in cursive?#2017-04-2802:20cfleming@souenzzo Yes, in fact that’s going to be the next major thing I add. Unfortunately the current EAP series has had some very time-consuming bugs in it, so it’s taken a while.#2017-04-2802:20cflemingBut hopefully that’ll be in the next EAP series, say within a month or so.#2017-04-2802:38cfleming@onetom BTW I’ve filed this - adding modules from the Project Structure view is indeed totally broken.#2017-04-3020:27danielcomptoncfleming: I get what you mean now#2017-04-3020:28danielcomptonI just always closed and reopened IntelliJ when adding modules and they seemed to show up#2017-04-3021:40cfleming@U051KLSJF In fact, just a refresh lein projects will do, you don’t have to restart. But yeah, that does seem to be required - I’m consulting JetBrains about this.#2017-04-2802:38cfleminghttps://github.com/cursive-ide/cursive/issues/1729#2017-04-2802:39cflemingI’ve added it to the next EAP series since it involves a change to how all lein projects are synchronised.#2017-04-2806:54curlyfry@mikepence I use (js-debugger) directly in the cljs code, and then debug in chrome devtools (with the cljs-devtools plugin). Not quite as nice as breakpoint in the editor, but it gets the job done.#2017-04-2815:16mikepencethanks curlyfry, I will look into that#2017-05-0109:20ghufran@cfleming : this is probably just some new intellij thing I can't figure out the name of, but after not using intellij idea and cursive for a while, I now find that the editor displays every 'def' declaration as three horizontal three lines (appearance is that of unicode 2261, ≡). Similarly, it displays each instance of 'defn' as a curly 'f' icon ƒ (like u0192). Any idea what this 'feature' is called, and how I can switch it off?#2017-05-0109:52cfleming@ghufran Are you using firacode, or a font like that?#2017-05-0109:52cflemingCan you post a screenshot of what you’re seeing?#2017-05-0117:00zyloxok so, weird thing, anyone ever have it where if you click on the namespace it takes you to the proper namespace, but if you click on the alias, it takes you to the bin version#2017-05-0117:00zyloxseems...rather odd#2017-05-0117:02zyloxnot even sure why the bin version is indexable like that. maybe i need to run a mvn clean#2017-05-0117:04zyloxya bin wasnt supposed to be there anymore. still odd that it picked it#2017-05-0117:20rauh@ghufran What font are you using? It's somewhere in the editor settings.#2017-05-0117:21ghufran@rauh It says "primary font" courier#2017-05-0117:21ghufranand nothing listed for secondary font#2017-05-0119:50jmayaalv@ghufran that looks a lot like the Clojure Pretty Symbol plugin: https://plugins.jetbrains.com/plugin/8224-clojure-pretty-symbol#2017-05-0120:22cfleming@jmayaalv @ghufran Yes, that’s not a font, it must be something using folding - a font won’t change defn into a single symbol.#2017-05-0209:14rarouscfleming: ligatures can do that#2017-05-0222:05cfleming@U050487DQ Thinking about it, that makes sense, since of course it converts -> into a single symbol. I didn’t realise it would work to that extent though.#2017-05-0304:41rarousFor example Material Icons do that. So for me it is natural 🙂#2017-05-0120:58ghufran@jmayaalv , @cfleming : thanks guys! I think I had it installed but not switched on, maybe the upgrade triggered it somehow.THANK YOU!!! #2017-05-0217:47spieden@cfleming my repl history has gotten so large that the search dialog is unusable. the only file i can find to try and clear it out is .idea/replstate.xml, but it gets repopulated after i remove it (even with shutting down, clearing caches, etc.). any idea how i can clear it? (i turned down the retention but that doesn’t seem to prune the existing history) thanks!#2017-05-0221:59cfleming@spieden Sorry, I need to fix that. Close your project (you don’t have to totally shut down), then delete the replstate file, but you’ll also need to delete the replstate element in your workspace.xml.#2017-05-0222:03spieden@cfleming worked, thanks!#2017-05-0223:23bradfordHi! How can I download all documentation for java dependencies in my lein?#2017-05-0300:00cfleming@bradford Sadly, you can’t. Lein really doesn’t have good support for this, since it’s not designed to support IDEs.#2017-05-0300:00cflemingCursive will allow you to download source for deps, but in a bit of a roundabout way.#2017-05-0300:01cflemingIf you try to navigate to a Java class that doesn’t have source attached, Cursive will prompt you to download it and will attach it automatically.#2017-05-0300:01cflemingThat is library by library though, of course.#2017-05-0300:07cflemingActually, thinking about it, you can make lein download sources, like this:
:dependencies [[org.clojure/clojure "1.8.0"]
                 [junit "4.12"]]
  :profiles {:dev {:dependencies [[junit "4.12" :classifier "sources"]]}})
But obviously no-one actually does that. But I could detect that and attach the sources when you do that.
#2017-05-0300:10cfleminghttps://github.com/cursive-ide/cursive/issues/1736#2017-05-0300:11cfleming@bradford ^^#2017-05-0300:11bradfordYeah, I was actually thinking of that...a bit brute force, but at least it's one-time#2017-05-0312:50gklijsYou can also do a lein pom, and then use the maven plugin to get all sources and/or documentation of the dependencies.#2017-05-0312:59misha
resolve clojure.test.check.generators/let as let macro
@cfleming ♥️
#2017-05-0313:32yonatanelIs anybody using a remote nREPL instead of local? I'm thinking about running a nREPL in docker-compose with other services such as kafka so I can access them while coding within the docker network.#2017-05-0315:00pc123Yeah, remote nREPL works well#2017-05-0318:13mkeathleyIs there a plan to release Cursive as a standalone IDE?#2017-05-0318:14mkeathleyKeep having keybindings stomp on each other and thought it would be useful to have this be a standalone product#2017-05-0318:38zyloxThe last few times it has come up im pretty sure @cfleming has said that no, he doesnt have plans at the moment for that#2017-05-0318:38zyloxbut that might have changed for all i know#2017-05-0318:39zylox(or i could be wrong! my mental garbage collection can be quite unreliable)#2017-05-0318:39zyloxactually the site says "in the future" so....ya i dont know#2017-05-0320:41danielcompton@yonatanel I use it a remote nREPL with Boot#2017-05-0321:09cfleming@mkeathley @zylox So I would like to but it’s been fairly low priority since getting the community edition and installing Cursive is pretty trivial these days.#2017-05-0321:09cfleming@mkeathley What are the problems you’re having with keybindings?#2017-05-0321:09mkeathleyMainly just trying to use intellij as a Java and Clojure ide#2017-05-0321:10mkeathleyAlthough…I suppose I could install community and use that as my Cursive IDE#2017-05-0321:10cflemingWhich keybindings are problematic?#2017-05-0321:10cflemingAnd which platform are you on?#2017-05-0321:11cflemingI’m actually going to sort out how the keybindings works Real Soon Now, so I’m interested in feedback.#2017-05-0321:11mkeathleyI am on Ultimate 2017.1#2017-05-0321:12mkeathleyIt’s the issue where the default cursive bindings have overlap in general with the default intellij bindings#2017-05-0321:12mkeathleyI basically want to have my cake and eat it too#2017-05-0321:12mkeathleyI will send a list later when I have time#2017-05-0321:12mkeathleyIt’s several key bindings#2017-05-0321:12cflemingSo that overlap shouldn’t matter, because the Cursive bindings will only take effect when you’re in a Clojure context, i.e. editing Clojure code.#2017-05-0321:13mkeathleyOh#2017-05-0321:13mkeathleyOkay great#2017-05-0321:13mkeathleyI was worried I would do 2 things, so I have been neglecting to use many of them 😛#2017-05-0321:13cflemingHehe, no, it should hopefully just do the right thing.#2017-05-0321:14cflemingIf it doesn’t I’d definitely like to know, though.#2017-05-0321:15mkeathleyI’ll keep you posted 🙂#2017-05-0421:06hagmonkdid anyone else just get screwed by the 2017.2 update?#2017-05-0421:06hagmonkit seems cursive disappeared, along with my keyboard shortcuts#2017-05-0421:07hagmonkah ha#2017-05-0421:13hagmonkpaging Dr @cfleming, Dr @cfleming please report to the front desk#2017-05-0422:14cfleming@hagmonk Dr @cfleming reporting for duty.#2017-05-0422:14hagmonk\o/#2017-05-0422:15hagmonkI started a thread on the mailing list too … I'm suddenly cursive-less and it's scary 😉#2017-05-0422:16cflemingHehe#2017-05-0422:17cflemingI’m afraid it’ll have to be 2017.1.2 for the moment, I have to add support for each version.#2017-05-0422:23hagmonkoh wow, I figured the last EAP build would be basically equivalent to the RC build#2017-05-0422:23hagmonkthey make all the plugin owners bump their versions?#2017-05-0423:07cfleming@hagmonk Well, you can use an open range, but then things break if they change APIs.#2017-05-0423:07cflemingCursive covers enough API surface that that would be pretty frequent.#2017-05-0500:58cfleminghttps://twitter.com/CursiveIDE/status/860296219230322688#2017-05-0500:58cfleming1.5.0 is finally out, for those of you sticking to stable builds.#2017-05-0507:37julienielsenI get the following error in intelliJ when I try to import a project or add a module from existing source: Can't change/establish root binding of: *ns* with set. I have tried reinstalling IntelliJ and updating java, but the error still appears. Anybody who have a suggestion to what I can try?#2017-05-0508:47julienielsenProblem solved: The dobbelt-plings in my lein profiles file were formatted.#2017-05-0508:49tianshu@cfleming Personally, in Parinfer mode, I think some enhancement is needed for pasting code. After
(defn hello [x])
   |  <-- cursor here, paste
I have to indent code manually, or I have to switch to paredit, paste, then switch back.
#2017-05-0508:49cfleming@doglooksgood Yeah, I know 😞. I’m planning to fix that.#2017-05-0508:50tianshuParinfer has a feature called previewCursorScope, maybe this can help?#2017-05-0508:51cflemingNo, I already use that.#2017-05-0508:51cflemingThe pasting thing is IntelliJ trying to be too clever - it’s not Cursive/parinfer doing it.#2017-05-0508:52tianshuIf my cursor is located before a close paren, the pasting works fine.
(defn hello [x]
   |)  <-- this works
no matter in parinfer or paredit
#2017-05-0508:53cflemingOh, right - previewCursorScope holds the parens there when the caret is there, right?#2017-05-0508:54cflemingI remember now, I did use that but then turned it off. I can’t remember why now.#2017-05-0508:54cflemingI believe it was because it made editing totally not work in some contexts that are not normal editors, like diff views.#2017-05-0508:59tianshupersonally I don't use previewCursorScope, In my personal opinion, when pasting, parinfer indent mode should always preserve indentation.#2017-05-0509:00cflemingYes, I agree.#2017-05-0509:01tianshuI don't know if there's a hook or some stuff for paste in IntelliJ, that's pretty easy in Emacs though.#2017-05-0509:01cflemingThere are tons of them, it’s pretty complex 🙂#2017-05-0509:01cflemingI haven’t dug into it yet.#2017-05-0509:01tianshuokay#2017-05-0510:28psalaberria002I have a problem with the REPL, hopefully an easy one to solve. At work I am forced to use aws-vault for authenticating to aws. That means I need to prepend aws-vault exec profile -- to any command. aws-vault exec profile -- lein repl works fine. How can I achieve this in Intellij when opening a REPL?#2017-05-0510:53psalaberria002aws-vault exec profile -- idea works, but I want to be able to use use different aws profiles for different REPLs#2017-05-0511:08cfleming@psalaberria002 What does that do? I guess it sets environment variables?#2017-05-0511:08psalaberria002yes, that’s what it does under the hood. But it keeps credentials in a vault.#2017-05-0511:09cflemingI don’t think there’s any way to do that with the Cursive REPL, since it invokes lein in a non-standard way.#2017-05-0511:09psalaberria002manually adding the env variables is not an option#2017-05-0511:09cflemingOk.#2017-05-0511:09cflemingThen unfortunately I think your only option is to run lein repl :headless on the command line, and connect a remote REPL to it.#2017-05-0511:10cflemingIt’s a little fiddly, https://github.com/cursive-ide/cursive/issues/1039 would make it better.#2017-05-0511:10cflemingThis is a great use case for that issue, actually.#2017-05-0511:10psalaberria002thank you 😉#2017-05-0511:12cflemingThe only other option I can think of would be to have an option to execute a command, and then use the env vars set by that command to run the REPL.#2017-05-0511:12cflemingI actually don’t even know if Java would allow me to do that (read the env as set by a process I’ve run)#2017-05-0511:12cflemingI think #1039 is probably a better option.#2017-05-0511:13psalaberria002makes sense#2017-05-0511:13psalaberria002I will keep am eye on the issue in github. in the meantime I will have to open another terminal#2017-05-0511:13cflemingI put a comment on that issue with your use case.#2017-05-0511:14cflemingYou can use the terminal built into IntelliJ, in case that helps.#2017-05-0512:31souenzzoInformal feature request: please do some var highlight match inside datalog 😞#2017-05-0518:01jtthIs there a built-in way to rename a leiningen project in Cursive? (change all namespaces/folders/references from “project-a” to “mything-b”)#2017-05-0520:58chrisdevojtth: Have you tried highlighting the project name in project.clj and clicking shift+F6?#2017-05-0522:29cfleming@U4Q7NLNMC There’s no refactoring support for this, no, sadly.#2017-05-0518:25moizsj@cfleming some love for this one please (if priorities permit) https://github.com/cursive-ide/cursive/issues/1439#2017-05-0521:37mkeathleyThank you for making dependency management better ❤️#2017-05-0521:38danielcomptonWhat's new in Cursive 1.5.0: https://www.deps.co/blog/whats-new-in-cursive-1.5.0/#2017-05-0522:28cfleming@souenzzo Do you have an example of what you’d like?#2017-05-0522:29cfleming@danielcompton Thanks for writing that up!#2017-05-0522:30danielcomptonYou're welcome 🙂#2017-05-0522:30cfleming@mkeathley No problem! Glad it’s helpful.#2017-05-0522:30cfleming@moizsj Ok, I’ll look at that one.#2017-05-0522:30souenzzo'[:find ?e :where [?e :user/name]] When cursor was on ?e, highlight the other ?e.#2017-05-0522:32cflemingOk, is that always in the context of a particular datomic call, or would you want that in general data structures?#2017-05-0522:32cflemingI don’t use datomic, but I think queries are often built up dynamically, right?#2017-05-0522:33danielcomptonTypically you would write Datomic queries like parameterised SQL queries#2017-05-0522:34danielcomptonStructure stays constant, variable values are passed in as :in#2017-05-0522:34danielcomptonDatomic has a query cache, so reusing the structure for the same query helps#2017-05-0522:35cflemingRight, but what I mean is, is this always something like (d/whatever '[:find ?e :where [?e :user/name]]) or:
(let [my-query '[:find ?e :where [?e :user/name]]]
  (d/do-something my-query))
#2017-05-0522:36cflemingOne means that the functionality can be keyed off the function use, the other means I’d have to look for any vector that looks like a query in any namespace requiring datomic.#2017-05-0522:36souenzzoMaybe "highlight equal symbols inside a quote". No scope or syntax from datomic.#2017-05-0522:38cfleming(which is doable, just trying to figure out the requirement)#2017-05-0522:38souenzzoI almost always (let [query '[] res (d/q query))#2017-05-0522:38danielcomptonprobably the latter#2017-05-0522:38danielcomptonI can see queries being dynamically built once#2017-05-0522:38danielcomptonbut just highlighting symbols that are equal inside a quoted statement would be a pretty good solution#2017-05-0522:39danielcomptonIf you wanted to get really fancy, you could follow the scope through rules as well http://www.learndatalogtoday.org/chapter/8#2017-05-0522:39danielcomptonwhich would be very cool#2017-05-0522:41souenzzoBut there is no how @cfleming know what is a quote and what is datalog#2017-05-0522:44souenzzo(or there is?)#2017-05-0522:52souenzzoWould be awesome: yellow background on quotes that was a valid datalog(maybe u can check with spec. There is more then one "datomic-spec" on GH), then "datalog syntax highlight" inside yellows.#2017-05-0522:52souenzzoBut just equals symbols highlight will help a lot too. ;)#2017-05-0604:27martinklepschIs it expected that cmd-shift-o results include files in target/?#2017-05-0604:35cfleming@martinklepsch No, that should be excluded.#2017-05-0604:35cflemingCheck that in the project view.#2017-05-0604:35martinklepschI installed Cursive after creating the project. Maybe that’s the reason then?#2017-05-0604:35cflemingAre you using lein or boot?#2017-05-0604:36martinklepsch@cfleming lein in this project#2017-05-0604:36cflemingIt should be Excluded#2017-05-0604:37cflemingHowever that should be set up by default. In your lein toolwindow (View->Tool Window->Leiningen) is your project added there?#2017-05-0604:38martinklepschyes, it’s listed there#2017-05-0604:38cflemingOne sec#2017-05-0604:41cfleming@martinklepsch Do you have an entry for :target-path in your project.clj?#2017-05-0604:42martinklepschyes, :target-path "target/%s" maybe that’s the issue? (not sure why it has the %s)#2017-05-0604:43cflemingThat’s probably the issue, yes.#2017-05-0604:44cflemingI don’t know why that would be there.#2017-05-0604:45cfleminghttps://github.com/technomancy/leiningen/blob/master/sample.project.clj#L302-L306#2017-05-0604:45cflemingDo you see those directories being created?#2017-05-0604:45cflemingi.e. with profile names?#2017-05-0604:52martinklepschyes#2017-05-0604:57cfleming@martinklepsch Ok, I’ve filed https://github.com/cursive-ide/cursive/issues/1746#2017-05-0604:58cflemingI’ll fix that for the next build.#2017-05-0605:06martinklepschcool 👍 🙂#2017-05-0610:26moizsjdoes anyone here know how to make IntelliJ index a private maven repo? In other words how to tell IntellIJ’s maven plugin about the creds?#2017-05-0620:16sandbagsAm I missing out on any way to get rainbow parens in the REPL output?#2017-05-0620:16sandbags(solutions rules "SPACE") => (([\S \A]) ([\P \A] [\P \B] [\P \D]) ([\A \C] [\A \E]) ([\C \E]) ([\E \F])) it's kind of hard to see the nesting at a glance#2017-05-0704:46cfleming@moizsj See here: https://groups.google.com/d/msg/cursive/pWA528YDTIU/bZa7f-NEAQAJ for a possible solution, I’d like to know if it works or not.#2017-05-0704:46cfleming@sandbags Hmm, that might not work, I’m actually not sure. If it doesn’t, feel free to post an issue.#2017-05-0705:04gmercer@moizsj if it does work but you don't want a cleartext password in your settings.xml - http://blog.sonatype.com/2009/10/maven-tips-and-tricks-encrypting-passwords/#2017-05-0707:36cfleming@gmercer Good link, thanks - I’ll add that to the doc#2017-05-0708:28sandbags@cfleming i don't follow#2017-05-0709:35cfleming@sandbags It’s entirely possible that the rainbow parens don’t appear in the REPL output, because of how they’re implemented. If you file an issue for it, I’ll take a look at it - it’s probably an easy fix.#2017-05-0709:35sandbagsOk, will do#2017-05-0710:16dm3@cfleming do you see the Cursive extension API added realistically within the next couple of months (so that e.g. https://github.com/cursive-ide/cursive/issues/1670 doesn’t need a fix)? Should I just add a dependency on Potemkin and close the issue?#2017-05-0710:18cfleming@dm3 So, I’m not sure. I’m actually working on that somewhat in the background at the moment, evaluating how much I should refactor what I have to be more spec-like. I’ll take another look at that issue this week, I did make a start on it but it was somewhat tricky, IIRC because there are more macros than just the potemkin one that would really need support.#2017-05-0710:18cflemingI don’t have the code here with me though, so I can’t confirm. I’ll let you know next week if I have questions.#2017-05-0710:23dm3ok, thx#2017-05-0806:34moizsj@cfleming the thing is I am using a private repo that my project.clj specifies but its not specified in the settings.xml in my maven home dir.#2017-05-0806:34moizsjdint help even when i specified an “id” in the project.clj and used the same id in the servers entry in settings.xml#2017-05-0808:42stuartrexkingIs it possible to evaluate a form and have the output show in the editor window, like cider does with a buffer overlay?#2017-05-0811:11cfleming@stuartrexking It’s not right now, but it’s something I’m planning to add soon.#2017-05-0811:14stuartrexkingThanks. #2017-05-0811:16stuartrexkingNot the tennis player. Lol. #2017-05-0812:42rauhJust discovered "structural search / replace" in Intellij: https://www.jetbrains.com/help/idea/2017.1/structural-search-and-replace-examples.html#2017-05-0812:43rauhThat'd be a killer feature for Cursive! 🙂#2017-05-0821:25cfleming@rauh It’s very powerful, but it’s a gigantic pain to use. I’d probably add something more Clojure-specific, perhaps more like Kibit: https://github.com/jonase/kibit/blob/master/kibit/src/kibit/rules/collections.clj#2017-05-0821:31cflemingBut I’m interested in feedback about the sort of thing you’d like to use it for.#2017-05-0823:57kennyIs there a fix for the "Generate now" dialog not going away even after clicking generate now?#2017-05-0901:31cfleming@kenny I haven’t heard about that one.#2017-05-0901:31cflemingThis is using Cmd-N?#2017-05-0901:31kennyOops, I meant generate stubs dialog 🙂#2017-05-0901:33kennyIt finally went away but it left all my Datomic functions as unresolved. Though, I stopped working in that project and just took a peek at the project and it seems to have magically fixed itself.. Maybe IntelliJ's indexing was pretty delayed or something?#2017-05-0901:36hagmonkThere's still no Cursive for 2017.2, right? Just checking since I had another machine prompt to update, and I'm not sure how to tell what plugins will be invalidated after an update …#2017-05-0902:01taylorhagmonk: AFAICT if you install Cursive before upgrading to 2017.2 it continues to work fine. If you install 2017.2 and then try to install Cursive, it won’t let you. wrong#2017-05-0902:13cfleming@U3DAE8HMG I’d be surprised if that worked - IntelliJ should prohibit the current Cursive version from working in 2017.2#2017-05-0902:14taylor@cfleming it (fingers crossed) works on my machine 🙂#2017-05-0902:14cflemingReally? That’s very strange.#2017-05-0902:16taylorhaha disregard, I’m running 2017.1.2… forgot a very important number in there#2017-05-0902:17taylorI installed 2017.2 on my personal machine and noticed it wouldn’t allow me to install Cursive, but for some reason I thought I was running 2017.2 on my work machine#2017-05-0902:11cfleming@hagmonk No, sorry - I’m working on fixing a bug, hopefully I’ll get the EAP out today.#2017-05-0902:12cfleming@kenny There’s at least one bug there I’m planning to investigate for the next build.#2017-05-0902:12kennyGreat, thanks.#2017-05-0902:14hagmonk@cfleming no worries mate, just checking 🙂#2017-05-0905:36rauh@cfleming I'm refactoring some cljs code where have to turn some fn calls to macro calls. So far I've been using "Replace in path" with regex. It actually works pretty well#2017-05-0905:36rauhSo then I thought maybe structural replace would be pretty simple to implement for CLJ. But not sure if that option would be used by a lot of people.
#2017-05-0905:38rauhOne of the biggest pain point for me is that there is no automatic imports of "refer'd" vars.#2017-05-0909:38cfleming@rauh Yeah, I’m planning to add that soon as part of more sophisticated ns refactoring in general.#2017-05-0909:38cflemingIt’s something a lot of people have asked for.#2017-05-0910:56cfleming@hagmonk BTW 1.5.1-eap1 has 2017.2 support.#2017-05-0910:56cflemingOut now.#2017-05-0910:57cfleming@moizsj I did do at least a basic test of that, I’ll try it again tomorrow.#2017-05-0912:05curlyfryIs there anything in the works regarding support for spec? (Go to definition for namespaced keywords/go to spec for function/show specs when entering arguments to a fn, etc)#2017-05-0915:54hagmonk@cfleming installed … everything seems to be working great!#2017-05-0919:09danielcomptonhttps://github.com/cursive-ide/cursive/issues/1427#2017-05-1007:40cfleming@curlyfry ^^#2017-05-1008:26sandbagsIs my memory faulty? I could have sworn cursive allowed me to refactor function call chains into threading and vice verca?#2017-05-1009:23cfleming@sandbags Edit-&gt;Structural Editing-&gt;Thread/Unthread form#2017-05-1009:24sandbags@cfleming oh yes, ... thank you. Did they ever appear in a refactor menu at some point?#2017-05-1009:24cflemingYou mean like “Refactor this”? I don’t think so, no.#2017-05-1009:25sandbagshrmm... my memory being faulty i guess, thanks#2017-05-1017:09rauhOh well... I can select multiple files when doing a namespace search. Who knew... My problem of guessing which is the CLJ and which is the CLJS file are gone. I just open both 🙂#2017-05-1018:01taylorjust curious if there’s a changelog for 1.5.1 EAPs#2017-05-1019:21nwjsmithI'm having trouble connecting to a remote REPL and I think it's because of... Java parsing?#2017-05-1019:24nwjsmithlein repl works#2017-05-1019:24nwjsmithand so does lein compile. The com.google.protobufs stuff is in my classpath. I'm not sure why Cursive isn't picking it up.#2017-05-1021:56cfleming@nwjsmith Are you using AOT compilation in your project?#2017-05-1021:57nwjsmith:thinking_face:#2017-05-1021:58cfleming@taylor Unfortunately I’ve been pretty hopeless at getting a proper changelog set up. The closest thing are the announcement emails on the ML: https://groups.google.com/d/topic/cursive/4r7-ZuxWwa8/discussion#2017-05-1021:59nwjsmith@cfleming judging by the project.clj, I'm not AOT-ing#2017-05-1021:59cfleming@nwjsmith In fact, for the REPL I think it’s irrelevant. Go to your run config, and near the bottom under Before Launch tasks remove Build from the list.#2017-05-1021:59cflemingDoes that help?#2017-05-1022:00nwjsmithYou're a hero Colin#2017-05-1022:00nwjsmithThank you#2017-05-1022:00cflemingYou’re welcome!#2017-05-1022:00cflemingI really hate those things, it’s amazingly difficult to stop them being added by default since my run configs are based on the Java ones.#2017-05-1022:01nwjsmithI'm a bit in the dark about why the error occurs, but this gets me productive again#2017-05-1022:01cflemingSo, the problem is that that item means that IntelliJ will try to build your project before running.#2017-05-1022:02cflemingIn theory, the IntelliJ project should be a perfect representation of what’s in your project.clj, but in practice it’s not, and it’s hard to tell why without seeing the project.#2017-05-1022:02cflemingOr at least, it’s not always in practice - usually it is.#2017-05-1022:03cflemingSo sometimes compilation can be subtly different.#2017-05-1022:04cflemingBut if you’re using lein to run your REPL (which you are if you’re using the lein option in Cursive) then it doesn’t matter anyway because lein will compile everything it needs itself, so the IntelliJ compilation is redundant (quite apart from being incorrect)#2017-05-1022:06nwjsmithah okay, I understand that. So it makes sense to remove the Build task from any of my Leiningen-based projects, if only to speed up launching the REPL?#2017-05-1022:06nwjsmithDo I lose any IntelliJ-provided functionality here?#2017-05-1022:06cflemingSo - I don’t think so 🙂#2017-05-1022:07nwjsmith🙂#2017-05-1022:07cflemingIt’s hard to be sure - I think the most likely issue is that the compilation process in IntelliJ is also what copies resources around.#2017-05-1022:07nwjsmithSeems like a fairly large black-box#2017-05-1022:07cflemingBut again when you’re using lein it should do that automatically anyway.#2017-05-1022:07nwjsmithawesome,#2017-05-1022:07nwjsmithI'll keep on keeping on with this#2017-05-1022:08cflemingCool - if you see weirdness, let me know.#2017-05-1022:08nwjsmithIf I notice anything missing, I'll stop by this channel and let you know#2017-05-1022:08nwjsmiththanks for the help#2017-05-1022:10cflemingNo worries.#2017-05-1117:45wilkerluciois it possible to have multiple REPL's on same project running on separated windows (instead of tabbed)?#2017-05-1119:13nwjsmithIs there a way to switch Cursive's indentation to the 1-space (Emacs) style?#2017-05-1121:23cfleming@wilkerlucio No, unfortunately I don’t think there’s a good solution for this. I’m going to ask JetBrains what their recommendation is.#2017-05-1121:24cfleming@nwjsmith Settings-&gt;Editor-&gt;Code Style-&gt;Clojure-&gt;General-&gt;One space list indent#2017-05-1123:52wilkerlucio@nwjsmith I highly encorage you to don't do that, it gets really annoying if other people has to use it, since most Clojure code base is indented with 2 spaces#2017-05-1123:56nwjsmithUnfortunately I'm working in a code base which adheres to that style, on a large team that adheres to that style. I'm erring on the side of consistency. I hear ya though, I don't like it either #2017-05-1123:56cfleming\ahem\ Emacs’ fault, that one.#2017-05-1123:59nwjsmithHaha, yeah for sure#2017-05-1202:45kennyIs there a reason clojure.spec/*recursion-limit* shows up as "cannot be resolved" in the editor panel?#2017-05-1204:43cfleming@kenny Umm, I’m not sure - how is it defined?#2017-05-1204:45cflemingActually, yeah, there are a couple there which are not handled correctly for some reason.#2017-05-1204:46cfleminghttps://github.com/cursive-ide/cursive/issues/1751#2017-05-1212:06jmayaalv@cfleming this looks like a cool idea for debugging clojure https://plugins.jetbrains.com/plugin/9696-java-stream-debugger?platform=hootsuite 🙂#2017-05-1221:29cfleming@jmayaalv Oh, that does look very nice indeed.#2017-05-1302:27danielcomptonThat stream debugger looks awesome 🔥 🔥#2017-05-1319:32bherrmannlike https://bpiel.github.io/sayid/ for java#2017-05-1322:27souenzzostream debugger tracks just "primitives" or objects too? Does not seem very useful in a big java OO project#2017-05-1405:28cflemingI assume it tracks objects, but I haven’t tried it. I suspect the UI might be tricky with large Clojure data structures too.#2017-05-1421:22cfleming@bherrmann Actually, Chronon: https://www.jetbrains.com/help/idea/2017.1/debugging-with-chronon.html is more like Sayid for Java.#2017-05-1421:22cflemingHere’s possibly a better idea of what it looks like: https://blog.jetbrains.com/idea/2014/03/try-chronon-debugger-with-intellij-idea-13-1-eap/#2017-05-1421:23cflemingSadly Chronon only works with Java, not other JVM languages - I’m not sure what the limitation is.#2017-05-1507:27sandbags@cfleming am i missing a way to move a function to another namespace (handling the necessary requires)?#2017-05-1507:28sandbagsi had a look at the stuff in refactor and structural editing and didn't seem to see it#2017-05-1508:20cfleming@sandbags No, sadly that’s still on my to-do list.#2017-05-1508:43sandbagsokay, something else to look forward to 🙂#2017-05-1520:31carocadhey guys, does somebody knows how to start a cljs repl with cursive? I dont seem to find a way to do that. So far I have only been able to do it through fighwheel but I want to it with cljsbuild. Any ideas 😄 ?#2017-05-1521:20wilkerluciohello, is there a way to use the current selected text into a REPL command?#2017-05-1521:22wilkerluciofound it, ~selection 🙂#2017-05-1607:39stijn@carocad Not sure if this is ok for your use case: use piggieback to upgrade a jvm repl to a clojurescript one#2017-05-1607:39stijne.g. in dev/user.clj#2017-05-1607:39stijn
(ns user
  (:require [cljs.repl :as repl]
            [cemerick.piggieback]
            [cljs.repl.node]))

(defn start-cljs
  []
  (cemerick.piggieback/cljs-repl (cljs.repl.node/repl-env)))
#2017-05-1607:39stijnand after starting the jvm repl, (start-cljs)#2017-05-1607:40stijnand you need something like#2017-05-1607:40stijn
:profiles {:dev {:dependencies [[com.cemerick/piggieback "0.2.0"]
                                  [org.clojure/tools.nrepl "0.2.10"]]
                   :source-paths ["dev"]
                   :main         user
                   :repl-options {:nrepl-middleware [cemerick.piggieback/wrap-cljs-repl]}}}
#2017-05-1607:40stijnin your project.clj#2017-05-1608:37carocad@stijn thanks for the info. At the end I went with a simple clojure.main configuration in cursive which executes the following script:
(require 'cljs.repl)
(require 'cljs.build.api)
(require 'cljs.repl.node)

(cljs.build.api/build "src"
                      {:output-to "index.android.js"
                       :optimizations :simple})

(cljs.repl/repl (cljs.repl.node/repl-env)
                :watch "src"
                :output-to     "index.android.js"
                :output-dir    "target/android")
                ;:main "env.android.main")
#2017-05-1613:43sandbags@cfleming question: when you type ";" accidentally instead of "l" is it expected that when you Cmd+Z to undo instead of simplying undoing the insert comment it undoes the whole previous editing sequence?#2017-05-1614:03nwjsmithIs there a way to cycle from string -> keyword -> symbol?#2017-05-1614:03nwjsmithanalogous to the "Cycle Data Structure" action?#2017-05-1614:04nwjsmithI'm doing some testing around marshalling maps to and from JSON and it would be a big time saver#2017-05-1615:50zyloxhuh, hadn't seen that cycle data structure command before#2017-05-1615:50zyloxthats pretty neat#2017-05-1713:20souenzzo@cfleming how to see exception/log from stubs generation? I update EAP just now and: I need to regenerate stubs nice! new/better tips on code!. But it failing#2017-05-1716:10timgilbertI'm not having a lot of success generating stubs either in the just-released IntelliJ / Cursive EAP#2017-05-1719:11wilkerlucio@cfleming idea: on REPL commands, would be nice to have options about what to do with the command output, I found some cases that would be useful to instead of printing the result on the REPL, I want to replace the current selection (or insert on caret position in case nothing is selected) with the output#2017-05-1719:11wilkerlucioa case that I found it would be cool is a implementation of sort imports#2017-05-1719:12wilkerluciocurrently I have a command that reads the selection (in this case I select my required items) and output a sorted version of it#2017-05-1719:12wilkerluciobut currently I have to manually copy the output and paste over, would be cool to be able to make this happen automatically as a configuration of the command ouput, makes sense?#2017-05-1722:35kennyI like that spellcheck has been added to the latest Cursive EAP. Is it possible to ignore a word instead of adding it to the dictionary? I have many cases where a word is not a valid dictionary word but it is the correct spelling for the symbol. It makes sense to me to only have actual dictionary words in the dictionary.#2017-05-1722:38kennyAlso, it'd be cool if spell checking could be disabled for #uuids.#2017-05-1722:53danielcompton@kenny I think you just need to add it to the dictionary#2017-05-1722:53danielcomptonyeah, if you want to include all the UUID's in the dictionary it gets a bit large 😛#2017-05-1722:53kennyYeah, that solves the problem but the words I'm adding are not actual words haha.#2017-05-1722:55kennyHaving all the green squigglys annoys me 😆#2017-05-1722:57danielcomptonare they in a particular place? e.g. in function definitions?#2017-05-1722:58danielcomptonThe PHP version (for example) allows to disable spelling checks in certain places#2017-05-1722:58danielcomptonnot sure about Cursive#2017-05-1722:58danielcomptonhttps://intellij-support.jetbrains.com/hc/en-us/community/posts/207070915-disable-spell-checking-on-variable-declarations-#2017-05-1800:22nwjsmithDoes anyone have issues with Cursive not resolving symbols from Specter?#2017-05-1800:22nwjsmithThey are the only analysis warnings I have left in a couple of files, I'd love to get rid of them.#2017-05-1800:24nwjsmithWeirdly, it isn't all symbols from Specter, just MAP-VALS AFAICT#2017-05-1804:28cfleming@wilkerlucio Good idea, can you file an issue for that?#2017-05-1804:28cfleming@kenny Could you file an issue for the UUID thing?#2017-05-1804:29cfleming@nwjsmith It might be that Specter defines that using a macro or some other trickery.#2017-05-1804:29cflemingI’ve been meaning to look into it but haven’t yet.#2017-05-1804:32cfleming@souenzzo @timgilbert Could you try this: Go to Help-&gt;Debug Log Settings… and enter cursive.stubs into the box. Then reproduce the problem, and send me the log from Help-&gt;Show log in Finder/Explorer by email to <mailto:/cdn-cgi/l/email-protection|/cdn-cgi/l/email-protection>?#2017-05-1813:15wilkerlucio@cfleming cool, issue created: https://github.com/cursive-ide/cursive/issues/1755#2017-05-1813:52timgilbert@cfleming: I was able to fix it via File / Invalidate Caches#2017-05-1813:52timgilbertNow I can't reproduce but I'll shoot you a debug log if I do#2017-05-1823:00rafaelDoes anyone know if cursive can connect to clojure 1.8 socket repl?#2017-05-1823:00cfleming@rafael Sadly not yet, but that will be coming soon (like, the next couple of releases).#2017-05-1823:01cflemingIn the meantime you can use https://github.com/mfikes/tubular as a workaround.#2017-05-1823:01rafaelGlad to know it's on the roadmap 🙂#2017-05-1823:06cfleming@rafael Yes definitely. Can I ask about your use case? Why do you need it?#2017-05-1823:09rafaelMy current use case is probably not very generalizable, I think. I'm running a gorilla repl in docker and I'd also like to connect Cursive to it, but it binds nrepl to localhost which cannot be exposed outside of the container. I thought of working around it with the socket repl, but I'll find another workaround.#2017-05-1823:10cflemingOk, interesting, thanks.#2017-05-1900:37rafael(just for the record, this was my workaround https://github.com/JonyEpsilon/gorilla-repl/pull/270 )#2017-05-1917:42Lone Rangercurious if it's possible to execute code in repl from breakpoint in cursive?#2017-05-1917:43Lone RangerI feel like it is but I'm not seeing it 😅#2017-05-1917:43Lone RangerI see that it's possible to evaluate an arbitrary expression in a popup window#2017-05-1918:52timgilbertSay, is there a way to have parinfer on, but have Cursive not reformat a file as soon as I open it? Getting a lot of extraneous whitespace diffs#2017-05-1920:50nwjsmithWhen running tests, I'm not able to click the "Show Diff" Icon in the gutter, it just sets a breakpoint#2017-05-1920:50nwjsmithIs there a key combo I can press to open it up?#2017-05-1920:58nwjsmithHrm, I think I know what's up. There are ~20 "Show diffs" on the same line and it can't decide which one.#2017-05-1920:58nwjsmithand the tooltip is too large to click the link in, it just flashes#2017-05-1923:36kzeidlerI thought I had Cursive all nicely bootstrapped last night, but on a fresh project, I'm unable to launch the REPL. The only option available in any of the Module dropdowns is <unknown> (for nREPL in normal JVM process and clojure.main in nomal JVM). At the bottom of the run config menu there's an alert: "No modules containing clojure.main found"#2017-05-1923:37kzeidlerA detail which may or may not be interesting: the "run nREPL with Leiningen" option is grayed out, and not selectable#2017-05-1923:40kzeidlerRight before this, I didn't have the option to create the REPL and double checked that the project SDK was Java. The project SDK was actually Python. So I added the path to my Java SDK to IntelliJ, and selected that as the project SDK, thinking that might solve the problem...#2017-05-1923:41kzeidlerbut now I'm here. Any suggestions would be much appreciated#2017-05-2000:13Lone Rangerso @kzeidler I've run into this problem before and the best workaround I've found is to create a project on the command line using lein and then new project from existing sources in intellij#2017-05-2000:14Lone RangerI realize that's not a definitive answer or even addressing the underlying cause but it seems to work for me 😅#2017-05-2000:30kzeidler@goomba that did the trick! Do you happen to know if new project from existing sources is a valid option from the IntelliJ init popup? (Or even better: how to disable that f$*&ing popup? 😬)#2017-05-2000:31Lone Ranger😅 no it's a bit of dark magic for me and depends on whether I properly exit or rage quit#2017-05-2000:32Lone RangerI always go through the menu just b/c it's the only way I know how#2017-05-2000:32Lone Rangeralthough IIRC there is a way to do it from the popup#2017-05-2000:33kzeidlerThe only available context for selecting that option (that I'm aware of) is File > New, but the application tabs aren't available until you open something... :face_with_rolling_eyes:#2017-05-2000:33Lone Rangerohhh I see what you mean#2017-05-2000:34Lone RangerI think the "import project" would probably do the trick#2017-05-2000:34Lone Rangerfrom the popup#2017-05-2000:34kzeidlerheh yeah. I've looked this up before because it also prevents opening directories from command line. I didn't find a promising lead though 🙂#2017-05-2000:34kzeidlerI'll give that a shot#2017-05-2000:34Lone Rangeryeah that seems to work#2017-05-2000:35kzeidlerThanks so much for the tip#2017-05-2000:36Lone Rangerhehehe no worries 😄 it's all these little hangups that prevent actual code writing... I spent six hours yesterday tearing my hair out trying to get datomic running until someone pointed out I wasn't escaping an ampersand in my shell command 😳#2017-05-2000:37Lone Rangerand let's not even talk about kubernetes... 3 months later and I'm still not too much further with that#2017-05-2000:37kzeidlerHahaha that's rough. Did Cursive/IntelliJ not pick up on that?#2017-05-2000:37Lone Rangerwell I was editing on emacs soooo.... no 😛#2017-05-2000:37Lone Rangeralso, I have almost no idea how to use emacs#2017-05-2000:38Lone Rangersometimes I'm amazed people pay me money#2017-05-2000:38kzeidlerHeh realtime error highlighting is one of those small things that I've noticed several editors really struggle with (cough coughATOM cough)#2017-05-2000:39Lone Ranger😂#2017-05-2000:39Lone Rangertrue#2017-05-2000:39kzeidlerNot IntelliJ though. IntelliJ is more than happy to criticize my shortcomings#2017-05-2000:40Lone RangerI actually started with PyCharm and good lord it made me seem like a genius compared to folks using other IDEs if for no other reason than alt+enter, error highlights, and code cleanup#2017-05-2000:41Lone RangerI've dabbled with writing a few plugins... it's not easy. 🎩's off to @cfleming for crushing it with cursive... must've been madness#2017-05-2000:42kzeidlerI am. so. mad. I didn't know about IDEs when I was taking CS, everyone else had a sixth sense for solving all the endless strange errors of the JVM meanwhile I was using sublime and perpetually lost#2017-05-2000:43kzeidlerhow was getting started with that -- writing plugins, I mean?#2017-05-2000:44kzeidleras a lisper I'm always partially thinking about what sort of environment macros would make my life more pleasant#2017-05-2000:45kzeidlerlately I've been using bash scripts with my projects, but... y'know. \shudder\#2017-05-2001:00Lone Rangerohhh yeah that's rough#2017-05-2001:00Lone Rangerwhat are you bash scripting for? deployments or what?#2017-05-2001:02Lone RangerI've been using ansible for some of that stuff. It's a pretty good trade off between learning curve and usefulness... way better than just plain 'ol bash scripting so far#2017-05-2001:09kzeidlerthe other day I was trying to figure out a way to associate only the most recently modified file in a directory with a particular variable#2017-05-2001:11kzeidlerthere might be multiple ways of doing it, but I ultimately just wrote a bash alias to return the absolute path of the most recently modified file in a particular dir, and just called that from Python#2017-05-2001:12kzeidlerbut I felt dirty afterward, like I needed a shower#2017-05-2001:16Lone Rangerohhhh#2017-05-2001:16Lone Rangerhaha yeah 😅 I end up doing a lot of bash/Python interop for that file system stuff#2017-05-2001:17Lone Rangerat least you're in good company... that's pretty standard these days for sysadmin stuff#2017-05-2001:17kzeidler"modularity? pfft who needs it!"#2017-05-2001:19kzeidlerI've asked like half a dozen elder programmers how it was that bash came to be the lingua franca of the shell scripting languages, and scheme did not#2017-05-2001:19kzeidlerno one seems to know the answer, they're as baffled as I am#2017-05-2001:21Lone Ranger😂#2017-05-2001:21Lone Rangerwell after I started learning Clojure I was like "why the hell did we adopt C if we had LISP around in 1960?"#2017-05-2001:21Lone Rangerthe answer, at least as far as I can tell, is LISP in the 60's was nothing like Clojure today#2017-05-2001:25kzeidlerI actually heard Dick Gabriel talk about this a few years ago (one of the OG creators of Lisp)#2017-05-2001:26Lone Rangeroh yeah? what did he have to say about it?#2017-05-2001:28kzeidlerIn his assessment the beauty of Lisp was also its downfall, and the ease of extending the primitive base functions led to speciation between the various universities using Lisp, making their programs impossible to decipher outside the local context#2017-05-2001:28kzeidlerwhich... on bad days, reminds me a little bit of Clojure 🙂#2017-05-2001:29Lone Rangerah, yeah. that's a thing#2017-05-2001:29kzeidlerBasically it cleaved into a bunch of local DSLs, see Common Lisp vs. 100s of other lisps#2017-05-2001:29Lone Rangerthat's also in general what I've heard described as the "downfall" of LISP in general... it's so much fun to write everyone wants to write everything from scratch#2017-05-2001:30kzeidlerThe entire interview is actually one of my favorite programming-related things ever http://www.se-radio.net/2008/01/episode-84-dick-gabriel-on-lisp/#2017-05-2001:30Lone Rangerwhereas in other languages it's so painful everyone relies on shared code to a much greater extent#2017-05-2001:30Lone Rangercool! thank you!#2017-05-2001:31kzeidlerHe's fascinating, just the kind of person you would imagine might have invented Lisp one day#2017-05-2001:32Lone Rangergreat intro music#2017-05-2001:34Lone Rangerwhoa... MFA in poetry#2017-05-2001:34Lone Rangerdidn't see that one coming#2017-05-2001:34kzeidlerright!? He's a unicorn#2017-05-2001:35Lone Rangerwhoa... the way he talks about the initial thought of LISP is exactly why I became interested in Clojure... code that constructs code#2017-05-2001:40kzeidlerTotally. Sometimes in 2017 I forget to remember that the base mechanism of lisp is beautiful and a nice idea, despite circular dependencies and bizarre errors thrown from external sources 🙂#2017-05-2001:41Lone Rangerhappily I don't know enough about it yet to worry about those problems#2017-05-2001:41Lone Rangeralthough so far my experience with dependencies has been much nicer than Python#2017-05-2001:41Lone RangerI can see now why folks coming to Python as a second language find it maddening#2017-05-2001:43kzeidlerI know their pain... for what it's worth, once I switched to anaconda I stopped having strange dependency issues#2017-05-2001:44Lone RangerAhhh.... yeah anaconda introduces other issues though#2017-05-2001:44Lone Rangerreally the only way to do it without fubarring everything is to use VMs and containers for Python (or else virtual environments (which I think are dumb))#2017-05-2001:45kzeidlerDoes it? What kinds of issues?#2017-05-2001:45Lone Rangerwow, I just instinctively closed out nested parenthesis#2017-05-2001:45Lone Rangerit's too late for me#2017-05-2001:46kzeidlerhahaha apply @goomba#2017-05-2001:46Lone Rangerbwahaha#2017-05-2001:46Lone Rangerso with anaconda... if you want new packages you should use the conda tool#2017-05-2001:46Lone Rangerif you're trying to use pip or easy_install and you're not careful you can install to the wrong place and it's not obvious#2017-05-2001:48kzeidlerreally the only issue I've had with conda is certain libs like Tensorflow don't seem to be able to compile themselves to your individual machine, and supposedly would be a lot faster if installed directly via Pip#2017-05-2001:49Lone Rangeryou running a windows machine?#2017-05-2001:49Lone Rangerif so anaconda is really the only way to go#2017-05-2001:49kzeidlerweird. What's the defined behavior exactly when 'pip' is called in a conda environment?#2017-05-2001:49kzeidlerNah. Mac#2017-05-2001:50Lone Rangerit seems arbitrary#2017-05-2001:50kzeidlerheh#2017-05-2001:50Lone RangerI find that libraries that are installed using anaconda tend to install to anaconda#2017-05-2001:50Lone Rangerwhich is fine until it's not#2017-05-2001:50Lone Rangeragain I just skirt the issue with containers/VMs#2017-05-2001:51Lone Rangerand voodoo#2017-05-2001:51Lone Rangerlol and now I'm starting to do a lot of Python/Clojure interop#2017-05-2001:52kzeidlerHaha I do run into periodic issues with the permissions of like, python development header files especially#2017-05-2001:52Lone Rangerbasically the only things I won't do in Clojure anymore are sysadmin/devops stuff and anything I need numpy for#2017-05-2001:53kzeidlerbut they usually go away once i do something horrible like chown all my python paths and chmod them so everyone and their mother is invited to use them#2017-05-2001:53Lone Rangerahhaaahaaaaaa#2017-05-2001:53Lone RangerI'm so glad I'm not the only one who does that#2017-05-2001:53Lone Rangerf*ck it chmod -R 777 .#2017-05-2001:54Lone Rangeractually I've done chown -R 777 . and that's not fun#2017-05-2001:54kzeidlermy dev environment is a total house of cards and yes I live in constant fear of it toppling 🙂#2017-05-2001:54Lone Ranger😂#2017-05-2001:55Lone Rangeryou know before I became I programmer I assumed all programmers were like Dick Gabriel#2017-05-2001:55kzeidleroh snap, haha does that do what I think it does? Give your files to someone named 777?#2017-05-2001:55Lone Rangernow that I've seen the man behind the curtain ... every profession I once assumed was full of competent people has been called into question#2017-05-2001:55Lone Rangeroh, sorry#2017-05-2001:55Lone Rangerother way around#2017-05-2001:56Lone Rangerchmod -R app .#2017-05-2001:56Lone Rangerchanges everything to ????????? <file-name> when you run ls -l#2017-05-2001:56kzeidlerhahahahahah#2017-05-2001:57Lone Rangersuddenly nothing works#2017-05-2001:57kzeidlerAre you even allowed to touch them after? You must be, right?#2017-05-2001:57Lone Rangeryeah with sudo#2017-05-2001:57kzeidlerphew#2017-05-2001:58Lone RangerI remember before I was doing automatic deployments I botched a deployment pretty badly and had to go in and modify the live production system and did that#2017-05-2001:58Lone Rangerheheheh#2017-05-2001:58Lone Rangerdouble botch#2017-05-2002:00kzeidlerbtw, the solution for the issue we discussed earlier appears to be: left click your project.clj > add project to leiningen (or something like that), it should then start reindexing everything and when finished you should be able to specify a valid run configuration for the REPL#2017-05-2002:02Lone Rangerand the recursion unwinds 😄 wonderful!#2017-05-2004:13cfleming@goomba No, I’ve been meaning to fix that but right now you have to use the “evaluate expression” popup you found.#2017-05-2004:14cflemingThe issue is that the REPL is suspended because the whole VM is stopped.#2017-05-2004:15cfleming@timgilbert There isn’t, I’m afraid - that’s a fundamental part of parinfer (see https://shaunlebron.github.io/parinfer/#downsides)#2017-05-2004:16cflemingI’m halfway through thinking about/planning a parinfer-like thing which only works locally, and would not suffer from this problem.#2017-05-2004:20cfleming@kzeidler Phew - read all that. I think the issue is how you’re creating your projects. For a simple one-`project.clj` project, the easiest way is just File-&gt;Open… and select either the project.clj or the containing directory.#2017-05-2004:20cflemingIf you want to create a new project from within IntelliJ, File-&gt;New…-&gt;Project, then select Leiningen and you should be good to go.#2017-05-2004:23cfleming@kzeidler There’s some doc about this here: https://cursive-ide.com/userguide/leiningen.html. It’s slightly out of date since it was written against an older IntelliJ version, but it should still help.#2017-05-2004:33Lone RangerThanks again boss @cfleming, my hero as always!#2017-05-2004:44puzzler@cfleming Looking forward to the day I can try your new take on parinfer. I've temporarily gone back to emacs, in large part because I'm really liking parinfer, and Cursive's implementation of parinfer is too quirky for my tastes. I've mentioned this before, but in case it's fallen off your radar, I'll say that my three big issues with Cursive's parinfer were: 1) there is no "paren" mode, and parinfer really relies on being able to toggle back and forth between paren and indent mode. Cursive offers parinfer's indent mode, but Cursive's plain editing mode isn't really an adequate substitute for paren mode, IMHO. 2) I had files corrupted when Cursive's parinfer relocated parens based on indentation without asking for permission or formatting the file first (as a consequence, for example, of jumping to definition triggering another source file to be opened). 3) Undo interacted in strange ways with parinfer.#2017-05-2004:45cfleming@puzzler Thanks. After that recent thread I’m motivated to try to make Cursive more beginner-friendly again.#2017-05-2004:46cflemingCutting and pasting is another pain point, which may have a simple solution.#2017-05-2004:46puzzler@cfleming The other thing I'm really liking in emacs is how trivial it is to start up both a clojure and clojurescript repl for a mixed-code project. In pretty much every other respect, I'd prefer to be using Cursive. I'm sure I will be back on Cursive at some point in the future.#2017-05-2004:47cfleming@puzzler Yes, a combined clj/cljs REPL is the next large feature I’m planning.#2017-05-2004:47puzzler@cfleming Glad to hear it.#2017-05-2004:48puzzlerAnd yes, cutting/pasting was another thing that interacted oddly with parinfer at times. I had forgotten about that.#2017-05-2012:06rauhJust tried out 2017.1.2, and with it, "Jump to namespace" dialog often immediately disappears after a fraction of second. Not an issue with 2016.3.2#2017-05-2013:32kzeidler@rauh Yeah that's a minor gripe I have with IntelliJ itself. I've always had that problem, I think it's an IntelliJ quirk (also any changes to my tooltips' delay parameter do... nothing, I think)#2017-05-2013:38kzeidlerI have a dream, which may or may not be possible. But I bet it is possible: I'd like to have two simultaneous REPL run configs in the same project, one synced with the project.clj, and the other synced with some provisional staging REPL that I can use to hack on libraries that I'm considering introducing to the main build config.#2017-05-2013:44kzeidlerI know with leiningen it's mandatory to restart the repl after introducing a new dependency, which can be a headache. I'd like to minimize the number of times I have to stop/rebuild/reboot the main REPL process while I'm still flirting with a bunch of different libraries that I may or may not end up using#2017-05-2013:54rauh@kzeidler You can load deps at runtime: http://z.caudate.me/give-your-clojure-workflow-more-flow/#2017-05-2013:54rauhNo restart necessary#2017-05-2013:55rauhI've never used "start repl" from Cursive, I only ever connect to the NREPL that I start on the command line.#2017-05-2014:07kzeidlerHmm... I'm a little timid about introducing a dynamic dep fetcher/loader into my project at this point. I'm still a little scarred from using Boot a few months ago... I ended up retreating back to Javascript for a while#2017-05-2014:08kzeidler@rauh You don't use the Cursive REPL that's built into IntelliJ at all? 😮#2017-05-2014:09rauhNo I do, I just don't start a REPL from Cursive, I just connect to 3 different REPLs#2017-05-2014:10rauhSo for your case, you can start 2-3 REPLs on the command line and send forms to the REPL where you want to try out a library#2017-05-2014:10kzeidlerInnnteresting... I'm trying to picture this, but I'm having trouble visualizing how that even works#2017-05-2014:10kzeidlerooh#2017-05-2014:10kzeidleroooooh#2017-05-2014:10kzeidlerI think I'm starting to see#2017-05-2014:10rauhSo you start and NREPL, lein with-profile dev-clj repl :start :host localhost :port 23134#2017-05-2014:11kzeidlerSo the primary REPL basically... broadcasts the input to some slaves or something on the slave ports?#2017-05-2014:11rauhAnd in cursive you do "Clojure REPL -> Remote"#2017-05-2014:12kzeidlerAnd the slave environments are each customized and self-contained, I guess?#2017-05-2014:12rauhyeah, Cursive stays lean and doesn't start anything by itself.#2017-05-2014:13rauhI can even REPL in my Clojurescript macro namespaces. IMHO that should really be the recommended way, easier and more powerful#2017-05-2014:13kzeidlerI've spun up a remote REPL before... that's just a REPL listening on a network port right? Is there anything more to it than that?#2017-05-2014:13rauhnope, that's it.#2017-05-2014:14rauhWith the workflow you can even load new clojurescript libraries onto the classpath at runtime without ever restarting figwheel or any REPL#2017-05-2014:14kzeidlerHaha and they just chat with each other and debate the interpretation of language expressions indefinitely. Neat.#2017-05-2014:16kzeidlerIs there a practical limit on how many remote REPL processes you can run concurrently?#2017-05-2014:16kzeidlerI'm sure it's not a hard limit#2017-05-2014:17kzeidlerbut these handsome bastards seem to require about 1GB of ram while the processes are actively working#2017-05-2014:19rauhMy Shared memory is at pretty much 90% of each lein process#2017-05-2014:20kzeidlerThe remote repls are able to share memory? Whaaaat#2017-05-2014:21rauhWell that's just Linux doing it's work#2017-05-2014:21rauhSo I just started 10 REPLs and RAM increased by 200 MB#2017-05-2014:23kzeidlerActually I can see how that would make sense... remote repl doesn't remotely execute anything, it's just remotely listening. Is that right?#2017-05-2014:24rauhWell, TBH, the above 200MB were probably because linux freed some RAM somewhere else 🙂
#2017-05-2014:25kzeidlerIt's hard to say for sure, but it looks like there should be a way to implement multiple remote repls in the run config menu itself (no dependencies required)#2017-05-2014:25rauhWhat do you mean?#2017-05-2014:25rauhYou can have multiple remote repl configurations in Cursive, no problemo#2017-05-2014:26rauhThe REPL is just a Java+Clojure process#2017-05-2014:26kzeidlerIn the run config menu there's an option to spin up a remote REPL at a designated host, port, from a designated "context module file"#2017-05-2014:26rauhthough the jar files aren't loaded n times, but are all in shared mem#2017-05-2014:26kzeidlergotcha. Yuss#2017-05-2014:27rauhThough, the objects living in the processes will still all add up. But you can restrict the JVM and it'll stay leaner#2017-05-2014:27kzeidlercurrently I only have the option of selecting one context module, which aligns the current project's project.clj namespace/version number#2017-05-2014:28kzeidlerIs there a way to import non-local context modules?#2017-05-2014:29kzeidler(e.g., a dummy project clj that just loads a new library that I want to play with, maybe some utilities from the current project but not the whole running server part)#2017-05-2014:33rauhYou mean so Cursive knows about your deps? Yeah for that I merge all my deps from the REPLs into one for Cursive to read.#2017-05-2015:08kzeidler@rauh: you wouldn't happen to know if defining those satellite REPLs as named build profiles (so the alternate dependency sets are scoped to the main project.clj) might be another way to implement this? Would building a project with multiple profiles compile down to one self-contained "context module" thingy per profile? Struggling a bit to get this off the ground, but from what I gather this looks like maybe the preferred way to deal with multiple environments#2017-05-2015:10rauh@kzeidler Not sure what you mean, can you make an example?#2017-05-2015:19kzeidler@rauh: sure, so if the following defines the project.clj, and building the project.clj produces a my-namespace.core-v.1.0.0-SNAPSHOT object, and a SNAPSHOT object is required to initialize the Remote repl via run configs, is there some way to easily instantiate one of either the :dev, :secondary, or :tertiary environments in the run config? `(defproject ring_to_curl "0.1.0-SNAPSHOT" :description "FIXME: write description" :url "http://example.com/FIXME" :license {:name "Eclipse Public License" :url "https://www.eclipse.org/legal/epl-v10.html"} :dependencies [[org.clojure/clojure "1.6.0"] [cheshire "5.4.0"]] :profiles {:dev {:dependencies [[com.cemerick/austin "0.1.5"] [com.cemerick/piggieback "0.1.4-SNAPSHOT"] [ring-mock "0.1.5"]] :plugins [[com.keminglabs/cljx "0.5.0"] [com.cemerick/austin "0.1.5"] [lein-cljsbuild "1.0.3"]] :test {}} {:secondary {:dependencies [...other deps] ... other plugins }} {:tertiary {:dependencies [...and so on]}}})`#2017-05-2015:21rauhuse triple quotes#2017-05-2015:25kzeidlerI'm assuming that the motivation for partitioning the different environment profiles like this is basically what I'm trying to do too... share whatever definitions ought to be shared, and enforce separation between the parts that need to be separated. But I'm quite over my head 😅#2017-05-2015:26rauh@kzeidler Here's how my project.clj looks like, it works nicely with Cursive: https://gist.github.com/rauhs/d5bb47c239b58cbf54e1d3d1de221031#2017-05-2015:35kzeidler@rauh: really helpful. Thanks for pasting them#2017-05-2019:59sandbags@cfleming what controls when cursive can lookup a symbol that cannot be resolved in the current file and find it in another file. So if I have foo/bar sometimes it will pop up the intention (?) "Do you mean bar in namespace x.y.z.foo"? And create the appropriate require for foo so that the symbol can be resolved. But I can't seem to figure out why sometimes it doesn't.#2017-05-2021:20tcarlsIs there a canned configuration available that'll be comfortable to folks with finger memory from Emacs Live or similar environments? The way paredit works in Cursive is different enough that I find it quite unwieldy (as in, gave up and switched back to Emacs the last two times I tried it).#2017-05-2021:45kzeidler@cfleming: just wanted to say this parinfer is so far the first parinfer I haven't rage quit within the first 10 minutes of use. It's wonderful! Seriously, major props. I bet the logic is quite beastly#2017-05-2114:40denikis there any way to default to clj docs in cljc files? Currently the docs default to cljs which tend to be less documented as in the case of clojure.spec.alpha#2017-05-2123:34cfleming@kzeidler There are plenty of rage-quit worthy quirks in there, believe me 🙂#2017-05-2123:34cflemingI’m planning to do a round of fixes for that soon.#2017-05-2123:34cfleming@tcarls There’s nothing like that now, but I’m very interested to know what your problems are so I can fix/address them.#2017-05-2123:35cfleming@tcarls Perhaps add them to https://github.com/cursive-ide/cursive/issues/809#2017-05-2123:36cfleming@denik No, my plan was to allow you to choose, but a config item seems like a good idea.#2017-05-2123:38cflemingOr perhaps show both.#2017-05-2123:39cfleming@sandbags It requires an example, i.e. somewhere else in your project where foo is used as an alias for x.y.z.#2017-05-2201:24tcarls@cfleming, thank you -- I'll take notes next time I give it a try.#2017-05-2207:14sandbagsThanks @cfleming#2017-05-2217:07denikRecent Files (cmd + E) pops up with 3-8 seconds delay for me. Whereas Recently Edited Files shows up instantly. I understand the latter is a subset of the former. Is there any way to speed up Recent Files?#2017-05-2217:10denikNavigate by namespace includes namespaces of all required deps. Is there a way to limit it to the project namespaces?#2017-05-2218:25wilkerlucioone example stack for the case 👆#2017-05-2220:05timgilbertSay, is there a command for "re-indent surrounding form" that I could bind to a key? Currently I'm putting extraneous ) characters on a line by themselves to do so, but it's kind of goofy#2017-05-2220:08timgilbert...ah, got it, command-option-L does that very thing#2017-05-2221:21kennyI don't understand how the REPL debug button is supposed to work. I'll write a function and create a breakpoint demonstrated below:
(defn my-add
  [x y]
  (+ x y))   ; <-- breakpoint here
Then I click the debug mode button in the REPL pane and execute this form:
(my-add 1 2)
And nothing happens. I'd expect that the breakpoint would be hit and I'd be taken into the usual breakpoint UI. Am I doing something wrong?
#2017-05-2222:48cfleming@kenny That button doesn’t start the debugger. For the debugger to start, you have to run your REPL configuration in debug mode (so Run-&gt;Debug &lt;whatever&gt; rather than Run-&gt;Run &lt;whatever&gt;).#2017-05-2222:48cflemingWhat that button does is control locals clearing, which is very confusing.#2017-05-2222:51kennyHmm. It still doesn't seem to work. Will it work with a remote REPL?#2017-05-2222:52cflemingIt should work with a lein REPL too. Does your breakpoint have a check mark in it?#2017-05-2222:53kennyNo. Just a red dot.#2017-05-2222:53cflemingIs the namespace loaded into the REPL?#2017-05-2222:53kennyYes#2017-05-2222:53cflemingHold on.#2017-05-2222:55cflemingI’m actually seeing that as well.#2017-05-2222:55cflemingI wonder if the debugger is broken in the latest EAP.#2017-05-2222:56kennySeems like it. You'd know best 🙂#2017-05-2222:57cflemingHehe#2017-05-2222:57cflemingThanks, I’ll take a look.#2017-05-2222:57cflemingI’m pretty sure it works in the previous EAP if you need it, I’ve used it recently.#2017-05-2222:59kennyI don't need it per say. It'd just be a big time saver 🙂#2017-05-2223:01cflemingHehe. Well, as long as you don’t need anything from the latest EAP, downgrading should be safe I think.#2017-05-2223:05kennyOk cool. I'll try that out in a minute.#2017-05-2223:13kenny@cfleming Still doesn't work with 1.5.1-eap1-2017.1#2017-05-2223:14cflemingThat’s odd, I can’t see anything that would have affected the debugger in either release.#2017-05-2223:14cflemingI’ll check it out now.#2017-05-2223:17kennyHere's exactly what I'm doing: 1. Create remote REPL with "Use Leiningen REPL port selected 2. Run boot repl in the command line in my project 3. Run &gt; Debug... &gt; &lt;name of previously created run config&gt; &gt; Run. This opens the REPL pane. 4. Add breakpoint inside my function 5. Load my namespace in the REPL 6. Switch to my namespace 7. Run my function#2017-05-2223:25cfleming@kenny Actually, my problem was just stupid user error.#2017-05-2223:25cflemingIt does work for me.#2017-05-2223:25cflemingOh#2017-05-2223:25cflemingHold on.#2017-05-2223:26cflemingIf you’re running your REPL externally, then you’ll need to connect the remote debugger to the JVM.#2017-05-2223:26cflemingOne sec.#2017-05-2223:28cfleming@kenny https://groups.google.com/d/msg/cursive/iTri7vvXViA/veDAU6qlDAAJ#2017-05-2223:29cflemingSo there are three steps - start your process in debug mode using the Java opts specified there, then connect your remote debugger, then connect your remote REPL.#2017-05-2223:33kennyOk. I'll try that now#2017-05-2223:43kenny@cfleming I'm not sure where this section is: > 'IntelliJ/Run/Edit configurations.../Defaults/Remote' and adjust the Settings section accordingly, using port 5005#2017-05-2223:44kennyOooo I see. I've never noticed that dropdown before 😮#2017-05-2223:49cflemingActually, you don’t have to modify the Defaults, just create a Remote configuration and modify that.#2017-05-2223:50kennyIt sorta works haha. My fn is
(defn my-add
  [x y]
  (+ x y))   ; <-- breakpoint here
I call (my-add 1 2) and it opens the breakpoint UI except it thinks both x and y are null.
#2017-05-2223:56cflemingOk, so that might be because of locals clearing.#2017-05-2223:56cflemingIf you hover over that debug button in the toolbar, what does it say?#2017-05-2223:57kenny"Locals will be cleared (prod mode)"#2017-05-2223:57cflemingOk, so click that.#2017-05-2223:57kennyOoo shiny#2017-05-2223:57cflemingCursive enables that by default, but it can’t if you’re using a remote REPL.#2017-05-2223:58cflemingHere’s the trick:#2017-05-2223:58cflemingIt’s a flag that affects the compilation of code, so you’ll have to recompile your code after switching the flag.#2017-05-2223:58cflemingSo just re-load your ns and things should be good.#2017-05-2223:59kennyGotcha. And is there a reason that it is showing x and y as strings instead of numbers?#2017-05-2223:59cflemingAre you passing it strings?#2017-05-2223:59kennyNo#2017-05-2223:59cfleming🙂#2017-05-2300:00cflemingCan you show a screenshot?#2017-05-2300:00kennyThough, if I do pass a string it renders it the same#2017-05-2300:00kennySure#2017-05-2300:01cflemingOh, I see#2017-05-2300:01cflemingUmm#2017-05-2300:01cflemingThat might just be a bug.#2017-05-2300:01cflemingIn the variables view, they’re shown as numbers, right?#2017-05-2300:01kennySorta#2017-05-2300:02kennyIt knows they are a Long but renders as a string#2017-05-2300:02cflemingThat looks like a bug#2017-05-2300:03kennyThat could be quite a rage inducing bug haha#2017-05-2300:05cflemingWell, it’s a problem in the editor view, in the variables view it’s clear it’s a long#2017-05-2300:05cfleming(still a bug, obviously)#2017-05-2300:05cflemingCould you file an issue with those screenshots?#2017-05-2300:05kennyOk#2017-05-2300:06kennyAny idea if this is specific to the remote debugger?#2017-05-2300:07cflemingLooks like it might be, yeah - I was surprised I hadn’t noticed it.#2017-05-2300:10kennyhttps://github.com/cursive-ide/cursive/issues/1760#2017-05-2300:10cflemingThanks!#2017-05-2300:10kennynp#2017-05-2312:13denik@clfeming cursive doesn’t show unused namespace requires in cljc files#2017-05-2312:30carocadHey guys, does somebody knows if it is already possible to navigate to the spec of a function in cursive? :)#2017-05-2313:31erichmondIs there a way to run a remote repl in debug mode?#2017-05-2313:37erichmondI'm like 99% sure I asked this years ago, and had it running, but I can't recall#2017-05-2313:45erichmondFound it in the archive! NVM! Thanks!#2017-05-2321:05cfleming@carocad It’s not right now, I’m investigating spec support at the moment.#2017-05-2418:57potetmI'm getting the same issue @denik was getting earlier. After upgrading I can't get rid of the stub generation notification. IntelliJ IDEA 2017.1.3, Cursive Version: 1.5.1-eap2-2017.1#2017-05-2420:30erichmondIs there a way to index the repo?#2017-05-2420:33denik@cfleming is there any way to specify leiningen profiles just for the figwheel clojurescript repl that uses clojure.main. My frontend/backend deps clash and I can’t run both repls in intellij by including the profiles in the leiningen tab#2017-05-2420:35potetm@denik Specify profiles in the repl configuration?#2017-05-2420:40potetmAh I see. You can't specify profile with clojure.main. It just uses the whole classpath.#2017-05-2420:40potetm:derp:#2017-05-2421:12erichmondAlso, where are the datomic stubs?#2017-05-2421:21cfleming@denik I’m afraid not. I think your best option is to run the REPLs on the command line and then use a remote REPL config to connect to them.#2017-05-2421:23cfleming@erichmond You shouldn’t need to download them these days, they should be generated automatically, but some people are having problems with that in the latest EAP.#2017-05-2422:00denikthanks @cfleming how come that’s an option for the regular lein repl? Isn’t the clojure.main repl run with
lein with-profile my-profile run -m clojure.main dev/frontend/figwheel.cljc
?
#2017-05-2423:07erichmond@cfleming thanks! For the longest time I was getting errors when clicking the generate stubs button. That actually seems to be fixed for me now. You can ignore my questions. 🙂#2017-05-2500:07cfleming@denik No, right now it’s the moral equivalent of: java -cp <module classpath> clojure.main#2017-05-2500:08cflemingIt would be good to allow your suggestion for lein modules though, I like it.#2017-05-2500:18cfleming@denik https://github.com/cursive-ide/cursive/issues/1761#2017-05-2500:25wilkerlucio@cfleming currently everytime I run a REPL that uses clojure.main the Run panel from IntelliJ pops up, and it never has anything, can we change that to just don't open the panel?#2017-05-2500:26cfleming@wilkerlucio Yes, that’s a bug - I believe there’s an issue for that.#2017-05-2500:27wilkerlucio@cfleming thanks, glad to hear it's on track 🙂#2017-05-2501:42cfleming@denik @potetm https://github.com/cursive-ide/cursive/issues/1762, should be fixed shortly.#2017-05-2501:42cfleming@souenzzo too ^^^#2017-05-2501:42cflemingThanks to @wilkerlucio for helping track it down.#2017-05-2514:33potetmThanks @cfleming and @wilkerlucio! Much appreciated!#2017-05-2613:25wilkerlucio@cfleming stubs generating like a charm, thanks for the fix 🙂#2017-05-2615:31potetm@cfleming Same here. Works perfectly now.#2017-05-2618:08pelletierdoes someone know the rules to follow to have the "show differences" link appear on a failed test assertion?#2017-05-2618:18nwjsmithI could be wrong but I think it only works for (is (=... assertions#2017-05-2618:19pelletierthen I am on the same page. though it does not seem to work (anymore) for me#2017-05-2704:23nimblerabitIs there a way to make it so that when I do the "load current file" command, it also switches to current file's namespace?#2017-05-2716:12psalaberria002@nimblerabit You can use intellij macros. I have recorded a macro that first does the move to the current ns, and then load the file to repl. https://www.jetbrains.com/help/idea/2017.1/recording-macros.html#2017-05-2716:13psalaberria002then you can assign a shortcut to the macro#2017-05-2800:46kidpolloHow do I download the last version of the plugin supported by my license ?#2017-05-2808:30cflemingPSA - So that everyone can express themselves fully, I’ve added a Cursive emoji here.#2017-05-2808:31cflemingBecause sometimes it’s just the right reaction.#2017-05-2906:51andershessellundHow does Cursive detect when new bindings are introduced? Sometimes it works (e.g. when using let) but sometimes it doesn't (e.g. when using core.match).#2017-05-2909:23pseudAnyone done ClojureScript backend (node) development using cursive ?#2017-05-2909:38stijn@pseud, a little bit for AWS Lambda#2017-05-2909:40pseud@stijn what's your take on the support as compared to using regular Clojure ? (And which lein/boot template did you start out with)#2017-05-2909:44stijn@pseud leiningen, without a template. I setup the clojurescript repl with piggieback#2017-05-2909:44stijnthis in dev/user.clj#2017-05-2909:45stijn
(ns user
  (:require [cljs.repl :as repl]
            [cemerick.piggieback]
            [cljs.repl.node]))

(defn start-cljs
  []
  (cemerick.piggieback/cljs-repl (cljs.repl.node/repl-env)))
#2017-05-2909:45stijnafter starting a jvm repl enter (start-cljs) to upgrade to a cljs repl#2017-05-2909:47stijncode navigation works, evaluate file in repl too#2017-05-2909:49stijndidn't use much else though, more familiar with the jvm features of cursive#2017-05-2910:34rauhIt seems something like this: (#?(:clj b :cljs a) ,, ) completely throws off Cursive to the point where you can barely edit the CLJC file well. Can somebody confirm?#2017-05-2910:36cfleming@rauh It’s possible - I fixed some bugs with that recently but there may be more. If you could file an issue with a simple repro case I’ll look at it.#2017-05-2910:37rauhOk will do.#2017-05-2915:27erichmondHow many lines of output until the REPL would start to slowdown?#2017-05-2918:38wilkerlucio@pseud I have an active project doing that, IMHO works as well as main Clojure, except you can't debug (something I don't do in Clojure either)#2017-05-2922:11danielcomptonI'm guessing this would be major, but how hard is it to merge the REPL indexes with the static indexes? I've got functions defined by HugSQL that show up in the REPL, but aren't resolved in the editor#2017-05-2922:50cfleming@rauh Thanks for the issue. I’m curious - when do you want to switch in call position?#2017-05-2922:51cfleming@kidpollo You can do this from within the IDE (if you install a version that’s too recent, Cursive will prompt you to download the right one) but there isn’t a good way to do this from e.g. the website. If you DM me your licence or order ID, I’ll let you know.#2017-05-2922:52cfleming@pelletier Do you have an example of a condition which is not working?#2017-05-3016:29pelletier@U0567Q30W: https://cl.ly/1N42181N400d#2017-05-3016:30pelletierIntelliJ IDEA 2017.2 EAP Build #IU-172.2465.6, built on May 24, 2017 JRE: 1.8.0_112-b16 x86_64 JVM: Java HotSpot(TM) 64-Bit Server VM by Oracle Corporation Mac OS X 10.12.5 Cursive Version: 1.5.1-eap3-2017.2#2017-05-3021:18cfleming@pelletier Thanks, I’ll take a look.#2017-05-3021:18pelletierlet me know if there is anything i can do to help 🙂#2017-05-3021:18cflemingDoes this happen for all tests for you?#2017-05-3021:19pelletierYes#2017-05-2922:53cfleming@andershessellund This is done internally, Cursive parses those forms. I have not added support for core.match yet, but I’ve been planning to look at it. I’m also planning to open up an API so others can do this, but it’s proven much more complicated than I expected.#2017-05-2922:54cfleming@erichmond I’m not sure to be honest, depends how complex they are. You can control how many are kept around.#2017-05-2922:55cfleming@danielcompton So that actually would be easier after the recent changes to REPL completion, although still far from trivial.#2017-05-2922:55erichmondThats my other question, if I set it to like.. 10,000, does it purge the first once the 10,001 comes in?#2017-05-2922:55cflemingThat’s the idea, yes.#2017-05-2922:55cflemingI can’t remember off the top of my head if there’s some buffering which might mean that it’s not exactly line accurate.#2017-05-2922:56erichmondbut thats roughly corrwect? thanks!#2017-05-2922:56erichmondman, I hadn't used cursive / intellij in about 6 months or so. amazing how much better it's gotten#2017-05-2922:56erichmondkudos#2017-05-2922:59cflemingThanks! I’m glad you’re enjoying it.#2017-05-3005:25rauh@cfleming: In my case it's an SVG logo, for CLJS I compile it with sablono right away, on the server I use identity because it'll get later compiled by hiccup/rum.#2017-05-3005:25rauhI also use it at other code where I .push on a JS array (CLJS) and .add on an ArrayList (CLJ).#2017-05-3011:55stijn@cfleming is it a known issue that the 'Evaluate expression' in the debugger cannot resolve symbols that are created from namespaced keywords destructuring?#2017-05-3018:33nwjsmithI think the trouble Cursive is having resolving vars from Specter might be because the defmacros are inside a reader conditional: https://github.com/nathanmarz/specter/blob/master/src/clj/com/rpl/specter.cljc#L49-L63#2017-05-3021:16cfleming@stijn No, it’s not - issue very welcome.#2017-05-3021:17cfleming@nwjsmith Hmm, I’ll take a look at that.#2017-05-3021:17cflemingDo you have an example of a code snippet which doesn’t resolve correctly?#2017-05-3021:18nwjsmithWould an example repo help? If so I'll whip one up.#2017-05-3021:18cflemingYes please!#2017-05-3021:33nwjsmith@cfleming https://github.com/nwjsmith/specter-cursive-repro#2017-05-3114:14dealyHi, I've been trying to get figwheel to work properly in a Cursive REPL. It halfway works, my web browser can connect just fine, and the app runs. However I always see this in the REPL: Choose focus build for CLJS REPL () or quit > . I'm not sure what the problem is. I can't do any of the Cursive magic like switching namespaces or loading files etc.#2017-05-3114:15dealyAny idea what that message means, and how to fix it?#2017-05-3115:26mishaofftopic: how do I close it without mouse/touchpad?#2017-05-3115:32zyloxyou must give it a name before it can be vanquished#2017-05-3115:32zyloxbut i dont know ¯\(ツ)/¯#2017-05-3116:11misha@zylox I mean "how do I press ok w/o mouse". esc space enter tab cursors do not work#2017-05-3116:12zyloxoh i understood your question. I don't have an answer sorry bud#2017-05-3116:12mishaI can submit empty name dialog with enter just fine, but then I'am stuck here#2017-05-3116:13mishafor developers by developers™ opieop#2017-05-3122:02cfleming@misha That’s really weird, I’ve never seen that. I’m very surprised ESC doesn’t work, too.#2017-05-3122:03cfleming@dealy Can you post a screenshot of what you’re seeing in the REPL pane?#2017-05-3122:08cflemingSo I’m not sure what’s happening there - hopefully someone with more Figwheel experience can chime in.#2017-05-3122:09cflemingI believe it’s asking you to choose a build from your cljsbuild configs, so perhaps dev or prod, or whatever you have configured in your project.clj.#2017-05-3122:10cflemingIt usually picks one by default, but I believe it only picks builds with optimizations: none.#2017-05-3122:10cflemingDo you have one with no optimizations?#2017-05-3122:10dealyyea, that's what I thought also, but where is it expecting me to specify this?#2017-05-3122:11dealyI have a file called repl.cljs that looks like this:(use 'figwheel-sidecar.repl-api) ;(start-figwheel! {:build-ids ["app"]}) ;; <-- fetches configuration (start-figwheel!) ;; <-- fetches configuration (cljs-repl)#2017-05-3122:12cflemingWhat is the optimization level of your app build ID?#2017-05-3122:14dealyits set to none in [:profiles :project/dev :cljsbuild :builds :app :compiler :optimizations] if that is what you're asking#2017-05-3122:14cflemingYes, it is.#2017-05-3122:15cflemingThen I’m out of ideas, sorry - I haven’t actually used Figwheel much. Perhaps #clojurescript can help.#2017-06-0107:19pseud@dealy hard to read what you wrote. But if your user.clj file starts up figwheel immediately it seems to cause problems. At least it did for me when I had a file similar to yours yesterday. Instead, put those same commands to start figwheel and the cljs repl into a function and call it manually once you get your CLJ repl. Humour me 🙂#2017-06-0116:52misha@cfleming Is there a way to style how folded blocks of code are displayed? Here some current collapsed top level forms examples:
(let ...)
(defn foo ...)
(def bar ...)
(spec/def ...)
What I'd really like, is to show spec/defs keyword, and single-arity function's args (if those are on the same line, ofc.):
(defn foo [bar baz] ...)
(spec/def :foo/bar ...)
I know, there is a settings page for unresolved symbols to "alias" those to known macros structure, like "treat rum/defc just like defn". Is there something like this, but for code folding representation?
#2017-06-0121:53cfleming@misha No, there isn’t unfortunately. I’ll try to look at some of the folding related issues soon. Could you add a comment to https://github.com/cursive-ide/cursive/issues/1269?#2017-06-0209:43mishacfleming: done#2017-06-0210:19cfleming@misha Thanks!#2017-06-0204:59stijnCreated https://github.com/cursive-ide/cursive/issues/1776. I hope it makes sense 🙂#2017-06-0206:15pupenoCursive is such a pleasure to use. Thank you so much @cfleming#2017-06-0207:59cfleming@pupeno Thanks! I’m glad you’re liking it 🙂#2017-06-0214:01nwjsmithDoes anyone have an auto-testing workflow figured out with Cursive?#2017-06-0214:12kaukoI just run my tests in two terminal tabs (lein test and lein doo phantom) automatically. When I notice a test is failing, I run the tests from Cursive by opening the test-ns and using a keybinding.#2017-06-0214:12kaukoYou can either run all the tests, or the selected test#2017-06-0214:12kaukoI wish there was a better way, but I don't know any#2017-06-0214:44nwjsmith@kauko I think I'll give that a whirl. Thanks!#2017-06-0220:28wilkerlucio@cfleming when we launch a new repl, after it starts the focus is moved to the REPL input panel, is there a way to disable that?#2017-06-0305:11cfleming@wilkerlucio Not right now, but see https://github.com/cursive-ide/cursive/issues/1579#2017-06-0305:11cflemingLet me know if that sounds like a good solution.#2017-06-0310:25wilkerlucio@cfleming yes, the checkbox to disable focus change sounds good :)#2017-06-0512:47souenzzoThere is some way to connect the cursive repl (with "load file to repl" and other stuff) on a remote repl? I'm using telnet 5555 in this moment#2017-06-0521:16cfleming@souenzzo You mean a socket REPL? It’s not there yet, it’s something I’m adding in the next couple of weeks.#2017-06-0521:16cflemingYou can connect to a remote nREPL using the remote REPL option.#2017-06-0521:47dragoncubeIs there any special requirements need to be met by test, so Cursive would show diff for failed test?#2017-06-0521:48dragoncubeI definitely saw the diffs for my test, and then I changed something, so they do not appear now. I’m struggling to understand what was the change.#2017-06-0521:52cfleming@dragoncube Currently Cursive will only provide diffs for (is (= ... ...)) type forms - is that what you have?#2017-06-0521:52dragoncubeyes#2017-06-0521:53cflemingCan you send a screenshot of a failing test with the tooltip?#2017-06-0521:53dragoncubesure#2017-06-0521:57dragoncube@cfleming sent you in private#2017-06-0521:58shaun-mahoodWhen using paredit, is there any functional difference between the different closing braces ) ] }, with or without using the "Close and Newline" bindings? It doesn't seem to make any difference, but with the different bindings available I want to make sure I'm not overlooking anything.#2017-06-0523:19TimJoined this channel so I could ask @souenzzo ‘s question#2017-06-0601:20cfleming@shaun-mahood No, they’re really just there for completeness. The simple close-bracket forms jump to the end of the next closing form of that type, but there’s a good argument to be made that they should probably all just jump to the nearest closing delimiter of any type.#2017-06-0601:21cflemingSo:
{:foo [:something (do-something|)]}
#2017-06-0601:21cflemingWhere | is the caret#2017-06-0601:21cflemingRight now, if you press ) it’ll jump over the paren, if you press ] it’ll jump to the closing brace, and if you type } it’ll jump to the end.#2017-06-0601:22cflemingIt would probably make sense for ) to just jump to the next one regardless of type, and that would then free up ] and } for other things, or they could all work the same way.#2017-06-0601:23cflemingThe close-and-newline versions just do that, and then add a newline and indent.#2017-06-0601:28shaun-mahoodI suspect it is pretty irrelevant what the exact behaviour is - I only care at all because I'm messing around with a stupid customized layout so I'm trying to map all the structural stuff and shortcuts and see if I can use them more. I've been comparing paredit in Emacs, smartparens (spacemacs default), and the Cursive implementation just to see what things do.#2017-06-0601:29cflemingInteresting - if you see anything you like that Cursive is missing, do let me know.#2017-06-0601:29cflemingI’d like to try lispy out at some point too, although the learning curve looks formidable.#2017-06-0601:30cflemingWe need a yak-shave emoji here.#2017-06-0601:31shaun-mahoodHere'a my current iteration - kind if fun but I suspect not the most useful thing I've ever done. https://github.com/smahood/ergodox-infinity-layout/blob/smahood-layout/README.md#2017-06-0601:34cflemingyak#2017-06-0601:34cflemingThat’ll do, I guess#2017-06-0601:36shaun-mahoodI think it should be a green yak though :)#2017-06-0601:42shaun-mahood@cfleming: Lispy looks interesting, I really like the part of documentation with the reversible commands - one of the parts of learning emacs-paredit/cursive-paredit that is pretty unintuitive to figure out.#2017-06-0601:43cflemingYeah, I’ve actually considered something like a touch-typing tutor but for paredit, with exercises designed to teach you how it works.#2017-06-0601:43cflemingI like the context-sensitive short commands in lispy.#2017-06-0601:43cflemingAnd yes, the doc is really good.#2017-06-0601:46shaun-mahoodThe world of editing lisps has got to be a pretty unending source of ideas for you to implement in Kotlin :)#2017-06-0601:46cflemingHaha#2017-06-0601:46cflemingIndeed#2017-06-0601:46cflemingAlthough all the paredit stuff is in Clojure 🙂#2017-06-0601:49shaun-mahoodIf you decide you are coming to the Conj I'd be super interested in a Kotlin talk related to your work - I suspect I'm not the only one.#2017-06-0601:49cflemingYeah, that would be interesting to give - unfortunately I’m unlikely to go to the conj this year.#2017-06-0601:54shaun-mahoodI almost tried to swing Euro Clojure this year but timing didn't quite work. It'll be less fun without you there.#2017-06-0601:57cflemingThanks - it would be great to catch up again. The border circus is a bit off-putting, though.#2017-06-0601:57cflemingI haven’t 100% decided yet.#2017-06-0601:58shaun-mahoodYeah. I changed my travel plans a bunch of times to avoid it already. Transatlantic laptop stuff is just insane though.#2017-06-0601:59cflemingNo doubt.#2017-06-0601:59cflemingI’m looking forward to a Clojure North in Canada 🙂#2017-06-0602:00shaun-mahoodOur local clojure meetup has 2 regulars so we're almost halfway there to a big conference!#2017-06-0602:01shaun-mahoodI think there's a reason clojure remote was born in Canada, though Toronto sounds like there are quite a few devs there.#2017-06-0603:10cflemingYeah, IIRC Yogthos said they regularly get 30 or so, all working with Clojure.#2017-06-0610:41psalaberria002can I start cursive remote repl in debug mode? the option is disabled#2017-06-0615:26timgilbertSay, when I'm calling a function with the arguments on a new line, Cursive formats the second line with two spaces, like this:
(foo
  bar)
I'd like it to just use one space, like this:
(foo
 bar)
#2017-06-0615:26timgilbertI looked in the code style settings, but I don't see an obvious way to set this, is there a setting I'm missing?#2017-06-0615:30zyloxdoes One Space List Indent not do what you are looking for?#2017-06-0615:32zylox@timgilbert #2017-06-0615:33timgilbertI'm not able to find that setting, where do you see it?#2017-06-0615:33zyloxAway from computer but I think it's editor>code style>clojure > general tab#2017-06-0615:33timgilbertAha! Found it, thanks @zylox!#2017-06-0615:34zyloxNo problem#2017-06-0619:46nwjsmithIt's a little weird that test output is printed in red even when the tests pass, no?#2017-06-0621:12zyloxwhat output#2017-06-0621:13zyloxi dont have any red output#2017-06-0621:14cfleming@nwjsmith Only stderr should be printed in red.#2017-06-0621:15cfleming@psalaberria002 No, because the remote REPL doesn’t start the process it connects to (which is required to start in debug mode). If you want to debug a process you’re connecting a remote REPL to, you have to a) start it in debug mode, b) connect the remote debugger, c) connect the remote REPL.#2017-06-0621:23psalaberria002cfleming: Thank you.#2017-06-0621:21nwjsmithAh, thanks that makes sense#2017-06-0701:40danielcomptonI've really enjoyed working with Terraform and Swift lately where a file save reformats the code with terraform fmt or swiftformat respectively. Is there a way to do that with Cursive?#2017-06-0701:41danielcomptonAlso interested in cljfmt integration: https://github.com/cursive-ide/cursive/issues/1403#2017-06-0721:02raymcdermotthi @cfleming … I’m getting some grief about how Cursive formats / aligns namepaces … is there a means to control that?#2017-06-0721:12cfleming@raymcdermott Somewhat - do you have specific examples that you’d like to fix?#2017-06-0806:34raymcdermottmostly just lining up :as would do it#2017-06-0806:51raymcdermottshould be obvious but to satisfy my inner OCD … the require in the second example should also be indented#2017-06-0808:48cfleming@raymcdermott so there’s no way to do that automatically right now, no - an issue would be welcome though.#2017-06-0810:03raymcdermottok, I will open an issue#2017-06-0810:12raymcdermotthttps://github.com/cursive-ide/cursive/issues/1778#2017-06-0813:56rauhI'm seeing very high CPU load since the 1.5.1 update. Like 200% mostly. Also then doesn't update syntax highlighting anymore. Need to wait a minute and then it's back. Not sure what triggers it. IntelliJ 2016.3.2.#2017-06-0821:33cfleming@rauh Were you on 1.5.1-eaps before, or 1.5.0?#2017-06-0821:35cflemingA few people have reported intermittent perf problems I’ve never managed to repro (see https://github.com/cursive-ide/cursive/issues/1685)#2017-06-0821:35cflemingHowever it doesn’t seem to be related just to the Cursive version - those users have been seeing it for a while I think. CLJC seems to provoke it - are you using it?
#2017-06-0906:33rauh@cfleming Really difficult to figure out what's causing this. I think I was on a few EAP's past the 1.5.0 and didn't have the issue at all. Then boom, all in a sudden it's super slow and almost unusable. The ticket you linked seems to be my issue as well. I found that simply going over a local symbol (so it gets highlighted) and then moving the cursor over a function (global symbol) and repeating this back and forth will eventually spin the CPU to 200%. I see editor.cljs.editor_resolver.resolve_unqualified and resolve_normal_symbol very high in a CPU profile.#2017-06-0908:12cfleming@rauh So this is CLJS, or CLJC?#2017-06-0908:12rauhCLJS#2017-06-0908:12cflemingAre you on IntelliJ Ultimate?#2017-06-0908:12rauhYes#2017-06-0908:13cflemingCould you capture a snapshot with Tools-&gt;Start CPU Usage Profiling?#2017-06-0908:14rauhYeah, currently it works for me. Downgraded to 1.5.0-eap1. I'll profile when it acts up again#2017-06-0908:16cflemingGreat, thanks. I’ve had a couple of snapshots from the others in that issue, but never found anything conclusive (or really, anything to suggest that it’s Cursive, although it seems like it must be).#2017-06-0908:21rauhI can't toggle the "start CPU usage profiling" option. Reading thru: https://intellij-support.jetbrains.com/hc/en-us/articles/207241235-Reporting-performance-problems#2017-06-0909:49cfleming@rauh Did you manage to get it going?#2017-06-0909:50rauhYeah, but right now the problem is pretty much gone. I also upgrade to the latest version of Cursive again. So it doesn't seem to have been introduced by Cursive recently.#2017-06-0909:50cflemingIt’s really weird.#2017-06-0909:50rauhI also did disable all plugins. I'm not sure if that did it. I'm hesitant to binary search them.#2017-06-0909:51rauhDisable all "custom plugins" ie. Not that I had many.... Like 2-3#2017-06-0909:51cflemingYeah, it might be some interaction with another plugin, it’s hard to tell - that would explain why I can’t reproduce it, though.#2017-06-0909:51cflemingI’m pretty sure nothing that should dramatically affect editing perfomance has changed in a while though.#2017-06-0909:51rauhIt is really weird, and it was incredibly frustrating. I'm just too scared to make it not-work again 😄#2017-06-0909:51cflemingYeah, I understand 🙂#2017-06-0909:52cflemingAlthough if it is another plugin at least disabling it should work.#2017-06-0909:53cflemingActually, which were the plugins you disabled? Perhaps I’ll install them and see if I see any problems.#2017-06-0909:54cflemingI’ve found that my IntelliJ locks up a lot recently, but I haven’t worried about it since I’m running an EAP and debug a lot, which makes things funky.#2017-06-0909:54rauhI'm enabling them right now to see if the problem comes back up. The plugins: Gauge, String manipulation, YAML, Bash#2017-06-0909:55cflemingThanks, I’ll install those on Monday and see if I can see the problem.#2017-06-0909:57rauh@cfleming So super weird, but if I go over the .-a in (.-a xy) it'll lock up for a few seconds#2017-06-0909:57rauhAny other work fine. Like:
(combine-cmp
    (cmp-num (.-e d1) (.-e d2))
    (cmp-attr (.-a d1) (.-a d2))
    (cmp-val (.-v d1) (.-v d2))
    (cmp-num (.-tx d1) (.-tx d2)))
#2017-06-0909:57cflemingYou mean that if you put the caret there so it gets highlighted?#2017-06-0909:57rauhAll .-e, v, tx, are ok to hover 😉#2017-06-0909:58rauhIt just locks up. Never gets highlighted#2017-06-0909:58cflemingDo you have anything interesting in your log? Help-&gt;Show log in Finder/Explorer?#2017-06-0910:00rauhPM'd a log file. There is a few interesting exceptiions.#2017-06-0910:02cflemingThanks, it doesn’t look like anything that would cause this though.#2017-06-0910:02cflemingSomeone reported a while ago that CLJS interop provoked problems for them - I wonder if that is the issue.#2017-06-0910:03cflemingIt might be my JavaScript indexing.#2017-06-0910:03cflemingWhen you say it locks up, you mean the whole UI?#2017-06-0910:04rauhYeah can't move the Cursor#2017-06-0910:04cflemingCan you check for auto-generated thread dumps as described here: https://intellij-support.jetbrains.com/hc/en-us/articles/206544899-Getting-a-thread-dump-when-IDE-hangs-and-doesn-t-respond#2017-06-0910:05cflemingAnd PM them to me if they’re there?#2017-06-0910:06cflemingI PM’ed you some lines from your log - it looks to me like there might be an issue with the auto-indent detection. You could try disabling that at Settings-&gt;Editor-&gt;Code Style-&gt;Detect and use existing file indents#2017-06-0910:07rauhI got some of these automatic dumps#2017-06-0910:07cflemingGreat, actually email would probably be better#2017-06-0910:07cfleming<mailto:/cdn-cgi/l/email-protection|/cdn-cgi/l/email-protection>#2017-06-0910:07cflemingSo they don’t disappear#2017-06-0910:08rauhSent.#2017-06-0910:08cflemingThanks.#2017-06-0910:10cflemingOk, there is definitely something funky going on with the JS indexes.#2017-06-0910:11cflemingDid you try Invalidate/Restart?#2017-06-0910:11cflemingThat might help, and the code style thing might help as well, although try the invalidate first since funky indexes might cause that too.#2017-06-0910:11rauhI did yesterday, didn't help. But I'll try again. The detect indent disabling didn't seem to help.#2017-06-0910:12cflemingOk. I’ve been planning to rewrite that indexing, perhaps I need to move that up if it’s possibly the cause of all this.#2017-06-0910:14rauhHmm yeah, invalidate & restart didn't help.#2017-06-0910:16cflemingOk. I’ll take a look at that index on Monday. I’ve been meaning to look at it anyway since it’s old and crufty.#2017-06-0911:37bherrmannHumm. I was asked how many clojure developers are there. @cfleming do you know how many active cursive accounts there are (aka I assume something checks for updates everyso often) - so you must know the # of active users...#2017-06-0911:38bherrmannIf I assume 1/2 of all active users are using cursive, then I just have to multiply by 2 to get a rough estimate of total active clojure developers#2017-06-0917:28bfabryiirc cursive was more like 25% of users in the last state of clojure survey#2017-06-0917:28bfabryhttp://blog.cognitect.com/blog/2017/1/31/state-of-clojure-2016-results#2017-06-0918:30bherrmann@bfabry Thanks. I had also asked in the "clojure" group and Alex Miller said "based on a number of sources of data, I would confidently say it’s between 20k and 50k" and "it matters a lot what you mean by “active”"#2017-06-1015:35tianshuthe repl panel looks a little verbose in distraction free mode. #2017-06-1023:05cfleming@bherrmann Cursive has been at ~27% the last couple of years in the community survey.#2017-06-1023:07cflemingI’d agree with Alex, calculating the number of users is very hard. How much of someone’s day has to be spent doing Clojure to be considered a Clojure dev? I spent at least half my time writing Kotlin these days but I definitely qualify by anyone’s measure.#2017-06-1023:08cflemingI found this very hard when trying to get a handle on how many active Cursive users there are since Cursive plugs into IntelliJ. I do collect some stats I haven’t looked at for a while - I’ll try to dig something useful out of them.#2017-06-1023:08cflemingI’d say Alex’s ballpark is probably decent.#2017-06-1207:23yonatanelHave anyone else lost their cursive plugin when updating intellij to 2017.1? (In the end I reinstalled a fresh copy and imported the last working configuration)#2017-06-1318:33wilkerluciohello, today I updated IntelliJ and cursive, now I can't find the REPL Commands menu, did it moved somewhere else out of Tools menu?#2017-06-1318:36wilkerlucioanother question, is there a way to use the current namespace in a REPL command? if there isn't, what about have something like ~ns in same way we can with ~selection?#2017-06-1321:25staypufd@willkerlucio REPL commands may not be visible if you aren't in a Clojure file#2017-06-1321:40wilkerlucio@staypufd thanks for the suggestion, but I checked for that, even on a Clojure file it's not showing up, can you see it on latest intellij + cursive?#2017-06-1321:40wilkerlucioI'm able to access it from the command pallet, but can't see it on the menu anymore#2017-06-1401:01cfleming@wilkerlucio I can see them ok. Do you have a REPL running?#2017-06-1404:30staypufd@wilkerlucio I'll look in morning and see how it enables and hides to see#2017-06-1413:28wilkerlucio@cfleming @staypufd got back working after a Intellij restart 🙂#2017-06-1415:53zyloxthe eternal fix#2017-06-1417:05staypufd@wilkerlucio glad it's good now#2017-06-1421:53seancorfieldAfternoon folks… I’ve been looking at the http://clojure-doc.org issues today (since the JDBC section got a very welcome overhaul by the community!), and wondered if someone from the Cursive community would like to tackle this issue https://github.com/clojuredocs/guides/issues/210#2017-06-1421:53seancorfieldIt would go in articles/tutorials and end up linked from this page: http://clojure-doc.org/articles/content.html#essentials#2017-06-1421:54seancorfield(and from here http://clojure-doc.org/articles/content.html#essentials)#2017-06-1421:54cfleming@seancorfield I actually have a bunch of doc at https://cursive-ide.com/userguide/ - is the preferred way just to link to that?#2017-06-1421:55cflemingI’d rather not have to replicate the content over there, although it’s just markdown so would probably be pretty easy.#2017-06-1421:56seancorfieldThat would work (I just thought about that after posting those links 😆 ) — I guess I could just update that section easily enough to link directly to the existing user guide, if that works for you?#2017-06-1421:56cflemingThat’s fine by me - thanks!#2017-06-1422:01cfleming@seancorfield What’s used to build http://clojure-doc.org?#2017-06-1422:02cflemingActually, I see README-tools.md - sorry, should have poked around first.#2017-06-1422:12seancorfieldOK, I sent a PR to add Cursive to the Essentials. I want MK to give it a thumbs up before merging. Thanks for your input @cfleming#2017-06-1422:13cflemingAwesome, thanks @seancorfield#2017-06-1516:46okworiCan someone tell me the reason for this message pls your project requires namespaces which need stubs to be generated#2017-06-1518:48bfabry@simon stub generation is explained in the 1.4.0 release notes here https://groups.google.com/forum/#!searchin/cursive/stub$20generation%7Csort:relevance/cursive/ycMZAF29RZQ/cgIei8HCDAAJ#2017-06-1522:16cfleming@simon If that message doesn’t go away when clicking on the “Generate” link then I’d like to know about it.#2017-06-1523:39Oliver GeorgeTell me when Cursive does error highlighting when I try and access a map with a keyword not included in the function spec. (because I'm an idiot and forget if the keyword is :value or :values sometimes)#2017-06-1523:40Oliver GeorgeAt that point I might be tempted to fly to NZ just to buy you a beer 🙂#2017-06-1523:40cfleming@olivergeorge Hmm, yes, that would be nice. I’ll need to think about what’s required there - probably something like type inference but for specs, like spectrum does.#2017-06-1523:40cflemingI’m sure you can mail order 🙂#2017-06-1523:40Oliver Georgeheh#2017-06-1523:40Oliver GeorgeI imagine you're right. It'd be a well earned beer.#2017-06-1523:41cflemingI do have that planned, but it’ll need a lot of investigation to know how far I can take it.#2017-06-1523:42cflemingThe nice thing about it is that it would work for CLJ and CLJS, whereas the current inference only works for CLJ.#2017-06-1523:46Oliver GeorgeSounds fantastic#2017-06-1523:47Oliver George(I'm mostly in CLJS land)#2017-06-1609:51carocad@cfleming is the unused namespace detection deactivated in the latest Cursive? Somehow it is not working on my pcs 😞#2017-06-1609:58cfleming@carocad Can you check whether this is the problem? https://github.com/cursive-ide/cursive/issues/1637#issuecomment-298197331#2017-06-1609:59cflemingI don’t understand why that’s getting switched sometimes, but it happened to a couple of users.#2017-06-1609:59cflemingThe inspection needs to be enabled (left hand side) and the severity needs to be correct (right hand side)#2017-06-1610:11carocadyeap that was the problem. Thanks 🙂#2017-06-1610:13cflemingPhew 🙂#2017-06-1610:16carocadit is definitely weird because it was not working in both laptop and pc 😕 ....#2017-06-1610:16cflemingYeah, I don’t understand why that happens. I don’t do anything with the storage of that config myself, it’s stored by IntelliJ.#2017-06-1610:17carocadwell I remember it was working when I installed Intellij for the first time. Maybe the update process broke that? I will let you know if next time that I update the same happens 😉#2017-06-1610:17cflemingThanks!#2017-06-1610:23carocadI just found something out: in the settings the default profile Default IDE all those warnings are set as no highlighting, only fix#2017-06-1610:24carocadThe settings that I editted before were for the project so I guess that if I switch projects or import a new one I will have the same problem#2017-06-1610:24cflemingThat’s really weird.#2017-06-1610:24cflemingThanks for that, I’ll check that out on Monday.#2017-06-1616:57trikitrokHello I'm having a problem. Cursive is not being able to resolve many vars in clojureScript files, such as defn, let, first, etc.#2017-06-1616:57trikitrokIt's trying to read project.clj but logging this error:#2017-06-1616:59trikitrokWe're using this function in project.clj to get the environment variable:#2017-06-1617:00trikitrokThe thing is that the environment variable has been exported#2017-06-1617:00trikitrokI don't know why it's not being read#2017-06-1617:01trikitrokAny idea what might be happenning?#2017-06-1618:44trikitrokIt seems it's a problem with the sh script not founding sourcecommand. Nothing to do with Cursive. Fixed now. Sorry..#2017-06-1707:30tianshuis there a command for show difference for test result?#2017-06-1901:36cfleming@doglooksgood There isn’t at the moment, no, but I’m re-working the test integration right now, and that would be a good thing to add.#2017-06-1913:59yonatanelNot sure if this is a cursive issue. println output isn't displayed in repl window, only on container log when using remote repl in docker. Details: I'm running a remote REPL inside minikube (local kubernetes) as a clojure:lein-2.7.1-alpine docker container with this command: ["lein", "with-profile", "+docker-repl", "repl", ":headless", ":host", "0.0.0.0", ":port", "30304"].#2017-06-1914:25yonatanelIt's not only println but also some timbre logs.#2017-06-2008:04moizsj@cfleming am on 1.5.0-15. havnt seen any update notifications since the 1.5.1 release. EAP is disabled. Is there a workaround?#2017-06-2008:05cfleming@moizsj Recently I dropped support for IntelliJ 15. My policy is to support the last two years’ versions of IntelliJ, and 2017.1 has been out for a while now.#2017-06-2008:06cflemingUnfortunately it’s just not practical for me to support many old versions, especially now that JetBrains release 3 a year - sorry 😞#2017-06-2008:07moizsjoh ok i assumed that the 1.5.x series was going to be the last that supports 15 @cfleming#2017-06-2008:18cfleming@moizsj No, I actually hadn’t planned to do a point release, and I’d already removed the branch from the scripts when I decided I needed one.#2017-06-2008:19cflemingI actually spent a lot of the day today merging across 5 branches 😞#2017-06-2008:20moizsjthats totally ok @cfleming this will push me to upgrade to 17#2017-06-2008:21moizsjon the upgrade to 17 - I download 17, install, and cursive will continue to work? or will it need re registration? @cfleming#2017-06-2008:22cflemingIt should continue to work - Cursive might get disabled when you install it, but it’ll prompt you to upgrade and restart.#2017-06-2008:22cflemingIt should continue to have your licence registered.#2017-06-2008:38moizsjgreat thanks#2017-06-2017:01shaun-mahood@cfleming: As far as convenience goes, the autocomplete for Leiningen projects is pretty fantastic.#2017-06-2018:43souenzzoshaun-mahood: my default method to look for updates... 😄#2017-06-2018:44shaun-mahood@U2J4FRT2T: I think my versions might actually be out of date - is there a setting that you had to set for that to work well? I might have screwed up the default at some point...#2017-06-2018:47souenzzoI need to update maven repositories (search for repositories on settings) manually. Just that.#2017-06-2100:49cfleming@U054BUGT4 Right, updating the repository index in the settings should fix that.#2017-06-2100:49cflemingMy favourite part of this change is being able to add deps from anywhere in the project without having to open project.clj#2017-06-2018:20olfalHello! For unknown reasons, the unused alias warning is no longer showing in my editor. Unfortunately, I can’t remember if it appeared after a Cursive update or not… I’m currently using version 1.5.1. Anyone has had this issue in the past? Thanks 🙂#2017-06-2018:42souenzzo@olfal some issue here. @cfleming some news about visual match symbols inside quotes?#2017-06-2100:45cflemingPSA: for anyone who managed to download 1.5.2 before I pulled it, the builds for several IntelliJ versions are bad due to a botched merge - they contain incomplete changes intended for 1.6.0. I recommend downgrading to 1.5.1, instructions are here: https://groups.google.com/forum/#!msg/cursive/4xlDyyteirw/3_q8Dyp9CwAJ#2017-06-2102:29souenzzohttps://cdn.meme.am/cache/instances/folder561/58905561.jpg @cfleming 😉#2017-06-2102:33cfleming@souenzzo Hehe#2017-06-2102:34cfleming@olfal @souenzzo There’s an issue that several users have had recently where somehow the severity of their inspection gets switched. See here for details: https://github.com/cursive-ide/cursive/issues/1637#issuecomment-298197331#2017-06-2102:35cflemingIf that is the problem for either of you, could you let me know what the severity was when you had the problem?#2017-06-2103:09olfalcfleming: That was it! The severity was switched to no highlighting, only fix#2017-06-2103:09cfleming@olfal So it’s weird, because I think that’s actually the correct severity - I’ll check that and see.#2017-06-2103:12olfaloh. After setting it to error I was able to see the Unused alias warning#2017-06-2103:16olfalI’ve tried every level of severity and they all work except no highlighting not sure if it’s a bug or not :thinking_face:#2017-06-2103:18olfalThanks a lot ✌️#2017-06-2103:34cflemingOk, great, thanks - I’ll check that out.#2017-06-2102:36souenzzoMost missing thing for me is highlight equal symbols inside a quote 😕#2017-06-2102:53cfleming@souenzzo Sorry, that was in reference to the missing unused marking.#2017-06-2102:54cflemingYou’re talking about brace matching inside strings?#2017-06-2102:54cflemingOr inside quoted forms?#2017-06-2102:56souenzzoquote/datalog [:find ?erro :where [?error :my/misstyped-symbol]]#2017-06-2102:57cfleming@souenzzo There was actually a discussion about this on the ML recently: https://groups.google.com/d/topic/cursive/reN-UZdYZ3Y/discussion#2017-06-2102:57cflemingI’m planning to add support for that.#2017-06-2103:31jimmyhi guys, in intellij how do we reload live templates at runtime, just in case we edit the live templates xml file directly ?#2017-06-2107:30cfleming@kauko You can upgrade - 1.6.0 fixes the problems that were present in 1.5.2.#2017-06-2107:31kaukoThanks!#2017-06-2107:39kaukoHonestly, it was pretty interesting how badly 1.5.2 seemed to bork my editor 😄 I couldn't open some files, even though I could see them in the file tree and search dialog, global find didn't really seem to work at all, and a lot of namespaces were not getting evaluated at all.. the evaluation failures I get, but not being completely unable to open some files was surprising#2017-06-2107:39kaukoI guess Cursive does a lot of work under the hood#2017-06-2107:41cflemingIt’s not so much that - IntelliJ will bail if it receives an exception as some critical point. It’s normally pretty robust, but something in that mix of half-baked changes really threw it for a loop.#2017-06-2113:11denikIs it possible to jump to the namespace of a fully qualified keyword? Similar to jump to definition on vars?#2017-06-2118:42wilkerluciodenik: not yet as as far as I know, I opened an issue to jump to spec definition a few days ago: https://github.com/cursive-ide/cursive/issues/1781#2017-06-2120:38cflemingRight, the fix for this will be a more general solution to allow keywords to be “defined”, re-frame also uses this I believe.#2017-06-2115:50potetmHere's a question: Is there a way to configure let/map alignment to ignore right-hand atoms that are on their own line?#2017-06-2115:51potetme.g. Here's what happens:
(let [foo     (bar baz)
      buzzing (buzzy foo)
      longer-and-longer
              (map (fn [{:keys [a b c]}]
                     (fuzz a b c))
                   foo)
      lastly  (filter pos?
                      longer-and-longer)]
  ...)
#2017-06-2115:52potetmand here's what I'd like:
(let [foo     (bar baz)
      buzzing (buzzy foo)
      longer-and-longer
      (map (fn [{:keys [a b c]}]
             (fuzz a b c))
           foo)
      lastly  (filter pos?
                      longer-and-longer)]
  ...)
#2017-06-2119:51Lone Rangerdoes anyone know if there's anyway to configure Cursive settings? In this instance I want Cursive to treat certain macros as defn#2017-06-2119:51Lone Rangerfor cljs-react stuff defining components with macros but not being able to navigate to them is causing some headaches#2017-06-2120:39cfleming@potetm I don’t think so, no - as far as I can tell, the IntelliJ formatter isn’t capable of expressing this.#2017-06-2120:39cflemingWhich is a pain for the reasons you mention, especially when using destructuring.#2017-06-2120:42cfleming@goomba See https://cursive-ide.com/userguide/macros.html - you can now resolve as defn, although the screenshot is a little out of date and doesn’t show that.#2017-06-2120:42Lone Ranger@cfleming did I ever tell you how amazing you are? 😍#2017-06-2200:10elena.pootnot a big thing, but it'd be nice to add fn to the list of things you can resolve as. I'm using serializable.fn, which redefines fn. I've told it to resolve as defn, but it only works if I specify a name in my fn (generally _ of course).#2017-06-2202:44potetm@cfleming Shucks. Yeah I turned off map alignment because of destructuring woes. Well thanks for the response!#2017-06-2205:21cfleming@terry.poot There’s a hack described in an issue comment which allows you to do that by hacking config files: https://github.com/cursive-ide/cursive/issues/1440#issuecomment-232776904#2017-06-2205:21cflemingNot pretty, and I’m planning to add support for arbitrary functions in the UI, but it works for now if it’s a problem for you.#2017-06-2205:22cfleming@potetm Yeah, the issue is that the formatter for most languages generally expects to be able to manipulate newlines, so the concept of “things which start on different lines” isn’t so clear-cut.#2017-06-2207:47valyagolevi’m following this guide for every new project - is there maybe a newer, better way?#2017-06-2207:48valyagolevhttps://github.com/bhauman/lein-figwheel/wiki/Running-figwheel-in-a-Cursive-Clojure-REPL#2017-06-2208:11gklijsYou could us luminus to start your project, but it may give you more then you want, is you start it with clojurescript (or reagent, or re-frame) you get the config for figwheel for free.#2017-06-2208:30valyagolevwill it create the "script/repl.clj" and add the run configuration?#2017-06-2208:45gklijsNot exactly, it uses com.cemerick/piggieback to do some stuff, but you have a working webapp, with figwheel straight away. But you might want/need to remove some dependencies and code you will not be using. I hear from others they sometimes create there own ‘template’ from a prject, to use for other project.#2017-06-2208:52valyagolevokay thanks#2017-06-2216:57elena.poot@cfleming Thanks, I'll check it out!#2017-06-2222:59cfleming@valyagolev There isn’t right now, but there will be very soon (~1 month, I hope)#2017-06-2223:33souenzzohow to re-generate stubs?#2017-06-2300:14cfleming@souenzzo View-&gt;Tool Window-&gt;Leiningen-&gt;Refresh should do it. I don’t have an action specifically for that yet.#2017-06-2300:17souenzzocfleming: new line on project.clj, click on popup ;D#2017-06-2300:17cflemingAlso true 🙂#2017-06-2300:18cflemingI’m curious - why do you have to regenerate them?#2017-06-2300:18cflemingIs that because you’ve changed dependencies to use them when you didn’t previously?#2017-06-2300:21cfleming@souenzzo ^^#2017-06-2300:22souenzzoCrash/out of memory intellij just after update/reboot#2017-06-2300:23souenzzoI also send a ton of exceptions on new report tool...#2017-06-2318:02favilaAfter upgrading to the EAP I lost the "run" tool window, get the exception tried to access class com.intellij.execution.impl.TokenBuffer from class com.intellij.execution.impl.ConsoleViewImpl when I try to run a lein run config, and I never see output of the run command. (the process does run though). Thoughts?#2017-06-2405:50royalaidHey all I can't find any good resources to see if cursive has functionality similar to CIDER's hotload dependency https://github.com/clojure-emacs/clj-refactor.el/wiki/cljr-hotload-dependency#2017-06-2406:56jumar@royalaid I don't think so - but you can always try to use https://github.com/pallet/alembic#2017-06-2407:47cfleming@favila Yes, sorry - that’s https://github.com/cursive-ide/cursive/issues/1785, I’m hoping to fix that tonight and do a bugfix release.#2017-06-2407:48cfleming@royalaid No, not yet, sorry.#2017-06-2407:50cfleming@royalaid Is that something you use a lot? I’m interested to know if it’s very useful.#2017-06-2409:34royalaidI do a lot of side projects and often find that I want to add a dep I use often, like timbre, to a new project or module#2017-06-2409:34royalaidhotload+mount/component mean really you never have to reset your repl#2017-06-2409:34royalaidthe other thing that is missing is namespace refreshing#2017-06-2409:34royalaidwhich would be cool to have too#2017-06-2410:49cfleming@royalaid I think what you want for namespace refreshing is “Sync files in REPL” - see here under “Interaction with the editor”: https://cursive-ide.com/userguide/repl.html#2017-06-2422:06royalaidDoes that also reset repl set symbols?#2017-06-2422:07royalaidlike if I def something in the repl and then refresh namespaces that def will be unset because the the whole namespace is refreshed#2017-06-2512:26valyagolevhow do I look up javadoc from cursive?#2017-06-2513:14curlyfryI think it's ctr + j or cmd + j, but just check out the keymap next time#2017-06-2516:34valyagolevthanks, i’ll try it out!#2017-06-2522:07cfleming@U5UP845LY https://cursive-ide.com/userguide/documentation.html#2017-06-2609:06valyagolevthanks!#2017-06-2517:48carocadhey @cfleming I just found a strange behavior in Cursive. When I am in my project.clj if there is a commented out line with unbalanced quotes, parinfer will report an error. Is this a bug? It seems useless to me to complain about it since the line is commented out 😕#2017-06-2522:08cfleming@royalaid No, it doesn’t unset right now.#2017-06-2522:09cfleming@carocad Yes, that’s parinfer itself reporting that, see the warning under: https://shaunlebron.github.io/parinfer/#inserting-quotes#2017-06-2522:24royalaidSeems that I can build in the functionality I need with a combination of https://github.com/clojure/tools.namespace and https://github.com/pallet/alembic#2017-06-2613:12misha@cfleming greetings! is there a way to custom-resolve macro? resolve as def/defn does not help me here:#2017-06-2614:21zyloxhey, someone using clara 👍#2017-06-2614:22zyloxthe answer last i heard was that there is not a way right now but he is working on a way to custom define macros. he has one internally but it is not ready for external exposure. current resolved macros are custom defined by Colin.#2017-06-2614:23zyloxas someone who writes in a rules based dsl for the majority of my day, i greatly look forward to its release.#2017-06-2614:23zylox@misha#2017-06-2614:26zyloxbest ive found is to define then as def at the moment unfortuantely#2017-06-2614:45misha@zylox thanks, was expecting that, but hoping for docs to be outdated#2017-06-2614:46favila@misha if your macro is at least a little bit like some other form already in clojure, you can use one of those#2017-06-2614:46mishanot really using clara yet, but digging into rule-based-systems as part of the quest to simplify/organize tons of UI state I am going to have.#2017-06-2614:47favilahttps://github.com/cursive-ide/cursive/issues/1440#issuecomment-232776904#2017-06-2614:47favilaI have some macros that act like if-let and when-let#2017-06-2614:48misha@favila on the screenshot defn macro resolution is applied, which helped only to recognize foo, and prevent highlighting to leak out of the top form.#2017-06-2614:48favilaI'm surprised url was not understood as a local var#2017-06-2614:49mishaI think destructuring form after the :put messes it up.#2017-06-2614:54zyloxsince there could be multiple conditions on the left hand side its pretty much hopeless to try and parse it as a defn#2017-06-2614:57mishaI spent 5 minutes on implementing a macro accepting '[] instead of spliced list of :lhs => :rhs, but didn't get it yet :)#2017-06-2614:58mishathat quote would make def resolution work#2017-06-2614:59zyloxim not sure i would reccomend morphing your code to match the ide like that haha#2017-06-2614:59mishathat's why I dropped it#2017-06-2623:25cfleming@misha Yes, sadly @zylox’s answer is correct - I haven’t got to this yet. defn is unlikely to work very well since it has to parse the whole form, and defrule looks quite different, it’s only superficially similar.#2017-06-2623:26cflemingLooking at the doc, the tricky bit is going to be that rules can refer to fields from records implicitly.#2017-06-2623:26cflemingI’m not quite sure how to handle that, I’ll think about it.#2017-06-2623:48zyloxYa implicit references are pretty important.#2017-06-2623:49zyloxAdditionally you can do a lot of destructuring style things #2017-06-2623:49zyloxAnd the types of the constraints can be non record types.#2017-06-2623:49zyloxSo.. Ya it's gonna be rough#2017-06-2709:59mishacustom macro it is then opieop#2017-06-2710:21misha
(defmacro mydefrule [rule-name [tick rule-vec]]
  `(clara.rules/defrule ~rule-name 
(macroexpand-1 '(mydefrule foo '[[:bar] => (println :foo)]))
=> (clara.rules/defrule foo [:bar] => (println :foo))
#2017-06-2806:23pupenoWhen I add a java-agent to my project, the REPL stops working. I added :java-agents [[com.newrelic.agent.java/newrelic-agent "3.40.0"]] and when I try to start the REPL I get: Error running REPL: resources\jars\com.newrelic.agent.java\newrelic-agent.jar (The system cannot find the path specified). The jar is there. Any ideas what's going on?#2017-06-2810:10cfleming@pupeno No, I’ve not seen that but I’ve never tried to use third-party agents either. Can you file an issue for that and I’ll look at it?#2017-06-2810:13pupenosure#2017-06-2810:13pupenohttps://github.com/cursive-ide/cursive/issues/1791#2017-06-2810:15cflemingThanks!#2017-06-2810:15pupenoHow did you get the cursive icon next to your name?#2017-06-2810:16cflemingIt’s in the status message - I just chose an icon with no actual message.#2017-06-2810:17pupenoAh! Cool 🙂#2017-06-2811:51jkourosHello everyone! Is there an equivalent to the change signature refactoring for functions in cursive? Change signature does not work for me.#2017-06-2819:04sparkofreasonOn the topic of "resolve as" for macros - I don't suppose we could get an option that follows the defmethod template? Or maybe I should just wait for the general solution?#2017-06-2819:15zyloxyou can do some manual overrides in the xml file it stores its stuff off at#2017-06-2819:16zyloxthe path on mac is /Users/<userid>/Library/Preferences/IdeaIC<intjversion>/options/ClojureResolveSettings.xml#2017-06-2819:18zyloxand add an entry like <item key="your.namespace/custom-defmethod" resolves-as="clojure.core/defmethod" />#2017-06-2819:18zyloxand restart intellij#2017-06-2819:18zyloxnow this is assuming clojure.core/defmethod is wired up right, i assume it is but i dont touch it much#2017-06-2819:19zyloxi have a number of things set up like this and it works pretty well for me#2017-06-2819:21zylox@dave.dixon#2017-06-2819:21sgerguriG’day, I’m having issues creating a project from existing sources the first time it loads up. I go through the dialog, then get an IDE error about project “not being initialized”, SDK is not set up (despite being set through the creation window), and root directories are not marked as such. When I set the JDK manually and restart things are loaded properly but first time is like this for pretty much any project that I choose to create from an existing Leiningen repo in this way. Is this a known issue? I’m on the latest Ultimate 2017.1 version, running the latest stable Cursive plugin.#2017-06-2821:04jumar@U067BPAB1: how do you import an existing project? I used "Import project" The first time it suffered from "SDK not set up" issue and missing sources but everything was easily fixed by "Refresh Leiningen Projects"#2017-06-2821:26sgerguriFile->New->Project from existing sources… That gives you a “wizard”-like dialog window where you actually get to pick an SDK as well, it just ends up being ignored it seems. I remember this working correctly in earlier versions of Idea/Cursive so maybe it just got broken later on. Nice to see a familiar face in here!#2017-06-2822:50cfleming@U067BPAB1 Could you send a screenshot of the error you’re seeing?#2017-06-2819:22sparkofreason@zylox That pretty much works. Only minor annoyance is that Cursive doesn't recognize the "method name" symbol, probably as it expects a declaration like defmulti somewhere else. Anyway, better that than having the args unresolved. Thanks for the tip.#2017-06-2819:23zyloxno problem#2017-06-2822:48cfleming@jkouros No, there isn’t yet, unfortunately#2017-06-2918:43dm3@cfleming is there any development around https://github.com/cursive-ide/cursive/issues/1670? 🙂#2017-06-2919:19joelsanchezHi everyone Is there any way to temporarily disable paredit to make parens balanced again after pasting unbalanced parens or deleting code leaving it unbalanced?#2017-06-2919:19joelsanchezApart from manually using the menu#2017-06-2919:21zyloxhttps://cursive-ide.com/userguide/paredit.html#2017-06-2919:23joelsanchezYes, ended up assigning a shortcut key 🙂#2017-06-3002:51danielcompton@joelsanchez yeah I have a shortcut key. Alternatively you can run Find Action... to search for Toggle Structural Editing Style#2017-06-3023:06cfleming@hjrnunes That’s actually an IntelliJ thing - Settings-&gt;Build, Execution-&gt;Debugger-&gt;Data Views-&gt;Java-&gt;Hide null elements#2017-07-1008:00hjrnunescfleming: thanks!#2017-06-3023:49michaellindonHi everyone, I'm trying to change the binding set from Emacs to Cursive, however it says "Current keymap cannot be modified Fix"#2017-06-3023:49michaellindonclicking fix goes nowhere#2017-07-0107:24cfleming@michaellindon Sorry about that, a few people have reported that the fix link is bad.#2017-07-0107:25cflemingThe issue is you’re trying to modify one of the built-in keymaps, which are immutable. Go to Settings-&gt;Keymap, and click on the gear to duplicate the built-in one. You’ll be able to modify the copy.#2017-07-0217:34baptiste-from-parishello people of cursive, little question here How to I keep my standard cursive input when launching a cljs/repl with rhino env ?#2017-07-0222:20ajsthe getting started instructions for cursive say to "select an sdk" but there is no sdk in my sdk list and cursive will not let me continue with the leiningen project import. any ideas?#2017-07-0401:20selfsamecan cursive connect with the clojure.core.server socket repl?#2017-07-0401:21cfleming@selfsame Not directly, I’m planning to add that soon. In the meantime, https://github.com/mfikes/tubular is a possible workaround.#2017-07-0401:22selfsameah i see, thanks!#2017-07-0402:25danielcomptonI'm noticing CPU spikes which seem to be correlated to IntelliJ (and not my app), what's the best way to profile this to get more info?#2017-07-0402:26danielcomptonRoughly every 15 seconds my CPU temp goes way up#2017-07-0402:32zyloxthat sounds tricky#2017-07-0403:26cfleming@danielcompton Tools->Start CPU usage profiling#2017-07-0403:27cflemingAre you working with CLJ or CLJS?#2017-07-0403:29cflemingI’m actually seeing something like this myself#2017-07-0403:31cflemingActually, no, I’m seeing some kind of EDT lockup, CPU doesn’t spike in my case.#2017-07-0404:06cflemingActually, mine looks like it may be https://youtrack.jetbrains.com/issue/JRE-401#2017-07-0404:06cflemingLatest IntelliJ EAP downgrades the JRE they bundle#2017-07-0404:12danielcomptonThere’s a CLJ module and a CLJS module but I’m working just with CLJ#2017-07-0404:42potetmI've noticed mine freezing when finding usages on keywords. I wonder if that's related.
#2017-07-0423:35danielcompton@cfleming I don't see "Start CPU usage profiling"#2017-07-0423:37danielcomptonAh, looks like I need to do this: https://intellij-support.jetbrains.com/hc/en-us/articles/207241235-Reporting-performance-problems#2017-07-0502:26cfleming@souenzzo So this is handled internally by having a list of forms which allow processing inside them when they’re encountered at top level - things like let and do. I can make that list extensible, so that you could add trace-forms to it.#2017-07-0502:27cfleming(the actual answer to your question is no, currently)#2017-07-0502:32souenzzoIt's clairvoyant.core from [spellhouse/clairvoyant "0.0-72-g15e1e44"] Not sure, but it could be a metadata inside the macro?#2017-07-0502:33cfleming@souenzzo See here for tons of discussion on that: https://github.com/cursive-ide/cursive/issues/147#issuecomment-29776501#2017-07-0503:11cfleming@souenzzo See also https://github.com/cursive-ide/cursive/issues/974#2017-07-0503:12cfleming@souenzzo And https://github.com/cursive-ide/cursive/issues/979#2017-07-0509:02miikkaIs there a way to tell Cursive to stop suggesting a specific import?#2017-07-0509:03miikkaThis suggestion is wrong and it makes the editor super-slow 😞#2017-07-0509:03cfleming@miikka What is Inst in that example?#2017-07-0509:03miikkathe Inst protocol from clojure.core in 1.9#2017-07-0509:04cfleming(i.e. I’d like to fix the actual problem as well as the import).#2017-07-0509:04miikka(But Cursive wants to import the interface)#2017-07-0509:04cflemingInteresting, I’ll try to reproduce that.#2017-07-0509:05cflemingIt should only try to import it if it can’t resolve the symbol - I wonder why it can’t.#2017-07-0509:06cfleming@miikka Under Settings-&gt;Editor-&gt;General-&gt;Auto Import, there’s an Exclude from Import and Completion section - that should help.#2017-07-0509:07cflemingDoes (extend-protocol clojure.core/Inst ... help?#2017-07-0509:08miikkaOkay, that helps. It highlights it as unresolvable but that's fine. Thanks.#2017-07-0509:10cfleming@miikka I filed https://github.com/cursive-ide/cursive/issues/1798 for that.#2017-07-0509:11cflemingThat’s weird, I don’t know why it can’t resolve that, it’s just a normal defprotocol.#2017-07-0509:18miikkaThe protocols in clojure.core.protocols have the same problem, by the way.#2017-07-0510:30cfleming@miikka Thanks, I must have broken something recently.#2017-07-0515:17dealyI just upgraded to the latest version of intellij and all my run configs have a red X through them. Trying to solve the problem I moved my .idea dir to another location and re-imported everything. When I put my saved .idea/runConfigurations dir back into the newly created directory everything except my clojure/leiningen modules appeared. Where are the clojure runConfigs stored?#2017-07-0520:58michaellindon@cfleming that worked, thank you 🙂#2017-07-0621:42bfabryfor me when I hit enter while inside a ;; comment I get another line of ;;#2017-07-0621:42bfabryoh wait#2017-07-0621:42bfabrythat's what used to happen#2017-07-0621:42bfabrynow not so much#2017-07-0621:43joelsanchez😂#2017-07-0621:43bfabrywhen did that change#2017-07-0621:43joelsanchezwell there's an autowrap option but i don't want to do that to code#2017-07-0621:44joelsanchezin fact i want to wrap myself, Cursive just needs to ;; the lines#2017-07-0621:44bfabryyeah I swear to god it used to#2017-07-0621:44bfabryalso used to add indentation#2017-07-0622:02cfleming@bfabry It definitely should do that, I’ll try it later.#2017-07-0622:02cfleming@joelsanchez You can also do Edit-&gt;Fill Paragraph in docstrings.#2017-07-0622:04cflemingThe width it fills to is controlled by Settings-&gt;Editor-&gt;Code Style-&gt;Clojure-&gt;General-&gt;Docstring fill width#2017-07-0622:04joelsanchezwhat Cursive does is inserting the ;; when you break the line you have written#2017-07-0622:04joelsanchezbut not if you enter a newline#2017-07-0622:04cflemingIt’s independent of the code width.#2017-07-0622:04cflemingSorry, you can fill in docstrings and comment blocks.#2017-07-0622:04bfabryyeah I see that behaviour as well. I'm pretty sure newline used to also insert it and maintain indent though#2017-07-0622:05cflemingI’ll check the comment enter thing#2017-07-0622:07joelsancheztried Fill paragraph, it works with (comment) , docstrings and the #_" example i pasted above#2017-07-0622:07cflemingBut not with line comments?#2017-07-0622:07joelsancheznot with line comments!#2017-07-0622:10cflemingUgh#2017-07-0622:10cflemingOk, I’ll investigate all that.#2017-07-0719:36Lone Rangerhey hey 🙂 curious if anyone knows if executing statements in the REPL while debugging is a thing yet? (@cfleming I know you're a one-dev army, not trying to rush just curious!)#2017-07-0807:13cfleming@goomba No, it’s not, sorry.#2017-07-0807:14cflemingStill have to use Evaluate Expression, which is a little clunky but has the advantage of allowing the result to be explored.#2017-07-0816:11Lone Rangerindeed thank you!#2017-07-0822:21onetomis there anyone here using tolitius/mount or aroemers/mount-lite with cursive? im trying the with-session feature of mount-lite (https://github.com/aroemers/mount-lite/blob/2.x/src/mount/lite.clj#L207-L218) which creates a separate thread.#2017-07-0822:23onetomi thought i would just wrap my tests using with-session inside an :each fixture:
(defn with-test-db [tests]
  (-> (mount/with-session
        (mount/with-substitutes
          [#'conn (test-conn)]
          (mount/start))
        (tests))
      :result deref))

(use-fixtures :each with-test-db)

(deftest test-inside-session-using-fixtures
  (tx! [{:db/id "e" :str "asd"}])
  (is (= {:str "asd"}
         (q '[:find (pull ?e [:str]) .
              :where [?e :str "asd"]]))))
https://gitlab.com/onetom/mount-lite-example/blob/master/test/app/pretty_db_test.clj#L7-21
#2017-07-0822:24onetombut as a result i was surprised with some cursive test integration internals when i Run tests in current NS in REPL:
Loading test/app/pretty_db_test.clj... done
Running tests in app.pretty-db-test

Testing app.pretty-db-test

===>>> Setting up test DB <<<===

@#Cursive#TestSupport#@ {:file "pretty_db_test.clj", :line 21, :class "app.pretty_db_test$fn__4511", :type :pass, :expected "(= {:str \"asd\"} (q (quote [:find (pull ?e [:str]) . :where [?e :str \"asd\"]])))", :message nil}
===>>> Tearing down test DB <<<===

Ran 0 tests containing 0 assertions.
0 failures, 0 errors.
#2017-07-0822:28onetomsometimes i get the test summary way ahead of time:
Loading test/app/pretty_db_test.clj... done
Running tests in app.pretty-db-test

Testing app.pretty-db-test

Ran 0 tests containing 0 assertions.
0 failures, 0 errors.

===>>> Setting up test DB <<<===

@#Cursive#TestSupport#@ {:file "pretty_db_test.clj", :line 19, :class "app.pretty_db_test$fn__5225", :type :fail, :expected "(= {:str \"asd\"} (q (quote [:find (pull ?e [:str]) . :where [?e :str \"asd\"]])))", :actual "(not (= {:str \"asd\"} nil))", :message nil}
===>>> Tearing down test DB <<<===
#2017-07-0822:32onetomso im clearly not synchronising with the clojure.test framework somehow... i was thinking maybe i should pass down clojure.core/{*out*,*err*} to the thread so it can communicate back to cursive but seeing the test summary so early kinda invalidates this idea#2017-07-0908:00cfleming@onetom Right, there’s a problem when running tests in background threads - it doesn’t work right now, but hopefully will very soon.#2017-07-0908:54cfleming@onetom See https://github.com/cursive-ide/cursive/issues/1402#2017-07-0908:54onetomthanks!#2017-07-0908:55onetomi was also wondering if it's possible to just see all the errors on the console, but haven't found any such options#2017-07-0908:57onetomis that on purpose? because thanks to the Re-run last test action in REPL action im often in implementation, change then re-run the tests#2017-07-0908:59onetomwhile i could just almost have a lein test auto, I can't tell that quickly which namespace or which specific test do i want to run...#2017-07-0909:00onetomi had such a workflow when i was using ruby from sublime so im still puzzled that i couldn't replicate the same convenience with clojure (without emacs :)#2017-07-0909:35rauhCan I use connect to a lumo repl with Cursive?#2017-07-0913:03joelsanchez@rauh tried with lumo -n 127.0.0.1:7777 and Cursive's "remote REPL" run configuration, but it seems that Lumo does not support nREPL: https://github.com/anmonteiro/lumo/issues/171#2017-07-0913:06rauh@joelsanchez Thanks! I figured it's not working yet.#2017-07-0913:07joelsancheza possible solution: https://github.com/mfikes/tubular#2017-07-0913:07joelsanchezstart a Lumo socket REPL with the -n argument#2017-07-0913:08joelsanchezthen choose “Use clojure.main in normal JVM process” in cursive#2017-07-0913:08joelsanchezand then
(require 'tubular.core)
(tubular.core/connect 5555)
#2017-07-0913:20joelsanchezhey @rauh i tried Tubular and it is working flawlessly, let me know if you have problems#2017-07-0913:20rauh@joelsanchez Woah that's nice! I'll try it later, gotta run 🙂#2017-07-0913:20rauhThanks!#2017-07-0921:50cfleming@joelsanchez @rauh yes, Tubular is currently the best solution.#2017-07-0921:50cflemingI’m planning native Lumo support soon though.#2017-07-0922:03cfleming@onetom https://github.com/cursive-ide/cursive/issues/1186#2017-07-0922:04cflemingI’m planning to fix that too in the current round of test improvements.#2017-07-1001:36bfabryI wish I had some sort of hybrid between the repl input pane and a scratch buffer#2017-07-1001:38bfabrylike, I want to be able to scroll up and down, build up forms piece by piece, edit etc, but I want option+enter to send a require to the repl, not add stuff to an ns form#2017-07-1001:43cfleming@bfabry Busy right now but will write more later, I have some ideas around that.#2017-07-1001:48bfabrycool#2017-07-1006:35onetom@bfabry +1 for the idea...#2017-07-1007:21Oliver GeorgeQuick sanity check. Is there a way to get the core.match/match macro to syntax highlight correctly? The binding variables in particular don't get picked up.#2017-07-1007:21Oliver GeorgeI see this related issue https://github.com/cursive-ide/cursive/issues/1683#2017-07-1007:22Oliver GeorgeJust checking that there isn't a workaround#2017-07-1009:54cfleming@olivergeorge No, no workaround sorry.#2017-07-1010:42Oliver Georgecfleming: No worries. Thanks for confirming.#2017-07-1009:58shidima_I'm using Intellij with cursive, but it seems to be unable to resolve some of my code (like (db/add-message). I have been watching a video by @yogthos and it seems he has the same problem in the screen cast. So I'm assuming it is normal?#2017-07-1010:03cfleming@shidima_ What is db/add-message? Which lib does it come from?#2017-07-1010:05shidima_I started a new projcet with lein new luminus guestbook +sqlite +swagger +cljs and import the db namespace as require guestbook.db.core :as db#2017-07-1010:06cflemingIf you look in that namespace (you can Ctrl/Cmd-click on the ns name), what does the definition of add-message look like?#2017-07-1010:10shidima_
(ns guestbook.db.core
  (:require
    [conman.core :as conman]
    [mount.core :refer [defstate]]
    [guestbook.config :refer [env]]))

(defstate ^:dynamic *db*
          :start (conman/connect!
                   {:datasource
                    (doto (org.sqlite.SQLiteDataSource.)
                          (.setUrl (env :database-url)))})
          :stop (conman/disconnect! *db*))

(conman/bind-connection *db* "sql/queries.sql")
#2017-07-1010:10cflemingOk, it looks like it’s dynamically creating vars from that sql file.#2017-07-1010:10cflemingCursive will have problems with that, yes.#2017-07-1010:11shidima_Alright, expected behavior then 🙂#2017-07-1010:11cflemingNot desired, but sadly expected, yes 🙂#2017-07-1010:12shidima_Sometimes its a bit hard to know if I'm doing something wrong or if its part of the tool chain#2017-07-1010:12shidima_Thanks for making it clear#2017-07-1010:13cflemingNo problem, definitely not your fault this time.#2017-07-1013:39onetom@shidima_ would u mind sharing which video were u watching. pls? btw, what's the goal with combining mount and dynamic vars? sounds a bit odd to me#2017-07-1013:40shidima_@onetom Sure: https://vimeo.com/164256508#2017-07-1021:37onetom@shidima_ i've tracked down where did this (defstate ^:dynamic *db* ...) come from. it was introduced when mount was integrated into the luminus template: https://clojars.org/luminus/lein-template/versions/2.9.8.64 at that time (2015-11-18) it used mount:0.1.2 (https://clojars.org/mount/versions/0.1.2) which came from this commit: https://github.com/tolitius/mount/commit/a7770968dbfa4d010ed3827ce0108db5d0e27741 if you check that out, it does not mention ^:dynamic anywhere in the source code, so i think the luminus template just carried it around with itself in the hope of maintaining some kind of a backward compatibility, however i think it was simply a breaking change, since they fundamentally changed how *db* should work and what should it mean. current luminus docs doesn't show any ^:dynamic *db* stuff either: http://www.luminusweb.net/docs/components.md intrestingly there is an article from 2015-12-05 from yoghtos where he says: > Conclusion > ... > While it's possible to formalize the handling of stateful resources, using libraries such as component, I personally have not found this to be necessary in my applications. — https://yogthos.net/posts/2015-12-05-LuminusComponents.html#2017-07-1021:38onetomso in my conclusion, it should just be (defstate db :start ... :stop ...) i will bring it up on #luminus#2017-07-1106:05shidima_@onetom Cool, nice find 🙂#2017-07-1106:07shidima_Does the dynamic mean you can change the sql while the app is running? I found that I need to restart the whole app when I make a type.#2017-07-1110:06royalaidshidima_: You should be able to just reload the sql fns with something like this
(def db (atom nil))

(defmacro init-queries-connect!
  [pool-spec resource-path]
  `(do (reset! db (conman/connect! ~pool-spec))
       (conman/bind-connection @db ~resource-path)))

(defn disconnect!
  []
  (conman/disconnect! db)
  (reset! db nil))
assuming you have access to the conman
#2017-07-1110:07royalaidpool-spec is something like {:jdbc-url (:database-url conf)} or {:jdbc-url "jdbc:} and resource-path is "sql/queries.sql" and your sql file is located in {project root}/resources/sql/. If you have any question about the above just ask away 🙂#2017-07-1110:08shidima_Tnx, I will look into it. I'm quite prone to typos and having to restart the whole app is a bit annoying 🙂#2017-07-1110:09royalaidyeah I hate that too#2017-07-1110:10royalaidalso check out https://github.com/pallet/alembic for adding deps to a running repl#2017-07-1110:10royalaidand#2017-07-1110:10royalaidhttps://github.com/clojure/tools.namespace#2017-07-1110:10royalaidfor reseting state in a namespace#2017-07-1122:46onetom@U0S3YK6HK these are just the low level puzzle pieces you mentioned. tolitius/mount and stuartsierra/component and his reloaded workflow is meant to unify and codify these into a consistent and more flexible convention or framework. Using dynamic vars is one of the patterns which was alleviated by using mount or component, that's why it was surprising to see them combined. But @U050CBXUZ on #luminus gave an explanation why it might make sense still (which I'm still suspicious of but can't argue with because I don't know conman)#2017-07-1123:15erichmondIs there a way to "add source root" when working with a cljs project so we can get keyword highlighting?#2017-07-1123:21erichmondnvm, the issue is that we are using boot, not lein ... sorry#2017-07-1209:36onetom@erichmond so how do you deal with a boot project in cursive?#2017-07-1212:00erichmondI'm using your plugin! Works incredibly! Thanks!#2017-07-1217:53rnagpalAny simple way or shortcut to run tests from intellij(Cursive plugin)#2017-07-1217:57sgerguriSettings->Keymap, “Run tests in current NS in REPL” and “Run test under caret in REPL”.#2017-07-1217:57sgerguriAlso “Re-run last test action in REPL”.#2017-07-1217:58sgerguriOtherwise if you right-click in your editor window in the test namespace you should have an option there to evaluate those tests in REPL.#2017-07-1217:58rnagpalI get this exception#2017-07-1217:58rnagpalException No namespace: bookings.events-test found clojure.core/the-ns (core.clj:4032#2017-07-1217:59rnagpalWhen I go to “tools” -> “repl” -> “Run tests in current NS in REPL”#2017-07-1220:11zyloxhave you loaded the ns#2017-07-1220:11zyloxlet me try#2017-07-1220:12zyloxoh it loads it for you#2017-07-1220:12zyloxfancy#2017-07-1220:15zyloxEDIT: mine ran, but printout was slightly different#2017-07-1221:07rnagpalActually I am trying to run clojurescript tests#2017-07-1221:08zyloxi got nothing then#2017-07-1222:12cfleming@rnagpal Cursive’s integration doesn’t work for CLJS tests yet, sadly - it will do soon though.#2017-07-1307:54rauhPSA: If you use CLJS with fighweel in your project you might've noticed that "jump to definition" will jump into a weird figwheel-helper-deploy.js file. Eg when you jump to definition at (goog/getUid {}). You can exclude that JS file from indexing in "Open Module settings" (right click on your project), then Libraries -> figwheel-sidecar -> exclude -> choose compiled-utils.#2017-07-1307:55cfleming@rauh Interesting, thanks - I might just exclude that file automatically in Cursive#2017-07-1307:56rauh@cfleming That'd be great 🙂#2017-07-1318:30tony.kaySo, a few days ago the clojure resultion stopped working for me. One of my macros was acting as a defn, and Cursive was “doing the right thing” when I set it to resolve that as a defn. Now it isn’t working anymore, but the resolution is still set when I look at preferences. I tried invalidating cache/restart, clearing out the IDEA files and re-importing. No luck.#2017-07-1318:32tony.kayAh, I see an open issue on github#2017-07-1319:22cfleming@tony.kay Hmm, which issue looks like yours?#2017-07-1319:23cflemingOh, I see you’ve commented on one.#2017-07-1319:28tony.kay@cfleming Yeah, I’m having a number of issues. At the moment I’m trying an old release from Jan 1, and that isn’t working for me either. I’m going to try an old project and see if there isn’t something weird about what I’m working on. I’ve lost all ability to affect resolution of macros#2017-07-1319:29tony.kayI can give you a github project to look at if you care to#2017-07-1319:29cflemingThat’s very strange - the issue is I’ve never managed to reproduce this. If you could provide a repro project that would be excellent.#2017-07-1319:29tony.kayhttps://github.com/fulcrologic/fulcro#2017-07-1319:30tony.kayimport, then open src/test/fulcro/client/mutations_spec.cljs#2017-07-1319:30tony.kaythere is a macro called defmutation being used there#2017-07-1319:30tony.kayon line 14#2017-07-1319:30tony.kaywon’t resolve#2017-07-1319:30cflemingOk, and you usually resolve that as defn?#2017-07-1319:31tony.kayyes#2017-07-1319:31cflemingOk, I’ll take a look when I get in.#2017-07-1319:31tony.kayok, thanks!#2017-07-1322:13cfleming@tony.kay ^^ (not sure if title mentions ping you or not)#2017-07-1322:15tony.kayyes#2017-07-1322:15tony.kayso, it won’t even offer it to me 😞#2017-07-1322:15cflemingThat’s not what you’re seeing?#2017-07-1322:16tony.kayit used to be. I don’t get the offer to resolve as defn…I’ve cleared all of them in prefs, but it still won’t reoffer#2017-07-1322:17cflemingIf you navigate from the defmutation symbol, does that take you to the macro definition?#2017-07-1322:18hlshipOh yea, the problems with qualified dependencies was fixed in 1.6.0 Thanks!#2017-07-1322:18tony.kayjust a sec…opening it#2017-07-1322:19tony.kayyes, it does take me to the macro#2017-07-1322:20tony.kaybut sample shows up in yellow#2017-07-1322:20cflemingWhoa#2017-07-1322:20cflemingAll of a sudden, I’m seeing:#2017-07-1322:21tony.kay😕#2017-07-1322:21cflemingI’m going to try an invalidate, one sec#2017-07-1322:22cflemingThat’s going to take a while, back with a cup of tea in a moment#2017-07-1322:22tony.kayk#2017-07-1322:23tony.kayI’ve gone as far as re-installing the plugin, clearing ~/Library (everything to do with IntelliJ), and git clean -xfd on the repo to clear out all IDE files.#2017-07-1322:34cflemingOh#2017-07-1322:34cflemingOk, this is a UI problem#2017-07-1322:34cflemingInstead of opening the menu to the right, you have to select the Resolve… as… item with enter#2017-07-1322:36tony.kayoh, interesting#2017-07-1322:37tony.kaythat works#2017-07-1322:37cflemingFor some reason, that confuses a lot of people (including me, from time to time), I think it’s the … at the end of the menu item.#2017-07-1322:37tony.kayweird that it had stopped working when I had it defined, though#2017-07-1322:37cflemingAlthough looking at the popup, JetBrains do the same for the Typo inspection.#2017-07-1322:38tony.kaylet me look at the other project that was having problems…#2017-07-1322:39tony.kayyeah, seems ok now#2017-07-1322:39cflemingGreat#2017-07-1322:40cflemingI’m not sure how to make it clearer in that popup what the user needs to do.#2017-07-1322:40tony.kaySo, the resolution had stopped working at some point with the resolution still in prefs, but now that I’ve reinstalled everything hard to know what was causing that#2017-07-1322:40cflemingYeah, for sure. Ok, well let me know if you have more problems.#2017-07-1322:40tony.kaythanks, I appreciate your time#2017-07-1322:41cflemingIf you see it again let me know before you wipe everything, and we’ll see if we can debug it.#2017-07-1322:41tony.kayk, will do#2017-07-1322:44cfleming@hlship The copy reference thing? Yes indeed!#2017-07-1401:35zylox@cfleming hey, do you have a release history anywhere (like https://blog.jetbrains.com/idea/category/releases/)#2017-07-1401:36zyloxi spent a bit looking but could only really find google groups stuff and some occasional eap updates#2017-07-1401:36cfleming@zylox No, the closest thing is the Google Group posts. I’ve been meaning to sit down and sort them out, but haven’t yet.#2017-07-1401:36zyloxyou should 🙂#2017-07-1401:36cflemingThere should be a post there for each new version though.#2017-07-1401:37cflemingYes, I know 🙂#2017-07-1401:37zyloxya. i find google groups cumbersome though. ill get over it#2017-07-1401:38cflemingIt’s not ideal, for sure.#2017-07-1901:28wilkerlucio@cfleming hello, not sure you saw this, I just updated IntelliJ for 2017.2, and now this is happening: https://www.dropbox.com/s/spf5hepegkvh5ud/Screenshot%202017-07-18%2022.27.23.png?dl=0#2017-07-1901:29wilkerlucionot all of then, in my file only one of the defn got this, which is pretty weird#2017-07-1901:30wilkerluciowow, I just removed and then typed again, and now it's back to normal :face_with_rolling_eyes:#2017-07-1901:50wilkerluciook, it happened again, with a different function, something seems odd about the arity detection#2017-07-1902:59mfikes^ I’ve seen this arity stuff recently as well. If I wait a bit (half a minute), they clear out on their own.#2017-07-1904:20zyloxThat seems bothersome. Especially if there is some analysis spinning in the background.#2017-07-1913:32chrisbroomejust got cursive up and running on IntelliJ CE last night. one that that's really bugging me is that it doesn't let me just type and bracket ()[] wherever I want. it's trying to be "smart" about what it does but it ends up making the user experience pretty frustrating.#2017-07-1913:33chrisbroomefor example, in order to insert a missing ) in the correct spot, I have to copy an existing ) and paste it in place instead of just being able to type )#2017-07-1913:35chrisbroomeI'm guessing it gets easier to use with time, but transitioning from any other editor (including other IntelliJ based editors), it's really counter-intuitive.#2017-07-1913:35chrisbroomeIs there a setting I can use to turn that "smart" behavior off?#2017-07-1913:42sgerguri@chrisbroome In the bottom right corner there is “Paredit” (or “Parinfer”). If you click that and select “Structural Off” it will turn off this “smartness” and let you insert stuff wherever you want.#2017-07-1913:44chrisbroomeawesome thank you!#2017-07-1913:44chrisbroomeit was set to Paredit#2017-07-1913:44sgerguriI find that if you’re doing structural editing you cannot really mess things up but I sometimes hit the backspace instead of killing an S-expression as well and occasionally mess things up.#2017-07-1913:45sgerguriMind you I also use IdeaVim so that adds to the complexity since Paredit does not really prevent you from x-ing a symbol (i.e., deleting a character in normal mode by hitting the “x” key).#2017-07-1913:45chrisbroomelol yeah that would be "fun"#2017-07-1913:46chrisbroomeESC d$... woops#2017-07-1913:47sgerguriI think if you take the time (and it’s not a lot fortunately) to familiarise yourself with structural editing and learn the keybindings you’ll experience a massive productivity boost. That’s one of the awesome things of coding in a Lisp.#2017-07-1913:47chrisbroomeyou're probably right#2017-07-1913:47chrisbroomeneed to think more in data structures since that's what the language is defined in#2017-07-1913:52zyloxi think a pretty normal flow is to bind the hotkey for toggling structural editing and toggling to fix small issues, but for the most part stay in some structural form#2017-07-1913:52zyloxthat being said, i don't do that. i do think its a good flow though#2017-07-1913:52chrisbroomeah that would make sense#2017-07-1922:13cfleming@wilkerlucio @mfikes That’s very strange. What’s odd is that it’s reporting the wrong arity (that form pretty clearly has args), if it were an indexing problem I’d expect the reported arity to be correct.#2017-07-1922:18mfikes@cfleming Last time I saw it (earlier today), I first typed (defn) which starts off in an invalid state, and is properly marked as such. Then I proceeded to fill in the the function definition, but the markings stayed. My best guess is that I have other things running on my box, which are taking up sufficient CPU to delay background marking task. (My son has me rendering some 3D animations for him.) Otherwise, it might actually be the case that the background thread died. If I see it again, I’ll be sure to open the Event Log.#2017-07-1922:19cfleming@mfikes Hmm, that could be - that seems pretty seriously delayed though, especially in the screenshot Wilker posted.#2017-07-1922:20mfikesYeah, I agree @cfleming. I’d be more satisfied if the root cause was a static analysis error earlier in the file that derailed things.#2017-07-1922:20cflemingI’d be interested to know if either of you have errors in your log when it happens (Help-&gt;Show log in Finder…)#2017-07-1922:21mfikesCool. I’ll check there if it happens again.#2017-07-1922:21wilkerluciosure, if I get that again I'll get the log#2017-07-1922:22mfikesA few days ago I went through a period of 2 or 3 days where IntelliJ and/or Cursive was completely locking up every 2 to 3 hours, and I had to force kill it. Those problems have since gone away. (I changed nothing to make it arrive, and nothing to make it go away.)#2017-07-1922:22wilkerlucio@mfikes are you on IntelliJ 2017.2?#2017-07-1922:23mfikes2017.1.5#2017-07-1922:23wilkerluciook, just a guess, because I started seeing the issue after upgrading yesterday, but might be a coincidence#2017-07-1922:24wilkerlucio@cfleming unrelated question: today I added a dependency that was installed via lein install (not a deployed one), but when I try to compile my JS it's not finding the dependency, I noticed this dependency is not on the classpath on launch, but it is present at the External Libraries when I look there, you have an idea what can be going wrong here?#2017-07-1922:25wilkerlucioalso, compiling via terminal works fine, just when launching from cursive it's missing#2017-07-1922:26mfikes@cfleming I see quite a few of these
2017-07-19 11:16:00,235 [  38653]   WARN - tectAndAdjustIndentOptionsTask - Indent detection is too long for: core.cljs 
2017-07-19 11:16:00,235 [  38653]   WARN - tectAndAdjustIndentOptionsTask - Indent detection is too long for: core.cljs 
2017-07-19 11:16:00,236 [  38654]   WARN - tectAndAdjustIndentOptionsTask - Indent detection is too long for: core.cljs 
2017-07-19 11:16:00,236 [  38654]   WARN - tectAndAdjustIndentOptionsTask - Indent detection is too long for: state.cljs 
2017-07-19 11:16:00,236 [  38654]   WARN - tectAndAdjustIndentOptionsTask - Indent detection is too long for: state.cljs 
2017-07-19 11:16:00,236 [  38654]   WARN - tectAndAdjustIndentOptionsTask - Indent detection is too long for: state.cljs 
#2017-07-1922:26cfleming@mfikes A few users have reported the slowdown issue, and I believe it’s due to the indexes being slow for CLJS interop. I have a fix for that as part of a longer project to improve that side of things, it should be out soon. Hopefully that helps.#2017-07-1922:27mfikesCool!#2017-07-1922:28cfleming@wilkerlucio Does lein classpath show it?#2017-07-1922:28wilkerlucioyes#2017-07-1922:28cfleming@mfikes Are those the ClojureScript core files?#2017-07-1922:29mfikesSome of them were#2017-07-1922:29cflemingThey’re pretty big, which might be why the indent detection times out.#2017-07-1922:30mfikesI ignored the ClojureScript ones (they are a little unfair to Cursive), but the ones I pasted above are not, they are small ones from my own code.#2017-07-1922:30cfleming@wilkerlucio If you look at your Project Structure (Cmd-;), and then look at your module, is that lib in your deps?#2017-07-1922:30wilkerluciothe files on my machine on the issue were small, but my home machine (where I got the arity issue) is currently being slow in general, and for some reason IntelliJ was constantly using 200% of my CPU (even I was not doing anything with it)#2017-07-1922:31cfleming@mfikes Do those files contain interop? If you were experiencing this interop problem the other day, that might have caused it too.#2017-07-1922:31cfleming@wilkerlucio I wonder if that is the CLJS indexing issue too.#2017-07-1922:32mfikes@cfleming The files I’m working on have a decent amount of React Native interop calls as well as quite a few #js literals#2017-07-1922:32cfleming@mfikes @wilkerlucio If you’d like to try out the CLJS change, go to the plugin repo here: https://plugins.jetbrains.com/plugin/8090-cursive, then click on “dev” to see the dev channel, and download the 1.6.1-snapshot2 build corresponding to your IntelliJ version.#2017-07-1922:32wilkerlucio@cfleming interesting, when I checked my modules, it had 2 different modules, one of then was missing the library#2017-07-1922:32mfikesCool. I’ll give it a try.#2017-07-1922:33cfleming@wilkerlucio Hmm, that is strange. Is this a lein project?#2017-07-1922:33wilkerlucioyes#2017-07-1922:33cflemingDid you have modules like module and module_1?#2017-07-1922:33wilkerlucioyup#2017-07-1922:33cflemingHmm#2017-07-1922:33wilkerluciomodule-1 to be more precise#2017-07-1922:34cflemingSomewhere recently something broke in the lein importing, and sometimes modules get duplicated. If you remove the duplicate (module-1) and refresh, hopefully that might help.#2017-07-1922:34wilkerlucioha, after removing the one with bad dependencies it's now working again#2017-07-1922:34cflemingGreat.#2017-07-1922:34cfleming@wilkerlucio That’s https://github.com/cursive-ide/cursive/issues/1789 BTW#2017-07-2001:29cfleming@mfikes Thanks, I’m interested to know if it’s any better, or at least not worse, and if the completion etc is noticeably worse.#2017-07-2001:30mfikesI’m running your beta version. Will let you know. Hah, I actually realized I needed to upgrade my Cursive license. I actually had license number 6. 😀#2017-07-2001:30mfikes(Meaning the 6th license you sold.)#2017-07-2001:30cflemingNice 🙂#2017-07-2001:30cflemingThat’s some fast work.#2017-07-2001:36mfikesFWIW, I’ve started using “hippie” completion in IntelliJ, where it simply cycles through directly-entered textual completions, rather than popping up the little completion GUI. It seems to give slightly different results, but I like it.#2017-07-2001:37cflemingIt’s probably useful for CLJS I guess, where the interop completion is still not so useful.#2017-07-2001:37cflemingI’m going to add type inference soon, so hopefully that will make it much more useful in the presence of mild annotation (like the new auto externs stuff)#2017-07-2001:39mfikesCool! It will be interesting to see how Cursive type inference compares to what exists internally in the ClojureScript compiler.#2017-07-2001:40cflemingRight, with all the new Node stuff I should be able to take advantage of the DefinitelyTyped stuff that Typescript uses too.#2017-07-2001:40cflemingThat would probably help React Native apps a lot.#2017-07-2001:41mfikesIf Cursive starts with simple things like marking the string in (+ 2 "a") that will be amazing 🙂#2017-07-2001:42cflemingIs + hinted to only accept a number?#2017-07-2001:42mfikesThe macro is, in ClojureScript. It has meta, I believe, something like ::ana/numeric#2017-07-2001:42cflemingI think CLJS supports JSDoc hints, right? But I don’t see them being used at all.#2017-07-2001:43mfikesI think those were suggested a few years ago, perhaps related to some stuff that Closure could help with#2017-07-2001:44cflemingRight, the wiki page makes it sound like it’s a thing, but I couldn’t find any examples in the CLJS project itself (which is where I would have expected them).#2017-07-2001:44mfikesEven if Cursive had a roughly equivalent type inference engine matching what ClojureScript has, it would be nice to see it statically doing it in the UI.#2017-07-2001:44cflemingYes, that works well for Clojure, although there’s a lot more I could do with it. It’s mostly used for completion right now, not for inspections.#2017-07-2001:45cflemingBut it’s possible to catch things like (instance? x String) now, which would help me a lot - I always get that wrong.#2017-07-2001:48mfikesHere is the bit that essentially means “this operation works on numbers” so that that ClojureScript compiler can detect type mismatches: https://github.com/clojure/clojurescript/blob/master/src/main/clojure/cljs/core.cljc#L1021#2017-07-2001:49cflemingBut that’s only typing the result, not the params, right?#2017-07-2001:49mfikesIt is the params being constrained#2017-07-2001:50cflemingDoes that also constrain the result type?#2017-07-2001:50mfikes(It is not a normal type hint, but a mechanism the analyzer uses to emit :invalid-arithmetic warnings)#2017-07-2001:50mfikesThe one place where result types are heavily type-hinted is ^boolean#2017-07-2001:50cflemingOk, interesting - I should be able to use that, yes.#2017-07-2001:51cflemingRight, because of the truthiness performance.#2017-07-2001:51mfikes(This is so that it can do unchecked if evaluations`)#2017-07-2001:52mfikesThe recent addition on master to check types passed to aget and aset is essentially custom code inside the analyzer that has been hard-coded to know what those core functions accept.#2017-07-2001:53cflemingRight. dnolen was actually talking about using spec for the CLJS project, but I suspect that’s a long-term goal.#2017-07-2001:53cflemingSo the arithmetic warnings are actually produced by the CLJS compiler? Or does it create hints which allow Closure to catch them?#2017-07-2001:54mfikesYes, if s/fdef was being used, the analyzer could probably detect a lot of stuff statically 🙂#2017-07-2001:54mfikesRight, the arithmetic warnings are generated when it looks at the AST.#2017-07-2001:54mfikes(It is in the analyzer part of the compiler)#2017-07-2001:57mfikesHere is the point where the analyzer is looking at the js* special form that + expands to, and doing arithmetic type checks: https://github.com/clojure/clojurescript/blob/master/src/main/clojure/cljs/analyzer.cljc#L3026#2017-07-2001:59mfikesThat essentially results in type checks for macros, and recently this was added that allows a similar thing to be done for functions: https://github.com/clojure/clojurescript/blob/master/src/main/clojure/cljs/analyzer.cljc#L3467-L3479#2017-07-2001:59mfikesThe salient aspect is that it is all being done by looking at the inferred types in the AST and checking to see if function invokes are valid given things that mark what those functions require.#2017-07-2002:01cflemingNice.#2017-07-2002:01cflemingAnd that’s a static check during compilation, right?
#2017-07-2002:01cflemingWhat happens when the compiler doesn’t have enough information?#2017-07-2002:02mfikesThe cool thing is the type inference is in there (it knows what the types are, if it can infer them). The uncool thing is it doesn’t know what parameters need to be. That will take spec, I guess.#2017-07-2002:02cflemingi.e. (defn foo [arr elem] (aget arr elem))#2017-07-2002:02mfikesYes, it is done during the analysis phase of compilation. It has to be conservative and not emit diagnostics if there is not enough informatino.#2017-07-2002:02cflemingRight.#2017-07-2002:03cflemingThe tricky part about type inference is that it’s much more powerful if you infer function param types from call sites, but it’s difficult to do that in a performant way.#2017-07-2002:03mfikesRight, in that example, arr and elem are of type 'any and will be assumed to be valid arrays, via this bit here https://github.com/clojure/clojurescript/blob/master/src/main/clojure/cljs/analyzer.cljc#L2998#2017-07-2002:04cflemingAh, I see - interesting, thanks.#2017-07-2002:04mfikesYeah, so it only catches gross type mismatches. It is very easy to have code where you can say nothing about its correctness.#2017-07-2002:05cflemingActually, I saw the other day that it looks like there are some clj-* type tags too, but I couldn’t find any examples of them. Do you know what they’re about?#2017-07-2002:06mfikesI’ve seen clj-nil but I haven’t gained an appreciation for what it is really#2017-07-2002:06cflemingI can’t find the code now#2017-07-2002:08cfleminghttps://github.com/clojure/clojurescript/blob/master/src/main/clojure/cljs/compiler.cljc#L964#2017-07-2002:08cflemingLooks like clj clj-or-nil clj-nil#2017-07-2002:08mfikesHah, even some rudimentary checks would be nice. It is surprising how often code is committed that has calls with incorrect arity. A common example is (ex-info "hello"), which no Cursive user would commit. 🙂#2017-07-2002:09cfleming🙂#2017-07-2002:09cflemingYes, the arity checking was a huge bang for the buck.#2017-07-2002:18erichmondI had license 85, and I thought I was hot stuff @mfikes 😂#2017-07-2008:18cflemingFor those of you using parinfer, there’s a new demo up of a new Smart Mode, which will hopefully replace the Indent/Paren mode distinction. Please try it out and let us know what you think: https://shaunlebron.github.io/parinfer/demo#2017-07-2008:19cflemingcc @puzzler, I know you were interested in this: ^^#2017-07-2008:20cflemingI’m hoping to get this into a Cursive dev build soon so I can try it for real work, but it seems very promising. There are a few edge cases to investigate, but it’s looking very nice IMO.#2017-07-2406:11richard-nagelmaekerHow do you run clojure.main/repl in the cursive repl? When I try a window pops up asking for an input string. I have no clue what to enter or how to remove this window. Any ideas?#2017-07-2406:31richard-nagelmaekerI'll see if a remote repl works for me. For now this should be a good work around. Í'll let you know if I have further issues. For now consider my previous question as solved#2017-07-2415:43bfabry@richard-nagelmaeker I think the cursive repl would probably rely on nrepl#2017-07-2420:31erichmondHm. What governs this remote maven repo stuff? Cursive? Or the IntelliJ subsystem? I ask because my computers seem to forget the indexed repos all the time. Also, it tries to index the datomic repo that is PW protected. Does anyone else have these kinds of issues?#2017-07-2422:52cfleming@richard-nagelmaeker When you’re configuring your REPL run configuration, there’s an option there “Use clojure.main in normal JVM process”#2017-07-2422:53cfleming@erichmond The indexing is done by IntelliJ as part of the Maven plugin.#2017-07-2422:53cflemingI’m not sure why it should forget the indexed repos, that’s very strange.#2017-07-2422:55cflemingThere is a possible workaround for the authentication issue here: https://groups.google.com/d/msg/cursive/pWA528YDTIU/bZa7f-NEAQAJ, but I never got any feedback on whether it worked or not.#2017-07-2422:57erichmondThanks brother! I’ll look into this. Continued thanks for making Cursive! Incredible project.#2017-07-2423:43cfleming@erichmond Thanks! I’m glad it’s working well for you 🙂#2017-07-2502:20cfleming@miikka https://github.com/cursive-ide/cursive/issues/1798#issuecomment-317598933#2017-07-2507:37val_waeselynckIs there an easy way to save the last REPL output to clipboard?#2017-07-2507:54richard-nagelmaeker@bfabry @cfleming thanks for the response.#2017-07-2508:46cfleming@val_waeselynck No, but that would be a nice improvement: https://github.com/cursive-ide/cursive/issues/1819#2017-07-2510:36val_waeselynck@cfleming thanks, can't wait to have it 🙂#2017-07-2518:18zyloxis it recognizing it as clojure at all? I don't use boot but the fact that it doesnt recognize defn- seems odd.#2017-07-2518:51dadairyeah that seems odd#2017-07-2518:52dadairtangental: anyone know how to get cursive to recognize clara-rules macros and bindings?#2017-07-2518:52pupenoNo, I don’t think it’s recognizing Clojure at all.#2017-07-2518:58zylox@dadair no, unfortuatnly it doesnt recognize clara rules at all yet#2017-07-2518:58zyloxbest ive been able to do is to set them to resolve as defs#2017-07-2518:59zylox@cfleming has talked of taking a crack at them but they are non trivial as im sure you know#2017-07-2519:14zyloxthough the crowd of people wanting it seems to grow every day#2017-07-2522:20cfleming@pupeno Cursive doesn’t like files not being under a source root. I think a lot of boot folk symlink it inside one to help.#2017-07-2523:39jeremys@pupeno Hey mate take a look there https://github.com/boot-clj/boot/wiki/For-Cursive-Users It is a tuto that explains how to setup a task to generate a project.clj from your build.boot. It get deps so cursive can index them, pulls boot.core so you can autocomplete boot stuff, sets the sources and resources path from your config telling cursuve where your sources are... quite handy.#2017-07-2609:15pupeno@cfleming @jeremys thanks, I'll look into that.#2017-07-2609:16pupenoIs there a way to select all the expressions inside a do, but not the do itself? For example: (do (foo) (bar)) just select (foo) (bar).#2017-07-2609:19cflemingNot an immediate nice one, no.#2017-07-2609:19cflemingThere’s an issue out there for extending the selection laterally to sibling forms.#2017-07-2617:33sgerguriIs IDEA 2017.2 safe to use with Cursive or do people still suffer from the function/arity detection wonkiness as reported a while ago?#2017-07-2617:57royalaidIf you have JetBrains toolbox installed you can upgrade and test. If the update breaks stuff then you can rollback. Also it works on my machine as well#2017-07-2617:34sgerguriI’d like to upgrade but I don’t want to risk breaking my setup on my work machine as I need it fully operational for my day-to-day stuff.#2017-07-2617:38rarousworks on my machine#2017-07-2620:35danielcomptonI'm on 2017.2, there was a little bit of wonkiness with upgrading settings where some of the styling ones were lost (not Cursive's, just general IntelliJ ones)#2017-07-2620:35danielcomptonBut other than that it's fine#2017-07-2621:15wilkerlucioworking fine here too#2017-07-2621:40d5pyeh everything good with 2017.2 / cursive for me as well , did the upgrade earlier today#2017-07-2706:35sgerguri^ Thanks guys, much appreciated!#2017-07-2714:44mishaI know how to close random dialogs in IDEA w/o touchpad: alt will underline action letters on the buttons#2017-07-3113:35luke.defeohey guys liking the newish update with autocompletion for the project.clj. Is there a way for cursive to add too the classpath of a running repl without a manual restart of the whole thing?#2017-07-3117:07royalaidYou can get a good 80/20 return with https://github.com/pallet/alembic and load-project or distill. Would recommend making it a repl command#2017-07-3119:21cflemingRight, this is the best way right now. I’m planning to integrate this better into Cursive soon.#2017-07-3113:46paudoHi @cfleming, I’m suffering from https://github.com/cursive-ide/cursive/issues/1505 - Invalidate caches/restart of no help. On 2017.2 and 1.6.1-eap2. Have had this for a good while I would say, finally doing something about it 😁 Anything I can do to help diagnose?#2017-07-3120:08rgdelatoSorry if this is an obvious question, I'm pretty new to Cursive and IntelliJ in general. How do I enable Joker linter in Cursive?#2017-08-0100:58cfleming@rgdelato So there’s no way to use an external linter in Cursive right now, you’d have to use it externally from lein or something similar.#2017-08-0100:59cflemingI’m not sure what Joker’s linter provides, but my understanding is that it provides similar checks to the ones Cursive does.#2017-08-0100:59cflemingCursive is actually still relatively limited in its checks, I have plans to add more but it’s in a long queue 🙂#2017-08-0100:59cflemingIf there’s something Joker does that you’re missing, I’d be interested to know about it.#2017-08-0101:00rgdelatoAh, I see. Roman had tweeted this at me and it looks like I misunderstood what he meant: https://twitter.com/roman01la/status/892068553888813058#2017-08-0101:00rgdelatohttps://twitter.com/roman01la/status/892068704791519233#2017-08-0101:00cflemingOk, looks like he’s saying there that Cursive already does the same thing.#2017-08-0101:00cflemingCursive’s main problem is false positives due to macros.#2017-08-0101:01rgdelatoJoker has the same problem, but you can add macro names to a .joker file to exclude them. I guess Cursive also has a way to easily add exclusions?#2017-08-0101:02cflemingSo, not really, no - that’s actually a pretty hard problem. How does Joker handle that?#2017-08-0101:02cflemingActually, let me read the doc, one sec.#2017-08-0101:08rgdelatoanyway, sorry for the confusion, I was just trying to figure out what Roman was referring to#2017-08-0101:08cflemingOk, so that’s interesting. What it looks like the .joker file contains is a list of forms which are macro forms, and it then won’t warn you about those.#2017-08-0101:09cflemingBut that’s only solving part of the problem - say you have a new let like form, that will create new local bindings that the linter will also need to know about it, and there’s no good way that I can think of to communicate that.#2017-08-0101:10cflemingCursive handles the case described in the Joker doc like this: https://cursive-ide.com/userguide/macros.html#2017-08-0101:11cfleming@rgdelato ^^#2017-08-0107:44cfleming@paudo I’ll check the code and try to come up with a plan to diagnose that - I’ll let you know.#2017-08-0107:59paudoSo, I fixed it by deleting the IntelliJIDEA directories from Library/Application Support, Library/Caches, and Library/Preferences. Then I broke it again by re-importing my settings!#2017-08-0108:09paudoFixed it again by deleting Library/Preferences and then broke it again by importing all setttings except CursiveIde.#2017-08-0108:10val_waeselynckIs there a way to prevent IDEA from freezing when entering big-ish commands in the REPL ?#2017-08-0108:10val_waeselynck(like a few dozens LoC)#2017-08-0108:15paudo@cfleming Importing just CursiveIde settings does not break it! I’m now going to import settings one by one until it breaks.#2017-08-0108:20paudoImporting IntentionManager settings breaks it again. I can export just the IntentionManager settings and attach the jar to the GitHub issue.#2017-08-0108:25paudoActually this looks pretty straight-forward! intentionSettings.xml contains only the following:#2017-08-0108:25paudo
<application>
  <component name="IntentionManagerSettings">
    <ignoreAction name="Clojure/Resolution" />
  </component>
</application>
#2017-08-0108:28paudoRemoving <ignoreAction name="Clojure/Resolution" /> fixes the issue. Not sure how I ended up with that!#2017-08-0108:33cfleming@paudo That’s really weird. I’ll investigate that tomorrow.#2017-08-0108:34cflemingWhat I suspect is happening is that when an item ends in “…”, it makes it look like you should expand the menu out to the right with the arrow. I’m not sure how to communicate that you need to select it with enter, but that that will lead to more actions.#2017-08-0108:35cflemingOnce the menu has been expanded out, there are some disable actions there that it’s probably easy to select by accident - I’ll see if I can make that happen tomorrow.#2017-08-0108:56paudoThat’s probably it alright. At least I know where to go if it happens again.#2017-08-0119:27wilkerluciois there a way to run a REPL command on file save?#2017-08-0122:48cfleming@wilkerlucio In general, IntelliJ doesn’t have on-save actions, since it saves automatically at unpredictable times. But if you execute a REPL command, the files will be saved then.#2017-08-0122:48cflemingWhat are you trying to achieve?#2017-08-0200:25wilkerlucio@cfleming I'm trying to find a way to automatically have (s/instrument) to run when I change my files, so in dev time I have the functions always instrumented, ideas?#2017-08-0808:52cjmurphy@wilkerlucio: To have all functions always instrumented during development see: https://stackoverflow.com/questions/45501284/how-to-turn-on-cljs-spec/45503246#45503246#2017-08-0811:24wilkerlucio@U0D5RN0S1 thanks, that's a cool trick 🙂 what I have done is change my "Load current file on REPL..." keymap, now instead I'm using a REPL command that runs (s/instrument) and load the current file, so now every time I reload a file I get the instrumentation 🙂#2017-08-0200:49cfleming@wilkerlucio Hmm, I can’t think of a better way to do that than an explicit REPL command.#2017-08-0203:07wilkerlucio@cfleming I'm wondering if there is something I can hook up at REPL level, do you know if there is any trigger for file loaded there that I could hook on?#2017-08-0203:11cfleming@wilkerlucio The thing is, you’ll have to run an action of some sort anyway to load your code in the REPL, right?#2017-08-0203:11cflemingSo couldn’t you create a REPL command for (s/instrument) which syncs your files?#2017-08-0203:13wilkerluciohumm, I guess you right, the only issue is see here is that my need for (s/instrument) is project dependent, so can be a bit annoying to keep changing the keymap,#2017-08-0203:14wilkerluciobut maybe I can just make the command safe to run when spec is not available, I'll give a shot, thanks for the suggestion 🙂#2017-08-0220:52pelletier@cfleming feature suggestion: a button in the REPL panel that stops the REPL and starts it again.#2017-08-0222:52bfabrylol... I would use that more often than I'd care to admit#2017-08-0305:26cfleming@pelletier @bfabry Yeah, that should definitely work - the way those buttons work in the REPL is confusingly different to how the standard run panel buttons work.#2017-08-0513:57jeremysHello, I was wondering if there is a way to control the classpath used in repls that run in clojure.main. It seems to me the general dependencies from project.clj are automatically in. Using figwheel-sidecar in a normal jvm process I’d rather have this dependency under my lein dev profile than the general deps...#2017-08-0809:03cjmurphyI just discovered 'Tools / REPL / Jump to REPL editor'. Can this command have a keybinding? I have tried to give it one by going to 'File / Settings / Keymap / Clojure keybindings'. When there I found that 'Jump to REPL editor' existed, but unfortunately didn't seem to be selectable/editable. And is there a standard keybinding for this command? (I'm going to use F12 is there is no standard).#2017-08-0809:23cfleming@jeremys Yes, in your REPL run configuration you can specify the profiles it should use to build the classpath.#2017-08-0809:23cfleming@cjmurphy Yes, you should be able to bind that, but for changing individual bindings you want File-&gt;Settings-&gt;Keymap. You can search for it there and assign it a key.#2017-08-0809:24cflemingI don’t think there’s a standard binding, no.#2017-08-0812:52jeremysHey @cfleming that’s the thing, figwheel’s wiki recommands the use of the third repl option “use clojure.main in normal jvm process”. When I use this repl the profiles selection textfield is disabled... https://github.com/bhauman/lein-figwheel/wiki/Running-figwheel-in-a-Cursive-Clojure-REPL#2017-08-0813:59Garrett HopperHas anyone else had trouble with Intellij/Cursive reformatting cljc conditionals incorrectly?#2017-08-0817:26jffryYeah, I've definitely run into this as well. Only happens sometimes for me, haven't had enough time to tinker yet to narrow down when it's wrong#2017-08-0817:44Garrett HopperHmm, ok. It seems very random about when it breaks.#2017-08-0817:46Garrett HopperIt seems to be strongly dependent on the positioning of the conditional.#2017-08-0820:48cfleming@U5JUDH2UE If you have example cases, I’d appreciate an issue with them.#2017-08-0820:48cflemingThere’s one about the ns form out there, one sec…#2017-08-0820:50cfleminghttps://github.com/cursive-ide/cursive/issues/1014#2017-08-0917:38Garrett HopperThat's actually exactly the issue I'm running into. Thanks!#2017-08-0817:11mishaI have a bunch of expanded keywords in a file. Is there a way to replace those with short alias? Or am I overthinking it, and find/replace would work just fine?#2017-08-0817:36zyloxseems like something easy to test#2017-08-0817:46Garrett HopperIt seems to be strongly dependent on the positioning of the conditional.#2017-08-0818:49Joe R. SmithIs it possible to get Parinfer w/ Cursive to re-indent subsequent forms when adding new forms before them? i.e., If I have a form that contains another form (e.g., a map) that is on multiple lines and I add a form before the map it’d be nice if it re-indented the map entries on subsequent lines, preferably while I type.#2017-08-0818:56jjfineif it did that, how would you input a form that didn't contain that map?#2017-08-0819:03Joe R. Smith@jjfine the idea is not changing the structure of subsequent forms when adding a new form in front of it#2017-08-0819:05Joe R. Smithe.g.:
(myfunc {:a 2 
         :b 3})
now if I add a symbol in front of that map, parinfer will do this:
(myfunc blah {:a 2}
        :b 3)
#2017-08-0819:05jjfineOh yeah that would be nice#2017-08-0819:05Joe R. Smithyeah, hard to explain in words#2017-08-0820:42cfleming@solussd @jjfine That’s actually handled by Parinfer v3's new smart mode, which we’re working on right now - I’m hoping to integrate that for testing this week.#2017-08-0820:42Joe R. Smith@cfleming awesome! I can’t wait to try it.#2017-08-0820:43cfleming@jeremys Oh right, sorry - there’s actually an issue out there to allow running that REPL via lein to allow profile selection.#2017-08-0820:44cfleming@solussd You can try it out here: https://shaunlebron.github.io/parinfer/demo#2017-08-0820:44cflemingFeedback very welcome#2017-08-0820:44Joe R. Smithyes, that is exactly what I want.#2017-08-0820:45jeremys@cfleming ok cool I’ll track down the issue#2017-08-0820:46cfleming@jeremys When running the clojure.main REPL, it uses the classpath of your project as seen by IntelliJ. You can control how that is created by setting the profiles Cursive uses to create that.#2017-08-0820:47jeremysOh really!#2017-08-0820:47cflemingThat’s in the Leiningen toolwindow - View-&gt;Tool Windows-&gt;Leiningen#2017-08-0820:48cflemingThere’s a profiles entry where you can select the profiles it should sync to the classpath. Adjust those, and then hit refresh (I can’t recall if that’s required or not, I think so)#2017-08-0820:48jeremysoh nice It was under my nose... Thx Colin.#2017-08-0820:58yediI'm having the most annoying issue#2017-08-0820:58yedirandomly cursive will stop formatting my CLJS code like it normally does#2017-08-0820:59cfleming@yedi Can you send a screenshot?#2017-08-0821:00yedi
(defn [args]
  nil)
will start indenting as
(defn [args]
      nil)
#2017-08-0821:00yedimaybe formatting was the wrong word, but the indentation behavior will rbeak#2017-08-0821:00yedito fix it id have to invalidate cache and restart#2017-08-0821:00yedibut it happens pretty often now#2017-08-0821:00cflemingThat’s probably a problem with your indexes - oh, ok, you’ve tried that 🙂#2017-08-0821:00cflemingUmm#2017-08-0821:01yedii can't figure out whats causing it to get in that state#2017-08-0821:01cflemingIs everything resolving ok, or are you seeing a sea of yellow?#2017-08-0821:01yediyea im getting fn cannot be resolved#2017-08-0821:01cflemingOk, that’s the problem#2017-08-0821:02cflemingIs your file under a source root? Blue folder in the project view?#2017-08-0821:02yedithe src folder is blue#2017-08-0821:03yediand the files is nested deeply within#2017-08-0821:03cflemingOk, good.#2017-08-0821:03cflemingDo you have ClojureScript as a dependency of the module? File-&gt;Project Structure-&gt;[your module]-&gt;Dependencies#2017-08-0821:04yediah apparently not#2017-08-0821:04yedihow do i add it#2017-08-0821:05cflemingHow did you create the project? With lein?#2017-08-0821:05yediyep#2017-08-0821:06cflemingAnd you have CLJS in your :dependencies?#2017-08-0821:09yediyea#2017-08-0821:09yedi[org.clojure/clojurescript "1.9.671" :scope "provided"]#2017-08-0821:10yedinot sure what :scope "provided" does tho#2017-08-0821:11cflemingThat’ll give it to you in the editor but not in any artifacts you create - unless you have a good reason for it being there, I don’t think you need it, but obviously I don’t know your project.#2017-08-0821:12cflemingDoes refreshing your project (View-&gt;Tool Windows-&gt;Leiningen-&gt;[refresh button]) fix the problem?#2017-08-0821:13yedinope#2017-08-0821:13yediit also says there are no lein projects to display#2017-08-0821:13cflemingOhhh#2017-08-0821:13cflemingThat’s the issue - weird.#2017-08-0821:13cflemingIn your project view, right click your project.clj and Add as Lein project#2017-08-0821:17yediah k, that appears to have fixed it#2017-08-0821:17cflemingYou’re supposed to get a warning when that happens, I’ll check that’s working.#2017-08-0821:18yedithanks so much for all the help#2017-08-0821:18cflemingNo problem! Sorry for the hassle.#2017-08-1009:34joelsanchezHi! Does anyone know how can I remove a sexp without copying it? Right now I'm using Cursive's "Kill" action but it's more similar to "cut" than to "remove"#2017-08-1010:13cfleming@joelsanchez Hmm, I don’t think so, apart from selecting it and deleting it.#2017-08-1010:13cflemingYou can copy without killing, but not kill without copying.#2017-08-1010:19joelsanchez"Extend selection" and Supr will do it, thanks!#2017-08-1012:42mishagreetings, @cfleming, when I rename alias, it does not rename any related keywords in the same file. Should I file a bug?#2017-08-1012:45misha
(alias 'f 'foo.bar)
::f/baz
;=>
(alias 'foo 'foo.bar)
::f/baz
; expected:
::foo/baz
#2017-08-1021:54cfleming@misha Yes please, I actually thought there was one already but I can’t find one.#2017-08-1106:23mishahttps://github.com/cursive-ide/cursive/issues/1826 existing one was about :as aliases in ns form.#2017-08-1414:28richiardiandreaHello Colin + folks! Where can I find how to configure ClojureScript + Cursive? I tried the User Guide but could not find it#2017-08-1419:01wilkerlucio@cfleming this is something that tricks my head, why the kill sexp does a copy? I really only expect it to "kill", this is quite annoying to be honest =/#2017-08-1420:49danielcompton@richiardiandrea Cursive works for editing/inferring CLJS by default, what are you trying to do with CLJS? I'm not so sure about CLJS REPLs#2017-08-1420:50danielcompton@wilkerlucio I think this is the behaviour that paredit has on Emacs and other paredit implementations#2017-08-1420:52richiardiandreaI guess my colleagues' goal is to evaluate thing in a node repl.. #2017-08-1420:53danielcomptonnot sure sorry, I haven't done much with the CLJS REPL in Cursive, but would love to do more with it#2017-08-1421:22richiardiandreaI am going to try shadow-cljs and report back#2017-08-1421:23richiardiandreaThomas Heller has done a very good job with nRepl support it seems#2017-08-1422:19cfleming@wilkerlucio @danielcompton Right, I basically copied Emacs’ behaviour here.#2017-08-1422:19cfleming@richiardiandrea I’m interested in experience reports, there’s also: https://github.com/bhauman/lein-figwheel/wiki/Running-figwheel-in-a-Cursive-Clojure-REPL#2017-08-1422:20cflemingImproving the CLJS REPL story is the next major thing I’m going to work on after finishing what I’m currently doing.#2017-08-1509:29richiardiandrea@cfleming shadow-cljs's REPL is really promising for ClojureScript...I am going to try in the next few hours#2017-08-1509:31richiardiandreathe only thing is port detection, having to insert the port every time is a bit odd...I guess I could link .nrepl.port to the shadow-cljs.port file#2017-08-1509:48richiardiandrealinking to .node-repl works fine, I reported my experience here: https://github.com/thheller/shadow-cljs/issues/83#2017-08-1514:35souenzzoFeature idea: (printf "foo: %s\n bar: %s\n" fo|o bar) where | is the cursor. Highlight matched %s (and vice-versa)#2017-08-1517:07fingertoeWhen my Cursive REPL is supposed to print a string with a series of several “DESCRIPTOR (SOMETHNG)” in it, It displays the first line then <7 internal calls> I can click and expand to see the whole thing.. Anyone know why it is doing that?#2017-08-1518:55Garrett HopperCursive doesn't seem to mark :source-paths in :uberjar profile as source roots? Only :dev ones are marked properly. I can do it manually through Intellij Project Settings, but it gets reset whenever I refresh the Leiningen project. Any ideas?#2017-08-1522:08cfleming@ghopper You can set the profiles that Cursive will use when syncing the project info in the Leiningen toolwindow - View-&gt;Tool Windows-&gt;Leiningen, then open the Profiles tree.#2017-08-1522:08cfleming@fingertoe I’m not sure I understand - are you printing a stacktrace?#2017-08-1522:09cflemingIf you’re not, it looks like Cursive is interpreting it as one and folding it.#2017-08-1602:55cfleming@fingertoe Right, I think that that is being matched by the regular expression regex.#2017-08-1602:57cflemingI’ll add some tests to try to fix that. In the meantime you can disable Settings-&gt;Languages &amp; Frameworks-&gt;Clojure-&gt;Prettify stacktrace elements using folding as a workaround.#2017-08-1603:15fingertoeThanks!#2017-08-1811:08joelsanchezare there any plans for improving macro support / any existing solutions that i don't know about?#2017-08-1811:08joelsanchezright now any var that's created by a macro goes unrecognized by cursive#2017-08-1818:27Garrett HopperAh, thanks!#2017-08-1820:38bfabry@joelsanchez this is the purpose of stub generation. though it doesn't seem to have had much movement in a while#2017-08-1822:55cfleming@joelsanchez Depending on how those vars are created, there are some options. If they’re created using def-like things, then https://cursive-ide.com/userguide/macros.html can help.#2017-08-1918:36dm3@cfleming what’s the easiest way for me right now to fix this issue: https://github.com/cursive-ide/cursive/issues/1670?#2017-08-2021:38yonatanelHad anyone stripped down intellij enough for it to be fun again?#2017-08-2022:27cfleming@yonatanel I think you’ll have to be more specific about what isn’t fun.#2017-08-2101:19sgerguri@yonatanel Nobody’s forcing you to use it if you don’t find it fun. There’s always Emacs or Vim with its myriad plugins and manual (re)configurations, for a different kind of “fun”.#2017-08-2108:13yonatanelIts initial loading is slow, and it probably has too many plugins or things it's doing that I don't need. I'm definitely not moving away from it or cursive so I wondered if you have any experience making intellij lighter and more to the point.#2017-08-2108:14cfleming@yonatanel You can disable plugins you’re not using at Settings-&gt;Plugins#2017-08-2108:14cflemingIt’s generally a good idea to disable ones you’re not using.#2017-08-2108:14cflemingYou can always re-enable them later#2017-08-2108:19cflemingOne thing that I may do at some point is to create a standalone Cursive like PyCharm#2017-08-2108:19cflemingBut that will be mostly just like Community edition with selected plugins.#2017-08-2108:21yonatanelSo removing plugins is the most significant way of reducing load?#2017-08-2108:23cflemingProbably, yes. You can also enable Power Save Mode, but that will reduce functionality, which may not be what you want.#2017-08-2108:23cflemingIt’s probably worth trying, though.#2017-08-2108:30cflemingIn the end, though, IntelliJ just does a lot of stuff.#2017-08-2108:56yonatanelOk, maybe I should also add more key bindings for more "fun"#2017-08-2109:24cflemingIf you can give me a better idea of what you feel like is missing, I may be able to help more.#2017-08-2110:55sgerguri@yonatanel Removing plugins is especially crucial if you have the Ultimate edition, which comes with a lot of them enabled by default. I do mostly Clojure with a view of some front end stuff on the horizon so that’s what I have enabled. Everything else - including a lot of the Java stuff - is disabled in my setup. From my personal experience I can say that it makes a lot of difference.#2017-08-2111:23yonatanelI did just now disabled most of the plugins. Not sure how fast it became. Intellij is still indexing the world etc. I think initialization is the pain point, splash screen, stealing focus while things are loaded, then indexing. I can probably config some of it#2017-08-2111:32sgerguriYeah, that’s the annoying bit. Which is the reason why I generally don’t bother shutting IDEA down at all.#2017-08-2111:33sgerguriA lot also depends on how fast your machine is. Quad Core i7, 16 GB RAM and a PCIe SSD does help with speeding things up.#2017-08-2119:44souenzzoError loading complete.core: Could not locate complete/core__init.class or complete/core.clj on classpath. Anyone else getting this message? (not sure if related to cursive)#2017-08-2122:19yonatanelIs socket repl integration coming soon (i.e. weeks)? :)#2017-08-2122:47cfleming@yonatanel Yes!#2017-08-2122:48cflemingI’m working on parinfer right now which is proving harder than I expected. After that it’s REPLs.#2017-08-2123:57cfleming@souenzzo I don’t think that’s Cursive related, Cursive doesn’t use a complete.core namespace.#2017-08-2211:51pupenoWhat is Clojure Application for in the Run/Debug Configurations?#2017-08-2213:41wilkerluciomorning, I remember in Cursive to navigate to test path, there was a configuration somewhere to set regex on how to find the test source from the file, can someone remember me where that was please?#2017-08-2215:07souenzzoJust changed my intellij -Xmx from 750 to 2048. No more lags 🙂#2017-08-2215:24erichmond@souenzzo where do you do that?#2017-08-2215:26souenzzovim ~/idea-IU-171.3780.107/bin/idea64.vmoptions on my machine#2017-08-2215:27erichmondLinux? or OS X?#2017-08-2215:28erichmondnvm, found it, thanks!#2017-08-2215:25erichmondthat setting#2017-08-2216:41tayloris there a shortcut for vertically aligning map key/values? I notice it happens automatically when I do certain refactorings#2017-08-2216:44taylornevermind, found it! (It’s just “Reformat Code”)#2017-08-2221:03cfleming@wilkerlucio Settings-&gt;Langs &amp; Frameworks-&gt;Clojure-&gt;Test integration#2017-08-2221:05wilkerlucio@cfleming that was it, thanks 🙂#2017-08-2221:15sashtonI noticed that indentation in cljs files is incorrect if I don’t include [org.clojure/clojurescript _] in my lein :dependencies. What is the link there? Is that an explicit search which Cursive does of the lein project?#2017-08-2221:17sashtonContext: I’m writing a namespace to be executed with lumo, so I wasn’t planning on doing much with lein#2017-08-2221:27wilkerlucio@sashton I believe cursive needs that in order to index the cljs namespaces, without the cljs dep all cljs namespaces get to be unknown#2017-08-2222:51cfleming@sashton Right, @wilkerlucio is correct. There isn’t a great way to use Lumo right now, although I’ve discussed it with Antonio (and with Mike for planck support) and I’m planning to add that soon.#2017-08-2222:52cfleming@taylor Right, it’s just reformatting if you have the map alignment option enabled.#2017-08-2222:52cfleming@dm3 Sorry, I’ll look at that issue again and see what I can do or if I have a better suggestion.#2017-08-2222:54sashtonthanks! any chance that other filetypes could also be formatted using typical clojure rules? for example https://github.com/candid82/joker uses clojure-compatible syntax, but *.joke files are similarly not formatted by Cursive.#2017-08-2222:55cfleming@sashton Sure, you can customise that under Settings-&gt;Editor-&gt;File Types#2017-08-2222:55cflemingAgain, it may work annoyingly if you don’t have Clojure added as a dependency.#2017-08-2222:56sashtonah, nice. i’ll give it a try#2017-08-2306:59cjmurphyI'm on Linux and key-mappings that have Meta in them are a bit of a mystery to me. Which key do I press? Or rather do I need to setup a particular key to be this Meta key - for instance the "Windows" key on my keyboard might be a good candidate? As an example (Meta + Alt + K) is Killsexp, but there are quite a few others.#2017-08-2307:15yonatanelIs it possible to set value in debugger? Does it make sense in clojure?#2017-08-2312:07cjmurphyThis reference actually worked quite easily to change the Windows keys to be the Meta key: https://superuser.com/questions/246345/how-can-i-make-my-super-keys-windows-key-behave-more-like-ctrl-alt-shift-in-li.#2017-08-2321:15cfleming@cjmurphy I must admit that I haven’t tried the default bindings much on Win/Linux (I use OSX), and this has been a problem for several people. @pupeno has an alternative set that I will probably make the default set there if people like it better.#2017-08-2321:21cfleming@cjmurphy Here’s the link: https://www.cheatography.com/pupeno/cheat-sheets/cursive-on-windows-sequences/#2017-08-2323:57nwjsmithIs there a "Tidy Namespace" thingy in Cursive?#2017-08-2401:01cfleming@nwjsmith Sadly no, but it’s near the top of my shortlist#2017-08-2401:05cjmurphy@cfleming: Perhaps a sideways comment, but I've never understood why so many have adopted Macs for Clojure development when Linux works fine. There must be a reason...#2017-08-2401:05cfleming@cjmurphy In my case, it’s because I want to use my mac for everything else too, and most user-level things just work better.#2017-08-2401:06cflemingI used to use Linux on the desktop, and every year or so I read a thread on HN about someone’s experience, and they’re always full of problems that I had forgotten ever existed.#2017-08-2401:07cflemingConnecting to printers/scanners/wifi/projectors etc etc.#2017-08-2401:07cflemingSo I put it off till the following year.#2017-08-2401:08cflemingFor development, Linux is at least as good as OSX or perhaps better, but OSX isn’t significantly worse either.#2017-08-2401:36cjmurphyMy only real loss of productivity with Linux for development is consternation trying to decide what to use to give a talk. I know there's something on the Mac, that does the job really well. So far I've always ended up using an old version of https://github.com/MysteryMachine/jobim.#2017-08-2403:27cflemingRight, another thing I take for granted now is a large ecosystem of high-quality applications for pretty much anything I want to do (like create a presentation).#2017-08-2408:04dm3OSX is OK for development. If only it allowed to swap out the default window manager for something more sensible like XMonad#2017-08-2408:04dm3Amethyst is halfway there#2017-08-2502:19danielcomptonWe have several lein projects in one repo. We want to depend on the src of one from several others (a specs project). However when I add ../specs/src to the source-paths of the other projects, Cursive picks up the source path and reorganises the modules so that the specs project is under that module#2017-08-2502:20danielcomptonIf I try and edit the modules I get an error > Module "specs" must not contain source root "[...]/specs/src". The root already belongs to module "service"#2017-08-2502:20danielcomptonIs there abetter way to set this up?#2017-08-2506:49cfleming@danielcompton If you just add the spec project as a dependency of the others, Cursive will add a module dependency and you’ll be able to access the code.#2017-08-2506:50cflemingYou could do that in a cursive profile, perhaps, and then only use that to sync your project in Cursive.#2017-08-2514:59sandbagsIs there a way to get a list of what's in the cursive REPL buffer?#2017-08-2514:59sandbagswithout scrolling back through it?#2017-08-2515:12joelsanchez
(ns something.core
  (:require [something.other :as other]))

::other/a-keyword
As a user I want to be able to use "go to definition" (Ctrl+B) when I put the cursor over ::other/a-keyword Current behavior: nothing happens Expected behavior: Cursive opens the something.other namespace
#2017-08-2521:13cfleming@joelsanchez So something I’ll be adding shortly is the ability for certain keywords to be treated as if they were definitions, e.g. spec keywords#2017-08-2521:13cflemingBut you’d like to navigate to the namespace of arbitrary keywords?#2017-08-2522:53joelsanchez@cfleming yes, provided that the keyword has a namespace and it exists#2017-08-2522:54joelsanchezjust opening the namespace, not searching for definitions or anything#2017-08-2522:55joelsanchezmany times I'm using a keyword from a namespace and I want to visit that namespace to read/change some code#2017-08-2522:57joelsanchezI instinctively press "Ctrl+B" but immediately I see that there's no one to help me and I'm on my own searching for the namespace in an ocean of code#2017-08-2607:48steven_t(not trying to crosspost, but noticed this Cursive channel) hi, I have recently started using Cursive for CLJ / CLJS development and I would like to start the repl from here. For my leiningen project this works with a script/figwheel.clj but I started a test project which uses boot. What is needed to run a boot task for this?#2017-08-2608:15steven_tah, I have noticed that the repl is already used by cljs-dev-tools and dirac....#2017-08-2608:15steven_tWithout it I can connect to the repl form Cursive#2017-08-2608:18steven_t(The code I am trying is a tenzing template with re-frame)
#2017-08-2611:45sandbagsIs it expected to get a lot of "<symbol> cannot be resolved" when using reader conditionals? e.g. str cannot be resolved (from clojure.core)#2017-08-2710:40carocad@cfleming is there anyway in Cursive to have both *print-length* set and pretty-printing? It seems that if I set a print-length the pretty printing gets messed up 😕#2017-08-2713:45carocadjust one other thing that I just noticed. Is it expected behavior for Cursive to autocomplete private functions? I got really confused today when the Compiler threw an exception on some evaluation which was perfectly fine for Cursive#2017-08-2721:30danielcompton@cfleming we're using it as a source dependency only, not publishing it, so that the whole codebase can work off the exact same version#2017-08-2721:30danielcomptonDidn't quite understand about the cursive profile though?#2017-08-2721:30danielcomptonoh, I think I might get it#2017-08-2721:47cfleming@carocad actually, I think I know what’s going on there. Could you file a bug for that, and I’ll look at it?#2017-08-2800:13danielcomptonHow do I set a cursive Lein profile to use that dependency?#2017-08-2800:52danielcomptonIt doesn't seem like the dependency is enough to override the source-paths configuration, it still creates a separate sources root submodule#2017-08-2804:41cfleming@danielcompton What do you mean by using it as a source dependency?#2017-08-2822:28danielcomptonWe have 3 projects in one git repo, client, server, and specs. Rather than constantly releasing versions of the spec project, we want to specify :source-paths ["../specs/src"] so that the project always uses the current version of specs when building#2017-08-2909:43cflemingIf you’re all using Cursive, you don’t need to change the versions of the spec project. Just add a dependency on the spec project, and Cursive will set up a module dependency, which will allow the depending modules to access its source.#2017-08-2909:43cflemingIt sounds like the sort of thing you might use checkouts for, too.#2017-08-2804:42cflemingYou can configure the profiles that are used to sync the project in the Leiningen toolwindow, the profiles that are selected in the profiles tree.#2017-08-2804:47cfleming@carocad There are a couple of issues about private fn completion: https://github.com/cursive-ide/cursive/issues/1449 and https://github.com/cursive-ide/cursive/issues/1643#2017-08-2812:26joelsanchezI think I found a bug: in a test directory, use New -> Clojure Namespace, select ClojureScript test, you get a your-test.cljs file with this:
(ns app.your-test
  (:require [clojure.test :refer :all]))
Note "clojure.test" instead of "cljs.test"
#2017-08-2907:47rarousShould be working fine. Cljs compiler aliases cljs as clojure for simpler cross-platform code.#2017-08-2813:17misha@cfleming greetings, I found an issue with clojure code debugger, do I report it within cursive project, or is it 3rd-party for you?#2017-08-2813:20mishato reproduce: set any breakpoint inside clojure.pprint/print-table, and then try to step over: since print-table defined inside separate file via:
(in-ns 'clojure.pprint)
(defn print-table
IDEA highlights correct line inside wrong file: jar/clojure/pprint.clj, instead of jar/clojure/pprint/print-table.clj
#2017-08-2816:05sandbags@cfleming Is it possible to mess with how Clojure formats vectors across lines? I would like [foo bar\n----baz] rather than [foo bar\nbaz] if that makes sense? I had a look at the Clojure code style parameters and couldn't see anything so I'm guessing not, but never hurts to ask right? 🙂#2017-08-2821:58amannHas anyone seen Visual Studio’s purported Clojure support? Anyone used it? A new-to-clojure-dev just asked for my help therein and it looked hella messed up. Instead of engaging in a Vim/Emacs/Cursive editor war with them, I’m trying to understand what the benefits of it over Cursive are before telling them to come to the light…etc.#2017-08-2822:06cfleming@misha Could you report that in the cursive tracker?#2017-08-2909:09mishahttps://github.com/cursive-ide/cursive/issues/1837#2017-08-2909:17cflemingThanks!#2017-08-2822:07cfleming@joelsanchez Does clojure.test not get mapped to cljs.test with this: http://blog.fikesfarm.com/posts/2016-07-03-clojurescript-clojure-namespace-aliasing.html?#2017-08-2822:08cflemingReading that blog post it should in semi-recent CLJS versions.#2017-08-2822:08cfleming@sandbags No, but if you can create an issue with the behaviour you’d like I’ll look at it.#2017-08-2822:09cfleming@amann I haven’t, no - my impression is that it’s pretty green, but I think someone is working on it actively.#2017-08-2822:09cflemingI don’t know much about it - my impression is that in general Atom would be a better choice just because of proto-REPL#2017-08-2822:11amannyeah, that was my feeling as well#2017-08-2822:11amannthe out of the box auto formatter is…bad…to put it lightly#2017-08-2822:12amannI’ll play with it a lil’ and see if it’s worth a damn#2017-08-3017:49yedihow do you add the cljs sdk to your current project#2017-08-3017:49yedii have a billion warnings#2017-08-3018:08zyloxi dont do cljs but i feel like ive heard people say that if you add it to your project.clj it detects it#2017-08-3019:02yedinvm i just had to add the java sdk#2017-08-3021:04wilkerlucio@cfleming idea, please let me know if you think makes sense: when auto-importing namespaces, Cursive could check if the requires are already in alphabetical order, and if it is, add the new namespace at the correct index (keeping the order), that would help a lot, because of most of the time the requires got out of order because auto-import#2017-08-3109:00ikitommiWould it be possible & good idea for Cursive to evaluate the var meta-datas? I think spec modifies the docstrings and we seem to do the same: https://github.com/metosin/compojure-api/blob/master/src/compojure/api/api.clj#L20-L52. Doesn’t show correctly with Cursive currently.#2017-08-3109:02joelsanchez@cfleming Didn't know that, thanks#2017-08-3109:03joelsanchez@cfleming Got this exception today (didn't affect anything, but it showed up in the logs). Can't really say what I was doing so maybe just ignore it
Exception in thread "ApplicationImpl pooled thread 34" Exception in thread "ApplicationImpl pooled thread 38" Exception in thread "ApplicationImpl pooled thread 32" java.lang.NullPointerException
	at cursive.psi.impl.synthetic.ClJavascriptAlias.getTarget(ClJavascriptAlias.java:132)
	at cursive.psi.impl.synthetic.ClJavascriptAlias.getNavigationElement(ClJavascriptAlias.java:104)
	at com.intellij.psi.impl.light.LightElement.isValid(LightElement.java:111)
	at com.intellij.codeInsight.TargetElementUtil.isAcceptableReferencedElement(TargetElementUtil.java:270)
	at com.intellij.codeInsight.TargetElementUtil.doFindTargetElement(TargetElementUtil.java:240)
	at com.intellij.codeInsight.TargetElementUtil.findTargetElement(TargetElementUtil.java:208)
	at com.intellij.codeInsight.navigation.actions.GotoDeclarationAction.findTargetElementsNoVS(GotoDeclarationAction.java:307)
	at com.intellij.codeInsight.navigation.CtrlMouseHandler.getInfoAt(CtrlMouseHandler.java:523)
	at com.intellij.codeInsight.navigation.CtrlMouseHandler.getInfoAt(CtrlMouseHandler.java:502)
	at com.intellij.codeInsight.navigation.CtrlMouseHandler.access$2200(CtrlMouseHandler.java:103)
	at com.intellij.codeInsight.navigation.CtrlMouseHandler$TooltipProvider.doExecute(CtrlMouseHandler.java:834)
	at com.intellij.codeInsight.navigation.CtrlMouseHandler$TooltipProvider.access$2900(CtrlMouseHandler.java:774)
	at com.intellij.codeInsight.navigation.CtrlMouseHandler$TooltipProvider$1.performInReadAction(CtrlMouseHandler.java:819)
	at com.intellij.openapi.progress.util.ReadTask.lambda$runBackgroundProcess$0(ReadTask.java:66)
	at com.intellij.openapi.application.ReadAction.compute(ReadAction.java:47)
	at com.intellij.openapi.progress.util.ReadTask.runBackgroundProcess(ReadTask.java:66)
	at com.intellij.openapi.progress.util.ProgressIndicatorUtils.lambda$runUnderProgress$5(ProgressIndicatorUtils.java:243)
	at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$2(CoreProgressManager.java:186)
	at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$1(CoreProgressManager.java:170)
	at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:548)
	at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:493)
	at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:94)
	at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:157)
	at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:186)
	at com.intellij.openapi.progress.util.ProgressIndicatorUtils.runUnderProgress(ProgressIndicatorUtils.java:241)
	at com.intellij.openapi.progress.util.ProgressIndicatorUtils.access$000(ProgressIndicatorUtils.java:47)
	at com.intellij.openapi.progress.util.ProgressIndicatorUtils$4.run(ProgressIndicatorUtils.java:192)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:748)
#2017-08-3123:20rgdelato@cfleming Just curious, are you using any particular library for doing auto-formatting in Cursive?#2017-09-0100:37kennyI'm curious about that too ^#2017-09-0100:37cfleming@rgdelato No, IntelliJ plugins have to use the formatting engine it provides, so it’s a custom algorithm.#2017-09-0100:38cfleming@kenny ^^^#2017-09-0100:38cflemingIt’s very powerful, but a bit tricky to get right.#2017-09-0100:38kennyDang, that's unfortunate. I'm finding it's very tricky to work with the way other people format their code.#2017-09-0100:39cflemingI’m planning a mode to make Cursive conform to external standards such as cljfmt, but it’ll be hard to make other systems match what Cursive can do.#2017-09-0100:39kennyI can use something like zprint to enforce a format but then Cursive always changes it back.#2017-09-0100:39cfleming@kenny If you have specific examples feel free to send them over, or other things you’d like to be able to configure.#2017-09-0100:40cflemingWould a flag in Cursive like “zprint mode” work for you?#2017-09-0100:40kennyWhich does what?#2017-09-0100:40cflemingAlthough I think zprint is fairly configurable, right?#2017-09-0100:40kennyVery 🙂#2017-09-0100:40cflemingIt would match what zprint would do when formatting in Cursive.#2017-09-0100:41cflemingHmm, if it’s very configurable, it might be easier to just expose more knobs in Cursive.#2017-09-0100:41cflemingSo that you can match however you have zprint configured.#2017-09-0100:41kennyI think what would be cool is to take a zprint config and map it to IntelliJ algo.#2017-09-0100:42cflemingYeah, but that may be very difficult - lots of edge cases there.#2017-09-0100:42kennyOh yes, definitely not straightforward.#2017-09-0100:42cflemingIn the meantime, if you have particular problems, send them over and I’ll see if I can help.#2017-09-0100:42cflemingFeel free to email if you’d rather not share code snippets here.#2017-09-0100:44cflemingI really need an “anonymize this code snippet” function that replaces all the sensitive names with lorem ipsum or something.#2017-09-0100:44kennySure. I'll compile a list. This is the first time I'll be working with several other devs using various formats and tools, so getting the format flow correct seems important. Not sure what others are doing to avoid the "formatting tag" that can occur.#2017-09-0100:44cflemingGreat, let me know. I’m definitely interested in supporting formatting better since it’s really important for mixed-editor tools.#2017-09-0100:44cflemingAnd so far I haven’t managed complete world domination.#2017-09-0100:45kennygit blame can ignore whitespace, which is helpful. But it's annoying to see basically every file change when changing a file.#2017-09-0100:45kennyBy change I mean turn blue indicating that there are changes that need to be committed.#2017-09-0100:46cflemingBut that should only happen when you actually change the file, right?#2017-09-0100:46cflemingOr are you using parinfer?#2017-09-0100:47kennyYes but you may make several small changes in a number of files and having multiple formats in files seems wrong.#2017-09-0100:48kennySo then you either deal with the wrong feeling or you auto-format the file using Cursive thus creating "format tag."#2017-09-0100:49cflemingYeah, that’s tricky. You don’t have to reformat the whole file though, you can just reformat something like the top-level form you’ve worked on, or even a smaller unit than that if required.#2017-09-0100:49cflemingIt requires care though, for sure.#2017-09-0100:50kennyIt's just not really something I want to think about. I want to solve problems, not worry about my code formatting 😆#2017-09-0100:50cflemingYeah. I’m now totally in favour of languages which enforce a code style (go, Elm).#2017-09-0100:50cflemingIt’s the sort of thing people think they will hate but in practice don’t.#2017-09-0100:50cflemingAnd if they do they should just get over it.#2017-09-0100:51cflemingIt’s too late for Clojure, sadly.#2017-09-0100:53kennyTotally agree. Anyway, I think the solution has to be some variant of zprint. While cljfmt is a very cool, succinct library, it does not come close to the amount of configuration zprint provides.#2017-09-0100:53cflemingYeah, but again I’d rather something opinionated and sensible, so that we can just get on with our lives 🙂#2017-09-0100:54cflemingi.e. “just do it like this, already”#2017-09-0100:56kennyYep. And I don't think strict formatting matters as much in a lisp as it would in a traditional language (e.g. Java).#2017-09-0100:57kennyThat being said, the problem still isn't solved. I think part of the issue is Cursive's autoformatter is not opinionated.#2017-09-0100:58kennyFor example, running autoformat on this
(assoc {} :a
          "a"
          :b "b")
simply aligns all the chars but does not format the code.
#2017-09-0100:58kennyCursive's autoformat is more of an auto-aligner.#2017-09-0101:01cflemingRight, currently it doesn’t mess with newlines at all.#2017-09-0101:03kennyWhich is great for a number of cases. Really it seems like there should be two modes: align & format. Where format does deal with newlines.#2017-09-0101:04cflemingYeah, it’s very easy to end up with an exponential number of rules, though.#2017-09-0101:05cflemingI’ll take a look at the sort of thing zprint allows you to configure.#2017-09-0101:05kennyThis could be an interesting solution: - Create your zprint config - Write a lumo script to run the formatting in your current project - Assign that script to an external tool - Map external tool to a keybinding#2017-09-0101:06cflemingSure, and you can already do that.#2017-09-0101:06cflemingThe issue is that the formatting engine in IntelliJ is also invoked in many other circumstances, such as pressing enter (to work out where to indent the new line) etc#2017-09-0101:08cflemingI’m looking at zprint now - that’s just a silly amount of configuration IMO.#2017-09-0101:08cflemingI’m not sure Cursive will ever allow that much control, just because I don’t think it’s sensible.#2017-09-0101:09kennyRight but IntelliJ's formatting never does anything destructive (as far as I can tell). So as long as you never invoke the autoformatter I think you'd be good.#2017-09-0101:09kennyAnd yeah, I totally agree.#2017-09-0101:10kennyIt's useful because it has a built in "style" for https://github.com/bbatsov/clojure-style-guide.#2017-09-0101:10kennyNo way I'm spending my time reading through the zprint doc and configuring everything I can.#2017-09-0101:11cflemingSeriously.#2017-09-0101:11cflemingIt would take me an afternoon just to read this.#2017-09-0101:12kennyYep. But I think the lumo solution may work.#2017-09-0101:12cflemingThe problem is also competing standards - CIDER now has its own specification format in metadata#2017-09-0101:12cflemingWhich I think cljfmt can be made to respect.#2017-09-0101:14kennyThis? https://cider.readthedocs.io/en/latest/indent_spec/#2017-09-0101:14cflemingYeah#2017-09-0101:16kennyThat is exactly what cljfmt can do. Wonder why they made their own.#2017-09-0101:16cflemingWell, I think it was designed to be interoperable with cljfmt (I can’t remember if they were designed concurrently or not)#2017-09-0101:17kennyHuh. cljfmt looks much different than that syntax.#2017-09-0101:17cflemingAgain, Emacs has its own formatting engine which they probably need to integrate with.#2017-09-0101:17kennyAh right.#2017-09-0101:17cflemingOtherwise e.g. paredit wouldn’t use it when it’s reformatting after actions.#2017-09-0101:18cflemingMan, I’m kind of in awe of the zprint doc. I can’t imagine how long it took to write that, let alone implement it.#2017-09-0101:21kennyHaha yeah, very complex. Some documentation formatting would certainly stop scaring people away. Though what really makes me nervous is I recently ran into https://github.com/kkinnear/zprint/issues/23, which is nasty and makes me worried about how their parser is written such that the failing case is to just output nothing.#2017-09-0101:21cflemingIt also does things like convert maps to namespaced maps and so on.#2017-09-0101:21cflemingWhich IMO is way out of scope.#2017-09-0101:21cflemingWow#2017-09-0101:21cflemingThat’s a pretty bad bug.#2017-09-0101:21kennyIt just tried to do everything.#2017-09-0101:22kennyAnd yes. I ran it on my code and things just broke.#2017-09-0101:23kennyLatest version fixes it but still. I don't see how failing to parse something correctly should ever spit out nothing.#2017-09-0101:26kennyAnyway, I'll try the lumo solution and see how that goes. I'm very curious how others are solving this problem.#2017-09-0102:05cfleming@ikitommi There are a couple of solutions for that. One would be to enable stubs generation for compojure.api.api, however that might have some unexpected side effects with navigation.#2017-09-0102:06cflemingThe other solution would be for the doc lookup to use the open REPL if available, and fall back on the statically-determined one if not.#2017-09-0102:07cfleming@wilkerlucio I’ll look into that. I’m planning a full namespace tidy, but that might be a good middle ground.#2017-09-0102:08cflemingIt’s tricky when people do crazy things like use prefix lists, though.#2017-09-0102:08wilkerlucioyou could keep it simple, just do it when it's all plain flat and simple, otherwise ignore it#2017-09-0102:24cflemingYeah, something like that is probably a good idea.#2017-09-0106:28ikitommi@cfleming I can inline the docs for c-api. But wanted to know if there is something coming for this as the function specs contribute to docs too.#2017-09-0106:29ikitommiand big thanks for making Cursive. It's awesome :)#2017-09-0107:11ikitommibtw, feature idea: many clojure libs (including clojure.spec, re-frame) define things with qualified keywords. It would be great if there was a shortcut “goto definition” for those. You can now say “find occurances” and there is most likely one that matter s/def, reg-event-db, reg-event-fx etc. Would massively help on navigation.#2017-09-0107:35cfleming@ikitommi Yeah, I’m planning to do that very soon - there’s an issue for it: https://github.com/cursive-ide/cursive/issues/1470#2017-09-0107:36cflemingI’m planning to add better support for spec including the doc fixes, too.#2017-09-0107:36cflemingGlad you’re still liking Cursive too 🙂#2017-09-0413:50skjutareIs there a known workaround for "Reslove _ as" not working?#2017-09-0413:51skjutarehttps://github.com/cursive-ide/cursive/issues/1666#2017-09-0421:47cfleming@skjutare A few people had this, and it turned out the intention was disabled - could you check that?#2017-09-0505:57skjutare@cfleming It was enabled, tried to disable then enabled again but no use. Restarting idea doesn't help either. The option is there when I do alt+enter, indention pops up a dialog, resolution doesn't. I'm going to try to rebuild indexes in idea.#2017-09-0506:04skjutare@cfleming No change after I rebuilt the indexes.#2017-09-0508:43cfleming@skjutare Can you send a screenshot? Does it look like the one in #1666?#2017-09-0511:12cfleming@skjutare Yes, thanks. But the “Resolve… as… ” option is there, right?#2017-09-0511:12cflemingOne thing to be sure of is that you have to press enter when you have it selected, not press right for the submenu.#2017-09-0511:13cflemingThat’s occasionally confusing.#2017-09-0511:51skjutare@cfleming I do press enter on resolve, and nothing happens. Previously (other machine and IDEA version) I got options to select defn, let, def, but now the menu just disappears.#2017-09-0515:03roman01laHello! Is it a known issue that ClojureScript REPL outputs EDN as a string?#2017-09-0515:03roman01laor is it something that should be changed in Figwheel? :thinking_face:#2017-09-0518:26dealyI've upgraded to Intellij 2017.2.3 today. Now I'm getting the error that there is no module specified for my clojure project. I haven't changed anything in my run config. My system is using the Cursive plugin built on 2017-08-04 21:36. There is a message at the bottom of the run config editor that says there is no Clojure jar attached to this module.#2017-09-0518:26dealyany idea what might be wrong here?#2017-09-0518:57Joe R. Smithany updates on when parinfer v3 support will land? 🙂#2017-09-0523:33cfleming@roman01la No, I’m not aware of that. How do you have your REPL configured?#2017-09-0523:33cfleming@dealy No, it looks like something funky might have happened to your config during the update. If you open your run config and re-select the module (even if you just re-select the same one) does that fix the problem?#2017-09-0523:35cfleming@solussd I’m actively working on it, but there are some bugs which currently make it painful to work with (https://github.com/shaunlebron/parinfer/pull/174#issuecomment-326629576, https://github.com/shaunlebron/parinfer/issues/176, https://github.com/shaunlebron/parinfer/issues/177)#2017-09-0523:48cflemingI wrote an update on the parinfer v3 integration here: https://groups.google.com/d/topic/cursive/P9bdkrmS-yQ/discussion#2017-09-0600:15nwjsmithI've noticed that protocol function renaming doesn't totally work. If the function is used in a defrecord it isn't being found#2017-09-0600:16nwjsmithIs there an issue for that or should I file one?#2017-09-0600:16nwjsmith(found it) https://github.com/cursive-ide/cursive/issues/222#2017-09-0609:05roman01la@cfleming just tried on a bare project, REPL output looks fine#2017-09-0609:14roman01la@cfleming ok, the cause is cemerick.piggieback/wrap-cljs-repl#2017-09-0613:56dealy@cfleming after invalidating the caches and restarting everything seemed to be ok once again.#2017-09-0622:09narek@cfleming, I’m experiencing the same issue as @pelletier https://clojurians-log.clojureverse.org/cursive/2017-05-30.html#inst-2017-05-30T19:29:24.036633Z#2017-09-0622:10narekhttps://cl.ly/1N42181N400d#2017-09-0703:50tomasIs it possible to resolve symbols as fn or letfn in cursive? I have problem with this macro:
(defcmd :command/login
        (cofx [cmd ctx]
              ...cofx-code...)
        (fx [cmd cofx]
              ...fx-code...))
which expands to something like this:
{:cmd-id :command/login
 :cofx (fn [cmd ctx]
         ...cofx-code...)
 :fx (fn [cmd cofx]
       ...fx-code...)}
cofx and fx are converted to anonymous function definition. But cursive marks possible function parameters as “cannot be resolved”. I think that marking symbols cofx and fx to be resolved as fn would solve the problem. What do you think?
#2017-09-0710:34Oliver GeorgeQuick thought in passing. I'd like to know which of my functions have a (s/fdef ...) spec associated with them so that I'm encouraged to add ones which are missing.#2017-09-0710:35Oliver GeorgeA simple visual indication would be enough to be useful.#2017-09-0710:35Oliver GeorgeCursive Spec MVP FTW!#2017-09-0710:44cfleming@olivergeorge Good idea, could you file an issue for that one please?#2017-09-0711:05Oliver GeorgeGladly.#2017-09-0711:06Oliver Georgehttps://github.com/cursive-ide/cursive/issues/1842#2017-09-0714:43potetm@cfleming Are there any plans to support tools.deps.alpha? That would be pretty snazzy.#2017-09-0719:42kenny@cfleming Per our conversion earlier about formatting: I made the CLI that wraps cljfmt https://github.com/ComputeSoftware/cljfmt-cli. It is working well so far. Although not incredibly important, the one place this breaks is in the REPL. I don't believe there is any way to get the REPL content as a string or file and reformat with an external tool.#2017-09-0719:43kennyThe REPL content would need to be available as an external tool macro.#2017-09-0719:46kennyI suppose I could select all the REPL text, use the SelectedText macro, and then format that. Though it's not clear what is done with the output. Does it replace the selected text with the output of the external tool? Anyway, its not the cleanest solution anyway because you have to select all of the text.#2017-09-0721:17cfleming@narek I’m actually working on the test integration right now, I’ll see if I can reproduce that.#2017-09-0818:27narekGood to hear, thanks!#2017-09-0721:18cfleming@tomas Unfortunately I don’t think you can use that in your case. The issue is that cofx and fx don’t resolve to anything, they’re special to the macro.#2017-09-0804:16tomasYou’re right, but I can create var so cursive will see it and macro will shadow it for execution. Then I can mark fx/`cofx` to be resolved as fn
(defmacro defcmd [& args])
(defmacro cofx [& args])
(defmacro fx [& args])
(defcmd :solved.cmd/login
         (cofx  [cmd ctx])
         (fx [cmd cofx]))
It’s kind of hack, but can solve the problem for now…
#2017-09-0804:18cflemingVery true. I’m planning to add arbitrary “Resolve as…” support but haven’t done so yet. There’s a hack described here though: https://github.com/cursive-ide/cursive/issues/1440#issuecomment-232776904#2017-09-0813:32tomasThanks a lot, that works!#2017-09-0721:19cflemingSadly there’s probably no good way to support that until I get better general macro support into Cursive.#2017-09-0721:20cfleming@potetm Yes, I’ll probably support that soon. It currently doesn’t support everything that Cursive needs (e.g. source roots) so those will have to be manually set up.#2017-09-0721:21cfleming@kenny Hmm, I’ll have to look at the External Tools part to see if there’s anything I can do about that.#2017-09-0721:22cflemingIf they don’t have something like a “Text content of current editor” macro then it might be difficult.#2017-09-0721:26kennyYeah nothing like that exists right now. Upon further inspection, the "Macro preview" for SelectedText does not show text as being selected when it is selected in the REPL. It only shows selected text when text is selected in the editor.#2017-09-0721:29cflemingYeah, the REPL editor is special, some things may not work. I can imagine the External Tools functionality being built around editors editing files, since it has to be able to pass them to external tools somehow.#2017-09-0721:29cflemingI’m surprised it doesn’t support directly piping text better, though.#2017-09-0802:50potetm@cfleming ::bananadance:#2017-09-0802:51potetmYeah I'm totally fine with setting up some things manually.#2017-09-0803:09lfn3@cfleming does the test integration work include https://github.com/cursive-ide/cursive/issues/875?#2017-09-0803:09lfn3I have to use a plain repl for something I've been working on and it's doing my head in.#2017-09-0803:10cfleming@lfn3 Umm, it possibly could do - what are you using that’s fiddling with report?#2017-09-0803:10lfn3Writing a generative testing lib#2017-09-0813:18nwjsmithI'm curious about this, are you taking the QuickCheck route for generating data?#2017-09-0813:19nwjsmithI'm working on my own property-based testing library, but with enumerative testing. Essentially a port of https://github.com/rudymatela/leancheck#2017-09-0823:45lfn3My inspiration comes from hypothesis: http://hypothesis.works/#2017-09-0803:11lfn3So I rebind report to capture failures.#2017-09-0803:18cflemingOk, are you using test.check?#2017-09-0803:18cflemingI know test.check sends some extra messages that Cursive doesn’t handle - I could add support for those if that would help.#2017-09-0803:19lfn3Nah I'm writing something like test.check.#2017-09-0803:20lfn3The issue is I can't rebind the report fn when running inside a regular cursive repl.#2017-09-0803:20cflemingOk, got it.#2017-09-0803:22lfn3Understand if it's not a priority, btw, I figure it's a pretty niche use case.#2017-09-0803:37cflemingIt is, but based on that issue it’s a problem that people have from time to time - anyone explicitly or implicitly adding humane-test-output will have the same problem.#2017-09-0803:38cflemingThe issue is that if I delegate then all the standard test output will go to the REPL, which may not be a problem.#2017-09-0823:57lfn3I’d be fine with it outputting to the REPL, personally. The only thing that might be nicer is if you could capture the printed output and stuff it into the normal intellij test runner output window. That’s probably prone to even more weirdness than the existing solution and a lot more work though!#2017-09-0811:48ingesolI run a figwheel repl by starting figwheel from the cursive REPL. Every once in a while, my target/classes starts to be filled up with the cljs-files from my source folder, causing fighweel to stop picking up my changes. Anyone else getting this?#2017-09-0811:49ingesolI assumed this was a cursive problem, since I guess leiningen by itself does not put things in target/classes?#2017-09-0823:43alexbayHey guys. When I do "Load file into REPL" in my CLJS Figwheel project, my repl process terminates:
Error evaluating - class java.net.SocketException: Socket closed
clojure.lang.ExceptionInfo: failed compiling file:/Users/alex/source/clj/pm/src/pm/core.cljs {:file #object[java.io.File 0x1ad08abd "/Users/alex/source/clj/pm/src/pm/core.cljs"]}
	at clojure.core$ex_info.invokeStatic(core.clj:4725)
	at clojure.core$ex_info.invoke(core.clj:4725)
	at cljs.compiler$compile_file$fn__13584.invoke(compiler.cljc:1533)
	at cljs.compiler$compile_file.invokeStatic(compiler.cljc:1494)
	at cljs.compiler$compile_file.invoke(compiler.cljc:1470)
	at cljs.closure$compile_file.invokeStatic(closure.clj:532)
	at cljs.closure$compile_file.invoke(closure.clj:523)
	at cljs.closure$eval15896$fn__15897.invoke(closure.clj:601)
	at cljs.closure$eval15832$fn__15833$G__15821__15840.invoke(closure.clj:485)
        .................
	at clojure.main.main(main.java:37)
Caused by: java.lang.NullPointerException
	at java.util.regex.Matcher.getTextLength(Matcher.java:1283)
	at java.util.regex.Matcher.reset(Matcher.java:309)
	at java.util.regex.Matcher.<init>(Matcher.java:229)
	at java.util.regex.Pattern.matcher(Pattern.java:1093)
	at clojure.core$re_matcher.invokeStatic(core.clj:4782)
	at clojure.core$re_matches.invokeStatic(core.clj:4812)
	at clojure.core$re_matches.invoke(core.clj:4812)
	at cljs.util$compiled_by_version.invokeStatic(util.cljc:42)
	at cljs.util$compiled_by_version.invoke(util.cljc:39)
	at cljs.compiler$requires_compilation_QMARK_.invokeStatic(compiler.cljc:1455)
	at cljs.compiler$requires_compilation_QMARK_.invoke(compiler.cljc:1442)
	at cljs.compiler$compile_file$fn__13584.invoke(compiler.cljc:1511)
	... 65 more
dev:cljs.user!{:conn 3}=> 
Process finished with exit code 137 (interrupted by signal 9: SIGKILL)
#2017-09-1003:44Oliver GeorgeAlex's clojure-install work seems to offer a much simpler arrangement for project setup. A single deps.edn file can define dependencies and allow command line repl and clojure.main execution.#2017-09-1003:44Oliver GeorgeI presume there will be times when it is a sensible alternative to lein/boot#2017-09-1003:45Oliver GeorgeFor the moment, cursive wouldn't support this because it doesn't know deps or source files specified in the deps.edn file.#2017-09-1003:45Oliver Georgee.g.
{:deps {org.clojure/clojure {:type :mvn :version "1.9.0-alpha20"}
        my/src {:type :file :path "src"}}}
#2017-09-1003:46cflemingWell, I can get the deps from the file, but IIRC the src format wasn’t actually supported (unless that’s new)#2017-09-1003:47cflemingThere wasn’t any way to specify source roots, at least initially.#2017-09-1003:47Oliver GeorgeYeah, I didn't see that in the talk but the brew-install doc mentions a way https://github.com/clojure/brew-install/blob/master/docs/guide-clj.adoc#including-your-source-directory-into-the-classpath#2017-09-1003:48cflemingInteresting, thanks, I’ll take a look.#2017-09-1003:49Oliver GeorgeThanks Colin. Love your work as always.#2017-09-1003:49Oliver George(Seems to be the {:type :file} bit which is new)#2017-09-1019:05Alex Miller (Clojure team)Btw that guide is now at https://clojure.org/guides/clj#2017-09-1019:05Alex Miller (Clojure team)And that's newer than the ref above#2017-09-1019:06Alex Miller (Clojure team)The default user level deps.edn now includes a src/ root by default too#2017-09-1022:25cfleming@alexmiller So I guess a dep of :type file is just a directory, and could contain compiled classes or source code, right? Is there any way to distinguish the two?#2017-09-1100:51Alex Miller (Clojure team)No - this is about making classpaths and they're all the same to the jvm#2017-09-1118:48Alex Miller (Clojure team)@U0567Q30W this is an area likely to undergo some flux for a bit btw#2017-09-1105:08steveb8nWhen I use the “REPL” keyboard shortcut to jump from editor to REPL, I’m having one annoying behaviour. If I have previously cut/paste from the repl output pane, then the cursor/focus lands in the output pane and I never want that. I always want focus in the repl input pane. I have to reach for the mouse to change focus. Does anyone else experience this? And if so, is there a better way? Thanks.#2017-09-1106:35cjmurphy@steveb8n: I just defined Tools / REPL / Jump to REPL editor as a keystroke. So when I press F12 (my invention) I never go to the output pane.#2017-09-1106:55steveb8n@cjmurphy that was it. I was using “REPL” instead of “Jump to REPL Editor”. Thank you!#2017-09-1202:19cemerickIs there any way to have a run configuration that evaluates an expression automatically once the REPL is up and running?#2017-09-1202:19cemerickI feel like I'm sure I've seen this option before, but am missing it now#2017-09-1202:50viniciushanaI usually create a clj file with the expressions I want to run and reference it on the parameters field for the run config. For instance, running Figwheel:
(use 'figwheel-sidecar.repl-api)
(start-figwheel! "dev")
(cljs-repl)
Since this is run when the REPL starts, then it automatically starts a cljs REPL with Figwheel.
#2017-09-1203:14cemerickThat will definitely work if you're just using clojure.main, but not if you're in an nREPL environment#2017-09-1212:08viniciushanaThat's true. No idea then, sorry#2017-09-1222:46cfleming@U09A6U6GJ No, there isn’t an option like that. Can you use user.clj?#2017-09-1301:04cemerick@cfleming No. I can (and do) keep helper fns there, but because the nREPL session isn't set up when user.clj is loaded, I can't just e.g. put a (cljs-repl) call as a top-level.#2017-09-1213:13kauko@cfleming any chance you could add different highlighting for namespaced vs unnamespaced keywords? A couple of times I've had errors where I mix the two, and it's hard to spot#2017-09-1213:14kaukoThe errors can be pretty cryptic sometimes too, though this doesn't have anything to do with cursive 😄#2017-09-1213:14kaukoToday I had (require [my.namespace ::as my-ns]). Took a while to notice where the error was 😕#2017-09-1218:01kennyRenaming an alias in :require seems to be broken in the latest build.#2017-09-1222:47cfleming@kauko Sure, could you file an issue for that and I’ll add it?#2017-09-1307:12kaukoDone. Sorry I didn't notice the link in the topic 🙂#2017-09-1323:53cflemingAwesome - thank you!#2017-09-1222:47cfleming@kenny I’ll try that - what are you seeing?#2017-09-1222:47kennyThe symbols are not updated. If you try to do the rename action again, it thinks the alias was updated.#2017-09-1222:57cflemingOk, I’ll check it out, thanks.#2017-09-1322:37dadairIs there a way to get the tree-inspection window for a var defined in the REPL (without a breakpoint?)#2017-09-1323:53cfleming@dadair Do you mean the debugger collapsible tree view for a data structure?#2017-09-1323:54dadairYeah, like the visual inspector where you can drill down through map key/vals #2017-09-1323:56cflemingSo there isn’t right now, but I’m working on some UI improvements which will allow this.#2017-09-1323:57cflemingWould you prefer that as a full ns browser, or do you just want to be able to look at the value for a specific var?#2017-09-1323:57cfleming“Both” is a valid reply too 🙂#2017-09-1400:04dadairboth 😛 but really if there's a way to see all vars currently defined in the ns and you can still drill down to one of them (and use the "set as root" button as in the inspector) then that accomplishes everything I would need#2017-09-1400:04dadairthen being able to specify a specific var to jump to is just convenience#2017-09-1400:28dadairnode that this would need to include both vars defined in the file and vars defined through the repl 🙂#2017-09-1400:51cflemingYeah, this would be a REPL introspection tool.#2017-09-1409:35steveb8n@cfleming would it be difficult for unused (grey) symbols in {:keys [foo bar]} where bar is not used to be grey? I’ve been cleaning these up lately and it would happen naturally if they were grey. Or is there an issues for this already?#2017-09-1520:50bfabrylittle diff window doesn't come up for test inequalities for me anymore 😞#2017-09-1522:32cfleming@bfabry For all tests, or just some?#2017-09-1522:34bfabryall, the hover-over is still right, but clicking just makes a breakpoint#2017-09-1522:34cfleming@bfabry Can you send a screenshot?#2017-09-1522:38cflemingThanks - a couple of people have reported this recently. I’ll check the code later and see how best to diagnose it.#2017-09-1522:40cfleming@bfabry This looks like it, right? https://cl.ly/1N42181N400d#2017-09-1522:40dadairyep same thing here#2017-09-1522:41cflemingOk, I’ll try to check that later on.#2017-09-1522:48bfabryexactly ya#2017-09-1711:00royalaidAnyone able to shed light on why when reference clj defined and loaded vars from a cljc file cursive insists they are not defined?#2017-09-1720:25camachomHello! new to clojure/cursive here. I made a new local repl configuration but I keep getting the following error:#2017-09-1720:25camachomthe logs also don't say very much. any help would be appreciated.#2017-09-1809:31tapI have this config in my project.clj
:profiles {:dev {:repl-options {:nrepl-middleware [cemerick.piggieback/wrap-cljs-repl]}}}
but when I start repl, piggieback middleware is not installed. How to debug this issue?
#2017-09-1809:58tapAfter 4 hours of debugging, I finally found the cause of it.#2017-09-1811:18ikitommiNoticed that for Java, there is implementation(s) shortcut, which seems to find the implementing method of a interface method. That would be awesome to navigate to the definition of a qualified keyword.. (`s/def ` etc).#2017-09-1817:43wilkerlucioI'm having an issue with one of my projects, it's not detecting my clojure main anymore#2017-09-1817:43wilkerlucioI tried to remove the module and add again, but no success, anybody has an idea about what is going on? with this problem it's not even indexing my project anymore#2017-09-1817:45wilkerluciobut weirdly, I can still run the configuration#2017-09-1817:48wilkerluciook, my deps got back, but it's not finding the namespaces on my project source path#2017-09-1817:49wilkerlucioit can auto-complete, but at same time it says the local dependency can't be resolved :thinking_face: https://www.dropbox.com/s/ydsorz1dowb0fu6/Screenshot%202017-09-18%2014.49.26.png?dl=0#2017-09-1818:08wilkerluciosomehow that is affecting all my projects#2017-09-1820:07wilkerlucio@cfleming please let me know if you have any idea what's that about, I've no clue... tried to restart my computer but didn't helped, for some reason happened from yesterday to today and now is affecting all my projects =/#2017-09-1820:16cjmurphy@wilkerlucio Have you tried Invalidate Caches / Restart from the File menu?#2017-09-1820:33wilkerlucio@cjmurphy that did the trick! thank you very much 🙂#2017-09-1820:41cjmurphyNo problem 😉#2017-09-1821:19sashtonis there a way to activate a specific profile for what cursive uses to import libraries into the workspace?#2017-09-1821:20sashtonin other words, i’ve got a dependency in a particular profile (not dev), and i’d like it to be imported into my workspace, and be able to navigate to symbols in that library#2017-09-1821:23danielcomptonyep#2017-09-1821:40sashtongreat, thanks @danielcompton!#2017-09-1900:28cflemingThanks @cjmurphy and @danielcompton!#2017-09-1900:29cfleming@mcama200 That is indeed not a very useful error message. Is this a project I could look at, or is it a work one?#2017-09-2005:55camachom@U0567Q30W thanks for getting back to me! I was able to solve my issue by adding '127.0.0.1 localhost' to my 'hosts' file. I previously had a custom configuration. REPL works great now.#2017-09-2007:27cfleming@mcama200 Interesting, so it was some kind of networking issue? That’s very strange.#2017-09-2007:27cflemingI’ll see if I can reproduce that to get a better error message in there.#2017-09-2007:51cfleming@ikitommi I’m actually planning to have navigation to keyword “definitions” like s/def be just Ctrl/Cmd-click, like normal vars.#2017-09-2007:52cflemingThe implementations functionality will be for things like protocols and multimethods.#2017-09-2010:41ikitommi@U0567Q30W awesome!!°!#2017-09-2015:54lumpywould this work for things like re-frame keywords? This would be a huge upgrade!!#2017-09-2021:49cfleming@U5E4P88JG Yes!#2017-09-2113:25souenzzoit's on eap? I can test it?#2017-09-2123:47cflemingNot yet, I’ll try to get that in the next EAP, if not it’ll be in the following one.#2017-09-2106:53pbailleHello, i've got a macro that is a thin wrapper around fn, but in the 'resolve as' menu I can't find fn. How can I do?#2017-09-2108:25cfleming@pbaille So I still haven’t fixed this so you can enter arbitrary vars to resolve as, sorry. There’s a workaround you can use by hacking config files here: https://github.com/cursive-ide/cursive/issues/1440#issuecomment-232776904#2017-09-2108:25cflemingIt’s a bit ugly sorry.#2017-09-2109:03pbaille@cfleming thank you I will try this#2017-09-2109:03pbaille@cfleming by the way, have you got an idea when the standalone version of cursive will be available?#2017-09-2109:06cfleming@pbaille Not really, the install process is pretty easy these days so it’s less compelling.
#2017-09-2109:06cflemingI do still want to do it but it’s a lower priority than it was. Do you have a case where it would be useful?#2017-09-2109:06pbailleno i was just wondering 🙂#2017-09-2109:08cflemingOk - I do want to do it, in particular a simpler version (or a version that could easily be configured to be simpler) for educational purposes is a use case I’d like to support.#2017-09-2109:08cflemingSomething more like DrRacket#2017-09-2109:08cflemingKeybindings have also been an awkward part of setup but should be much easier in the next release.#2017-09-2109:10pbailleok I see, Personally I find cursive pretty simple to setup these days.#2017-09-2109:11cflemingYeah, that’s mainly why I’ve de-prioritised the standalone version. It’s a complicated thing to set up that is not at all documented by JetBrains, and it’s unclear how a non-JetBrains standalone would update itself etc.#2017-09-2109:11pbailleI've got another question: I'm wondering why repl evaluated forms doesn't print the same that when wrapped in a 'println' call, specifically \newline chars looks to be omitted#2017-09-2109:13pbaillei've noticed that print-method is called with a stringwriter instead of a printwriter when I send an expr to the cursive repl#2017-09-2109:15cflemingUmm, I’m not sure why that would be the case. Cursive doesn’t mess with how print-method etc work, but since Cursive parses + pretty-prints the output on the client side, the results are sometimes different from what you might expect.#2017-09-2109:15cflemingIf you have a concrete example of something unexpected I can take a look at it.#2017-09-2109:21pbaillei cannot see newlines when I evaluate this#2017-09-2109:21cflemingRight.#2017-09-2109:21pbaillethis is really a dummy exemple#2017-09-2109:21cflemingHere’s what’s happening.#2017-09-2109:22cflemingnREPL just returns eval values back to the client as pr-str‘ed strings.#2017-09-2109:23pbailleand it works in this case:#2017-09-2109:23cflemingCursive, in order to pretty print them, will try to parse them as Clojure data structures and then print the parsed version using fipp. What’s happening in your case is your output is correctly parsed as a form and then pprinted, but it all fits on one line so that’s how it’s printed.#2017-09-2109:23pbailleok I see#2017-09-2109:24pbailleit treat it as a list#2017-09-2109:24pbaillein the first case#2017-09-2109:24cflemingYou can disable that if you like in Settings-&gt;Languages &amp; Frameworks-&gt;Clojure-&gt;Pretty print REPL return values#2017-09-2109:25pbailleI like the pretty colors 🙂#2017-09-2109:25cflemingBut then none of your results will be formatted unless you install a middleware or something.#2017-09-2109:25pbailleI don't want to remove it#2017-09-2109:25cflemingRight 🙂#2017-09-2109:25cflemingIn your second example, the newlines are preserved because you essentially have 3 top level forms.#2017-09-2109:25pbaillemaybe I can extend some fipp stuff?#2017-09-2109:26cflemingSo unfortunately it’s not extensible at the moment, because it’s built in to Cursive. I’m planning to allow it to be extended, but I’m not sure how that will work yet.#2017-09-2109:26pbailleokok I see#2017-09-2109:27pbaillethank you!#2017-09-2109:28pbailleand if I disable pretty print repl, can I insert fipp myself as a nrepl middleware?#2017-09-2109:28pbailleif it makes sense 🙂#2017-09-2109:30cflemingYes, you can - I think https://github.com/greglook/whidbey is what you want.#2017-09-2109:30cflemingI believe there’s something similar which just uses pprint, too.#2017-09-2109:30pbailleok that's great, I will look at this#2017-09-2109:30pbaillethank you a lot#2017-09-2109:31cflemingNo problem, let me know if you run into trouble - I’m not sure many people are using whidbey with Cursive, so I’d be interested to know how it goes.#2017-09-2109:31pbailleok I will tell you#2017-09-2110:03pbailleI've just tried, I can't make it works. I've added whidbey stuff in my profiles.clj. It works as intended when used at the terminal with 'lein repl'. but doesn't works in cursive repl (i've unchecked Pretty print REPL return values). Also i've tried to check whidbey in profiles (lein intellij panel) but nothing seems to do the trick.#2017-09-2110:03cfleming@pbaille Hmm, ok - I’ll take a look at that tomorrow. Could you file an issue to remind me?#2017-09-2110:04pbaillesure!#2017-09-2113:29souenzzo@cfleming double shift search find my project/my_namespace but not project.my-namespace... It's a know bug?#2017-09-2123:45cfleming@souenzzo Sort of - unfortunately the double shift search isn’t extensible. So the only way I can contribute to it is to use symbols, which isn’t great for namespaces.#2017-09-2123:46cflemingThat means namespaces will also show up in the Find symbol… search, which you almost certainly don’t want.#2017-09-2123:50cflemingActually, looking at it, IntelliJ does actually add classes to the Find symbol… dialog. So perhaps I should add namespaces there too.#2017-09-2123:50cfleming@souenzzo Could you file an issue for that and I’ll add them there?#2017-09-2123:51cflemingI guess that means that keywords should probably go there too#2017-09-2209:09odinodinIs there a way to run a specific function/force reload of a given ns as part of the “sync files in REPL command”?#2017-09-2209:17danielcompton@odinodin you can use REPL commands to call functions and bind it to a key. and one of the options for a REPL command is to sync files IIRC#2017-09-2209:17odinodinalright, thanks 🙂#2017-09-2209:21cfleming@odinodin @danielcompton Right, you can define a command and have it sync before running, which is basically the same thing.#2017-09-2209:23odinodinSolves my problem it seems (re-running orchestra’s instrument after code has been reloaded)#2017-09-2215:34amannSo having used Clojure for roughly 5 years professionally now, I’ve just found out about thrown? and its ilk inside the is macro. Is there any plan for Cursive to provide useful hints for these admittedly messed up bindings?#2017-09-2423:16cfleming@amann There’s a (very old) issue about this: https://github.com/cursive-ide/cursive/issues/238#2017-09-2423:17amannThe more you know. Yeah, a coworker instructed I use that and my immediate reaction was “that doesn’t exist, Cursive doesn’t resolve it, the REPL doesn’t resolve it”. Only of course to fine out, the REPL does resolve it if you’re inside an is etc. etc…#2017-09-2423:20cflemingYeah, there’s some black magic going on there.#2017-09-2519:43timgilbertSay, with IntelliJ 2017.2.4 and Cursive 1.6.1-2017.2 I noticed I'm not seeing unused function arguments or namespaces highlighted in gray any more. Is there a preferences I need to set to get them back or something?#2017-09-2519:43timgilbertFunctions that are never called still show up as grayed out though.#2017-09-2519:45cfleming@timgilbert Could you check here and see if this is your problem? https://github.com/cursive-ide/cursive/issues/1637#issuecomment-298207286#2017-09-2519:46cflemingUnused Local Symbol in your case.#2017-09-2519:47timgilbertAh, yes, looks like they are set to "no highlight, only fix" although I didn't go in and change their values myself#2017-09-2519:48cflemingSo I think that should be the right setting, but quite a few people recently have had this problem, and setting it to warning seems to work.#2017-09-2519:48cflemingI’ll try to investigate this to see if I can figure it out.#2017-09-2519:48cflemingBut in the meantime setting it to warning should work.#2017-09-2519:48timgilbertResetting the values to "weak warning" gives me the behavior I was expecting. Thanks!#2017-09-2523:21kennyIs there a solution to a situation like this?
(ns my.foo
  (:require
    [clojure.spec.alpha :as spec]))

(s/def )
When you start typing the s/def Cursive will have the autocomplete dropdown appear. But if you hit enter on any of the options, it will add a new line to the :require that looks like [clojure.spec.alpha :as s] when it should just change the s/def to spec/def given the namespace is already aliased.
#2017-09-2606:38cfleming@kenny No, that’s just a bug I think. Could you file an issue for that and I’ll fix it?#2017-09-2618:38kennyhttps://github.com/cursive-ide/cursive/issues/1858#2017-09-2619:17cflemingThanks!#2017-09-2606:38cflemingThere are a couple of related things I’d like to fix at once.#2017-09-2703:38bennyis there a way to launch a figwheel repl via lein?#2017-09-2703:39bennyall i can find is https://github.com/bhauman/lein-figwheel/wiki/Running-figwheel-in-a-Cursive-Clojure-REPL but it uses the limited repl#2017-09-2704:38stuartrexking@cfleming I’ve updated to the latest version of IntelliJ and I’m seeing this exception when I try to load a file in the repl https://gist.github.com/stuartrexking/405cde6dd1dd541bec61dd76fd390fa2#2017-09-2704:43stuartrexkingInvalidating the caches cleared it up.#2017-09-2715:12manutter51I’m getting a stack overflow error in Cursive while indexing a large EDN file. Is this a known bug? (Also, have you ever tried googling for something dev-related that includes the phrase “stack overflow”? Yeesh.)#2017-09-2715:14manutter51If I try to open the EDN file in an editor, the whole IDE locks up, have to force-quit. It’s a data dump we use as seed data for populating our dev database.#2017-09-2715:19horzaI'd try increasing Xss in idea.vmoptions#2017-09-2717:42manutter51Ok, that did the trick, thanks @horza#2017-09-2718:52cfleming@manutter51 Do you have a copy of the SOE around still?#2017-09-2718:53cflemingIt might be in your log file: Help-&gt;Show log in Finder/Explorer#2017-09-2718:55cfleming@benny That’s the next large thing I’m going to work on. I’d hoped to get to it by now but other things have taken longer than I’d hoped.#2017-09-2718:55manutter51@cfleming Yeah, it’s mostly repeating
at clojure.core$concat$cat__4217$fn__4218.invoke(core.clj:700)
	at clojure.lang.LazySeq.sval(LazySeq.java:40)
	at clojure.lang.LazySeq.seq(LazySeq.java:49)
	at clojure.lang.RT.seq(RT.java:507)
	at clojure.core$seq__4128.invoke(core.clj:137)
#2017-09-2718:56bennysweet thanks @cfleming#2017-09-2718:57manutter51
ERROR - napi.project.CacheUpdateRunner - Error while indexing
file
To reindex this file IDEA has to be restarted 
java.lang.StackOverflowError
	at clojure.lang.LazySeq.sval(LazySeq.java:40)
	at clojure.lang.LazySeq.seq(LazySeq.java:49)
	at clojure.lang.RT.seq(RT.java:507)
	at clojure.core$seq__4128.invoke(core.clj:137)
	at clojure.core$concat$cat__4217$fn__4218.invoke(core.clj:700)
etc…
#2017-09-2718:57manutter51Increasing -Xss fixed it.#2017-09-2718:59cfleming@manutter51 What’s at the end of the stacktrace, i.e. the earlier part which actually calls concat?#2017-09-2719:01manutter51There isn’t any, it’s just those same 5 lines ending like this:
at clojure.core$concat$cat__4217$fn__4218.invoke(core.clj:700)
	at clojure.lang.LazySeq.sval(LazySeq.java:40)
	at clojure.lang.LazySeq.seq(LazySeq.java:49)
	at clojure.lang.RT.seq(RT.java:507)
	at clojure.core$seq__4128.invoke(core.clj:137)
2017-09-27 13:10:12,066 [  24474]  ERROR - napi.project.CacheUpdateRunner - IntelliJ IDEA 2017.2.5  Build #IU-172.4343.14 
2017-09-27 13:10:12,066 [  24474]  ERROR - napi.project.CacheUpdateRunner - JDK: 1.8.0_152-release 
2017-09-27 13:10:12,066 [  24474]  ERROR - napi.project.CacheUpdateRunner - VM: OpenJDK 64-Bit Server VM 
2017-09-27 13:10:12,066 [  24474]  ERROR - napi.project.CacheUpdateRunner - Vendor: JetBrains s.r.o 
2017-09-27 13:10:12,066 [  24474]  ERROR - napi.project.CacheUpdateRunner - OS: Mac OS X 
2017-09-27 13:10:12,067 [  24475]  ERROR - napi.project.CacheUpdateRunner - Last Action:  
2017-09-27 13:10:12,117 [  24525]   INFO - .diagnostic.PerformanceWatcher - Unindexed files update took 1857ms; general responsiveness: ok; EDT responsiveness: ok 
#2017-09-2719:04manutter51Looks like 205 cycles (1025 lines divided by 5 lines per cycle)#2017-09-2720:09cfleming@manutter51 That’s really weird - I mean, seq was called by something#2017-09-2720:09cflemingI’ll check for uses of concat, anyway - it looks like https://stuartsierra.com/2015/04/26/clojure-donts-concat#2017-09-2720:10manutter51My guess would be the stack trace was truncated due to length, so we never got the initial kick off#2017-09-2720:11cflemingYes, probably. There’s a patch in JIRA for that problem.#2017-09-2720:12cfleminghttps://groups.google.com/forum/#%21topic/clojure-dev/ewBuyloeiFs/discussion#2017-09-2720:12manutter51cool#2017-09-2919:04darwinupgraded to 2017.3 EAP after seeing the announcement on mailing list, and cursive is not present in preferences / plugins or "browse repositories"#2017-09-2919:04darwinthe Cursive plugin was installed in my 2017.2.x IntelliJ#2017-09-2919:12darwinok, got it working, had to quit IntelliJ and delete ~/Library/Preferences/IntelliJIdea2017.3 and ~/Library/Application Support/IntelliJIdea2017.3, those were lingering there from my previous attempt to upgrade IntelliJ without Cursive being available. Not sure why it got into such bad state that the plugin wasn't listed and wasn't offered to be installed...#2017-10-0211:48val_waeselynckWhat is the recommended way of running a Basic ClojureScript REPL in Cursive ? I can't seem to get my dependencies found. Works fine with lein repl.#2017-10-0211:55val_waeselynckI got it to work after adding ClojureScript to the default dependencies, then removing them.#2017-10-0218:34mandersonI upgraded to latest IntelliJ (2017.2.5) and Cursive (1.6.2-eap1-2017.2) and for some reason every namespace I open in the editor can't resolve any of the dependencies (get the warning lines). The REPL runs fine and I can execute fn's from my NS, so appears all the dependencies were found, but the editor seems to not be aware of them... Has this happened to anyone else?#2017-10-0219:53danielcompton@manderson try invalidating all caches#2017-10-0219:53danielcomptonFile > Invalidate Caches/Restart#2017-10-0219:57mandersonAh, didn't know about that. It seems to have done the trick. Thanks @danielcompton!#2017-10-0303:20cfleming@narek @pelletier Are you still experiencing the problem where you don’t get the test difference link?#2017-10-0303:22pelletieryes#2017-10-0303:31cfleming@pelletier Do you have venantius/ultra, or humane-test-output, or anything similar as an nREPL plugin?#2017-10-0303:31pelletieri do have ultra#2017-10-0303:32cflemingIf you remove that, does the test highlighting work?#2017-10-0306:50cfleming@pelletier ^^#2017-10-0306:50cfleming(just in case you hadn’t seen it - no rush)#2017-10-0316:23bfabry@U0567Q30W that fixes it for me#2017-10-0316:29pelletier@U0567Q30W works for me too!#2017-10-0319:09cfleming@U050MP39D @pelletier Thanks for letting me know! The problem is humane-test-output, which ultra installs.#2017-10-0319:09cflemingI’m curious - I thought that Cursive provided everything that ultra does out of the box. Is there anything you wanted it to do that Cursive doesn’t?#2017-10-0320:08pelletieri think the reason i installed it was for the stacktrace formatting#2017-10-0320:21cflemingCursive should do that too - if you have aviso/pretty installed and loaded, Cursive will use it.#2017-10-0320:33pelletierha, good to know#2017-10-0320:33pelletierthanks Colin!#2017-10-0323:34bfabryI don't always use cursive for a repl, ie using boot to quickly launch a repl with a different version of clojure for testing things#2017-10-0323:34bfabrythat said, I'm not too concerned to be losing ultra#2017-10-0323:34bfabrythough shouldn't cursive prompt to add aviso/pretty if you don't have it or something?#2017-10-0323:35cflemingOk. I’m actually adding a warning message for this case now - you can actually disable humane-test-output by adding an env var INHUMANE_TEST_OUTPUT#2017-10-0323:35bfabrysweet#2017-10-0323:36cflemingWell, Cursive will also use clj-stacktrace or fall back to clojure.stacktrace if it can’t find the other two.#2017-10-0323:37pelletiernice#2017-10-0323:37pelletiermust have happened quite a bit#2017-10-0323:42cflemingNot so much, but it’s confusing when it does.#2017-10-0323:54cflemingI can’t add images here, but it looks like this now:#2017-10-0323:55cfleming
Running tests in cursive-1865.core-test

Testing cursive-1865.core-test

WARNING: pjstadig/humane-test-output appears to be active.
This library interferes with Cursive's test functionality, in particular test result
diffs. You can disable it in your project.clj, or by setting the INHUMANE_TEST_OUTPUT
environment variable, either in your project.clj or your run configuration.


Ran 2 tests containing 2 assertions.
2 failures, 0 errors.
#2017-10-0323:55cflemingAlthough @bfabry’s mention of boot makes me realise I should make that less lein specific.#2017-10-0400:48cflemingBTW this is https://github.com/cursive-ide/cursive/issues/1865#2017-10-0318:25kennyGetting this error when attempting to generate stubs for my project with Datomic:
Error generating stubs for module command-processor: java.lang.NoSuchMethodError: org.slf4j.helpers.Util.safeGetSystemProperty(Ljava/lang/String;)Ljava/lang/String;
				at org.slf4j.impl.VersionUtil.getJavaMajorVersion(VersionUtil.java:11)
				at org.slf4j.impl.Log4jMDCAdapter.<clinit>(Log4jMDCAdapter.java:37)
				at org.slf4j.impl.StaticMDCBinder.getMDCA(StaticMDCBinder.java:59)
				at org.slf4j.MDC.<clinit>(MDC.java:90)
				at datomic.slf4j__init.load(Unknown Source)
				at datomic.slf4j__init.<clinit>(Unknown Source)
				at java.lang.Class.forName0(Native Method)
				at java.lang.Class.forName(Class.java:348)
				at clojure.lang.RT.classForName(RT.java:2186)
				at clojure.lang.RT.classForName(RT.java:2195)
				at clojure.lang.RT.loadClassForName(RT.java:2214)
				at clojure.lang.RT.load(RT.java:450)
				at clojure.lang.RT.load(RT.java:426)
				at clojure.core$load$fn__6542.invoke(core.clj:6047)
				at clojure.core$load.invokeStatic(core.clj:6046)
				at clojure.core$load.doInvoke(core.clj:6030)
				at clojure.lang.RestFn.invoke(RestFn.java:408)
				at clojure.core$load_one.invokeStatic(core.clj:5849
#2017-10-0318:27kennyI have tried restarting IntelliJ and doing "Invalidate caches and restart."#2017-10-0400:47cfleming@kenny That is very strange. Is your slf4j from your app or bundled with Datomic?#2017-10-0400:47cflemingOr both?#2017-10-0400:48cflemingIt looks like it’s getting the wrong version of slf4j somehow, do you have two versions on your classpath?#2017-10-0400:51kennyMy projects are using v1.7.12 of both org.slf4j/slf4j-nop and org.slf4j/slf4j-api. I don't understand how this would affect stub generation.#2017-10-0400:55kennyAlso interesting, I have no problem generating stubs for this project on my Ubuntu computer.#2017-10-0401:07cflemingI don’t understand it either.#2017-10-0401:08cflemingWhich version of Datomic are you using? You’re on OSX when it’s failing?#2017-10-0401:13cflemingAlso, are you on Cursive 1.6.2-eap1?#2017-10-0402:51kennyI am using Datomic 0.9.5561.50. And yes, 1.6.3-eap1-2017.2.#2017-10-0402:52kennyIt looks like there is a longer stacktrace but the only option on the error message is "show balloon" which opens up a huge dialog that I can't copy text from.#2017-10-0402:52cfleming@kenny Can you do this: go to Help-&gt;Debug log settings… and add #cursive.stubs in the box there. Then repro the problem (refresh lein project is the easiest way) and then send me your log file?#2017-10-0402:53kennySure.#2017-10-0413:52wilkerluciohello, I would like to ask you fellow cursive users, do you guys experience from time to time (in my case a couple times a day), intellij seems to trigger a full re-index from nowhere? like, no big changes or anything, a lot of times just focus out/focus in, and then it goes, trigger a full re-index... not a huge issue, but certainly can breaks the flow... do you experience something like this?#2017-10-0413:53wilkerlucioI have a suspicious that it happens when CLJS gets compiled, even it going to a ignored folder, it seems doens't matter, intellij sometimes just decides to trigger a re-index, I just wanna know if it's just me or other people experience that too, how about you?#2017-10-0413:55rauh@wilkerlucio Not really. Though, make sure to add your JS output directory to the "ignored" directories in IntelliJ so it doesn't scan those (large) JS files.#2017-10-0413:57wilkerlucioit feels like (I know, feel is really unreliable...) its something like "oh, a lot of things seems to change, let's trigger a re-index just in case!"#2017-10-0413:57wilkerluciobut yeah, the JS out is ignored here, weird thing#2017-10-0414:14danielcompton@wilkerlucio I don't see a full reindex very often, usually only on IntelliJ version upgrades. You can get logs from IntelliJ which might give you a hint#2017-10-0414:15wilkerluciohumm, interesting, thanks @danielcompton, I'll try that next time it happens#2017-10-0423:07cfleming@wilkerlucio Can you go to Help-&gt;Debug log categories…, add #com.intellij.openapi.project.DumbServiceImpl in the box, and then send me the log after it happens a couple of times?#2017-10-0423:25wilkerlucio@cfleming 👍#2017-10-0519:23erichmondis anyone else having issues trying to map keybindings for cursive? I can’t seem to “select” certain things, like Switch REPL NS to current file?#2017-10-0519:57cfleming@erichmond How are you trying to do that? Can you send a screenshot?#2017-10-0519:57cflemingOh, and is this on the latest EAP?#2017-10-0521:26erichmondI wonder if user error is to blame... Let me keep playing around. haha#2017-10-0521:34erichmondYep! User error! Disregard!#2017-10-0523:40cflemingThat’s my favourite sort of bug!#2017-10-0600:42dragoncube@cfleming could be caused by bad UX 🙂#2017-10-0601:45erichmondIt is, but it's Intellijs bad UX 😄#2017-10-0615:44bfabrymm, my unused imports seem to have stopped working#2017-10-0615:52mseddonHi all, looking at cursive coming from emacs, I wonder- is there a doc on attaching a browser cljs repl via weasel?#2017-10-0615:55mseddondoh. nm, i think i have it#2017-10-0616:09mseddonokay, i got it working just by invoking piggieback manually from a clojure repl- is there a convenient way I can get that boilerplate executed in a configuration so I can just drop straight into clojurescript?#2017-10-0701:31royalaidI have always just used the script method#2017-10-0701:31royalaid1 sec#2017-10-0701:32royalaidhttps://github.com/bhauman/lein-figwheel/wiki/Running-figwheel-in-a-Cursive-Clojure-REPL#2017-10-0718:37dfcarpenterI'm following this https://github.com/bhauman/lein-figwheel/wiki/Running-figwheel-in-a-Cursive-Clojure-REPL but I keep getting 'No nRepl ACK recieved'. I have adjusted the timeout to around 2 minutes. Any ideas?#2017-10-0807:06royalaidI have noticed that reader conditionals in require forms for CLJC causes odd behavior for reformatting the code#2017-10-0820:28danielcomptonThere's https://github.com/cursive-ide/cursive/issues/1014 open which covers that possibly?#2017-10-0900:53Andrew Sharpdoes cursive support live-reloading (live-importing) of project.clj?#2017-10-0901:30Andrew Sharpnvm it’s already an issue https://github.com/cursive-ide/cursive/issues/1740#2017-10-0906:42cfleming@U74H7J9FF Actually, I think that one is different to what you’re asking for. That’s for synchronising the dependent libraries with IntelliJ, but you’re talking about updating dependencies on the classpath of a running REPL, right?#2017-10-0906:42cflemingCursive doesn’t support that yet, but you can use alembic to do it manually.#2017-10-0923:56Andrew Sharp@U0567Q30W i see, no i meant synchronizing with intellij. thanks though. never thought about refreshing a running REPL#2017-10-1005:21cfleming@U74H7J9FF Ah, in that case that is indeed the issue you want 🙂#2017-10-0915:42manutter51I'm seeing a weird REPL issue: I place the cursor at the end of the form, and select "Send <form> to REPL", which gives me "Unable to resolve symbol: defn". Then I command-up-arrow to bring up the form again, and hit <ENTER>, and it compiles just fine. Is this a known bug? (Current non-EAP IntelliJ and Cursive.)#2017-10-0916:46manutter51Seems to have gone away after doing Load File Into Namespace. Peculiar, but ok.#2017-10-1013:03misha@cfleming did you see https://vimeo.com/237220354 ? What do you think about doing something similar but on the IDE level? Where separate shortcut would wrap form in let with the most recent locals, and execute it Wrapping subforms with custom macro prior to execution, and later define bunch of top level vars seems like a no-go, but the idea is actually cool, if integrated seamlessly#2017-10-2308:54val_waeselynck@cfleming author here, available to discuss this whenever you want 🙂 (Paris timezone)#2017-10-2308:55val_waeselynck@misha . You should also check scope-capture nREPL https://github.com/vvvvalvalval/scope-capture-nrepl#2017-10-2308:57val_waeselynck> and later define bunch of top level vars seems like a no-go @misha I suggest you give it a try anyway 🙂 in practice, I've found the only danger is when your local names shadow global names, which is bad practice anyway. I'll add an argument from authority: this is exactly what Stuart Halloway does (by hand) in his blog post: http://blog.cognitect.com/blog/2017/6/5/repl-debugging-no-stacktrace-required#2017-10-2309:40mishahe does it by hand, not "tool assisted", I'd like to scale it, and integrate it seamlessly into IDE, where neither manual clean up nor any typing (manually wrapping form you want to debug in a "spy") is reqiured#2017-10-2309:44mishano clean up part – is basically let. no wrapping is harder though#2017-10-2312:27val_waeselynck@misha agreed, this last part would require IDE integration.#2017-10-1020:03cfleming@misha I haven’t looked at it in detail, but I’m away at the moment, back at work tomorrow - I’m planning to look at it then.#2017-10-1020:04cflemingThere was some discussion about it on Reddit: https://www.reddit.com/r/Clojure/comments/750e61/releasing_scopecapture_a_library_for_easing/do2ob78/#2017-10-1309:28Petrus Theron@cfleming a request on Cursive’s “read-only REPL”: please don’t mode me in while Clojure is starting up, it creates an attention dependency - I have to watch the REPL until I can paste or start typing the command I’m going to run. Instead of moding the user in, show an indicator or mute the text I’m typing so I can see the REPL isn’t up yet#2017-10-1310:05cfleming@petrus There’s an issue about that: https://github.com/cursive-ide/cursive/issues/1579#2017-10-1310:06cflemingIt’s a tricky problem since REPLs can take so long to start.#2017-10-1310:06cflemingI’m planning to fix that issue soon as part of a general overhaul of the REPL UI.#2017-10-1310:06cflemingIdeally I’d let the user type commands, but in the output pane show them dimmed or something to show that they haven’t been sent yet.#2017-10-1310:08cflemingSo then your options would be: never focus the REPL, or focus it right at the start, allow commands to be entered but not executed until the REPL is fully started.#2017-10-1312:37mmerHi, I am using clara rules which uses macros for handling rule definitions. In this there is an implicit declaration of a variable within the rule of the format ?name this strings are always shown as not being referenced. Is the any way to either switch these warnings off or make them actually check#2017-10-1315:26zyloxYou can turn off all of the warnings, but otherwise no, not that i know of#2017-10-1315:26zyloxclara isn't yet supported by cursives macro resolution library.#2017-10-1315:26zyloxand it can get pretty rough.#2017-10-1319:37cfleming@zylox @mmer I’m planning to start work on macro specs for clara next week, so hopefully support will be soon.#2017-10-1319:38mmerFantastic, It would make life easier to get the rules right.#2017-10-1605:15MudgeHow come I can't connect to a remote repl when it is created like this: boot repl -s which creates a remote repl#2017-10-1605:16Mudgebut when I do boot repl I am able to connect to it in Cursive#2017-10-1606:21moizsj@cfleming i can reproduce https://github.com/cursive-ide/cursive/issues/1745 on the latest stable 1.6.1-2017.2#2017-10-1606:49cfleming@nick319 I’m not sure, I don’t know what the -s flag does.#2017-10-1606:49cfleming@moizsj Ok, I’ll take a look tomorrow.#2017-10-1606:53cfleming@moizsj Actually, I just tried this and it works for me. Can you share a screenshot of where you’re trying to copy the reference from?#2017-10-1606:54moizsj@cfleming an example - (defn send-message ...#2017-10-1606:55moizsjwhen used here ^, it copies line number#2017-10-1606:55moizsjinstead of fully qualified name#2017-10-1606:56cflemingThat’s weird, it works for me. Do you have anything weird going on such as it not being able to resolve defn?#2017-10-1606:58moizsjcopying on new-fn yieldds - learn_clj/core.clj:9#2017-10-1606:59cflemingDoes foo work?#2017-10-1607:00moizsjnope - learn_clj/core.clj:3#2017-10-1607:01cflemingThat’s really weird#2017-10-1607:02cflemingIn that case I will have to look at it tomorrow - I’m not sure what could be happening there.#2017-10-1607:03moizsjalright.#2017-10-1607:04moizsj@cfleming also are you aware of any issue that causes unused symbol highlighting (and unused alias) to stop working?#2017-10-1607:04moizsjit seems flaky#2017-10-1607:06moizsjworks in the screenshot above, but does not work in a much larger (proprietary) project#2017-10-1609:55cfleming@moizsj Could you check this?: https://github.com/cursive-ide/cursive/issues/1637#issuecomment-298207286#2017-10-1609:56moizsjlooking#2017-10-1609:56cflemingThere’s something weird going on with that severity setting, that I haven’t managed to track down yet.#2017-10-1609:57cflemingI can’t figure out if it’s being reset somehow, or if IntelliJ for some reason suddenly requires a higher severity setting to work correctly. I need to investigate and ask JetBrains.#2017-10-1610:00moizsj@cfleming that was it. its now started reporting unused requires and unused locals, but still not reporting unused fn declarations#2017-10-1610:07cfleming@moizsj They’re not reported 100% of the time, it depends on the name for performance reasons.#2017-10-1610:08moizsjah ok..whats the naming rule?#2017-10-1610:08cflemingIf the name is sufficiently unique (IIRC it only appears in < 10 files) then it’ll run the inspection to see if it’s used or not. Otherwise it’ll skip it because it would take too long.#2017-10-1610:08moizsji see that test* is ignored#2017-10-1610:09moizsji tried other name combos and it works!#2017-10-1610:09cflemingSo you should never get a false positive, but it won’t catch all unused things.#2017-10-1610:09moizsjgotcha. thanks so much#2017-10-1610:11moizsjis there some other setting I should verify? for the copy reference not working#2017-10-1610:15cflemingNo, I don’t think so - that one should just work.#2017-10-1613:10mseddonI have a macro that is a dsl, so when I use it there will be lots of symbols that won't resolve, is there a way I can hint to cursive that it shouldn't complain about these within a use of my macro? it's highlighting nearly all the symbols as "cannot be resolved" and rather destracting#2017-10-1623:48markaddlemandoes anyone have a pointer to a recipe for a good repl experience using cursive and nodejs? i came across something on the web a few weeks ago but i can't find it anymore#2017-10-1700:21kenny@markaddleman Check this: https://github.com/ComputeSoftware/cljfmt-cli/blob/master/build.boot#L35-L45 If you run boot dev it will compile your CLJS, setup a watch, and open a REPL. If you want to hop into the node CLJS repl, simply run (nodejs-repl) in the boot.user ns and you will be placed into a CLJS REPL.#2017-10-1722:01denik@cfleming any way to run a clojure repl off a deps.edn file within cursive?#2017-10-1722:02cfleming@denik I haven’t added any support for deps yet, so I don’t think so. Running a remote REPL in the terminal and connecting to it is probably the closest approximation.#2017-10-1809:39tengstrandI upgraded IDEA to Community 2017.2, and now I can’t send values to the REPL via <Cmd>+<Enter> on my Mac. If I have the statement “(eval 123)” then it works but if I try “123" then nothing happens.#2017-10-1809:41tengstrandI run Cursive 1.6.1-2017.2.#2017-10-1811:28guyHi sorry im sure this has been asked before, but i'm getting
12:22	Error running 'repl': Invalid javascript engine (javascript)
When i'm just trying to run a repl in cursive.
#2017-10-1811:28guyDoes anyone know what to do?#2017-10-1812:56souenzzoawesome new(?not sure when added?) feature: warn about wrong ns/file path.#2017-10-1818:04kennyExcited that this will be included in the next release! https://github.com/cursive-ide/cursive/issues/1470. Will this list (https://github.com/cursive-ide/cursive/issues/1470#issuecomment-337448508) of functions be extensible?#2017-10-1820:09ikitommithe #1470, looking forward to the release! should defmethod be listed as possible source too?#2017-10-1820:40kenny@ikitommi I doubt it as defmethod can dispatch on other things besides keywords. Also, I'd bet the impl would be slightly different.#2017-10-1913:36maikteskeHi, I can't get Cursive to resolve symbols from native JavaScript APIs. e.g.
(.abs js/Math -100)
or
(. js/document (getElementById "app"))
How can I get rid of these warnings without disabling them? I am using IDEA 2017.2 together with Cursive 1.6.1 Any hints?
#2017-10-1913:37rauh@maik.teske (js/Math.abs 8)#2017-10-1913:42maikteskeThanks, that seems to work, however (js/document.getElementById "app") does not#2017-10-1913:44maikteskenor does (. js/document (getElementById "app"))#2017-10-1913:44maikteskenor (.getElementById js/document "app")#2017-10-1913:55maikteskeI am getting a NullPointerException when right clicking on js/document 😞#2017-10-1913:56maikteske
Worker exited due to exception
java.lang.NullPointerException
	at cursive.psi.impl.synthetic.ClJavascriptAlias.getTarget(ClJavascriptAlias.java:132)
	at cursive.psi.impl.synthetic.ClJavascriptAlias.getNavigationElement(ClJavascriptAlias.java:104)
	at com.intellij.psi.impl.light.LightElement.isValid(LightElement.java:111)
#2017-10-1919:02dmarjenburghHi. I have a project with both Clojure(Script) and Ruby. When I do Find Usages on a keyword, it will also list Ruby symbols in the result list. Is this a bug?#2017-10-1920:38zyloxyou've unlocked ruby interop, congrats#2017-10-2001:32cfleming@teng What do you have that bound to? Send form before caret to REPL?#2017-10-2001:50cfleming@guy Do you have any less or sass plugins, or anything like that? I seem to recall that those can cause problems sometimes.#2017-10-2007:44guyyes thats right, Less plugin. I got it working eventually. Thank you though for replying ❤️#2017-10-2001:50cfleming@souenzzo Thanks! That is indeed new.#2017-10-2001:51cfleming@kenny It is extensible, but currently only by me - any requests?#2017-10-2002:01kennyDang. I was hoping for open extensibility. We wrap a lot of the re-frame API functions (as suggested by the re-frame docs) so the navigate to keyword would not work for our wrapped function.#2017-10-2002:04cflemingSo you should be able to use “Resolve as…” for that.#2017-10-2002:05cflemingI’ll see if I can get the fix into the next build to allow that to be specified for any function, otherwise you can work around it by hacking a config file.#2017-10-2002:13kennyOh cool. As long as there is some sort of hack to get it to work that would be awesome.#2017-10-2001:52cfleming@ikitommi So with defmethod, you can navigate to the defmulti from the symbol rather than the keyword - did you need something else from that?#2017-10-2005:15ikitommi@cfleming oh, that. I think that’s a great way to do this. And actually, despite we are registering the defmethods with qualified keywords as dispatch values, the actual calls to defmulti are done with a map or such, so there isn’t (usually) a case that one need to navigate from the defmulti invocation parameter to the actual defmethod.
(defmulti kikka :type)

(defmethod kikka ::kukka [_])
(defmethod kikka ::kokko [_])

;; it's just a map, not a plain keyword, so no need to navigate from `kikka` to the actual implementation...
(let [m {:type ::kukka}]
  (kikka m))
#2017-10-2005:16ikitommithanks, all good 🙂#2017-10-2005:17ikitommiOne could use identity instead of :type in the example, in case on could navigate from (kikka ::kukka) to the actual ::kukka defining defmethod but I think that’s not a common case.#2017-10-2007:47cflemingOh, I see - to navigate from the data itself to the multimethod impl handling that data.#2017-10-2007:47cflemingHmm#2017-10-2007:48cflemingThat actually might be quite nice, since you could use “Show implementation” to quickly see the handling code from a use of the data.#2017-10-2001:54cfleming@maik.teske Sadly JS interop is just hard to resolve correctly. I’m planning to improve it shortly, and there’s also an issue slated to be fixed soon to allow adjusting the severity of that warning: https://github.com/cursive-ide/cursive/issues/1526#2017-10-2001:54cflemingI’ve seen that NPE reported but not been able to reproduce it, I’ll try right-clicking js/document, thanks.#2017-10-2001:54cfleming@dmarjenburgh That is definitely a bug, yes. Does invalidating caches fix it?#2017-10-2003:10kennyI feel like ctrl+clicking on a :require alias should show you all the usages of that alias in the current ns instead of taking you to the actual ns. If you ctrl+click on the ns itself, then you'd be brought to that ns. For example, clicking myns below would show you all the usages of the myns alias in the current ns.
(ns some.ns
  (:require [my.ns :as myns]))
Would this behavior make sense to add? It'd be a breaking change so it'd probably need a settings option.
#2017-10-2005:57gravwrong channel#2017-10-2006:35maikteske@cfleming Thanks for the clarification. I'll just disable the highlighting of unresolved references for now. regarding reproducing the NPE with the following snippet:
(.getElementById js/document "app")
press CTRL and hover over .getElementById until "show usages of symbol 'getElementById'" pops up and while keeping pressed CTRL move the mouse to the right and hover over 'document'. The NPE gets thrown when the new 'document ' pop up is shown
#2017-10-2012:12tengstrand@cfleming added an example.#2017-10-2012:15tengstrand@cfleming Now I must write: ((fn [] a)) …to print out a.#2017-10-2120:01dmarjenburgh@cfleming Invalidating cache doesn’t change it (with or without restart). It’s very reproducible.#2017-10-2206:46cfleming@dmarjenburgh Ok, I’ll try to reproduce this. So if you search for usages of :foo, it’ll find Ruby symbols named foo too?#2017-10-2216:10denikIs there a way to commit the repl config separate from the .idea/workspace.xml which updates on a tab focus change#2017-10-2220:58danielcomptonI can see "Navigate to testdata" which is exactly what I want, but it doesn't show up in the keymap when I search for either the name or keybinding. Does anyone know where I can find it?#2017-10-2221:04danielcomptonHmm, looks like it might be part of the test runner#2017-10-2306:12rauh@cfleming Do you have anywhere where users can vote on features? So that you actually work on the features that matter the most to Cursive users?#2017-10-2306:13rauhFor instance, I'd give any voting points to "automatic requiring of :refers). That's something that would make my life a lot easier.#2017-10-2306:22cfleming@rauh I don’t yet, but I’m planning to add it to Cursive itself. I’ve investigated various web options, but the advantage of doing it in Cursive is that it’s automatically tied to the licence ID - I think making people sign up would be a significant barrier.#2017-10-2306:22cflemingI’m planning two main categories - new features and paper cuts, i.e. small bug fixes that would improve your life.#2017-10-2306:24cflemingI’m going to tie it to GH issue tags, and hopefully will be able to display the voting on the issue itself by editing a comment or something.#2017-10-2306:25cflemingI’ll try to add that soon, a lot of people have asked for it and it will allow me to direct my efforts better.#2017-10-2306:25rauh@cfleming Yeah that might get you there quickly, just add a "votable-issue" tag to the features you want votes on. And then post the (filtered) issue link here in slack.#2017-10-2306:25rauhThat would get you some kind of guidance.#2017-10-2306:26cflemingThe actual issues would be presented in a voting panel in the settings, probably, or in a popup from the Help menu or something similar.#2017-10-2306:26cflemingBut yeah, which issues were presented for voting would be triggered by one of two tags on them.#2017-10-2306:27rauhSounds great.#2017-10-2306:56dmarjenburgh@cfleming Yes, also when the clojure keyword is namespaced https://puu.sh/y4XS3/bc508699f8.png#2017-10-2307:04rauh@dmarjenburgh You can edit the scope of the search and also create your own scope for it.#2017-10-2307:04dmarjenburghI know, that would be a project specific workaround
#2017-10-2314:59mmerIs it possible to update cursive to run with leiningen 2.8.0?#2017-10-2402:20chang@cfleming both of my clj and cljs are returning the same error: "No nRepl ack received" is this issue frequent?#2017-10-2402:46cfleming@mohamedhayibor No, it’s not. Is your Figwheel configured to use nREPL?#2017-10-2402:47cfleming@mmer I’ll be adding 2.8.0 to the list in the next build. I haven’t tested it with Cursive yet though.#2017-10-2402:47cfleming@dmarjenburgh Actually, could you file an issue for that, please? I’m working on something else right now and don’t want it to get lost.#2017-10-2403:47MudgeWhen is Cursive going to have more support for boot?#2017-10-2403:54cfleming@nick319 Unfortunately it’s hard to give a better answer than “sometime”. Boot support for Cursive is hard, and build tool support in general is a lot of work.#2017-10-2403:54cflemingIt’s definitely on my list, because I know not having it sucks for a lot of people.#2017-10-2403:54Mudge@cfleming okay, thanks for the answer#2017-10-2403:54cflemingThere are workarounds, which are sort-of adequate but still really clunky#2017-10-2403:54Mudgeyes#2017-10-2403:55Mudge@cfleming what are the top development priorities for Cursive, or is there a list somewhere?#2017-10-2403:55Mudgeor a roadmap or something?#2017-10-2403:57cflemingIt’s pretty informal at the moment, but is more or less a) some spec support b) better REPL support c) extending that support to CLJS REPLs d) improving CLJS support to include all the new Node stuff and then after that probably boot support and better macro support.#2017-10-2403:58cflemingI’m planning to add feature voting as described above, and I’ll probably create a rough non-binding roadmap based on results of that.#2017-10-2404:03cfleming@nick319 ^^#2017-10-2404:03Mudge@cfleming cool, sounds great#2017-10-2408:40danmI am currently muddling along with boot.lein/generate 🙂#2017-10-2408:40danmAnd a bash alias that says any boot command I run should run that first#2017-10-2423:05Mudge@cfleming I want to set the indentation level on an unresolved symbol in cursive. How do I do that?#2017-10-2502:07cfleming@nick319 Hmm, there’s no good solution for that at the moment, sorry. What’s the symbol?#2017-10-2503:01MudgeWell it is a symbol that is used in the custom macro I made:#2017-10-2503:01Mudge(defscripts "root.Test Button" (actionPerformed "This is neat." [event] (println "Just clicked on the button.") (println event))#2017-10-2503:01MudgeThe symbol is actionPerformed#2017-10-2503:02Mudge@cfleming I was able to set the indentation level on my defscripts macro but not on the symbols that defscripts uses#2017-10-2504:07danielcomptonHow is the resolve as meant to work? I'm trying it but nothing happens when I click the button#2017-10-2504:07danielcomptonClicking that row, nothing actually happens#2017-10-2504:09danielcomptonah, I had to resolve it in the actual project, I was clicking on it as a locked library file and nothing was happening#2017-10-2609:10vikeriForgive my limited REPL knowledge but I have a question. I’m running a Cursive REPL with the clojure.main option, a parameter (to a startup .clj file) and a working dir specified. How can I run this same setup without Cursive? The main issue I have is how the “Working dir” option can be specified either using lein run or java -cp clojure... or whatever correct way of doing it is. I’m trying to get this setup to work for an emacs user.#2017-10-2611:03mattfordhey all#2017-10-2611:03mattfordfind-usages and lein checkouts#2017-10-2611:04mattfordI see odd behaviour: in the module of the library it can't find any usages in the module that depends on it.#2017-10-2611:04mattfordIt does work the other way though, the client module can find the refs in the library module#2017-10-2611:05mattfordAlso, I'm new to cursive, but do people edit the source in the lein checkout folder or via the module in the project list? What's best practice there?#2017-10-2611:06mattford(I'm a bit confused)#2017-10-2612:00mattfordso more find-usage stuff, in the checkouts folder I dont' get the ability to alter the scope of the search when using it on the upstream library.#2017-10-2612:51mattfordoh please ignore me - it was finding the jar and not the snapshot version of my upstream library#2017-10-2612:52mattfordafter that was sorted the checkout module find-usage worked great#2017-10-2612:53mattfordtook me too long to work out though 😞#2017-10-2614:10Alex Miller (Clojure team)@cfleming just want to say thanks for the debugger support in Cursive. :) Currently debugging a gnarly Clojure -> Java thing (inside the bowels of Maven code). Without the debugger, this would be 100x harder to understand.#2017-10-2616:26zylox@manutter51 mine isnt that dark, weird. might want to see if its something related to https://github.com/cursive-ide/cursive/issues/1594#2017-10-2616:27zyloxon a side note i think it uses console color settings but im not in a position to test that at the moment.#2017-10-2616:52manutter51Yeah, I changed the console color, but it’s not picking up in the repl#2017-10-2616:53manutter51That issue does look like what I’m seeing tho.#2017-10-2621:22cfleming@vikeri The easiest way would be to cd into the working directory, and then use java -cp clojure.... If the working dir is non-standard (i.e. not your main project directory or something) then the easiest thing would be to write a short shell script to do the two things.#2017-10-2621:25cfleming@manutter51 I actually think your issue might be different to #1594. That one actually looks like the exception is coming from aviso/pretty, which uses ANSI colours. Yours definitely should be affected by the console colour scheme though. Does restarting your REPL help?#2017-10-2621:25cflemingAfter changing the console colour settings, that is?#2017-10-2621:26cfleming@alexmiller Great, I’m glad it’s helpful! That’s definitely the ideal use case for it. I’m actually planning a bunch of fixes to the debugger soon, hopefully it’ll be faster and fix some unreliability of the breakpoints.#2017-10-2622:08cfleming@manutter51 Actually, I think your problem has the same root cause - I’ll fix that.#2017-10-2622:31manutter51@cfleming Thanks for looking into this. It’s not picking up the console color even after restarting the REPL.#2017-10-2622:32cfleming@manutter51 Ok, you’ll probably have to restart IntelliJ then - sorry about that. I’ll fix it for the next build.#2017-10-2711:44manutter51Ah, restarting IntelliJ did work, it’s using the console colors now. Tks much!#2017-10-2622:59mnewhookis there an easy way to add debug prints to a lein dependency?#2017-10-2622:59mnewhookie: I want to a some prints to a defn in a dependent package#2017-10-2702:20souenzzo+1 tô this feature#2017-10-2712:25bherrmannShould cursive work with the new 2017.3 Public Preview ?#2017-10-2712:26bherrmannThe cursive web site says "Cursive will work with IntelliJ versions from the last two years, currently 2016.x, 2017.1 and the new 2017.2 EAP."#2017-10-2712:26bherrmannAlthough 2017.2 is not EAP anymore... so that is dated.#2017-10-2712:27bherrmannCursive doesnt show up in the "plugin / browse repositories" screen ... boo....#2017-10-2717:16souenzzoquick report Error evaluating - class com.intellij.openapi.project.IndexNotReadyException: Please change caller according to com.intellij.openapi.project.IndexNotReadyException documentation trying to load a file to repl during a random index routine(not requested/just using same files)#2017-10-2717:25pelletier@cfleming is there any plan to add parameter name hints to cursive?#2017-10-2721:05cfleming@bherrmann Yes, it does - sorry, I’ll get that updated.#2017-10-2721:06cflemingHmm, Cursive should definitely show up in that screen, I’ll check it if doesn’t for some reason.#2017-10-2721:06cfleming@souenzzo I’ll check that, thanks.#2017-10-2721:06cfleming@pelletier Yes, I definitely want to do that.#2017-10-2721:13pelletierawesome! really looking forward to it#2017-10-2801:57souenzzoNot a #cursive but I'm getting com.intellij.openapi.actionSystem.impl.ChameleonAction cannot be cast to com.intellij.openapi.actionSystem.DefaultActionGroup on lein plugin for intellij Then I cant start the repl because REPL run configuration is incorrect - no module selected Anyone else with this problem?#2017-10-2803:03cfleming@souenzzo Do you have the lein plugin installed as well as the Cursive one?#2017-10-2803:04cflemingIf so, that’s officially deprecated and superceded by Cursive - Cursive does all that did and much more, and there will be confusion if you have both.#2017-10-2803:49souenzzofixed 😄#2017-10-2803:58cflemingNice 🙂. I should actually add code in Cursive to check if any conflicting plugins are installed and complain.#2017-10-3015:11amann^ huge 👍 on the above#2017-10-2912:10sandbagsAnyone know if it's possible to stop IntelliJ/Cursive stop eliding levels of nested folders, e.g. I don't want it to collapse "tools>utils>map" into a single level "tools.utils.map"?#2017-10-2912:11sandbagsi'm hunting through the many options but have no idea really what i am looking for#2017-10-2918:19d5pcheck your project panel settings :#2017-10-2918:19d5pthat flatten packages is the one#2017-10-2918:20d5phmm if the screenshot didn’t post , it’s “Flatten Packages” in your project view settings#2017-10-3014:53wilkerlucio@cfleming yesterday I was having some issues with a project that was apparently "syncing" forever. I was confused because the CPU usage was low, but it was taking about 5 min to sync the project (and I just had restarted my machine). After a while I realise the problem was that I wasn't connected to the work VPN, which was required to check the dependencies, and that was making my editor hanging for a long time, although I didn't need to check the dependencies on that time. So I wonder if we can make this syncing cancelable, I imagine I can be on situations where I have no way to access that, and it takes a fair time preventing me from work during it, if we could cancel the sync process that could be a non-issue. is that feasible?#2017-10-3014:55wilkerlucioor maybe just cancel anything that is related to remote fetching, making it use just whatever local dependencies we already got#2017-10-3015:37zyloxlike -o in maven#2017-10-3015:37zyloxid like something like that aswell#2017-10-3015:37zyloxin fact since our stuff uses maven maybe i can...hmm..#2017-10-3020:53kennytiltonThe Cursive doc in the section “Test Integration” says “You can run the tests by starting a REPL and then using Tools→REPL→Run tests in current NS in REPL”. I am not seeing that menu path (no REPL under Tools). Am I doing sth stupid? This is a project developed with .cljc files, if that matters (and I will be happy to just run the clojure.test variants).#2017-10-3021:03danielcompton@hiskennyness think it only shows up when you have a REPL running?#2017-10-3022:01Joe R. Smithany news on parinfer v3 support? 🙂#2017-10-3022:11cfleming@hiskennyness Yes, @danielcompton is right - that menu only appears when you have a REPL running.#2017-10-3022:11cfleming@solussd No 😞. Seems like Shaun is still busy, I’ll ping him and see what’s up.#2017-10-3022:16Joe R. Smithcool, thanks for the update#2017-10-3022:32kennytilton@danielcompton Thx. I quoted “…by starting a REPL and then…“, I just did not read it. <sigh>#2017-10-3115:27kennytiltonHunh. I have two CLJC projects. In the old one after I start a REPL in IntelliJ I can evaluate (+ 2 2) in the input area and see 4 in the output. With what seems to be an identical run configuration, (after duly switching the to the NS of the same source file) (nrepl with leiningen) I get “unable to resolve symbol +”#2017-10-3115:32kennytiltonThat rings a bell from when I last worked on CLJ in anger, but I thought it arose from forgetting to switch the REPL to a clojure namespace. I do see a confirming message that the correct NS is operative:
`(in-ns 'tiltontec.cell.base)
=> #namespace[tiltontec.cell.base]
`
#2017-10-3115:34Alex Miller (Clojure team)when you switch via in-ns, that doesn’t actually refer-clojure (something ns does for you)#2017-10-3115:34Alex Miller (Clojure team)you can correct at this point by doing (clojure.core/refer-clojure)#2017-10-3115:34kennytiltonAh, OK, that sounds familiar.#2017-10-3115:35Alex Miller (Clojure team)I think the question is what “duly switching” means :)#2017-10-3115:36Alex Miller (Clojure team)if you’re working at the repl, you can instead (require 'tiltontec.cell.base) (in-ns 'tiltontec.cell.base)#2017-10-3115:38kennytiltonThx! Come to think of it, when I did this before (a year ago) I was using Emacs and I think Cider takes care of that. Now I am curious how I got the other project working just now! (Meanwhile, refer-clojure worked great.) Hmmm, I guess I could also send the (ns…) form in the source to the REPL.#2017-10-3115:40Alex Miller (Clojure team)in cursive, I often use the “Load file in REPL” Cursive key binding to re-load the file I have open in the editor#2017-10-3115:40kennytiltonHa-ha, yes, I should have said “duly executing menu item “Switch REPL NS to current file”. There is no room for ambiguity in help requests!#2017-10-3115:42Alex Miller (Clojure team)yeah, that just does in-ns, which won’t cause a load#2017-10-3115:43kennytiltonHunh. Should I be getting a stack overflow error in the Cursive plugin when I open a project? (I just let IJ report it.)#2017-10-3115:57bradfordAny news on 2017.3 support? ❤️#2017-10-3116:02kennytiltonOK, never mind, the two project files show copious differences, one of which I am sure explains the issue.#2017-10-3118:51kennytiltonI just had to disable Cursive to delete a blank line. Anyone else had that? I saw this on two different MacBooks/installations.#2017-10-3121:31cfleming@hiskennyness No, you shouldn’t get SOEs, but you might - just report them and I’ll take a look. CLJC files are prone to them unfortunately.#2017-10-3121:31cfleming@bradford Yes, works fine 🙂#2017-10-3121:32cfleming@hiskennyness No, you shouldn’t have to disable Cursive to do anything - what was the problem deleting the line?#2017-10-3121:42ckarlsenany ETA on the next EAP? Really looking forward to namespace aware navigation 😄#2017-10-3122:04cfleming@ckarlsen Should be in the next couple of days, sorry for the delay - a couple of changes have taken longer than expected.#2017-10-3122:05cflemingThis EAP has suffered from the terrible creeping yak shave.#2017-10-3122:42kennytilton@cfleming I wonder if the SOE was just because I was on my old anemic (4g ram) Mac? I do not get it on my new 16g toy. But the little guy was not showing RAM pressure in the Activity Monitor. Sadly the "k" key on my new toy has me headed back to the shop, but such is life.#2017-10-3122:49kennytilton@cfleming OK, on the undeletable line (including simple blank lines) I now have it highly reproducible. I had copied the code snippet below into my source as a reference while hacking away, and commented it out with the #_ block commenter. That is sufficient to make lines undeletable (including defeating deletes when on populated lines in front of any content):
`(#?(:clj dosync :cljs do)
(with-integrity (:change (c-slot c))
    (c-value-assume c new-value nil)))
`
#2017-10-3122:50kennytiltonForget the surrounding backquotes above.#2017-10-3122:51kennytiltonI mean, those are not in the source, just my faulty markup attempt.#2017-11-0108:39vikeriHas anyone managed to get any of the clojure formatters to work concistently with Cursive’s built in? I looked at cljfmt but couldn’t get it to work, boot-fmt might work since it’s very flexible but it seemed like a lot of work to get it to output like Cursive.#2017-11-0112:39horzaThere's one thing slightly annoying me with parinfer. My project has some code that's poorly formatted and whenever I open one of those files with parinfer on, it does its thing and then everything's broken until I turn parinfer off and revert.#2017-11-0112:40horzasome "don't touch the file until I edit it" option would be really nice#2017-11-0112:41horza(also, this stuff is mostly in a git submodule I don't have access to, so "fix the bad formatting" is sadly not a viable solution)#2017-11-0114:12kennytiltonAha. Both cmd-F and shift-cmd-F (the IDE find commands) flash the “Edit” menu label in the menubar but fail to bring up the dialog iff I have selected any term in this snippet:
(#?(:clj dosync :cljs do)
     (with-integrity (:change (c-slot c))
       (c-value-assume c new-value nil)))
#2017-11-0116:13jeffersonbakeranyone had any luck getting a mono repo to play nicely with cursive? specifically using the lein monolith plugin for managing deps#2017-11-0116:27danmYes. But no. We have a monorepo with a whole load of Clojure projects in, but we're not using the lein monolith plugin#2017-11-0116:28danmWe're actually using boot, so I have a boot task that builds the project.clj per project in the monorepo#2017-11-0121:02danielcompton@vikeri see https://github.com/cursive-ide/cursive/issues/1403#2017-11-0207:10vikeriYeah I found that one and liked it, but didn’t see any concrete suggestions of how to implement it#2017-11-0121:07cfleming@horza See here for gory details on why that is hard: https://github.com/shaunlebron/parinfer/wiki/Problems-integrating-parinfer-into-Cursive#2017-11-0121:08cflemingI have a better solution in a branch as part of the parinfer v3 integration, but unfortunately it has some bugs which are show-stopping in Cursive and Shaun has been busy.#2017-11-0121:08cflemingI may try to separate out the part which prevents the problem you’re experiencing from the new v3 integration.#2017-11-0121:09cfleming@hiskennyness I’ll try to reproduce what you’re seeing there.#2017-11-0121:10cfleming@horza (BTW in that wiki page, specifically “Run Paren Mode before Editor action” relates to your suggestion).#2017-11-0122:53kenny@vikeri This is the approach we are using at my company: https://github.com/ComputeSoftware/cljfmt-cli#usage-in-intellij#2017-11-0207:10vikeriOk nice, so you basically reformat the code with an external tool instead of the built in formatter?#2017-11-0218:02kennyYes.#2017-11-0210:19danmOh nice, I didn't even know Cursive did that at all. How do I get it to run my tests? I've just been using the inbuilt terminal to do it#2017-11-0212:44olfalThere is a keymap called “Run tests in current NS in REPL”#2017-11-0213:08mattfordHello! Is there anyway I can get function names colored differently after a defn?#2017-11-0213:28danm@olfal Thanks 🙂 We're using a different testing library so it looks like it doesn't support us, but no worries#2017-11-0213:41souenzzoHello. I'm trying to use JDK9 on my project (intellij still uses it own JRE8) To get repl working, due Caused by: java.lang.ClassNotFoundException: javax.xml.bind.DatatypeConverter, I'm using on jvm args --add-modules java.xml.bind Everything works ok, but the stub generation fails with Caused by: java.lang.ClassNotFoundException: javax.xml.bind.DatatypeConverter#2017-11-0221:03potetmIs there a way to set the lein profile for a clojure.main repl?#2017-11-0221:04potetmI want to control the classpath for one run config.#2017-11-0222:47kennyHas integration with Spectrum (https://github.com/arohner/spectrum) been discussed?#2017-11-0300:30cfleming@carr0t Which are you using?#2017-11-0300:31cfleming@souenzzo Ouch, that looks bad. I’ll take a look, thanks.#2017-11-0300:32cfleming@potetm No, unfortunately: https://github.com/cursive-ide/cursive/issues/1036#2017-11-0300:33cfleming@kenny Not really - it’s a very interesting project and has potential for Cursive, I’m not sure it’s production ready yet though.#2017-11-0308:36ikitommithe new follow qualified keywords feature is awesome, thanks @cfleming!!!#2017-11-0308:56cfleming@ikitommi No worries, sorry it took so long! Any suggestions, let me know.#2017-11-0308:56cflemingPro tip: things like Show Implementation work as well.#2017-11-0308:56cflemingWhich is probably pretty nice for spec.#2017-11-0309:00mattfordI’m new to cursive - is there a place to see the newly released features?#2017-11-0309:00mattfordJust switched to the EAPs#2017-11-0309:04mattfordah found the page https://cursive-ide.com/eap.html#2017-11-0309:23danm@cfleming Well, the specific libraries we're using are adzerk/boot-test (in our older stuff) and metosin/boot-alt-test (in the newer stuff). In terms of the code content of the test files they're both the same, the just produce different output. For all I know the code content is the same for clojure.test too. (deftest ... (testing "..." (... (is etc? But I wouldn't expect Cursive to support them because it doesn't do boot 🙂#2017-11-0309:25cfleming@carr0t It should work since you’re actually using clojure.test, you’re just using the boot runner. If you can start a boot REPL and connect Cursive to it, the test integration should work for you.#2017-11-0309:25cflemingIf it doesn’t, if you could create a small test project I’ll look at it.#2017-11-0309:25danmSure, I'll give it a go 🙂#2017-11-0309:26cfleming@mattford I don’t have a good release notes page, the best way to stay up to date is the mailing list: https://groups.google.com/forum/#!forum/cursive#2017-11-0309:27mattfordah cheers#2017-11-0311:18danmHmm. I went to "Debug REPL for..." instead of "Run REPL for..." and for some reason Cursive seems to have forgotten all my definitions for this project. My project.clj is still the same...#2017-11-0311:19danmEven after refreshing projects#2017-11-0313:05danmWhat does Cursive need to resolve the code within a module? I have 2 modules here within the 1 project and 1 resolves fine and the other was but has just stopped, and I can't work out what has suddenly changed#2017-11-0313:06danmIt is referencing a different Clojure version, but it was doing that before. If I change the Clojure version to match the working project it resolves the basics like defn, but not the other calls for other libs#2017-11-0313:07danmI've checked my .m2 directory, and both versions of Clojure are present in there. The iml file is referencing the correct one#2017-11-0313:31danmAhha, I moved the project directory a while back. It seems anything regenerated since then has got confused. If I move it back it all works. So is there a relative path somewhere that has got messed up?#2017-11-0317:22kennyJust updated Cursive to 1.6.2-eap2-2017.2 and it refuses to syntax highlight a couple files in one of my projects. All symbols and most functions are highlighted as "cannot be resolved." The strange thing here is that it is only in a couple files in this project. Every other file is unaffected. I have tried restarting InteliiJ, invalidate caches & restart, and deleting the IntelliJ project and recreating it all without success. Any ideas?#2017-11-0317:25kennyRestarting computer does not work either.#2017-11-0317:27kennyInterestingly, if I comment out [clojure.spec.alpha :as spec] from my :require it is fixed. Guessing this is a regression.#2017-11-0317:28kennyHowever if I uncomment it then it stays "fixed."#2017-11-0319:21pandeirodoes cursive have step-through debugging similar to what's possible in cider ?#2017-11-0319:24dragoncube@pandeiro https://www.youtube.com/watch?v=ql77RwhcCK0&amp;t=1s#2017-11-0400:15cfleming@kenny That’s very strange. Does that happen for all namespaces requiring clojure.spec.alpha?#2017-11-0400:16kennyYes that was the pattern. It fixed itself after I uncommented the :require.#2017-11-0400:16cflemingThat’s very weird.#2017-11-0400:16cflemingNo-one else has reported that - are you on IDEA 2017.3 EAP?#2017-11-0400:16kennyNo. 1.6.2-eap2-2017.2.#2017-11-0400:17cflemingOk. In the latest EAP they’ve made some indexing changes, I thought that might have been the problem.#2017-11-0400:18kennyThough now that I'm back in the editor, navigation to re-frame keywords doesn't seem to work.#2017-11-0400:19kennyOh, do they need to be full namespace qualified keyword? e.g. :foo/bar won't work but ::foo/bar will?#2017-11-0400:20kennySeems to not work either way actually.#2017-11-0400:21kennyOhh my bad. It's definitely because of the re-frame wrapper. Completely forgot about that. I believe you said there was a workaround for this?#2017-11-0400:24kennyEditing ClojureResolveSettings.xml?#2017-11-0400:30kennyDoing this does not work:
<item key="compute.ui-frontend.re-frame/reg-event-fx" resolves-as="re-frame.core/reg-event-fx" />
#2017-11-0400:32cflemingYou might need to shut down IntelliJ, make that change and then re-start it#2017-11-0400:32kennyTried restarting.#2017-11-0400:37cflemingOk, I’ll try to reproduce that on Monday.#2017-11-0417:42snoeHi, I’ve been using cursive with unity and clojureCLJR and it’s working ok but I was wondering if anyone has tips. Like is it possible to tell cursive/intellij to turn off interop / classname inspections.#2017-11-0418:44danielcompton@snoe you can turn off most (all?) inspections at a pretty granular level in the preferences #2017-11-0418:52snoe@danielgrosse It seems the class/method highlights are at the syntax level not the inspection level - and I think the syntax level is all-or-nothing - I can’t seem to be able to keep clojure syntax and reference checks while turning off interop checks. Hopefully I’m wrong but if not I’m thinking the way to hack around the problem is to stub out java packages/classes/methods for the Unity stuff.#2017-11-0418:54snoe(I’m talking about these highlights if it wasn’t clear) https://imgur.com/a/EP9tk#2017-11-0501:13psalaberria002I get the following error when trying to start a Repl in Cursive with aot enabled for two namespaces that contain defprotocol and :gen-class: LinkageError loader constraint violation: when resolving method "com.whatever.KafkaProducerCollector.<init>(Lfranzy/clients/producer/protocols/FranzyProducer;)V" the class loader (instance of clojure/lang/DynamicClassLoader) of the current class, com/whatever/metrics$kafka_producer_collector, and the class loader (instance of sun/misc/Launcher$AppClassLoader) for the method's defining class, com/whatever/KafkaProducerCollector, have different Class objects for the type franzy/clients/producer/protocols/FranzyProducer used in the signature com.whatever.metrics/kafka-producer-collector (metrics.clj:16)#2017-11-0501:15psalaberria002nevermind. A Refresh in the Leiningen tab fixed the issue#2017-11-0501:23psalaberria002hmm, it keeps happening every now and then. Is this a known issue?#2017-11-0502:02psalaberria002I can reproduce it by running lein clean and starting a new REPL. If I stop the REPL, and start it again then it works. It only fails when booting a REPL and the classes are not compiled yet.#2017-11-0521:29danielcomptonUpdating to the newest EAP has rebound my keybindings, is that expected? I knew there were changes, but didn't think it would affect existing users#2017-11-0521:31danielcomptonIn particular overriding Select Previous/Next Tab from the macOS defaults#2017-11-0521:40cfleming@danielcompton I wouldn’t have expected that, no - it should have just changed the defaults. Also Cursive shouldn’t have touched that one at all since it’s not a Clojure action.#2017-11-0521:41cflemingI just checked, Cursive definitely doesn’t bind anything to those actions.#2017-11-0521:43cfleming@snoe Yes, unfortunately those inspections are not configurable - I’ve been meaning to fix that. I’ll try to do that in the next EAP.#2017-11-0521:43cflemingYou’ll still get some warnings though, e.g. UnityEngine.Input cannot be resolved.#2017-11-0521:45snoe@cfleming gotcha thanks!#2017-11-0521:45cfleming@psalaberria002 That’s very strange. Does that also happen if you do lein clean and then lein repl on the command line?#2017-11-0608:07psalaberria002I think the error went away after I changed the order of some required namespaces, and added more namespaces to aot. It only happened with Cursive Repl. lein clean lein repl worked fine. If it happens again I will notify here. thanks#2017-11-0521:46danielcomptonSorry wasn’t very clear, cursive wrap commands conflict with prev next tab#2017-11-0521:47danielcomptonJust checked on my laptop and I didn’t have them bound before, so that’s why they were added. #2017-11-0521:47cfleming@danielcompton Ugh, that’s a bummer.#2017-11-0521:47danielcomptonI would only expect the key bindings to be added for new users, not existing ones#2017-11-0521:48snoe@cfleming Another question/observation. It feels to me that optimize imports has been a tough nut to crack. I wonder if https://github.com/cursive-ide/cursive/issues/1592 as a stopgap wouldn’t be useful (simply (sort (rest require))#2017-11-0521:49cfleming@danielcompton Unfortunately that’s hard, since I’m changing the way actions are mapped to the default keymaps. There’s no easy way to say “only do this if there’s nothing bound to that action, or if this action is already bound to something else”#2017-11-0521:50cflemingBut those are probably a bad choice for the wrapping on OSX though, which is unfortunate.#2017-11-0521:52danielcomptonCan you set them based on the users parent keymap?#2017-11-0521:52danielcomptonMy key map is based off 10.5+ macOS #2017-11-0521:54cfleming@snoe Yes, the problem with full optimise imports is that it has a lot of moving parts - rewriting the ns form with minimal changes is difficult, and once you’re rewriting it then you need a lot of options for formatting it, allowing lists or vectors for different forms etc. Even that issue you mention is harder than just (sort (rest require)) because of formatting. It is a lot easier though, you’re right.#2017-11-0521:54cfleming@danielcompton That’s basically what this change does - it’s only actually modified the 10.5+ one, not your actual keymap.#2017-11-0521:56cflemingI guess the issue is that you now have two keys bound to your wrapping commands - what you had before and the new default one, which conflicts with the tab commands. You can unbind that obviously, but it’s not ideal as a default.#2017-11-0522:07danielcomptonYeah#2017-11-0522:09snoe@cfleming I assume you’ve seen this?https://github.com/clojure-emacs/refactor-nrepl/blob/992e9a25bdb411bc49c5c38a48ff0182d91631f2/src/refactor_nrepl/ns/rebuild.clj#2017-11-0522:11cfleming@souenzzo Looking at that issue, Cursive doesn’t use DatatypeConverter anywhere that might get injected into your project, so I’m guessing that use is from your project code. You mention you’re adding the module JVM args, are you adding those to the REPL run config? If so, try adding them to your project.clj, which will mean they’ll be picked up by the stubs generation as well (and things like lein run or whatever)#2017-11-0522:17souenzzoworks!#2017-11-0523:05cflemingGreat, thanks for letting me know!#2017-11-0522:14cfleming@snoe I did a long time ago, but I should take another look, thanks!#2017-11-0523:04sparkofreasonIs there any way to do copy/cut/delete of the current s-expression (the inner-most containing the cursor)?#2017-11-0523:07danielcompton@dave.dixon does Kill sexp work?#2017-11-0523:16sparkofreason@danielcompton No, that seems to just cut everything from the cursor to the end of the current s-expression. I've been working with atom and proto-repl for awhile, coming back to cursive now. One of the things I found is that cut/paste of entire expressions works nicely with parinfer (IMHO).#2017-11-0523:20sparkofreasonMaybe I could do it with a macro. That's effectively what I did with atom.#2017-11-0523:24snoe@dave.dixon expand-selection x3 (ctrl/cmd-w) works ok.#2017-11-0523:31cfleming@dave.dixon Yes, I’m afraid that expand selection is really the only option right now.#2017-11-0523:32cflemingPerhaps a “Select innermost sexp” would be a useful action.#2017-11-0523:35cflemingSomeone suggested an “Expand selection by sexps” which would work for this too, one expand by sexp and then select/copy/send to REPL#2017-11-0523:51cfleminghttps://github.com/cursive-ide/cursive/issues/401 is the issue#2017-11-0600:12sparkofreasonCool. I was able to make it work with IntelliJ macros.#2017-11-0605:11snoe@dave.dixon that works great! I didn’t realize intellij had these. For others, I did Navigate -> Structural Movement -> Move Backwards out of Sexp followed by expand-selection.#2017-11-0617:41sparkofreasonDoes cursive allow usage of parinfer "smart" mode?#2017-11-0621:53cfleming@dave.dixon Not yet, although I’m working on it. I have it almost ready to go, but parinfer v3 has outstanding bugs which make smart mode fairly unusable in Cursive. Shaun has been busy recently but I’m hoping to work with him on fixing them soon.#2017-11-0621:54sparkofreasonCool. It's a "nice-to-have", but it definitely needs to be unobtrusive.#2017-11-0621:56sparkofreasonBTW, one other suggestion from my time with atom/proto-repl is to make the code coloring a bit more granular. For instance, in cursive, pretty much all identifiers are colored as "symbols", but somehow the clojure plugin for atom separated things like top-level defintitions from parameters, let-bindings, etc. Not super important, but another nice-to-have at some point.#2017-11-0623:48cfleming@dave.dixon Yeah, there are a couple of issues related to this, I definitely think there’s scope to do more there.#2017-11-0701:39cfleming@kenny Here’s the fix for your problem (and others) in the next build:#2017-11-0701:39cflemingYou can now resolve any macro as any other with a decent UI to select them.#2017-11-0701:39kennyThat is awesome!!#2017-11-0701:40cflemingThe one other issue is how those customisations get shared across a team - I’ll check that’s working ok.#2017-11-0701:42kennyWe aren't doing that right now but that seems quite valuable. Are you suggesting there is a way to do that right now?#2017-11-0701:43cflemingNo, I’m suggesting that there should be 🙂#2017-11-0701:43cflemingRight now I think they’re IDE specific, and there’s no good way to make them project-specific.#2017-11-0701:44cflemingIn your case, these customisations are specific to the project you define your wrappers in, so that’s what you’d want.#2017-11-0701:45cflemingBut if you were defining that for something that came from a lib you use in many projects, it would be annoying to have to re-define it in each one.#2017-11-0701:45kennyIsn't it fair to say that namespaces should be global?#2017-11-0701:45kennyTherefore these resolve-as settings should also be global#2017-11-0701:47cflemingWell, there are two sorts of global, or two things which are global in different ways. IDE settings are global to any project you open in your IDE. Project settings are global to anyone opening that project, assuming you’re checking the relevant config file in.#2017-11-0701:47cflemingThings either have to be stored with your IDE or your project, they can’t be both.#2017-11-0701:48cflemingMost config falls pretty clearly into one or the other, but sometimes things like this require both depending on how you use it.#2017-11-0701:50kennyMakes sense. What I was suggesting was is that this sort of setting is global to any project you open.#2017-11-0701:51cflemingYeah, I think there’s scope for something you configure in your IDE that gets copied to any project you open, but IntelliJ doesn’t have anything like that.#2017-11-0701:51cflemingDefault run configs would be another good candidate for that.#2017-11-0701:52kennyAgreed.#2017-11-0701:52kennyDon't the current symbol resolutions get copied to every project?#2017-11-0701:52kennyOr are somehow treated as global.#2017-11-0701:52cflemingNo. Because they’re associated with your IDE, you will see them in all projects, but your co-workers will not.#2017-11-0701:53kennyAh I see. Because they are not stored in the .idea project folder?#2017-11-0701:54cflemingThe issue with an IDE config that got synced to projects you opened would be if you and a co-worker had different, say, indentation settings for a particular form. Then each time one of you checked in that setting would get overwritten for the other person.#2017-11-0701:58cflemingYes, that’s right. Because project config is stored in .idea, you can check it in and co-workers will see it, but then it won’t apply to any other projects you may have.#2017-11-0701:59cflemingThat would make sense if you’re customising a macro defined in that project, since anyone using the project will need that customisation and you’ll never need it in any other project.#2017-11-0722:23cap10morganCursive bundles its own leiningen, yes?#2017-11-0722:24cfleming@cap10morgan Not quite, but it does download it automatically to ~/.lein/self-installs on first use of a particular version.#2017-11-0722:25cap10morganoh, hmm. I'm trying to get it to use 2.8.1, but not quite seeing how.#2017-11-0722:25cflemingSo the only time that you might notice that is if you try to use it when not connected to the internet yet.#2017-11-0722:26cap10morganI found a version drop down list in the settings, but it maxes out at 2.7.1#2017-11-0722:26cflemingUgh, sorry, I forgot to add that to the latest EAP. I filed https://github.com/cursive-ide/cursive/issues/1882 and I’ll add it to the next one, hopefully in a couple of days.#2017-11-0722:27cap10morganah, cool. thanks @cfleming!#2017-11-0800:20tony.kayWhen I’m in a cljc file, doc strings don’t seem to work. Is this a known issue? Is there a fix?#2017-11-0802:07cfleming@kenny https://github.com/cursive-ide/cursive/issues/1885, related to our conversation the other day.#2017-11-0802:18danielcomptonOther conflicting keybindings: "Close [] and newline"#2017-11-0823:53steveb8nI’m seeing a new/strange error when working on cljc namespaces that use Instaparse. Error is “Dependency cycle: gll.cljc -> gll.cljc -> gll.cljc” Anyone else seeing this?#2017-11-0823:55cfleming@steveb8n I’ll try to take a look at this soon - this can happen when namespaces do funky things like the CLJS version of a CLJC namespace requiring the CLJ version of itself.#2017-11-0823:56steveb8nthanks. I can workaround it by sending indiv forms to the repl (only blocks sending entire ns) so not urgent#2017-11-0900:01steveb8nI’m on EAP release FWIW#2017-11-0921:28gjnoonan@cfleming When doing "Help -> Show Cursive Cheat Sheet" on the latest EAP it exports a file cheat-sheethtml (without the dot)#2017-11-0921:28cfleming@gjnoonan Yeah, sorry - I just fixed that: https://github.com/cursive-ide/cursive/issues/1887#2017-11-0921:29cflemingWill be in the next build. I don’t know how that works correctly in Chome on OSX but it does.#2017-11-0921:29cfleming(which is why I hadn’t noticed)#2017-11-0921:29gjnoonanAh, sweet#2017-11-0921:30gjnoonanChrome detects the doctype in any file IIRC#2017-11-0921:46manutter51This is weird: If I try to create a new Clojure namespace called idea-figwheel-repl at the top level of my src folder, Cursive throws a “String index out of range: 0” error.#2017-11-0921:47manutter51The Create dialog stays open, but if I click the Create button again, it tells me the file is already there, and if I cancel, the file shows up, but I can’t open it.#2017-11-0921:55manutter51Just curious if anybody else can reproduce that with the specific namespace idea-figwheel-repl at the top level of your src directory.#2017-11-0921:56cfleming@manutter51 One sec#2017-11-0921:57cflemingI get the exception, but the file is created and opened in the editor.#2017-11-0921:57cflemingThe problem is that the namespace is created with a leading ., so .idea-figwheel-repl#2017-11-0921:57cflemingI’ll fix that.#2017-11-0921:58manutter51Interesting.#2017-11-0921:58cflemingI suspect the difference might be that I don’t use tabs, one sec#2017-11-0921:58cflemingNo, even with tabs I still get the file opened.#2017-11-0921:59manutter51Ok, I’m trying an “Invalidate Caches” etc, just for grins#2017-11-0922:01cfleming@manutter51 https://github.com/cursive-ide/cursive/issues/1888#2017-11-0922:01manutter51No change, the dialog stays up, and if I cancel, the file shows up, but I can’t open it.#2017-11-0922:01manutter51@cfleming awesome, thanks much#2017-11-0922:02cflemingYou can probably just create a file rather than a namespace in that directory, call it idea-figwheel-repl.clj and add the namespace yourself.#2017-11-0922:02manutter51Yeah, that’s what I did, and that works fine.#2017-11-0922:02cflemingHi @gfredericks!#2017-11-0922:02gfredericksHI @cfleming#2017-11-0922:03manutter51I just posted it here at the end of the day because it seemed weird and I wondered what was going on.#2017-11-0922:03cflemingDefinitely a bug, thanks for the report.
#2017-11-0922:03gfredericksI am using a leiningen plugin that does its thing by adding a hook to the repl task#2017-11-0922:04gfredericksand I'm 87% sure that cursive, even when you ask it to use lein to start the repl, doesn't do it via the repl task#2017-11-0922:04cflemingDo you want to bet?#2017-11-0922:04cfleming87% is pretty good odds.#2017-11-0922:05gfredericksI will bet you 0.5 testnet BTC that I am correct#2017-11-0922:05cflemingI’ll get you my testnet address.#2017-11-0922:05gfredericksaw snap#2017-11-0922:05cflemingHere’s how that works.#2017-11-0922:05cfleming(let me just dig the code up to make sure)#2017-11-0922:06cflemingCursive does actually invoke the repl task, but it does it using lein’s trampoline in order to capture the created classpath/command etc#2017-11-0922:06cflemingIt also does a significant amount of its own hooking, so something like that may be causing problems.#2017-11-0922:07gfredericksI'm trying it out with trampoline right now#2017-11-0922:07gfrederickstrampoline does not break it#2017-11-0922:08gfredericksis there an easy way to figure out what cursive is running exactly so I can debug more?#2017-11-0922:08cflemingNot really - is the plugin public?#2017-11-0922:09cflemingWhat does the hook do?#2017-11-0922:10gfredericksyes one sec#2017-11-0922:10gfrederickshttps://github.com/palletops/lein-shorthand/blob/develop/src/lein_shorthand/plugin.clj#2017-11-0922:11gfredericksI'm 87% sure this doesn't have to hook the repl task and could just be a general :injections entry, but writing lein plugins like that is hard and I would like to avoid modifying it if I can#2017-11-0922:12cflemingSo that plugin doesn’t hook the repl task directly, it hooks the resolve task and in that hook, hooks the repl task.#2017-11-0922:13cflemingCursive however does not call the resolve task, in fact I don’t even know what that is/does.#2017-11-0922:13cflemingBut I assume it’s usually called as part of the repl task? Seems weird though.#2017-11-0922:13cflemingI can’t see why it would do that.#2017-11-0922:13gfredericksyes, I think it might be an attempt to avoid loading some code if not necessary#2017-11-0922:14cflemingCursive has taken that at its word.#2017-11-0922:14gfrederickssee the comment on lines 27 etc.#2017-11-0922:14cflemingWell… that’s a bummer.#2017-11-0922:15gfredericksbut in any case, is that indirection the cause?#2017-11-0922:15gfredericksit's hard to imagine what leiningen use cases don't involve resolve-task being called :thinking_face:#2017-11-0922:15cflemingI believe so, yes, but I’m only 87% sure.#2017-11-0922:15gfredericksokay, so I could test this by hooking the repl task directly myself#2017-11-0922:16gfredericksand that would potentially fix it?#2017-11-0922:16cflemingYes.#2017-11-0922:16cflemingPotentially.#2017-11-0922:24gfredericksmuch stranger problem now#2017-11-0922:25gfredericksbut I should debug more on my own first#2017-11-0922:26cflemingOk, but don’t spend too long on it - Cursive does all kinds of wacky things, which I can debug more easily.#2017-11-0922:31gfredericksit's complicated by the fact that I'm actually working on a plugin that wraps this one, so I should at least figure out which plugin is at fault#2017-11-0922:55gfredericksokay I think I confirmed that even using the regular lein-shorthand plugin cursive has the problem, even if I do the repl hook directly#2017-11-0922:56gfredericksI can create a debug branch of lein-shorthand with the hook modification if that would make things easier for you#2017-11-0922:56cflemingSure, I’ll take a look at it.#2017-11-0922:56cflemingLooking at that plugin, I’m tempted to say that you get what you deserve for doing such things, but that’s pretty much lein for you.#2017-11-0922:57gfredericksthat is pretty much lein for me#2017-11-0922:58gfredericksif you have alternate impl ideas, that'd be useful too#2017-11-0923:04gfredericks@cfleming https://github.com/gfredericks/lein-shorthand/tree/cursive-debug#2017-11-1009:12thosmoscursive feels bogged down like it's running extensive lookups almost every key stroke, sometimes my cursor freezes for up to a second while it does stuff. is there anything I can do to turn off or reduce what it's trying to do?#2017-11-1009:14thosmosactually maybe it's Intellij itself since even opening menus has a delay#2017-11-1012:40manutter51I’ve seen that sometimes with background tasks running, like indexing or generating stubs. The generating stubs one is kind of a gotcha, because you click on the link that says “Generate” or whatever, and it starts a bg task, but it’s not real obvious that it has done so. I clicked like 4 times once before I realized that each click was starting a new, separate bg task, and it seriously slowed down the IDE#2017-11-1021:46gfredericksI'm working on my lein plugin, and am observing the bizarre behavior that the cursive repl fails to start merely by virtue of having my empty(!) plugin registered in the project.clj#2017-11-1021:47gfredericksit fails when the plugin has an empty foo.plugin namespace, but it succeeds when the plugin has no namespaces#2017-11-1021:47gfredericksit won't tell me how lein is failing, so I might have to get creative to figure out how to get that information#2017-11-1021:58gfredericksdoes intellij use its own version of lein somehow? it's not calling mine, apparently#2017-11-1022:25gfredericksso if I rename the plugin from devloper to developer the problem goes away I can also see that the name devloper elicits a spellcheck warning when editing the project.clj Is cursive incompatible with plugins that look like spelling errors?#2017-11-1022:42gfredericksnevermind, that theory was as absurd as it sounded#2017-11-1022:44gfredericksmy new theory is that it can't handle a SNAPSHOT release of a plugin being updated#2017-11-1022:45gfredericksmaybe it's hashing the jar file and noticing it doesn't match?#2017-11-1100:04bfabrykinda surprised splice sexp killing backwards didn't make it into the default keymaps, it's like my 2nd most used paredit command#2017-11-1214:28akielToday in 1.6.2-eap2-2017.2 all my local REPL’s stoped working with the error: No leiningen modules containing clojure.main found. I have no idea what I can do about it. Anyone else?#2017-11-1214:53akielSorry solved my problem. It wasn’t about Cursive. Somehow my JDK was broken. I installed a new one and now everything works fine.#2017-11-1220:42cfleming@gfredericks Cursive actually doesn’t do anything at all specific to plugins, except for ensuring that classloaders etc are correct when it calls into them.#2017-11-1220:42cflemingHopefully you might get actual exception stacktraces in the log, Help-&gt;Show log in Finder/Explorer#2017-11-1220:43cfleming@bfabry Suggestions very welcome 🙂#2017-11-1220:43cflemingI think everyone has their own personal 20% of paredit they use.#2017-11-1220:50cfleming@gfredericks I’m actually working on lein at the moment because of 2.8.x, so I’ll try to look at your thing this afternoon.#2017-11-1220:50gfredericks@cfleming once I figured out that snapshots were bad, everything was better#2017-11-1220:51gfredericksbetween that and using one plugin instead of a plugin wrapping another plugin, I think everything is working#2017-11-1220:51cflemingInteresting, so there’s a problem using snapshot plugin versions?#2017-11-1220:51cflemingIs that a Cursive-specific thing?#2017-11-1220:53gfrederickscouldn't tell -- it wasn't just with using snapshots -- I had to use a snapshot version, then lein install the same snapshot version (i.e., mutate it), then try to run again#2017-11-1220:54gfredericksthus my suspicion about hashing#2017-11-1220:54cflemingHmm, Cursive itself doesn’t do anything like that (or anything specific to plugins, really), I can’t remember if Lein does - I’d be surprised.#2017-11-1220:54gfredericksI suppose you could test that theory more directly by just editing the SNAPSHOT jar directly#2017-11-1220:55gfredericksyeah it was weird; I imagine if I had used the Show log option you talked about I might have gotten more insight#2017-11-1220:55gfredericksas it was it was claiming it just couldn't create the classpath or something of that sort#2017-11-1220:56cflemingHmm, strange#2017-11-1222:56souenzzo@cfleming when I convert a cljs file to clj, cursive loses all syntax highlight#2017-11-1222:59souenzzohttps://screenshots.firefox.com/dXkwxtG2uLUgZCvN/null#2017-11-1222:59souenzzohttps://screenshots.firefox.com/uspJZ5Iv2X3XuKSu/null#2017-11-1223:06cflemingThat’s extremely weird, I can’t think why that would happen. Does invalidating caches help?#2017-11-1223:10souenzzoi remove/open close/move/copy paste all files and tons os other stuff.. Now I stoped everything. Will start from zero.#2017-11-1223:10souenzzoWhere I can exclude intellij/cursive cache?#2017-11-1223:10cflemingWhat I mean is File->Invalidate caches and restart#2017-11-1223:11cflemingThat will force your indexes to be rebuilt, so if the problem is that they have become corrupted that should help.#2017-11-1223:27souenzzo slowly rebuilding #2017-11-1223:28cflemingYeah, sorry about that.#2017-11-1223:33souenzzoBack to work#2017-11-1223:47cflemingThat fixed the problem?#2017-11-1223:53souenzzobut I deleted .m2 and "copy'n'paste" all project (it's a small new one)#2017-11-1317:08kennytiltonCan anyone guess what keychord I inadvertently hit in IntelliJ to not only close my REPL session but also DELETE THE RUN CONFIGURATION?!!!! Sorry. Lost it there.#2017-11-1317:08kennytiltonps. I honestly do not recall.#2017-11-1317:49sandbagsSeems that cmd+shift+o dialog has stopped finding some, but not all, of my project source files. Anyone else experienced this?#2017-11-1317:53sandbagsif it helps, ctrl+shift+o still finds that file holding that namespace#2017-11-1323:21sandbagsAlso is there a way to split a string?#2017-11-1408:50sandbagsbest way i've come up with so far is to type "" and then go back and delete the \'s that get inserted#2017-11-1408:55rauh@sandbags Structural command "Split" can do exactly that#2017-11-1408:55sandbagshrmm... i thought i tried that#2017-11-1408:56sandbagsbut, apparently, not... thank you! 🙂#2017-11-1422:11cfleming@sandbags So you mean that you can find the file from Navigate-&gt;File… but can’t find the namespace from Navigate-&gt;Namespace…?#2017-11-1423:33Mudge@cfleming I am referring a macro from a library and cursive does not recognize it as a macro (it is unidentified). Is this normal?#2017-11-1423:33MudgeHere is my ns:#2017-11-1423:33Mudge(ns clojuretest-client.windows.main-window (:require [ignition-project :refer [def-comp-events system]]))#2017-11-1423:34MudgeThe macro is def-comp-events, when I use it in the file the indentation is wrong because it does not recognized it as a macro and I can't set the indentation level#2017-11-1423:34MudgeIs there a way for me to set the indentation level?#2017-11-1501:59taylorI think if you hover over the macro def, a little light bulb might appear allowing you to select some macro formatting options @nick319#2017-11-1502:00taylor> However to adjust the indentation settings for a particular macro, you’ll need to do the following. Find an instance of the macro in your code, and position the cursor over the macro symbol. You’ll get an intention lightbulb which will allow you to modify the indentation using Alt Enter.#2017-11-1502:00taylorhttps://cursive-ide.com/userguide/formatting.html#2017-11-1502:12cfleming@nick319 Or are you saying that you can’t use @taylor’s solution because Cursive doesn’t detect def-comp-events as a macro?#2017-11-1502:13cflemingDoes def-comp-events resolve correctly? i.e. if you Ctrl/Cmd-click on it, does it navigate to the definition? Or is it marked in yellow?#2017-11-1503:08cfleming@hiskennyness I’m pretty sure there’s no key combo to delete run configs.#2017-11-1503:08cflemingAFAIK you can only do it from the Edit Configurations dialog.#2017-11-1503:58Mudge@cfleming It is not being resolved. Why not?#2017-11-1504:00MudgeThe macro comes from a library that is installed in my local maven repository#2017-11-1504:04Mudge@cfleming Here is how it looks:#2017-11-1504:04Mudge(ns clojuretest-client.windows.main-window (:require [ignition-project :refer [def-comp-events system]])) (def-comp-events "root.Power Table" (mouseEntered [event] (println "I am very glad. Does this change now?") (println event)) (initialize [source] (println "initializing with style. self:" source)))#2017-11-1504:04Mudgedef-comp-events is unresolved. I have ignition-project in the project.clj file like so:#2017-11-1504:04Mudge:dependencies [[org.clojure/clojure "1.8.0"] [perfect-abstractions/ignition-project "1.0.0"] [org.clojure/tools.nrepl "0.2.12"]]#2017-11-1504:05MudgeWhy is def-comp-events unresolved?#2017-11-1504:08cfleming@nick319 How is def-comp-events defined in that library?#2017-11-1504:13MudgeLike this:#2017-11-1504:13Mudge(defmacro def-comp-events [comp-path & functions] `(def-comp-events-fn comp-path 'functions))#2017-11-1504:15Mudge@cfleming will unresolved symbols in the library cause unresolved symbols in projects that use that library?#2017-11-1505:06Mudge@cfleming can there be a feature that allows me to set the indentation on unresolved symbols?#2017-11-1505:06MudgeThat would be really helpful because then I wouldn't have to deal/worry about unresolved symbols#2017-11-1509:24cfleming@nick319 That’s strange, that should definitely work. I’ll try to reproduce it tomorrow.#2017-11-1517:13MudgeOkay#2017-11-1520:38sandbags@cfleming other way around but, yes#2017-11-1523:31steveb8n“Live Share” looks really useful for remote devs. https://www.youtube.com/watch?v=fWXe1HQ1wVA&amp;t=13s Anyone know if something like this exists in IntelliJ or on roadmap?#2017-11-1600:23snoe@steveb8n look at floobits they have an intellij plugin. And the atom-teletype package that was released yesterday is supposed to have an editor agnostic server.#2017-11-1600:26steveb8n@snoe thanks, I will check it out#2017-11-1600:28cflemingThat is very cool. I was going to suggest Floobits too, but it’s not the same as this - it’s really more like a Google docs for editing the code itself. This actually integrates the IDE so features like debugging etc work seamlessly.#2017-11-1600:29cflemingLots of interesting questions there - I wonder where the server runs, and whether it’s a dumb tunnel or if it actually hosts the code.#2017-11-1600:30cflemingI suspect the remote IDE is getting the info it needs from the local one, but if so that would be a major change to how the IDE works I think.#2017-11-1611:09danmIntelliJ has some remote-pairing stuff built in doesn't it? I'm sure I've seen options for it, but never used it#2017-11-1611:09danmDon't know exactly what it does#2017-11-1616:53amannDoes anyone know how to get Cursive (Intellij?) to only reformat selected text? If I reformat code with just selected enabled, it reformats the entire file…(sharing images)#2017-11-1617:04amannhrmmm, this only looks to be a thing in edn files? I just tested this in clj file and no problems…#2017-11-1619:19actsasgeekI just installed IntelliJ and Cursive and I’m taking them for a test drive. If I create a new Leiningen-based project, this works just fine. I see all the usual files and directories. However, if I import an existing Leiningen-based project, I only see the files at the root, the src, test, etc., directories don’t show up. Additionally, I notice that the breadcrumbs at the top show the full path from /Users/me/Documents/…#2017-11-1619:19actsasgeekI assume there’s something very obvious I’m doing wrong?#2017-11-1619:28manutter51You’re using File -> New -> Import from Existing Sources, and then clicking Import Project From External Model, with Leiningen selected?#2017-11-1619:28actsasgeekyup#2017-11-1619:32snoetry file->open->project.clj and then open as project#2017-11-1619:36actsasgeek…trying…#2017-11-1619:40actsasgeekthat worked! thanks.#2017-11-1620:54cfleming@amann Hmm, I can’t see why EDN should be treated differently here, I’ve never noticed that but I don’t work with EDN much. That’s definitely issue-worthy though.#2017-11-1620:56amann@cfleming would it be helpful for me to create an issue on GH?#2017-11-1620:56cflemingYes please, then I won’t forget about it.#2017-11-1622:18amannHere you go ma dude: https://github.com/cursive-ide/cursive/issues/1895#2017-11-1622:21cflemingAwesome, thanks!#2017-11-1700:51cfleming@thosmos Cursive obeys the standard IntelliJ settings at Editor-&gt;General-&gt;Code Completion-&gt;Parameter Info#2017-11-1706:13thosmos@cfleming thanks! that was really slowing my typing down. I wonder if there's an optimization in there somewhere? It would prevent my cursor from moving to the next character until after it ran through its search. Maybe it can happen on a background thread so it doesn't hinder typing?#2017-11-1707:59jkourosHi there! Issue #817 on Github is a request for cursive functionality to refactor a function to a new namespace. Does this feature exist yet?#2017-11-1709:04cfleming@thosmos That definitely already happens on a background thread (except that all painting is on the EDT obviously), and shouldn’t affect typing. Weird that it did for you…#2017-11-1709:04cfleming@jkouros Sadly, no, sorry#2017-11-1709:07jkourosAh, well... Are there any recommendations for how to rename namespaces using Cursive?#2017-11-1709:08cflemingUnfortunately that’s mostly manual at the moment. Cursive will let you rename the last segment, i.e. everything it can rename without having to move files around.#2017-11-1709:17jkourosOk, thanks!#2017-11-1710:53stijndoes anyone know a good way of making Cursive handle the 'one big monthly repl commands history' file that Stu was talking about in https://vimeo.com/223309989?#2017-11-1710:54stijnI'm currently symlinking my ~/repl directory into each project that I want to use this in, but IntelliJ complains about repl not being a source folder, also you probably want multiple namespace declarations in that file, but Cursive complains that it doesn't match the file name in that case#2017-11-1918:25billare you trying to use the ns macro in that file? I don’t think you’d want the macro. I think you’ll always want to use the require function instead#2017-11-2014:16stijn@U0E11941M yes, I tried that but symbols don't resolve in that case...#2017-11-1710:58stijnOr is there a way to make Cursive write it's repl history to some file?#2017-11-1711:26reefersleepIs it possible to do a refactor where you switch parameter order, as well as argument order at all callsites, for a function?#2017-11-1711:56danmHmm. If I have a "Your project requires namespaces which need stubs to be generated" message, can I see which namespaces it's having issues with?#2017-11-1906:31thosmosI just used the debugger repl a few times for the first time today! Wow! Strange that I lived without it before now#2017-11-1915:59billlove settin me a breakpoint and seein me some bindins and eval’in me some exprs#2017-11-2014:58danmAll of my projects in my monorepo are giving me a "Your project requires namespaces which need stubs to be generated" error. I'm sure that only recently started appearing. Is there any way I can dig further into it and find out what it's failing to generate?#2017-11-2016:52billI can start a debug REPL and breakpoints work ✓ I can start an nREPL in my program and Cursive will connect to it ✓ (nrepl/start-server :port 8087 :bind "0.0.0.0") But I don’t know how to start my own nREPL and then use Cursive to set breakpoints. I believe that when Cursive starts a debug REPL, it has two connection points: the nREPL port and also a JDWP port. But when setting up a Run/Debug Configuration for a remote Clojure REPL there is no way to set a JDWP port—only the nREPL port. Is there a way to configure a “remote” REPL to support breakpoints?#2017-11-2020:39cfleming@carr0t Does generating the stubs not work?#2017-11-2020:41cfleming@bill On the run sorry but there are some discussions in the mailing list, try https://groups.google.com/d/topic/cursive/uWZF5nzbKZk/discussion and https://groups.google.com/d/topic/cursive/iTri7vvXViA/discussion#2017-11-2020:42cfleming@carr0t I’ll be back online with more time to explain later on#2017-11-2109:47danm@cfleming I hadn't tried generating them yet. My understanding (which may be incorrect) was that the message occurred when you were calling functions in namespaces that Cursive didn't 'know' about, and therefore assume you needed stub functions generating to fill in later. In my case the lib is downloaded and working when I compile the code, so I thought asking Cursive to generate the stubs would be the wrong thing to do, because it should be able to find the lib already#2017-11-2110:27cfleming@carr0t No, that’s incorrect. Here’s what this does.#2017-11-2110:27cfleming(I actually need to document this correctly, so I’ll try to explain here then use this as the basis for the doc)#2017-11-2110:29cflemingCursive works using static analysis, not runtime introspection like most other Clojure tools do. However not all libs are amenable to this. The most obvious example is Datomic, which is closed source so Cursive can’t analyse it at all.#2017-11-2110:30cflemingBut a lot of other libraries generate vars using various sorts of tricks - some are just a pain to analyse, and some (e.g. Midje, Overtone) use macros so heavily that analysing them is basically impossible.#2017-11-2110:30danmAah yes, I had noticed it had issues with macros#2017-11-2110:31cflemingFor these sorts of libraries, runtime introspection works better, so what Cursive will do is start a process with the runtime of the module, load the namespaces that it can’t analyse correctly and then introspect it to generate “stub” source files which it can analyse.#2017-11-2110:31cflemingThat only has to be done once, then those files can be used from then on (or until e.g. the library version is upgraded).#2017-11-2110:32cflemingIt’s not a perfect solution, and more complete macro support is coming, but it helps a lot with some important libs, particularly Datomic.#2017-11-2110:33cflemingSo hopefully, you should just be able to tell Cursive to generate the stubs, and it will stop bothering you.#2017-11-2110:34cflemingCurrently the list of namespaces to do this for is hard-coded, but it will be configurable at some point.#2017-11-2110:34cfleming@carr0t Does that help?#2017-11-2110:52danmIt does, thank you. (Sorry, we had standup)#2017-11-2110:52danmWhere are you based, btw? I'm in the UK, so it's coming up to 11am here. I assumed you were US based, but had no evidence for that#2017-11-2110:59cflemingNo worries - I’m in New Zealand, so it’s way past my bedtime 🙂#2017-11-2111:43danmHeh#2017-11-2217:21mikeyfordSorry for this newbie question, but I'm just getting started with Cursive (and Clojure) and I'm exploring a new code base. I was (perhaps naively) thinking I could call the main run function I'm keen to explore in the REPL in debug mode and then step into the process to help me understand what's happening in the program. However, when I do that, I start getting taken all over the place to lots of the underlaying java and clojure.core functions. Is there a way to walk through processes in Cursive and just stay at the high level stuff within the project's src code?#2017-11-2217:36mikeyford(the way I tried to do this was via Run > debug the REPL for x then pausing the program, calling the run function and and then stepping over/into when I get taken straight to .class java which is way deeper than I'm looking for)#2017-11-2220:10rauhCool stuff: https://gist.github.com/gregsh/b7ef2e4ebbc4c4c11ee9#2017-11-2222:00kennyI accidentally copied all the content from my REPL (not much but definitely contained some non-Clojure text) and pasted it into my editor. This threw an exception in Cursive (which I just reported). It also caused me to no longer be able to use the backspace button. I had to restart the IDE to fix it.#2017-11-2223:54danielcomptonHow can I make Garden be completed in Cursive? It defines lots of vars, but I can't seem to get the macro defining stuff to come up#2017-11-2223:56cfleming@kenny can you email me your log file?#2017-11-2223:59kennySure. I can't exactly remember what time the exception happened and I seem to have rotated through 3 log files today 😕#2017-11-2300:00cflemingHmm, well just send all 3#2017-11-2223:56cfleming@danielcompton That’s weird - how is defpseudoclass defined?#2017-11-2223:57danielcomptonhttps://github.com/noprompt/garden/blob/4eda64f3a432b35721c3ce4619b5d529955436a6/src/garden/selectors.cljc#L608#2017-11-2223:58cflemingHmm, I wonder if the CLJC is throwing it off#2017-11-2223:58danielcomptonyeah could be#2017-11-2223:58danielcomptonlooks pretty tricky#2017-11-2308:45tengstrandWhen I set up one extra test folder ‘itest’ for my integration tests (+ mark it as a “green” test folder in the Project Structure), the test looks fine for some seconds, but suddenly the ‘itest’ folder turns back to “grey” and after that it isn’t recognised as a source code folder.#2017-11-2310:55gklijsI have ind of the same thing, except it’s only for clojurescript sources, and it’s reset every time I open the project.#2017-11-2310:14claudiuHi. Is there any way to get "vim" like tabs in cursive ? (tab1: 3 split windows, tab2: 2 split windows) ?#2017-11-2311:56curlyfryI'm not sure, but it's likely an IntelliJ setting rather than a Cursive setting. I suggest looking at IntelliJ documentation.#2017-11-2321:04cflemingSee here for someone asking in the plugin dev forum about it this morning. I don’t really know how Vim handles tabs, but it looks like IntelliJ doesn’t do anything like that: https://intellij-support.jetbrains.com/hc/en-us/community/posts/115000722050-Redesign-of-IDEA-tabs-split#2017-11-2310:20ikitommiAdding this (broken let) will cause Cursive (and IDEA) to halt (throws StackOverFlowError):
(defn wild-param? [segment]
  (let [string-segment (if keyword? segment) (name segment) segment]
    (str/starts-with? string-segment ":")))
#2017-11-2321:06cflemingThanks, I filed https://github.com/cursive-ide/cursive/issues/1899 for this.#2017-11-2312:53tengstrandI have some issues with my development environment: - unused imports are not shown in grey - I can’t send things that have been defined by ‘def’ or constants (like 123) to the REPL, I need to wrap it in an empty function ((fn [] 123)) or in a vector [123]. - I can’t have more than one test folder (as mentioned earlier today) I extended the Cursive licence today and reinstalled the Cursive plugin. I’m running Cursive 1.6.1-2017-2. I have the latest version of IntelliJ IDEA, Community 2017.2.6. I use Java JDK 1.8.0_111. I still have these problems.#2017-11-2315:18tengstrandI have reinstalled everything now and the problem with two test folders could be that I’m doing something wrong with the profiles, I’m looking into that…so it’s ok for the moment even though I haven’t solved everything yet!#2017-11-2321:08cfleming@teng @gklijs The problem with your source folders is probably that your test or source roots are added in a Leiningen profile. You can set the profiles that Cursive should use when syncing the project in the Leiningen toolwindow under the Profiles tree. Select the profiles you need then refresh your project.#2017-11-2406:00gklijs@teng thanks, that dit the trick. Never really looked for a solution before, since it wasn’t that bothered by it. On overall it’s really great to be able to have it all in intelliJ.#2017-11-2321:10cfleming@teng Re: unused imports, this seems to be a problem with the inspection severity, see here: https://github.com/cursive-ide/cursive/issues/1637#issuecomment-298197331#2017-11-2321:12cflemingI’ve filed https://github.com/cursive-ide/cursive/issues/1900 to investigate why this is happening.#2017-11-2321:12cflemingBut changing the severity generally fixes the problem as a workaround.#2017-11-2322:30tengstrand@cfleming “Unused import” was set to Warning and checked, but the unused imports are still not marked as grey.#2017-11-2322:30tengstrand+ “In All Scopes”.#2017-11-2322:52cfleming@teng can you email me a copy of your log? Help-&gt;Show log in Finder/Explorer, <mailto:/cdn-cgi/l/email-protection|/cdn-cgi/l/email-protection>#2017-11-2323:07tengstrandI have mailed it.#2017-11-2414:24p-himikHey. I'm not sure whether it's Cursive or something else, but some methods of the native JS types can't be resolved when working with ClojureScript. E.g. .toFixed and .toExponential of a number. Is there anything I can do about it?#2017-11-2416:49danielcomptonThis can help in some cases, though those functions are very old, so it's probably not that#2017-11-2617:16eproziumany chance adding gradle-clojure support?#2017-11-2622:19cfleming@eprozium It should just work, what sort of support were you after?#2017-11-2622:20cflemingOne thing might be the REPL support, I know they’ve been working on that but I’m not sure if it’s been released yet.#2017-11-2622:49eprozium@cfleming there are several integration points: NewProject/Gradle : a checkbox for Clojure, and another one for ClojureScript ; Clojars as aditional repo in build.gradle ; #2017-11-2623:01eprozium@cfleming also to enhance usability, in NewProject/Clojure : all possibilities should be listed like it's done for Scala. So Leiningen should be a suboption together with gradle-clojure (and maybe boot in the future), not a main-option like gradle and maven.#2017-11-2623:02cfleming@eprozium Yes, adding the extra repo etc would be good, as well as adding the Clojure and CLJS deps#2017-11-2623:03cflemingI’m not sure I agree about Leiningen not being a top-level option though - at the end of the day, lein is basically like Maven. Why would it not be a top-level option?#2017-11-2623:04cflemingSimilarly for Gradle - once I’ve added the options so that a Gradle project has a CLJ and CLJS option, it’s really just a Gradle project, it’s not a Clojure project.#2017-11-2623:04cflemingSo you’ll just select Gradle, then Clojure and you’ll be set.#2017-11-2623:13eproziumLein is not general, the same way SBT is not.#2017-11-2623:14eproziumBoot would also not be general, hence would belong as sub-option too.#2017-11-2623:15cflemingWell, in theory you can build anything with either of them.#2017-11-2623:16eproziumthe grouping under Clojure would allow to see what options are there, the same way Scala has it.#2017-11-2623:17cflemingOk, I’ll check it out - I haven’t used the Scala plugin in ages#2017-11-2623:18eproziumfor scala there are 2 plugins: one for scala and one for SBT#2017-11-2623:19cflemingRight, I don’t want to do that, since everyone using Clojure will want Leiningen#2017-11-2623:19cflemingAnd it’s confusing needing to download two plugins just to get started.#2017-11-2623:20eproziumof course. I just mentioned that for Scala this is needed in order to see the UI example#2017-11-2623:21cflemingI actually see the sbt option with just Scala installed.#2017-11-2623:22cflemingI see what you mean. That would probably make sense to have Leiningen under the Clojure option.#2017-11-2623:22eproziumhmm, than some features will be missing#2017-11-2623:23cflemingI don’t think I would put gradle-clojure there, since to use that you’d select Gradle and then the Clojure option.#2017-11-2623:23cflemingBut lein/boot/plain IDEA project/CLJS quickstart project etc could live under there.#2017-11-2623:25cfleminghttps://github.com/cursive-ide/cursive/issues/1902#2017-11-2623:25eproziumimho gradle-clojure could also be added: this way all options would be in one place: less cofising for new users#2017-11-2623:26cflemingI’d have to check, I’m not sure I can do that, since I’d need to be able to start the Gradle project creation flow with some options selected - I don’t know if that’s possible.#2017-11-2623:28eproziumbut I guess for that a new "init" type would be required, and there's none yet. #2017-11-2623:29eprozium"gradle init" is too limited for now 🙁#2017-11-2623:30cfleminghttps://github.com/cursive-ide/cursive/issues/1903#2017-11-2701:05cflemingA couple of days ago someone reported here that downloading sources using Leiningen wasn’t working in the latest EAP with lein 2.8.1. Unfortunately the Clojurians archiver is broken, and I can’t remember who it was. I just tried and I can’t reproduce this, if this is happening to anyone please let me know either here or (preferably) over at https://github.com/cursive-ide/cursive/issues/1896.#2017-11-2718:25bradfordindexing seems faster on 2017.3 + the latest cursive EAP. :thumbsup:#2017-11-2718:26bradford(IntelliJ seems to kinda get bitrot and slow down so I have to do a new install every year, lol computers)#2017-11-2801:59cflemingCursive 1.6.2 is out! No change for those of you on the EAP program, it’s just a stable release of 1.6.2-eap3.#2017-11-2801:59cfleminghttps://groups.google.com/d/topic/cursive/vG5Uxm8ip2M/discussion#2017-11-2807:19sahilmHow do I see javadocs for Java constructs? I can easily see Clojure docs using ctrl+j but doing the same for Java constructs does nothing.#2017-11-2808:09cfleming@sahilm It should work just like that for Java too. Can you send a screenshot of how you’re trying to use it?#2017-11-2810:34curlyfry@cfleming The new update looks very nice! Is it possible to give your own definitions of functions that "define" keywords? I'm using a custom reg-event function that wraps the re-frame ones.#2017-11-2822:23cfleming@curlyfry Indeed it is!#2017-11-2822:25cflemingCustomise the resolution as described here: https://cursive-ide.com/userguide/macros.html - there’s a new option “Specify…” (not in the doc yet) which will allow you to choose any macro/keyword form to resolve as.#2017-11-2908:41curlyfryThat's great! Unfortunately I can't seem to get it to list that option. I put my cursor on the function name and press alt+enter, but all I get is "Configure indentation for..."#2017-11-2909:44curlyfryDoes it have to be a macro in order to be added? I would prefer not to alter my code to get the 'Specify' functionality to work.#2017-11-2921:50cflemingYes, you’re correct - I need to fix this, and will do so for the next build (should be out soon, I want to get some fixes and improvements to this functionality out ASAP). The issue is that resolution was previously only able to be customised by macros, but things that register via keywords don’t have to be, they can just be functions. But I’d rather not offer this option for all functions - I’ll investigate this and fix it soon.#2017-11-2922:08curlyfryCool, thanks!#2017-11-2822:40zyloxthat will save me and my team a lot of time. +1#2017-11-2822:40zyloxno more digging for that xml file hopefully#2017-11-2823:11cfleming@zylox Yes! I’m working right now on https://github.com/cursive-ide/cursive/issues/1885, which will make sharing those settings with your project easier.#2017-11-2823:12cflemingI really wanted that in 1.6.2 too, but I had to get it out before IDEA 2017.3 went GA#2017-11-2823:12cfleming1.6.3 should be out soon with that change, assuming it works ok.#2017-11-2823:15zyloxshould be interesting. we have well over 100 clojure projects though so i dont know how much it will fit our needs if im reading this right#2017-11-2823:17zyloxseems the linked issue deals primarily with storing those settings in a project.#2017-11-2823:19cflemingYes, that’s right. It may not work so well in your case, then. I’ll try to get import/export in there too, so at least you can create a scheme once, export it and then teammates and new hires can just grab that and import it.#2017-11-2823:19cflemingWith that many projects, I assume you’d probably keep the custom resolution in your IDE scheme so it works over all projects.#2017-11-2823:20zyloxboth are certainly useful. our use case is definitely not the standard one. right now i have a gist sitting out there on our internal github with the xml file. so anything is an upgrade#2017-11-2909:44curlyfryDoes it have to be a macro in order to be added? I would prefer not to alter my code to get the 'Specify' functionality to work.#2017-11-2909:11nblumoeHey hey. Are the Clojure Keybindings gone? Cannot find it on Preferences anymore…#2017-11-2909:16p-himik@nblumoe You mean structural editing? It's still there, Keymap -> Main menu -> Edit -> Structural Editing.#2017-11-2909:16p-himikCursive 1.6.2-2017.2#2017-11-2909:23cfleming@nblumoe Yes, that just got removed in 1.6.2, I haven’t updated the doc yet. https://groups.google.com/d/topic/cursive/vG5Uxm8ip2M/discussion has details.#2017-11-2909:39nblumoeHa, ok thanks. ...possibly no other code has ever given me greater pleasure when deleting it. 👍#2017-11-2914:26p-himikFor some reason keywords passed into cljs.spec.alpha/def are not highlighted.#2017-11-2917:17shaun-mahood@cfleming: The re-frame specific navigation in the new build is fantastic - thanks!#2017-11-2918:50kennyHow come the resolve-as dropdown does not appear when doing alt+enter over a macro usage in a library file?#2017-11-2921:51cfleming@kenny It should do, if it doesn’t it’s a bug - I’ll investigate.#2017-11-2921:52cfleming@p-himik I’ll check that too, thanks.#2017-11-2921:53cfleming@shaun-mahood Thanks! Glad it’s useful.#2017-11-3002:01souenzzoI believe that the expressions are equivalent. But cursive dosent like the first form.#2017-11-3002:02cfleming@souenzzo Yes, that’s possible. Currently Cursive in CLJC struggles when the head position of an invocation is a reader conditional.#2017-11-3002:02cflemingI would have expected that case to work correctly, though.#2017-11-3002:03cflemingWhat’s also odd is that it seems to mess up the paren balancing.#2017-11-3002:06cfleming@souenzzo https://github.com/cursive-ide/cursive/issues/1906#2017-11-3005:37p-himikI'm using IdeaVim, and it seems that after the latest release of Cursive it started to get parentheses wrong much more often. E.g. ca( instead of changing current section of parentheses would change from the first parenthesis till the end of the top-level function, regardless of how deep the first parenthesis is. Can it be something that Cursive does? Or is it something that should be directed to the developers of IdeaVim?#2017-11-3005:42p-himikNevermind that, just a bad coincidence I think. Right when I updated Cursive, I started to use a set of functions that accept symbols. Being escaped with a quote, they apparently prevent Vim from detecting parentheses.#2017-11-3005:43shaun-mahoodDo intellij crashes happen often for anyone when using a mac? I'm not sure if it's just the version or something else, but using it on my mac it seems to crash WAY more often than on either windows or linux.#2017-11-3014:55zyloxive never had a crash, thought ive had slow downs to the point of needing a restart maybe once a week.#2017-11-3009:06cfleming@shaun-mahood No, I use a mac and it hardly ever crashes.#2017-11-3016:40shaun-mahoodThanks, that's good to know - it's been pretty much daily so I guess it's time to do some work on the computer itself.#2017-11-3018:30p-himik@shaun-mahood Is there anything in the IDE logs?#2017-11-3020:50shaun-mahoodThere are definitely log files - I'm going to just update intellij and see if it keeps happening.#2017-11-3009:59nblumoeAre there any known restrictions to using IntelliJ modules with Cursive? For example should it work to have a root Elixir module and then a Cursive module within that? I tried setting that up but IntelliJ seems to mess it up and I always end up with a single module (either the root one or the nested one)#2017-11-3020:20cfleming@nblumoe Yes, that should work fine. If you’re still having problems could you send a list of repro steps and I’ll try it out#2017-12-0109:59nblumoeThanks, I will try it out with a fresh, new project and send an update.
#2017-12-0206:58p-himikA small peculiar thing - forms prefixed with #_ are still read by the reader, and every namespace alias mentioned there must be available. But if a namespace alias is mentioned only within such a form, it will be highlighted as Unused alias, which is incorrect. It's used by the reader.#2017-12-0302:53Oliver George@cfleming just checking where Cursive stands regarding deps.edn support. I couldn't see a github issue covering it.#2017-12-0308:23cfleming@olivergeorge No, there’s no support yet, or an issue I can recall#2017-12-0308:23cflemingFeel free to file one, I’m planning to add support at some point but I haven’t figured out the priority yet.#2017-12-0400:23Oliver GeorgeI've added a simple Cursive Github issue related to this. https://github.com/cursive-ide/cursive/issues/1910#2017-12-0400:47cflemingGreat, thanks!#2017-12-0309:38Oliver GeorgeThanks, will do. It’ll be nice to have a simple / barebones tooling option. #2017-12-0310:04cfleming@olivergeorge Sure. There are some issues with it - deps has no concept of source folders, for example. I’m not sure how I’m going to handle that.#2017-12-0322:05Alex Miller (Clojure team)It does now actually#2017-12-0322:06Alex Miller (Clojure team):paths [“src”]#2017-12-0322:12cfleming@alexmiller Oh nice - so things under :paths are always source paths? What about resource paths - does it make a distinction?#2017-12-0322:43Alex Miller (Clojure team)No#2017-12-0322:43Alex Miller (Clojure team)From a classpath perspective, there is no difference #2017-12-0322:55cflemingRight. I’ll need to figure out how to handle test paths and so on as well, it’ll probably just need some UI around it.#2017-12-0323:14Alex Miller (Clojure team)You can add as many dirs as you like so :paths [“src” “resources” “test”]#2017-12-0323:14cflemingRight, but IntelliJ likes to know which is which.#2017-12-0323:14Alex Miller (Clojure team)Or you can also add :extra-paths in an alias#2017-12-0323:14cflemingAnd the example in the README suggests putting test in an alias#2017-12-0323:15Alex Miller (Clojure team)So you could create aliases for each and selecting them#2017-12-0323:15cflemingRight, but I need to be able to read any deps file and figure out what the user’s intention was.#2017-12-0323:15cflemingSo I can’t force them to use a particular alias layout.#2017-12-0323:16cflemingI guess I’ll present a list of all source paths found in all aliases, guess based on whether they’re called “test” and then let the user customise the result.#2017-12-0323:16cflemingOr something similar.#2017-12-0323:16Alex Miller (Clojure team)Seems workable #2017-12-0323:51cfleming@alexmiller Is there any plan to be able to get a dependency tree out of deps somehow?#2017-12-0323:51cflemingAFAICT it will only return a classpath right now.#2017-12-0400:18Oliver GeorgeTotal speculation but I imagine there's code you could leverage in https://github.com/clojure/tools.deps.alpha/blob/ad54d15754b96d89540ae2619d46fc6bbbec169e/src/main/clojure/clojure/tools/deps/alpha.clj#L18#2017-12-0400:22Alex Miller (Clojure team)The lib map returned from resolve-deps is flat but has dependent data in it so it’s actually a shredded tree#2017-12-0400:23Alex Miller (Clojure team)Do you want the data for something or printing for debug?#2017-12-0414:13changHas anybody figured out how to jump between panes in intelliJ + IdeaVim. For instance on Chrome devtools: * I can cmd + ] to move to the next pane or the opposite * with cmd + 2 jump to console, cmd + 7 to jump to application It would be nice to be to be able to do the same for opened editor panes.#2017-12-0414:31p-himikYou can use e.g. Alt+1 to open the Project pane. Each tool window that has an assigned Alt+digit key combination, has this digit right before the panel name.#2017-12-0414:32p-himikAnd all these shortcuts are completely customizable, so even if some panel doesn't have a key combination, you can assign your own.#2017-12-0414:49changThanks @p-himik, I got cmd+] and the other working. Guess I was too afraid to mess with default settings 😬#2017-12-0415:58sandbagsHow does Cursive know which forms are binding forms? I am guessing it maybe hard coded to know about fn, let etc..?#2017-12-0416:00sandbagsi'm getting "cannot resolve conn" errors from uses of, e.g. jdbc/with-db-connection [conn db] (same for with-db-transaction) and it just occurred to me that it may rather be that cursive doesn't realise these are binding forms#2017-12-0416:04snoethere’s an inspection where you can make with-db-connection resolve as let#2017-12-0416:06sandbags@snoe thank you!#2017-12-0416:07sandbagsah, the indentation expectation is super-handy too, thank you doubly!!#2017-12-0416:07sandbags(ah, it is applied to new ones, just not retroactively to old ones)#2017-12-0423:07cfleming@sandbags Right, it won’t reformat all your existing code, you’ll have to do that manually. It’ll just update the form you’re using as an example.#2017-12-0500:54cfleming@curlyfry The next release has a fix for the resolution customisation problem you were having. I now allow customising any var to any other - I realised that many of Clojure’s core forms affecting resolution (`alias`, refer etc) are functions, not macros so now I allow it all.#2017-12-0500:55cflemingSo things like re-frame wrappers will now be easier.#2017-12-0505:59curlyfry@cfleming Awesome!#2017-12-0510:04nblumoeHey, should Debug be available for remote REPLs? I tried starting the Cursive REPL via IntelliJ’s “Debug…” but it does not seem to work and does not behave differently than normal run. Also the “Run > Debug” menu item is always greyed out. The documentation only mentions local REPL debug, is it not available for remote REPLs? I found some old Github issues around that which seem to indicate that it should work.#2017-12-0514:23james@cfleming Hi Colin, we’re having a problem with IDEA being immediately shut down as soon as we try to debug our ring server. We’re guessing that it could be a similar issue to https://github.com/cursive-ide/cursive/issues/1230, as we see the same shutdown message in IDEA’s log as soon as we try to start the leiningen process. Our configuration: Run/Debug Configuration -> Leininigen -> Arguments: ring server-headless, Use trampoline: checked, Activate tool window: checked
:profiles {:dev {:plugins [[lein-ring "0.9.7"]]
                   :dependencies [[ring/ring-mock "0.3.0"]]
                   :test-paths ["test"]}
             :api {:ring {:init api.core/init
                          :handler api.core/app
                          :port 6003}}
             :worker {:ring {:init worker.core/init
                             :handler worker.core/app
                             :port 6004}}}
Any ideas on how we could fix this?
#2017-12-0600:17cfleming@nblumoe You can do this, but there are some extra steps. It’s not in the doc but there are some examples in the mailing list, see e.g. here: https://groups.google.com/d/topic/cursive/FW4F9bq8b78/discussion and here: https://groups.google.com/d/topic/cursive/iTri7vvXViA/discussion#2017-12-0603:14cfleming@james This is a bug in lein-ring, I’ve filed https://github.com/weavejester/lein-ring/issues/196. It’s easy to work around, the issue is that your run config doesn’t use either the api or worker profile, so there’s no :handler configuration in your project. lein-ring incorrectly calls System/exit in that case, see: https://github.com/weavejester/lein-ring/blob/master/src/leiningen/ring/util.clj#L23-L31#2017-12-0622:34cfleming@james That was quick, lein-ring 0.12.2 is out with the fix for that problem.#2017-12-0702:00echristophersonI'm having trouble with ctrl+up/down moving between functions. I see the Navigation menu lit up as if I've triggered an action within it, but the system bell sounds and the cursor doesn't move.#2017-12-0702:42grzmLooking through the webdocs, it looks like the keybinding docs may be out of date with recent versions of IntelliJ. With IntelliJ IDEA 2017.2.5 on Mac OS X, there's no Clojure option under Preferences > Keymap, and the dialog doesn't look anything like what's on the page. https://cursive-ide.com/userguide/keybindings.html As I'm pretty new to IntelliJ, I might be completely looking in the wrong location.#2017-12-0703:22echristophersonThanks.#2017-12-0703:23echristophersonI am pretty sure the ctrl+up/down keys are the "right" ones, since the menu shows those as the accelerators, and the menu activates when I hit them#2017-12-0703:23echristophersonI just tried and ascertained that I can manually click those entries in the menu and it works.#2017-12-0704:05echristophersonI forgot to mention I'm using IdeaVim. I'll try without it.#2017-12-0704:05echristophersonI did find the Keymap part of settings#2017-12-0704:05echristophersonpreferences#2017-12-0704:10echristophersonYeah, it works without the Vim emulation. And I can set a secondary set of keys that do work with the Vim emulation.#2017-12-0704:48echristophersonAnd the same is true in a Java project with no Clojure#2017-12-0704:48echristophersonSo I'll take this issue to JetBrains#2017-12-0704:53echristophersonthanks#2017-12-0708:17james@cfleming Thank you for the work-around, and that was an incredibly fast fix on their side. Everything is working smoothly now.#2017-12-0709:13cfleming@grzm Yes, that doc is out of date, that was fixed in the latest release. I’ll update the doc shortly.#2017-12-0709:14cflemingHopefully all the keys you need should be bound out of the box now, let me know if you’re missing anything.#2017-12-0710:50sandbagsI find the "extract variable" refactoring very useful but am I missing an "extract to function" refactoring?#2017-12-0711:11flowthing@sandbags: https://github.com/cursive-ide/cursive/issues/89#2017-12-0717:15grzmThanks, @cfleming!#2017-12-0717:51joelsancheztoday I updated Cursive and now I can do "jump to definition" on namespace-qualified keywords! nice#2017-12-0721:08cfleming@sandbags Yes, you’re missing it because it’s not there 😞. Sorry.#2017-12-0721:11sandbagsAh well, I look forward to celebrating it's arrival in the future then 🙂#2017-12-0802:15echristophersonoh, that's a parameter -- that must be what (p) means#2017-12-0802:23echristophersonOK, here's something else: I am in the debugger and I clicked on a stack frame that's in Java with no source (part of Clojure)#2017-12-0802:24echristophersonbut the place in the decompiled source isn't the right place#2017-12-0802:25cfleming@echristopherson Hmm, that’s an IntelliJ issue I think.#2017-12-0802:25echristophersonOK#2017-12-0802:25cflemingBut you should be prompted to download the source?#2017-12-0802:26echristophersonI seem to remember being prompted to download source, but I don't remember if it was for Java or for Clojure. But either way, I always get decompiled classes#2017-12-0802:27cflemingClick the Download… link in the banner at the top of the editor.#2017-12-0802:27echristophersonOK.#2017-12-0802:27echristophersonoh, that just downloads one source file?#2017-12-0802:27cflemingI think that is the correct definition of invoke, in RestFn#2017-12-0802:28cflemingNo, it downloads the source for that lib and attaches it.#2017-12-0802:28echristophersonOK#2017-12-0802:31echristophersonI see that when I download the source, it shows the right source file, but it doesn't jump to line 397#2017-12-0802:34cflemingIf you click on the stack frame element again, does it navigate correctly?#2017-12-0802:34echristophersonOh, OK. Java source does show up too.#2017-12-0802:34echristophersonNo.#2017-12-0802:34cflemingThat’s very weird.#2017-12-0802:35cflemingUnfortunately it’s out of Cursive’s scope, that’s the underlying JVM debugger, but it seems odd.#2017-12-0802:35echristophersonOK.#2017-12-0802:36echristophersonI can't remember what the command is called that gives you a popup menu of things you can do with the current file -- like opening it in the navigator or the OS file manager#2017-12-0802:36cflemingSelect In….#2017-12-0802:36cflemingAlt-F1, at least on a Mac#2017-12-0802:37echristophersonperfect! thanks#2017-12-0802:37echristophersonThis seems like a nice IDE platform#2017-12-0802:37cflemingThanks, I’m glad you like it!#2017-12-0802:37cflemingThe IntelliJ platform is really nice to build on.#2017-12-0802:41echristophersonHere's something I've wondered about IDEs with certain languages: when you put the function name before all the parameters -- instead of putting the receiver parameter before the function name as in Java -- how is completion implemented? Like, can you invoke a function completion without having already typed a function name, but somehow specify that you want to see all the functions that take a string as first param?#2017-12-0802:43echristophersonOh wow. I see you have a fork of a project called riddley -- which is named after a book I like, that I was just reading about yesterday.#2017-12-0802:44cflemingRight, it’s a code walker 🙂#2017-12-0802:44cflemingztellman is a literary sort of chap.#2017-12-0802:46cflemingRe: completion, it’s tricky. Generally for vars it’s fairly easy since the available ones don’t depend on the first argument.#2017-12-0802:46cflemingIt’s a problem with interop, though.#2017-12-0802:46echristophersonHmmm#2017-12-0802:46cflemingCursive handles this by doing type inference, and allowing you to do (my-obj .myMet<complete>)#2017-12-0802:47echristophersonOh, for Java objects#2017-12-0802:47echristophersonI was just thinking that#2017-12-0802:47cflemingThat will then autocomplete to (.myMethod my-obj|), only offering methods available for the type of my-obj if Cursive can figure it out.#2017-12-0802:48cflemingOtherwise if you just autocomplete (.myMeth<complete>) then Cursive will offer all methods available on all imported classes, plus methods available in the types of any local variables that are in scope that it can figure out.#2017-12-0802:49echristophersonso... (my Clojure's kind of rusty...) (my-obj .myMethod) doesn't actually work in Clojure? It has to be transformed by the IDE?#2017-12-0802:49cflemingSo in a case like:
(let [list (ArrayList.)
      iterator (.iterator list)
  (.ne<complete>))
#2017-12-0802:50cflemingCursive will offer .next as a completion even though Iterator isn’t imported.#2017-12-0802:50echristophersonoh! right, I am rusty... I was forgetting about the dynamic typing#2017-12-0802:51cflemingRight, interop takes the method first, then the receiver.#2017-12-0802:54echristophersonHmm, I have .next as the fifth item#2017-12-0802:59cflemingThat’s possible, yes - it can’t know which one you’d like of the available options.#2017-12-0803:01echristophersonOh, OK. I thought you were saying it would put the Iterator one at the type via inference.#2017-12-0803:03cflemingNo, but it uses type inference to even know that .next should be in the list.#2017-12-0803:04echristophersonOK.#2017-12-0803:11echristophersonI'm having trouble triggering it to move .myMethod to the front#2017-12-0803:16cflemingWhat are you trying to do?#2017-12-0803:17echristophersonjust trigger a completion from (the-list .iter|) to (.iterator the-list)#2017-12-0803:18cflemingSo, one thing is that right now this will only happen in a standard code editor, and not the REPL editor.#2017-12-0803:18echristophersonRight. I tried in both places, figuring that might be true.#2017-12-0803:19echristophersonSince I'm not in a REPL now, maybe I need to use a let as you did, otherwise the code sense thing doesn't know the-list is an ArrayList?#2017-12-0803:19cflemingHow did you define the-list?#2017-12-0803:20echristophersonWith def.#2017-12-0803:20echristophersonI just tried letting it and it worked there.#2017-12-0803:20echristophersonYou might want to make (. the-list iter|) complete also.#2017-12-0803:20cflemingYes, def doesn’t add type information to the var it defines unless you explicitly hint it.#2017-12-0803:21cflemingYeah, I’m planning to do that, since it’s also consistent with the built-in form that interop desugars to.#2017-12-0920:20genechi, when I start lein repl in my project directory it works fine, but when I start the local repl from within IntelliJ with cursive I get the following msg: bjc[60298]: Class JavaLaunchHelper is implemented in both /Library/Java/JavaVirtualMachines/jdk1.8.0_101.jdk/Contents/Home/bin/java (0x107bfd4c0) and /Library/Java/JavaVirtualMachines/jdk1.8.0_101.jdk/Contents/Home/jre/lib/libinstrument.dylib (0x107cdf4e0). One of the two will be used. Which one is undefined.#2017-12-1012:01genecFound the fix by adding idea.no.launcher=true to the idea.properties file, this is a java bug that will be fixed in 1.9. Also, it's a harmless msg and can be ignored.#2017-12-1102:24briantricethanks!#2017-12-1110:48flowthing@genec: it's also fixed in Java 1.8.0_152.#2017-12-1110:57genecthanks, and odd since I have 1.8.0_101 and it hasn't updated, says I'm up to date. will d/l it now#2017-12-1114:25p-himikWould it be possible to make Cursive highlight function parameters like IDEA does for e.g. Python?#2017-12-1120:52amannIs there a way to get cursive to abort the current command in the repl? ie [this](https://stackoverflow.com/questions/14813764/how-to-stop-execution-of-function-in-clojure-without-exiting-repl) but for Intellij etc.?#2017-12-1121:00shaun-mahoodThere's an "interrupt current evaluation" button that does that - it works in most cases for me, but not when I print 100000000 lines accidentally#2017-12-1122:08chrisdevoWhat happened to the "Show Difference" link in the test output popup?#2017-12-1122:08chrisdevoDoes that still work?#2017-12-1122:23chrisdevoNevermind. It works for me when I Use nREPL in normal JVM process, but not Run nREPL with Leiningen.#2017-12-1122:39Oliver GeorgeReally enjoyed reading your responses to the AMA yesterday @cfleming #2017-12-1122:46cfleming@olivergeorge Thanks! I’m still monitoring it for the rest of today in case any more questions come up#2017-12-1201:03Oliver GeorgeHere's one I've been wondering about... https://clojureverse.org/t/im-colin-fleming-ask-me-anything/1148/39?u=oliver_george#2017-12-1200:42cfleming@p-himik Yes, I’m planning to add that.#2017-12-1201:01cfleming@chrisdevo BTW I’m assuming those are the wrong way around? Currently that only works with nREPL.#2017-12-1201:22echristophersonI didn't know there were AMAs outside of reddit#2017-12-1201:56echristophersonARGH, what is wrong with web developers that more and more sites override really useful and commonly-used things like ctrl+f?#2017-12-1201:56echristophersonsorry, venting in the wrong place#2017-12-1208:57p-himikIt's not a big deal, at least for me, but Cursive doesn't work on JDK9: java.lang.NoClassDefFoundError: javax/xml/bind/DatatypeConverter. Apparently, JAXB API has been removed from Java SE 9.#2017-12-1208:59cfleming@p-himik That’s only when running IntelliJ itself with JDK9, right?#2017-12-1209:10p-himik@cfleming Yup.#2017-12-1209:11p-himikWell, I didn't try to run anything on JDK9, so I can't say for sure. When I encountered that error, I just switched back to JDK8 completely.#2017-12-1214:44Alex Miller (Clojure team)I used JDK 9 from within Cursive yesterday with no problem#2017-12-1214:45Alex Miller (Clojure team)to run Clojure that is#2017-12-1217:54grzmIs there a shortcut for "require namespace" other than using Find Action? Or just a command available so I can bind my own shortcut? I didn't see anything in Preferences under keymap.#2017-12-1220:26martinklepsch@cfleming hey 🙂 Looking into exposing dynamic boot dependencies in a static way. What do you need for proper integration? a java classpath string, dependencies vector or are both equally good?#2017-12-1220:51danielcompton@martinklepsch pom.xml troll#2017-12-1220:53martinklepschI guess I can make a pom.xml from a dependencies vector?#2017-12-1221:01Alex Miller (Clojure team)btw, clj has an -Spom option that will generate a pom.xml#2017-12-1221:02Alex Miller (Clojure team)useful to go from deps.edn -> pom.xml -> working Cursive project#2017-12-1221:10martinklepsch@alexmiller is that available in the tools.deps API somewhere?#2017-12-1221:15Alex Miller (Clojure team)yep#2017-12-1221:15Alex Miller (Clojure team)clojure.tools.deps.alpha.gen.pom/sync-pom#2017-12-1221:16Alex Miller (Clojure team)or if you want the tool edge wrapper, that’s in clojure.tools.deps.alpha.genmf#2017-12-1221:35cfleming@alexmiller Right, but @p-himik is talking about using it to run IntelliJ, not projects within IntelliJ.#2017-12-1221:35cflemingI’m actually surprised IntelliJ itself works.#2017-12-1221:35cfleming@p-himik Do you have any particular reason for wanting to do that?#2017-12-1221:37cfleming@martinklepsch Ideally I’d like a dependencies tree. I can build the tree myself if you give me a map of {project dep -> [its dependencies]} or something like that.#2017-12-1221:37cflemingBut for dependencies I need both the coord and the artifact jar(s)#2017-12-1221:39cflemingI’m very curious how you’re planning to do this, since any task can add deps at any time, right?#2017-12-1221:39martinklepschright but tasks shouldn’t really do this except inside pods#2017-12-1221:39martinklepschIMHO a task that adds dependencies to your global env is broken 😛#2017-12-1221:39cflemingI actually chatted to Micha a while ago about this.#2017-12-1221:40cflemingIn my experience, users still get upset even if they’re doing broken things 🙂#2017-12-1221:40Alex Miller (Clojure team)+1#2017-12-1221:40cflemingAlthough in general I don’t have a problem saying that “if you do really crazy things you’re on your own”#2017-12-1221:40cflemingAdding deps in tasks does seem potentially useful though.#2017-12-1221:40Alex Miller (Clojure team)programmable builds are a great idea. programmable (ie not data) deps is not. imho.#2017-12-1221:41cflemingI definitely agree with that.#2017-12-1221:42cflemingGradle actually has a really nice model, which is basically that - partly declarative but the build is imperative.#2017-12-1221:42cflemingYou can tell they thought a lot about tooling it when they designed it.#2017-12-1221:44p-himik@cfleming No reason at all. Just saw that IDEA has a support for it, decided to try.#2017-12-1221:45cflemingOk - do they officially support running IntelliJ under JDK9? I hadn’t seen anything about that.#2017-12-1221:45cflemingI know they’re going to move their JDK build to JDK9 at some point, but I can imagine that might take a while.#2017-12-1221:46p-himikMaybe I misunderstood, and they just support Java 9 as a language.#2017-12-1221:46martinklepschThis is a separate problem - prefetching dependencies in CI - but I think a solution for Cursive could follow a similar approach: https://clojureverse.org/t/statically-expose-pod-dependencies-idea-proof-of-concept/1179#2017-12-1221:47p-himikRegarding programmable builds - interesting how in Python world people more and more often talk about moving from programmable to static builds, because programmable builds cause way too much problems.#2017-12-1221:47martinklepschIt’d be an interesting experiment to replace Boot’s dynamic env with tools.deps static one.#2017-12-1221:47cfleming@martinklepsch That looks nice. The problem is that I can’t only support boot projects that are structured in a certain way.#2017-12-1221:49martinklepschyeah, I mean this post is really about a different issue, in your project you probably don’t really care to much about dependencies in pods that you don’t really have access to anyways#2017-12-1221:51cflemingWell, I do, since presumably the project has code which needs those deps.#2017-12-1221:52cflemingAll this for Cursive is so that I know which libraries the project needs - presumably if a pod needs them, some code in the project does too, unless it’s a jar for a tool of some kind (web service code generation or something)#2017-12-1221:52martinklepschmaybe we’re misunderstanding each other but what tasks do in pods is opaque to the user, they don’t have access to whatever is happening inside a pod#2017-12-1221:53martinklepschpods are intended for dependencies your project does not depend on besides some minor tooling concern, whose API is exposed through the boot task#2017-12-1221:53cflemingRight, but assuming the code in the pod is user code from the project (which it may not be if it’s e.g. a tool of some kind) then it’ll need those deps.#2017-12-1221:55cflemingCan you give me an example of the sort of thing a pod is designed for?#2017-12-1221:56martinklepschA very basic example is this: https://github.com/martinklepsch/boot-deps/blob/master/src/boot_deps.clj#L12-L13#2017-12-1221:56martinklepschWe create a pod with some dependencies we need to do the job of the task but otherwise don’t need for the project itself#2017-12-1221:56cflemingOk.#2017-12-1221:57cflemingYeah, in that case Cursive wouldn’t care.#2017-12-1221:57martinklepschIf a project contains code using pods (not too common but def. possible) that would be problematic I guess#2017-12-1221:57martinklepschbut this is definitely more of an edge case#2017-12-1221:47martinklepsch@cfleming I presume if everyone using Boot were to use deps.edn this whole issue would be solved as well right?#2017-12-1221:48cflemingI probably can say “you’ll get better support if you do this” though.#2017-12-1221:48cflemingYes.#2017-12-1221:48cflemingBTW anyone using IdeaVim with Cursive probably should take a look at https://twitter.com/ideavim/status/940640661774233600#2017-12-1313:02martinklepschdoes Cursive already support deps.edn?#2017-12-1321:26Oliver GeorgeNo but Alex pointed out ‘clj -Spom’ generates a pom.xml which should let you setup a project.#2017-12-1314:46mfikesTip: After upgrading 2017.3 and Cursive, be patient for it to index. Until then the REPL "go" button will be disabled.#2017-12-1421:01grzmI have my test source files in test/server/. Cursive seems to assume my tests are test/. I have set up project.clj as :test {:source-paths ["test/server"]}. What am I missing? I can manually set the appropriate value via Project Structure, but it gets reset every time I re-import project.clj.#2017-12-1421:36cfleming@grzm So there, :test is a profile? In that case, open the Leiningen toolwindow and open the “Profiles” tree - these are the profiles that Cursive will use to sync the project information. Select “test” there and refresh your project, and your source folder should be synced.#2017-12-1421:44joelsanchez@cfleming How can I tell Cursive to run a function on REPL startup?#2017-12-1421:46grzmI'm likely missing something. Yes, this is under the :test profile. I check "test" (not "leiningen/test") under the "Profiles" tree, and click the 🔄 button/icon. Am I following what you meant correctly? It does the same thing, revert my "test/server" "test" selection in Project Structure to "test".#2017-12-1421:46grzmTests from the command line run as expected, btw.#2017-12-1421:47cfleming@joelsanchez Cursive doesn’t provide the means to do that, but is it possible to use user.clj for that? That’s just a Clojure thing.#2017-12-1421:48cfleming@grzm Hmm, that should work, I think - can you send a screenshot of your lein toolwindow? DM me if you’d prefer.#2017-12-1421:49joelsanchez@cfleming I wanted to execute a function depending on the REPL configuration that I'm running, was just asking, no problem if it's not possible (the most useful case would be calling figwheel-sidecar.repl-api/cljs-repl when I run the REPL configuration for CLJS)#2017-12-1421:49cflemingYeah, a few people have asked for that - I’ll try to add that soon.#2017-12-1422:03grzmJust a follow-up for the record: the issue is that I was using :source-paths instead of :test-paths in my :test profile. Thanks, @cfleming!#2017-12-1423:56kennyDoes the Cursive debugger offer any help in debugging code generated by macros in 3rd party libraries?#2017-12-1423:57cfleming@kenny Generally, not really, it’s pretty difficult. Can you give an example of what you’re trying?#2017-12-1423:57kennySure. It's pretty nasty though.#2017-12-1423:58cflemingI’m sitting down.#2017-12-1423:59kennyHaha. Getting a NPE pointing to this line: https://github.com/fzakaria/slf4j-timbre/blob/master/src/slf4j_timbre/adapter.clj#L126. I'd really like to be able to expand that macro to see where exactly the NPE is occurring.#2017-12-1423:59kennyWhat makes it especially nasty is that file itself generates a Java class.#2017-12-1500:00cflemingHmm. Unfortunately you probably can’t. The issue is that the generated code has no line/col information in it, so you can’t associate the expansion with anywhere in the source code.#2017-12-1500:01cflemingYou can look at the expansion using the Cursive macroexpander, but that won’t help you with the exact location of the error within the expansion.#2017-12-1500:02cflemingIf that file generates a java class, doesn’t the NPE come from that class?#2017-12-1500:03cflemingOr is the NPE in the macro itself?#2017-12-1500:03cflemingOh I see, it’s using gen-class.#2017-12-1500:05kennyGetting this invokeNoArgInstanceMember at the top of the stack trace so I'm guessing it isn't generating a method for a call that someone else is expecting. The stacktrace just points to line 126 though.#2017-12-1500:06cflemingCan you post the last couple of stacktrace lines? DM if you’d rather.#2017-12-1500:07kennyCan't navigate to the source on the line selected because there is no source. Though, it may be useful to look at.#2017-12-1500:09kennyHere's the textual version:
NullPointerException   clojure.lang.Reflector.invokeNoArgInstanceMember (Reflector.java:301)
                                          clojure.core/eval                       core.clj: 3206
                                                        ...                                     
                                         dev.user/eval48615                      REPL Input     
            compute.memcached.session-store/memcached-store              session_store.clj:   16
                   compute.memcached.core/binary-connection                       core.clj:   32
                clojurewerkz.spyglass.client/bin-connection                     client.clj:   95
                   net.spy.memcached.MemcachedClient.<init>           MemcachedClient.java:  209
net.spy.memcached.DefaultConnectionFactory.createConnection  DefaultConnectionFactory.java:  209
               net.spy.memcached.MemcachedConnection.<init>       MemcachedConnection.java:  282
    net.spy.memcached.MemcachedConnection.createConnections       MemcachedConnection.java:  345
                       AbstractLogger.java:  161
                       AbstractLogger.java:  150
               net.spy.memcached.compat.log.Log4JLogger.log               Log4JLogger.java:   99
                              org.apache.log4j.Category.log                  Category.java:  297
                org.apache.log4j.Category.differentiatedLog                  Category.java:  193
   com.github.fzakaria.slf4j.timbre.TimbreLoggerAdapter.log                                     
                                                        ...                                     
                                    slf4j-timbre.adapter/fn                    adapter.clj:  126
                                                        ...                                     
java.lang.NullPointerException: 
#2017-12-1500:09cflemingThat’s pretty nasty.#2017-12-1500:10kennyHa. Indeed.#2017-12-1500:10cflemingAt a guess, looking at invokeNoArgInstanceMember, I’d say the target is null because it calls target.getClass().#2017-12-1500:10kennyYep#2017-12-1500:10cflemingSo in some interop call within the expansion, the receiver is null.#2017-12-1500:11cflemingSo - this# or caller##2017-12-1500:11kennyNo idea who's passing that in though. I can actually walk the calls to get to that null though. I forget the method someone was trying to call on it but it's probably useful.#2017-12-1500:12cflemingActually, you should be able to put an exception breakpoint on NPE.#2017-12-1500:12kennyThe class?#2017-12-1500:12cflemingReproduce the problem, and the debugger will stop you in invokeNoArg….#2017-12-1500:12cflemingNo, one sec.#2017-12-1500:13cflemingOpen breakpoints, hit +, select Java Exception Breakpoint, then search for NPE#2017-12-1500:13cflemingThen the debugger will break whenever one is thrown.#2017-12-1500:14cflemingThat will stop you in invokeNoArgInstanceMember, and you can see what is null, and hopefully based on the other params you might get an idea.#2017-12-1500:14kennyHow do I open breakpoints? I usually just ctrl+shift+n for the file I want and add one in.#2017-12-1500:14cflemingAre you debugging right now?#2017-12-1500:14kennyYes#2017-12-1500:14kennyFound it 🙂#2017-12-1500:14cflemingShift-Cmd-F8#2017-12-1500:15cflemingOr the icon with …. right#2017-12-1500:15cflemingSeriously, exception breakpoints are the best thing ever#2017-12-1500:15cfleming95% of my debugging starts with them.#2017-12-1500:15kennyBTW is there a way to skip through all the frames to get back into the REPL?#2017-12-1500:16cflemingF9 will start running again#2017-12-1500:16cflemingIs that what you mean?#2017-12-1500:17kennyKinda. Except I may need to hit F9 ten times to get back to the REPL.#2017-12-1500:17cflemingYeah, unfortunately.#2017-12-1500:18kennyThat helps! I at least get to see that nasty generated class.#2017-12-1500:19cflemingRight, and you might be able to figure out what’s going on.#2017-12-1500:19kennymight... 🙃#2017-12-1500:20cflemingWell, your odds are some number greater than zero.#2017-12-1500:20kennyThanks to this awesome debugger!#2017-12-1500:21cflemingSometimes it’s a lifesaver, for sure.#2017-12-1500:23kennyAny way to see values of vars defined in a method in this generated class?#2017-12-1500:25cflemingWhen you’re paused at the breakpoint, you can use Evaluate Expression#2017-12-1500:25cflemingYou’re in Java, so you probably want var7.get()#2017-12-1500:25kennyIt doesn't appear to be at the right scope. All the vars except var7 are available.#2017-12-1500:26kennyWell.. No vars defined within the method are available.#2017-12-1500:26cflemingWhich line are you paused at there - var7 is a local#2017-12-1500:26kennyLooks like it's paused at the method definition line.#2017-12-1500:27kennypublic void...#2017-12-1500:27cflemingOk, you’ll need to step a bit until var7 is in scope#2017-12-1500:27kennyStepping takes me elsewhere.#2017-12-1500:28kennyThis method only exists in the stack once.#2017-12-1500:30cflemingI suspect it’s getting confused. What you’re looking at there is the decompilation of a gen-class’ed class. It’s possible that the generated bytecode doesn’t have accurate line information.#2017-12-1500:30cflemingRight, it has a line number of -1#2017-12-1500:30cflemingSo all the debugger knows is that you’re in there somewhere.#2017-12-1500:30kennyAnd there's no way to step inside of the method to test things out?#2017-12-1500:31cflemingCan you get the value of log__var in Evaluate Expression?#2017-12-1500:31kennyYes#2017-12-1500:31kennyGotcha.#2017-12-1500:31cflemingOk, then you can calculate the value that var7 will have yourself#2017-12-1500:32kennyRight. Seems handy to be able to step inside though. I don't know the technical limitation there though.#2017-12-1500:32cflemingThe issue is that I suspect the bytecode generated for that method has no line number information.#2017-12-1500:32cflemingWithout that, the debugger can’t map back from the bytecode it’s currently executing to the source.#2017-12-1500:34kennyMakes sense. It does seem like because this class is statically generated, there could be more help there. That also probably means more work for a niche use-case.#2017-12-1500:34cflemingI suspect this is a limitation of how gen-class works.#2017-12-1500:35kennyCould probably create some hackery to generate the class and then include that class in the JAR.#2017-12-1500:35cflemingThat’s also why the variables are named var1, var2 etc#2017-12-1500:35cflemingThe thing is, it’s not generating Java source, it’s generating bytecode directly.#2017-12-1500:36kennygenerate class, decompile, include? 🙂#2017-12-1500:36cflemingIf it were generating Java source, you’d get to debug that.#2017-12-1500:36cflemingyeah, that would work 🙂#2017-12-1500:36kennyAt least gives you line numbers. But that's a lot of work.#2017-12-1500:37cflemingYou could save the generated class as a .java file, compile that and then put the .class at the front of the classpath so your version is loaded over the gen-classed one.
#2017-12-1500:37cflemingBut it’s probably easier to just muddle around with what you have to be honest.#2017-12-1500:38kennyTotally. Fortunately this generated method is small and that's more work than just figuring out the values on my own.#2017-12-1500:38cflemingRight.#2017-12-1500:39cflemingI’m not sure why that method has no debug info though. It seems like it should point to inside the syntax-quoted block of define-log-method#2017-12-1500:39cflemingThere’s a bytecode viewer plugin you could use if you’re feeling curious 🙂#2017-12-1500:40kennyWhat would the bytecode viewer plugin tell me? Why there's no line number?#2017-12-1500:41cflemingNo, it would just confirm that there are none. You probably need bronsa or someone over in #clojure-dev to help with the why.#2017-12-1500:42cflemingThat’s way outside my knowledge of how multiple levels of macroexpansion interact with the compiler’s line number generation.#2017-12-1500:45kennyGotcha. I'd like to figure out this lovely error before delving down a rabbit hole 🙂#2017-12-1500:45cflemingI suspect that one is a very hairy yak, too.#2017-12-1500:45kennyThe most interesting kind 😉#2017-12-1500:45cflemingHaha, yes indeed.#2017-12-1500:50kennyYou know what'd be cool? A way to test changes to 3rd party sources inline.#2017-12-1500:52cflemingHow would that work?#2017-12-1500:52cflemingEmacs actually allows you to edit the sources of libs and load them, which I would like to support.#2017-12-1500:52cflemingI haven’t figured out how to support that yet though.#2017-12-1500:56kennyOh really? That seems quite useful. I'd imagine it by simply allowing edits in a library source (the yellow tabs). The tricky part would be making sure that edit is temporary.#2017-12-1500:57kennyFor example, I want to go into that adapter.clj file, edit a line, and see if that fixes my issue. To do that right now I have to clone the project, edit the line, bump the version number, install the jar, restart the REPL, then test.#2017-12-1501:03kennyBack to the debugger.. Is there a way to save a var from one view and use it in another view?#2017-12-1501:46cflemingHow do you mean? Between which views?#2017-12-1511:12SebastianHi, I'm trying Cursive right now and I wonder if there is integration for Vagrant. My dev setup usually involves a Vagrant vm which contains the jdk, leiningen, database, ... I was able to set up PyCharm and PHPStorm in a way that they used the Vagrant vm for executing code, running the debugger, doing package managing, which was very nice. Is this doable with Cursive as well?#2017-12-1515:05mbjarlanda question on debugging clojure clode in cursive. I would like to do a "step into" or "step over" per form and see them execute and highlight like they do in the following gif from cider: https://i.stack.imgur.com/wHaYC.gif maybe I just haven't figured cursive out, but it seems to me you can only debug on a 'per line' basis there which is not necessarily what you want in clojure. Is this true or am I just missing something?#2017-12-1515:09mbjarlandand while I'm here : ) is there a way to create a global execution configuration for "lein repl". I find that I do a lot of small projects and every single time I go and create a new execution configuration with the exact same choices checked#2017-12-1515:29manutter51@mbjarland found this about global run configurations: https://stackoverflow.com/questions/24642147/how-do-i-share-intellij-run-debug-configurations-between-projects#2017-12-1515:32mbjarlandyeah I'm aware of that checkbox, it's just that it doesn't seem to do what I would want it to do#2017-12-1515:32mbjarlandi.e. I check it in one project, open a new one and the configurations are still blank#2017-12-1515:32mbjarlandah, you have to manually copy the runConfigurations file to your new project...#2017-12-1515:33mbjarlandnot sure which is less painful, opening the dialog every time or switching to a terminal to locate and copy a file from some old project#2017-12-1515:40manutter51Yeah, IntelliJ didn’t go out of their way to make that easy#2017-12-1519:12kennyHad to run last night. The views I was talking about was each frame in the debugger.#2017-12-1519:44lgougerfound this on the Intellij discussions site : "If you enable Share checkbox in the run configuration panel it would be saved to .idea/runConfiguraions folder."#2017-12-1519:46lgougerI guess I'm repeating what's already been shared. Nothing to see here, move along...#2017-12-1520:10lgougerAdded a request to an old Cursive-IDE issue #401 >>>I think this related, so commenting here rather than adding a new issue. Under Structural Editing, there are "Move Forward" and "Move Backward" actions, I'm requesting "Move Forward with Selection" and "Move Backward with Selection" be added as assignable actions. I currently have <option>-<right-arrow> assigned to the "Move Forward" action and I'd like a SHIFT variant <shift>-<option>-<right-arrow> to make the same movement while also extending the selection.#2017-12-1522:23briantriceI’m having trouble searching https://github.com/cursive-ide/cursive/issues for what I’m looking for so Q: is Cursive interested in docstring or metadata support for referring to other namespaces or functions that are not directly required? Say, for CLJ/CLJS dependencies not formalizable as CLJC.#2017-12-1602:58cfleming@sebastian.goettschkes There’s nothing specific in Cursive for Vagrant, but I doubt IntelliJ’s support is specific to any language. However in IntelliJ the Vagrant support may only be in the Ultimate edition, not the community one - I’m not sure. The smaller commercial IDEs (PHPStorm, PyCharm) include features that are Ultimate-only in IntelliJ.#2017-12-1602:58cfleming@mbjarland Re: debugging, no, there’s no form-based debugging right now. Cursive’s debugger is JDI-based, which is a line-based protocol. IntelliJ does have some workarounds for that, but I haven’t investigated them yet.#2017-12-1602:59cflemingRe: lein repl config, I’m planning to have Cursive create a default REPL run config when creating new projects, but I haven’t done that yet.#2017-12-1603:00cflemingI agree the checkbox in that SO answer isn’t what you want - IntelliJ has no concept of global run configs, unfortunately.#2017-12-1603:02cfleming@kenny I see, you’d like to use locals from deeper stack frames when evaluating in the current one. Interesting idea. There’s nothing technically preventing it except that there’s no language syntax to express that obviously. I could possibly do some UI thing to pull those vars up and fake that they’re local, or something.#2017-12-1820:41kennyExactly. That seems really helpful. Faking as locals would do the trick. It'd also be nice to be able to name the var when saving. Seems like you could create a list of vars for each debug session that contains a list of vars saved. You'd be able to right click on a var shown on a frame, name it, then save it.#2017-12-1603:03cfleming@briantrice I’m not sure what you’re suggesting - could you give me an example?#2017-12-1603:05cfleming@Sebastian Is this what you’re talking about? https://plugins.jetbrains.com/plugin/7379-vagrant#2017-12-1603:05cfleming@sebastian.goettschkes I mean#2017-12-1603:05cflemingNot sure what Slack did there.#2017-12-1603:05cflemingAnyway, there’s nothing suggesting that it’s Ultimate-only.#2017-12-1603:06cflemingIf there’s anything specific you’d like Cursive to do, let me know.#2017-12-1608:31Sebastian@cfleming Thanks for looking into it, I appreciate it! The plugin is for managing Vagrant vms, which is not what I was thinking about. My goal would be to not have clojure (and leiningen and anything else I need for the project) installed on the host and Cursive getting everything it needs from inside the vm. I'll test it over the weekend and see how far I get (nrepl for example shouldn't be a problem)#2017-12-1713:30sandbagsIs there a way to have code folding for data structures? I have some large maps that I would like to fold#2017-12-1713:31sandbagsalso deeply nested vector-based datastructures (a la Hiccup)#2017-12-1720:27danielcomptonWelcome to the light side @arrdem#2017-12-1722:24briantrice@cfleming thanks. One implementation suggestion was ^{:refer-to 'package.path.to.module/fn-name} (or #'). the idea is that tool support for non-`require`d code could help when there’s a coupling that hasn’t been formalized but does need to be maintained.#2017-12-1822:11briantriceBasic config question: how do I ensure that running leiningen tasks within Cursive/IntelliJ will pick up the environment variables set for Application or Clojure Application?#2017-12-1822:13briantriceI guess I’m unsure where it’s reading from, aside from dumping (env) results to the log.#2017-12-1822:14danielcompton@briantrice env vars with IntelliJ are a bit annoying https://emmanuelbernard.com/blog/2012/05/09/setting-global-variables-intellij/#2017-12-1822:22briantriceyep…#2017-12-1822:23briantriceI use direnv and some tricks to get the output into IntelliJ but sometimes the values don’t stick.#2017-12-1822:29briantriceI found some stale issues where my PATH had “$PATH” in it and some JSON was escaped for bash where IntelliJ doesn’t need it. Fun!#2017-12-1823:01cfleming@briantrice That’s my bad, sorry - the lein run config needs an env vars section.#2017-12-1823:02cflemingBTW re your earlier question, I’m still not quite sure what the problem is you’re suggesting a solution for. Can you give me an example of when you’d need editor support for a namespace that hasn’t been explicitly required?#2017-12-1823:03briantrice@cfleming in the current case, I have Clojure backing an Om/ClojureScript application, and there are cases where I haven’t yet been able to make cljc code that synchronizes how callers and callees are meant to align across the implementation boundaries. Basically I need to say that “if you update a (de)serializer here, go visit there to ensure it matches”.#2017-12-1823:07cflemingOk, I see what you mean. Something like the expected/actual declarations here? https://blog.jetbrains.com/idea/2017/12/intellij-idea-2017-3-support-for-kotlin-multi-platform-projects#2017-12-1823:14briantricethat is interesting! I think so?#2017-12-1901:43Oliver GeorgeHow I can add clojars to the maven repositories in my project? I setup my project based on a pom.xml (generated with clj -Spom) but the clojar specific deps didn't come through.#2017-12-1901:44Oliver GeorgeI dont' seem to be able to edit "Build, Execution, Deployment > Build Tools > Maven > Repositories"#2017-12-1901:44Oliver GeorgeI found the "Remote Jar Repositories" and added it but my project still didn't seem to use it.#2017-12-1902:04cfleming@olivergeorge I think you’d need to add them to the POM. Are they in there?#2017-12-1902:04cflemingWhen you say the deps didn’t come through, do you mean that the pom was generated without those dependencies?#2017-12-1902:22Oliver GeorgeThanks Colin. The generated POM didn't include a clojars repository. I'll try adding it. (It did have the deps I expected in it)#2017-12-1902:23Oliver GeorgeYeah, that did the trick.#2017-12-1918:41arrdem@danielcompton Cursive is the only way to refactor Clojure I’m not completely insane 😛#2017-12-2008:22yonatanelDeleted modules reappearing drove me nuts right now: https://github.com/cursive-ide/cursive/issues/1632 Can modules be automatically deleted from the leiningen tool when they are deleted from the project?#2017-12-2009:30cfleming@yonatanel Hmm, maybe, I’ll investigate#2017-12-2009:33cfleming@yonatanel https://github.com/cursive-ide/cursive/issues/1916#2017-12-2009:33Oliver GeorgeThanks for all your hard work this year Colin. Hope you find time to step away from the keyboard.#2017-12-2009:34cflemingThanks Oliver! Yeah, I’ll be spending some time with the family for sure. But my life is fairly relaxed in general 🙂#2017-12-2100:35cfleming@guy Yes, that’s correct. What is the problem you’re having?#2017-12-2205:12cjmurphyI'm trying to work out a way around this problem:#2017-12-2205:13cjmurphy`Cannot download 'https://github.com/technomancy/leiningen/releases/download/2.8.1/leiningen-2.8.1-standalone.zip': Read timed out , response: 200 OK`#2017-12-2205:17cjmurphyMy Internet connection is poor, but no worse than usual. I'm thinking to attempt download this file myself, and put it (unzipped version) where IDEA/Cursive expects it. Where is that? (I'll investigate...) Also is there some other way I can get around this problem?#2017-12-2205:44cjmurphySo I'm trying lein upgrade now...#2017-12-2206:07cjmurphyThat didn't work either 😞#2017-12-2206:38cfleming@cjmurphy Cursive will download it and put it in .lein/self-installs#2017-12-2206:39cflemingIf you really can’t get it to download for some reason, you could tell Cursive to use some version you already have in there.#2017-12-2206:42lfn3@cfleming Hey I think I missed this in the patch notes, but did you change the way the test integration works lately?#2017-12-2206:51cjmurphyYes the lein upgrade was putting it in self-installs, but that didn't download either. So I'll try to tell Cursive to stick with what it has...#2017-12-2206:57cjmurphySo I'm gonna have to ask - how do I tell Cursive to do things, like use the version of lein that is there, rather than always auto-installing? I tried to 'show Cursive Cheat Sheet' but nothing came up.#2017-12-2207:08cjmurphySo I think it is the Leiningen project settings, you can set the version of Lein to use just for that project. I believe this setting is not in any file, but within Cursive somehow.#2017-12-2207:26cfleming@cjmurphy It’s stored in a file under .idea in your project dir.#2017-12-2207:27cfleming@lfn3 Yeah, there were a few changes - has something broken?#2017-12-2207:27cjmurphyOkay thanks. Working now (since changed lein version back for a project). I'll download when the Internet is fast here again. Thanks for your help.#2017-12-2207:27lfn3The opposite actually, it seems like you might have fixed the issue with rebinding the report fn#2017-12-2207:28lfn3Let me find it again tho#2017-12-2207:30lfn3@cfleming https://github.com/cursive-ide/cursive/issues/875#2017-12-2207:44cjmurphyNow any lein command lein clean, lein version, seems to want to complete the download. But that's a lein problem not a Cursive problem, and my problem because lein clean is a part of my workflow. I'll start posting in lein slack now...#2017-12-2209:33cfleming@lfn3 Hmm, I’ll have to think about what I might have changed to affect that.#2017-12-2819:12briantriceQ: I have a dependency prone whose jar contains generated JS that includes things like goog.object. In Cursive, this means that goog.object gets indexed twice, so function lookup requires a menu indirection for anything in core. This happened before with cljs-time which contains an entire copy of clojurescript for running tests, so I excluded it (inconvenient). Is there a better solution?#2017-12-2819:19briantriceTrying something out with the Dependency Viewer, which I’d not properly apprehended before.#2017-12-2819:23briantriceNo, I don’t think that its “Remove From Scope” action does what I suspected.#2017-12-2819:57briantricerelated: https://intellij-support.jetbrains.com/hc/en-us/community/posts/115000003210-skip-indexing-on-a-certain-Jars-#2017-12-2820:06timgilbertSay, is there any way to see my exception stack traces in the Cursive repl?#2017-12-2821:50cfleming@timgilbert Yes, when you receive an error there’s a button in the REPL menu bar, or you can bind the action to a key.#2017-12-2821:50cfleming@briantrice I’ll have to sit down and look at that, I’m not sure off the top of my head.#2017-12-2821:50timgilbertOh! Duh, should have noticed that. Thanks!#2017-12-2821:50briantricethanks!#2017-12-2821:51briantrice@cfleming I tried using the result of “copy path” from the jar’s contents, as well as naming the directory segment, into project exclusions, but it didn’t help. Right now it seems like dependency indexing happens per-JAR.#2017-12-2821:52cflemingYes, that’s right. I’m not sure whether it will be possible to control that.#2017-12-2821:53briantricethis gist was certainly intriguing, at least: https://gist.github.com/johnnykang/eed464578e33f03cdc1b0d06c19c00e4#2017-12-2821:54cflemingWow, that is crazy. I won’t be doing that 🙂#2017-12-2821:54briantriceyeah… hard to maintain#2017-12-2821:56briantriceI mean, I’m tempted to just clone and maintain branches of each offending library that omits the directory before packaging at this point, just so I can get F1 to call up cljs core signatures…#2017-12-2821:58briantriceoh… IntelliJ thinks these are production classes. hmmm#2017-12-2821:58briantriceor. library classes.#2017-12-2821:59briantricemaybe I can make a special scope with the exclusions and use that to avoid indexing?#2017-12-2822:00potetmomg. Am I reading this right? People are publishing jars w/ their deps packaged in them?#2017-12-2822:02cflemingIt does seem like something that might be a bug in the downstream lib.#2017-12-2822:02cflemingBut I’d need to look more closely at what they’re doing to be sure.#2017-12-2822:02potetmYeah on its face I would certainly call that an out-and-out bug.#2017-12-2822:03potetmTrue. Perhaps there’s something I’m not understanding.#2017-12-2822:05briantriceyeah, I’ll file with the maintainer if I can express the problem right#2017-12-2822:06briantriceespecially if I can fix it with a PR#2017-12-2822:11potetmfwiw I’m not seeing any of that in cljs-time-0.5.2.jar#2017-12-2822:11potetm@briantrice#2017-12-2822:11potetmjust the proper lib+jar files#2017-12-2822:12briantricesuggestions welcome: https://github.com/andrewmcveigh/cljs-time/blob/master/build.boot#2017-12-2822:12briantricehuh#2017-12-2822:13briantricejust bumped from 0.5.0 to 0.5.2 in case it shakes that out…#2017-12-2822:15echristopherson:bump:#2017-12-2822:18briantricestrangely enough, now cljs-time doesn’t have the test directory with clojurescript’s source in it. but prone still has the generated js. I’ll poke further, thank you.#2017-12-2822:19potetmnp! good luck!#2017-12-2822:36briantriceok, so generally it seems like when this happens, it’s fixable by using the “delete” option in the Project > Libraries panel, and then rebuilding while IntelliJ is closed (or invalidating caches)#2017-12-2822:37briantriceI’m not sure how dependencies get compiled that way, but will try to keep an eye on the issue if it re-occurs.#2017-12-2901:10sandbagsAnyone know a way to stop IntelliJ from collapsing folders "public/toolkit" (it seems to do this when 'toolkit' is the only thing in public and has content itself) into "public.toolkit" in the folder tree?#2017-12-2901:10sandbagsI've no idea what this might be called#2017-12-2901:10sandbagsit's very annoying#2017-12-2901:14sandbagsA ha... it's called "Hide empty packages" i'd never seen the project settings dropdown before!#2018-01-0500:27briantriceWhere is that dropdown?#2017-12-3018:34jrheardis there a button i can press that evaluates the current form in the REPL, and then sends the result back to the editor window?#2017-12-3018:35jrheardi’m missing the vocabulary to describe this but it seems like common functionality, i think i’ve seen emacs people do it#2017-12-3018:35jrheardlike, i want to write (+ 2 2) in my editor, put the cursor in there, press some keybind, and then have the (+ 2 2) go away and be replaced by 4#2017-12-3018:35jrheardright now i can accomplish this with copy/paste from the repl window, but it can get hairy if i have a big data structure, and i feel like this is probably a solved problem#2017-12-3023:45echristopherson@jrheard the action is called "Send top form to REPL"#2017-12-3023:46echristophersonon a Mac it's Cmd+Shift+P; so I'm guessing on other platforms it's Ctrl+Shift+P#2017-12-3023:46jrheardhm, i’m on a mac and for me, that command does indeed cause (+ 2 2) to execute in the REPL - but i’m saying that i’d like to have the (+ 2 2) in my editor window be replaced with the resulting 4, and i don’t believe that this command does that#2017-12-3023:47echristophersonoh! sorry#2017-12-3023:47jrheardnp 🙂#2017-12-3023:59echristophersonyeah, I can't find such a feature#2017-12-3023:59jrheardoh well - i find myself reaching for something like this about once every month or two, but that isn’t really all that often in the grand scheme of things#2018-12-3108:13cfleming@jrheard No, Cursive doesn’t do that right now, mostly because I’m worried about the combinatorial explosion of commands. Currently Cursive can send either the form before the caret, the top level form or the selection to the REPL. There are a bunch of interesting things that one might want to do with the result - add it as a comment, replace the original, just eval it, etc etc. I’m not sure how to handle all those combinations. Ideally some kind of verb-object command, i.e. use <this thing> and do <this thing> with it.#2018-12-3108:14cflemingI don’t like Emacs’ solution of just having a gazillion shortcuts. I guess I could just add the commands and then you could search for the one you want on the rare occasions you want that combo.#2018-12-3108:14cflemingBut it’s still a truckload of commands.#2018-12-3117:09jrheardgotcha, that makes sense#2018-12-3117:09jrheardi don’t have any good ideas for how to deal with that problem#2018-12-3117:10jrheard" I guess I could just add the commands and then you could search for the one you want on the rare occasions you want that combo” would work super fine for me fwiw, if eg there’s a way to suppress those commands from the tools menu so they don’t overwhelm newbies#2018-01-0307:13val_waeselynck@cfleming @jrheard FWIW copying the last REPL output would be enough for me#2018-01-0307:30cfleming@val_waeselynck Yeah, we’ve discussed that here before, that’s probably a good 80% solution.#2018-01-0307:30cflemingAnd useful for other things too.#2018-01-0308:22nblumoeHey, I am quite surprised that this is blocked by perceiving it as a combinatorial explosion. Cider has 10 eval commands, some also have a prefix version (https://cider.readthedocs.io/en/latest/interactive_programming/). So that would be max. 20, some are already present in Cursive, some are not needed. Having at least a subset of those commands would be really cool.#2018-01-0308:23nblumoeI also like the “copy REPL output to clipboard” idea though! 👍#2018-01-0311:24urzdsHi!#2018-01-0316:02roman01la@cfleming Is it possible to add custom command in Cursive that receive, process in the REPL and return back data? For example something like eval and replace#2018-01-0321:24cfleming@nblumoe Thanks for the doc link. It’s interesting the ones they’ve chosen to implement. They support three “sources” - form before point, top level form and surrounding sexp (which I don’t support but will do, people have asked for it). Cursive additionally supports sending the selection, but that’s overloaded - the other commands will send the selection if it exists rather than what they would normally use.#2018-01-0321:25cflemingBut the ops available for each source aren’t very consistent - you can debug a top-level form but not the form before point, and you can replace the form before point with the result but not the top-level form.#2018-01-0321:38cflemingThey have 4 ops - send to REPL and eval, send to REPL and replace, send to REPL and pprint result, debug in REPL. Cursive doesn’t need debug and it always pprints, so maybe it only needs two.#2018-01-0321:39cflemingThat’s then 6 commands, which seems pretty manageable.#2018-01-0321:41cflemingAnd copying the last REPL output allows for some flexibility too.#2018-01-0321:43cfleming@roman01la Can you give me an example of the sort of thing you’d like to do? Would replacing the original form work? Would being able to easily copy the last REPL result be sufficient?#2018-01-0322:23snoeIn vim I would wrap many MB edn files/logs in a pprint then send to repl and replace, as long as the clipboard can handle it, it would be fine#2018-01-0323:46roman01la@cfleming I’d like to be able to create commands that run arbitrary code on a selection and print results into the REPL #2018-01-0323:47cfleming@roman01la Oh, yes, that you can do. See https://cursive-ide.com/userguide/repl.html#repl-commands. One thing that is not documented there is that you can use ~selection in your commands.#2018-01-0323:47cflemingLet me know if that doesn’t meet your needs.#2018-01-0323:50cflemingSee also https://github.com/cursive-ide/cursive/issues/1694#2018-01-0406:12bthesorceroranyone using clojurescript see a warning that .querySelector cannot be resolved? been looking all over and can't find much about it.#2018-01-0408:56roman01la@cfleming it works! thanks#2018-01-0409:40gklijs@bthesorceror probably you have an error in the syntax, this is working example to use queryselector,
(defn get-radio-value
  [name]
  (.-value (.querySelector js/document (str "input[name=\"" name "\"]:checked"))))
#2018-01-0409:46gklijs@bthesorceror I misread, I have the same warning, not sure if it can be resolved, somehow intellij would need to be aware of native javascript.#2018-01-0412:08joshkhare there any tricks to appropriately indent reader conditionals? formatting with ctrl + alt + l produces some odd spacing and also forces values onto new lines:
(ns imcljs.internal.utils
  #?(:cljs (:require-macros [cljs.core.async.macros :refer [go go-loop]]))
  (:require [clojure.string :refer [split]]
    #?(:cljs [cljs.core.async :as a :refer [<! >! chan]]
       :clj
            [clojure.core.async :as a :refer [<! >! go go-loop chan]])
    #?(:clj
            [clojure.data.codec.base64 :as b64])))
#2018-01-0414:15jooivindIs there some tool to inspect data-structures in cursive?#2018-01-0414:33jooivindhttps://clojure.github.io/clojure/clojure.inspector-api.html this seems to work#2018-01-0414:33jooivindbut it’s not cursive-specific of course#2018-01-0414:34jooivindwould be nice to have an option for a sort of matlabish interface where current vars in ns can be browsed#2018-01-0502:53bthesorcerorthanks @gklijs#2018-01-0503:25cfleming@joshkh There’s an issue about that: https://github.com/cursive-ide/cursive/issues/1014#2018-01-0503:25cflemingI’ll try to get to that soon since it’s annoying when it happens.#2018-01-0503:25cfleming@jooivind There’s nothing right now but it’s something I’ve been thinking about recently.#2018-01-0503:26cflemingIf you have an example of the particular sort of thing you mean in Matlab that would be helpful, perhaps a screenshot from their doc is available?#2018-01-0507:16jooivind@cfleming download octave and try it out, might be easier#2018-01-0507:16jooivindi can try to give some screenshots and some thoughts tonight#2018-01-0508:43p-himikIs there any way to make Leiningen run configurations use some other JDK?#2018-01-0508:50cfleming@p-himik No, it’ll always use the JDK of the module.#2018-01-0510:03p-himikCould it be implemented? Without it, it's not possible to use Leiningen run configurations in projects that use non-JVM languages, like Python.#2018-01-0514:37joshkhthanks for the reply about reader conditionals. formatting isn't a show stopper 🙂 and thanks for cursive, it's fantastic!#2018-01-0603:43cfleming@drewverlee So the short answer is no, I don’t have anything like a feature matrix or anything like that to compare to Spacemacs + CIDER.#2018-01-0603:44cflemingCursive is more or less equivalent to Emacs + CIDER + some of clj-refactor.#2018-01-0603:44cflemingIt’s generally much easier to set up since it’s all in the box, especially if you’re not familiar with Emacs to begin with.#2018-01-0603:45cflemingThe main philosophical difference is that Cursive works by source analysis, not REPL introspection (most of the time)#2018-01-0603:46cflemingThat means that you don’t need a REPL running for basic editing features, and things like global indexing are generally better.#2018-01-0603:46Drew Verleeyea. i have been recommending it without actual having used it because i have had a great time with intelliji. > The main philosophical difference is that Cursive works by source analysis, not REPL introspection (most of the time) Ill have to think about that when i’m more awake 🙂#2018-01-0603:46cflemingIt also means that most of the fancy stuff works equivalently for CLJ and CLJS, which is not true for CIDER.#2018-01-0603:46cflemingHowever Cursive has problems with macro forms it doesn’t understand yet.#2018-01-0603:46cflemingSo it’s a tradeoff.#2018-01-0603:47cflemingIf you’re already familiar with JetBrains tools, I’d say it’s a no-brainer.#2018-01-0603:47cflemingAlso, if you do a lot of Java interop.#2018-01-0603:47cflemingIf you’re familiar with Emacs and you can get it all set up and keep it running, Emacs can currently be made more powerful than Cursive for straight CLJ code.#2018-01-0603:48cflemingCode that requires Java interop, or uses CLJS, it depends but I’d say Cursive usually wins.#2018-01-0603:49cflemingThat’s probably the shortest executive summary 🙂#2018-01-0603:49cflemingI should also add something like that to the FAQ.#2018-01-0603:55Drew VerleeThanks a ton for the overview. i would add that to a readme if it doesnt exist. Sense emacs has the majority of users it is probably worth the time.#2018-01-0604:09cflemingYes, definitely.#2018-01-0614:04taylorhas anyone had issues with IntelliJ stopping accepting keyboard input? It’s started to happen quite frequently with 2017.3.2 and Cursive 1.6.2-2017.3. I have to close/reopen IntelliJ to fix it, although if I have another IntelliJ project open it’s unaffected. It always happens while I’m typing.#2018-01-0620:29gklijs@taylor I had something similar, but was running a Java project. I do use 2017.3.2 so it might be a problem with intelliJ, or still some weird side effect from cursive.#2018-01-0622:11timgilbertThat very occasionally happens to me and drives me nuts. I find I can usually get out off it by closing windows. I have never been able to reproduce it consistently though#2018-01-0622:12timgilbertIs anybody else noticing a drop in performance around tooltips in the last few builds? It seems like there is a noticeable pause when I hover over like a misspelling warning or similar thing#2018-01-0708:22rauh@cfleming I'd love for Paredit commands to show up in the "Productivity guide"#2018-01-0813:32mbjarland@taylor yes, I (and others at my company) have seen that behavior over several years and a multitude of intellij versions. This is on linux x64 and for some of the instances we've found explanations (like a modal dialog that popped up automatically but ended up behind the main window and lost focus etc), other times we've found no root cause. Only way we've consistently been able to resolve it is via a restart of intellij#2018-01-0813:35mbjarlandI have another question, on the latest version of intellij I get a Error running 'leiningen-run-configuration': Unknown error every time I try to start a clojure REPL. This is with: Leiningen 2.7.1 on Java 1.8.0_121 Java HotSpot(TM) 64-Bit Server VM and clojure 1.9.0. Anybody seen this and/or have a fix for it? I've looked in the logs I could find and there is no mention of the error, the application event log pane just has the above message#2018-01-0815:43Andreas LiljeqvistI have a problem getting Cursive to work with clojure.tools.namespace/refresh#2018-01-0815:43Andreas LiljeqvistI have created a repl command (refresh specifying the user namespace#2018-01-0815:44Andreas Liljeqvistit seems to do something when I execute it :reload ()#2018-01-0815:44Andreas LiljeqvistBut no new symbols show up#2018-01-0815:45Andreas Liljeqvistbut if I execute (refresh) in the repl it seems to work#2018-01-0815:48Andreas Liljeqvist(def a 1 seems to work as intended, but new requires cannot be refered#2018-01-0821:12cfleming@taylor I’ve never seen that but it looks like others have. It looks like an IntelliJ issue to me, but Cursive could be involved somehow. It looks difficult to diagnose though 😞#2018-01-0900:13taylorFor what it’s worth I’m running the same setup on two MacBook Pros and only the touchbar model is affected. I’ve also noticed IDE flickering oddly which I highly doubt Cursive could be responsible for#2018-01-0901:32cflemingNo, definitely not. That’s odd about the touchbar model, too - there must be something at the level of the Java integration into the OS that’s playing up.#2018-01-0821:13cfleming@rauh Yes, that’s a good idea. https://github.com/cursive-ide/cursive/issues/1922#2018-01-0821:14cfleming@mbjarland Could you send me a copy of your log file? You can find it with Help-&gt;Show log in Finder/Explorer. Either DM it here or mail it to <mailto:/cdn-cgi/l/email-protection|/cdn-cgi/l/email-protection>#2018-01-0821:43mbjarland@cfleming turns out this was a general issue with leiningen even outside of cursive. A reboot fixed it, not sure why, I pasted a thread stack to the #leiningen channel#2018-01-0821:47cfleming@mbjarland Ok, thanks for letting me know.#2018-01-0906:42yonatanelIs anyone else experiencing no parens highlighting lately?#2018-01-0909:42vikeriI saw https://github.com/anmonteiro/lumo/issues/112 but does anyone know how I actually use lumo with Cursive? Is it supported yet?#2018-01-0917:24mandersonWith the change in recent Leiningen to enforce SSL for repositories, we have taken to using the :certificate field in our project.clj files to specify the self-signed cert for our internal repo. It is left as a relative path (usually just the cert name as we place it in the root of the project). The problem is that Cursive never can find the file by relative path and fails to load the project. Currently I work around it by adding the fully qualified path and refreshing Leiningen and then removing it again before checking in to VCS, but it's kind of a pain. Is there a config or something I'm missing to get Cursive to recognize the relative path?#2018-01-0917:25mandersonNote, running lein from command line finds the cert by relative path just fine. it's just in the ide that there is an issue...#2018-01-0917:31joshkhI'm getting a vague error when I try to run an nREPL via Cursive: 17:29 Error running 'REPL for sk': Invalid javascript engine (javascript) with the standard configuration as such:#2018-01-0917:33joshkhDebug doesn't get me much further. Any thoughts? 🙂#2018-01-0919:38rafaelHi. Noticed that on the latest EAP there is no Keymap panel anymore and several default bindings are set out of the box (I seem to remember some discussion about this here or on the list). Can I find a table of all default bindings somewhere?#2018-01-0920:44rafaelSeems like the cursive cheat sheet on the help menu is the table I was looking for#2018-01-0921:39cfleming@joshkh Do you have a plugin using JS, like less or something, in your project.clj?#2018-01-0923:01joshkh@cfleming You must be psychic. Yes, the lein-less plugin.#2018-01-0923:09timgilbertSay, just out of curiosity is there any support for the tools.deps.alpha deps.edn stuff in Cursive? Is it on the roadmap somewhere?#2018-01-1010:42cfleming@manderson Can you file an issue for that and I’ll look at it?#2018-01-1010:46cfleming@joshkh Hehe, I’ve seen that one before, but I can’t find an issue or anything in the mailing list about it.#2018-01-1010:46cfleming@rafael Yes, I still haven’t updated the doc on that, sorry.#2018-01-1010:46cfleming@timgilbert There’s no support yet, but I definitely want to add it soon.#2018-01-1014:02mandersonThanks @cfleming. I did a quick search of the current issues and found a ticket for this already: https://github.com/cursive-ide/cursive/issues/1156. The reproduction referenced in the ticket is almost exactly our issue too.#2018-01-1023:32cfleming@manderson Ouch, that one’s old. I’ll try and fix that soon.#2018-01-1101:16manderson👍 Thanks!#2018-01-1108:21gravIs it possible to get Cursive to remove-ns before reloading an ns into the repl?#2018-01-1108:48cfleming@grav No, but it should be.#2018-01-1108:49cflemingUgh, another old one: https://github.com/cursive-ide/cursive/issues/320#2018-01-1108:49cflemingWhat I’m less sure of is if that should also happen for other files that get transitively loaded - I guess so.#2018-01-1108:52gravYeah. Maybe a pragmatic first-shot would be a unload all namespaces, at least saving me from having to restart the repl feature 🙂#2018-01-1117:32mbjarlandis it possible to align the second value in cond pairs in cursive code formatting?#2018-01-1117:34mbjarland
(cond
    something something-other
    something-long should-align)
-->
(cond
    something      something-other
    something-long should-align)
#2018-01-1120:22timgilbertThere a few cases where I'd like the above, notably (case) statements and also longer assoc statements like
(assoc my-map :some/key 123
              :much-longer/key-name 456)
-->
(assoc my-map :some/key             123
              :much-longer/key-name 456)
#2018-01-1201:44kennyIs there a way to pass Cursive the Java classpath string?#2018-01-1201:49kennySimply adding a jar to :resource-paths in project.clj does not work.#2018-01-1209:07cfleming@mbjarland It’s not at the moment, no. It’s tricky because I can’t say “align the values unless the key is wider than 20 chars, in which case don’t align that value”, it’s pretty all or nothing. cond often has some long keys (if it’s an expression or something) and that looks really weird and is annoying if you can’t disable it.#2018-01-1209:07cflemingI’m going to revisit that and see if I can do anything, though.#2018-01-1209:11cfleming@kenny Hmm, that should work I think. If you pass a full path rather than a relative one, does that work?#2018-01-1210:11danmHi @cfleming, just seen the comments in #boot. I thought Cursive didn't do anything with boot (I'm still using the boot lein generate stuff). The feature requests still seem to be open for boot support. Did I miss something?#2018-01-1211:56mbjarland@cfleming thanks. Could we use a disable comment ala disable inspection as intellij does for java/groovy/scala/x inspections. Then you could (if the feature is enabled in code formatting) format all cond/assoc/etc statements except when it is explicitly disabled with a special comment. At least in my code, it seems that the cases where I would like for this to happen are more frequent than the ones where I would like to disable it#2018-01-1218:22kenny@cfleming So if I add "/home/kenny/.m2/repository/org/clojure/clojure/1.9.0/clojure-1.9.0.jar" to my :resource-paths, everything is marked as cannot be resolved.#2018-01-1222:00KentDoes the Cursive IntelliJ Plugin provide assistance for running polyglot projects? For example, I have a Java Spring Boot project calling a method in my Clojure library. Everything works for me, I have Gradle configured to build the project, and I can run it with java -jar [myprogram.jar], except for running from an IntelliJ run configuration.#2018-01-1313:52mbjarland@cfleming apropos my previous question on formatting cond statements. Is contributing to cursive an option? If so, how would a ramp-up path look like for getting up to speed with the relevant pieces?#2018-01-1409:44cfleming@mbjarland Yeah, a comment might be an option. Another option would be not aligning if there’s a newline between key and value.#2018-01-1409:44cfleming@kenny Ok, I’ll have to look at that next week.#2018-01-1409:45cfleming@kentoj Yes, it does, in fact Cursive itself is a Gradle project using Clojure, Kotlin and Java.#2018-01-1409:45cflemingWhat is the problem you’re having with running from a run config?#2018-01-1409:46cfleming@mbjarland Currently there’s no good way to contribute to Cursive apart from feedback and issues. It will be possible to contribute more in the future when I get an API opened up, but that won’t be for a while.#2018-01-1410:57joelsanchezit would be great to have an API for adding macros, instead of relying on the "resolve as" feature#2018-01-1411:36cfleming@joelsanchez Yes, that’s the first thing on the list#2018-01-1520:00kennytiltonDoes Cursive get thrown by having other projects in the checkouts directory? I love that build feature, but just now Cursive was saying it did could not resolve references in those projects (or at least one of them, and that was throwing off indentation). I cleared checkouts and am back to normal. Is it one or the other, cross project loading vs decent Cursive indentation?#2018-01-1520:38danielcompton@hiskennyness we use checkouts all the time and don't have that issue as a persistent one#2018-01-1520:39danielcomptonI know about the issue you're talking about with indentation and resolving references, but doing a rebuild caches and restart usually seems to fix it#2018-01-1600:04Kent@cfleming The problem I am having is that IntelliJ does not see the Clojure code from the Java code. I imagine this is some sort of compilation or classpath issue? Gradle build works, running the built JAR works, only development in IntelliJ has the issue.#2018-01-1600:05cfleming@kentoj How are you referencing the Clojure code from the Java code?#2018-01-1600:05cflemingDo you mean that when compiling within IntelliJ, that you get compilation errors that you don’t get when using Gradle?#2018-01-1600:06KentWeird, it is working for me now.#2018-01-1600:07KentI am referencing it as an import like so: import com.example.core;#2018-01-1600:07KentWith later core.testPrintln("Hello");#2018-01-1600:07cflemingOh, and com.example.core is a gen-class?#2018-01-1600:08KentNot sure why it wasn’t working before. Must have been a stale out/ or build/ output.#2018-01-1600:08KentYes, it looks like this:
(ns com.example.core
  (:gen-class
        :name com.example.core
        :methods [#^{:static true} [testPrintln [String] String]]))

(defn support [x]
  (println (str "Hello " x))
  (str "Hello " x))

(defn -support [x]
  (support x))
#2018-01-1600:09cflemingOk. That is strange, with the settings you have above I would have expected that to work.#2018-01-1600:09cflemingAs you say, perhaps a clean build was required - I’m not sure.#2018-01-1600:09KentIt is working every time now. Hmm, not sure what it was o.O#2018-01-1600:10KentThe main thing I wanted was to be able to debug through Java and Clojure seamlessly, which I have now. Thank you so much for making that plugin!#2018-01-1600:10KentI am going to get my company to donate to you once we have some Clojure code in production.#2018-01-1600:10cflemingIn my case, the dependencies are the other way around - my Clojure code depends on my Java code, and when I have to call into Clojure from Java I do it using clojure.java.Api.var#2018-01-1600:10cflemingNo problem! I’m glad you like it.#2018-01-1600:10KentThis was the clincher for us, to get Java and Clojure to easily call one another from the same project.#2018-01-1600:11KentIt is just too much of a comittment to go all in on a new language at this point#2018-01-1600:11KentThanks for the hint on clojure.java.Api.var#2018-01-1600:12cflemingYes, and sometimes it’s just not practical to rewrite everything 🙂#2018-01-1600:12cflemingFortunately with Clojure it’s not required - mixing and matching them is actually pretty easy.#2018-01-1600:13KentI am excited to start using it more.#2018-01-1600:13cflemingSorry, that should have read clojure.java.api.Clojure#2018-01-1600:14KentOk, thanks. I’ll be reading the Java interop section of Stuart Halloway’s book when it comes out in February so I’ll catch it there as well.#2018-01-1613:18kennytiltonAh, yes, “rebuild caches”. I had this before. Thx for the reminder.#2018-01-1614:27dominguesHello, I’m getting Error running 'REPL': Unknown error. How can I debug it?
#2018-01-1614:48conanA question about best practice: I have a project that uses Datomic and has a cljs frontend. Datomic is a private jar, so it needs to be installed locally in the project and checked into scm, so that Heroku gets it, but Cursive can't read dependencies from a local repo (https://github.com/cursive-ide/cursive/issues/333), i.e. like this:
:repositories [["local" ~(str (.toURI (java.io.File. "repo")))]]
I've seen suggestions that using an absolute path like this will work, but I haven't been able to make it work. Using a :local-repo solves the problem as I can keep the Datomic dependency in there, but then the project's classpath is too long to start a REPL as this adds a lot of characters beyond the standard ~/.m2 in each path, and it dies if I do this (https://github.com/cursive-ide/cursive/issues/1150). What's the best way to set up the project so that Cursive can find the dep it needs and can start a REPL? I'd really like it to run with a default run config or lein repl, and with the standard figwheel setup using a normal clojure.main.
#2018-01-1614:57joelsancheznot sure I understand but I have this in my project.clj and I never had to worry about Datomic
:repositories {""
                 ~(merge
                    {:url ""}
                    (let [username (System/getenv "DATOMIC__USERNAME")
                          password (System/getenv "DATOMIC__PASSWORD")]
                      (when (and username password)
                        {:username username
                         :password password})))}
#2018-01-1614:59conani don't really want to add a dependency on an external private repository#2018-01-1615:00conanif a new engineer needs the project, they shouldn't have to add env vars really. it may be unavoidable, which is why i'm interested in what the current best approach is. it seems a shame that cursive is the limiting factor here, so i was wondering whether there was a workaround#2018-01-1615:03conanthe gpg approach is possible, but i have not been able to get gpg working. it's cost me 2 days already and i've decided not to sink any more time into it!#2018-01-1615:36conanIncidentally, I just tried exactly your approach and cursive still can't resolve the dependency#2018-01-1615:56joelsanchezI never had problems with Cursive using my approach...weird!#2018-01-1618:08conanI don't think cursive can execute code using ~ in a project.clj, it may be that you already had datomic in your local maven repo?#2018-01-1622:51cflemingCursive does execute code in the project files, or at least it delegates to lein which does that. The issue is generally finding relative files - Cursive runs lein in-process, and Java processes can’t change the CWD.#2018-01-1622:52cflemingCursive does some black magic which means that most of the functions work correctly, but things like (File. ...) will not since there’s no way to hook that.#2018-01-1622:52cfleming@U053032QC I’ll look at that local-repo issue today, I’m sure I added support for that.#2018-01-1622:59cfleming@U053032QC BTW does changing the (File. ...) in your local repo example to ( ...) work?#2018-01-1623:49cflemingOk, I’ve just investigated this. I have not tested this, but I believe the :repositories snippet should work if (File. ...) is replaced as described above.#2018-01-1623:49cfleming:local-repo should also work. #1150 should be obsolete these days, if you’re still receiving an error with this could you send it to me?#2018-01-1623:50cflemingI’m going to update those issues, so perhaps we can discuss over there.#2018-01-1710:03conan:local-repo does work, i can mvn deploy:deploy-file the datomic jar and pom into a file within the project and commit that to scm, but then leiningen uses the local repo directory to put all its dependencies. Since the path to that directory is longer than the one in my home directory, it blows the max classpath length, and starting a REPL kills Intellij. So it's not practically usable even if it does work.#2018-01-1721:03cflemingWhat’s the error you receive? The max classpath length thing should have been fixed, and I’m concerned that it kills IntelliJ - it shouldn’t.#2018-01-1721:04cflemingAlso, does using :repositories with io/file work?#2018-01-1622:54cfleming@domingues Can you send me a copy of your log? Help-&gt;Show log in Finder/Explorer#2018-01-1713:55mattfordHi, maybe I'm being dense. But when I change namespace in the Cursive REPL I seem to lose the ability to capture the output of things like (print "hello world")?#2018-01-1713:55mattfordWhere does it go?#2018-01-1714:01mattforda glitch, a restart and it works again#2018-01-1809:56Empperiencountered a strange bug in Cursive:#2018-01-1809:56Empperi
”   lol\n    lal”
=> ”   lol\nlal”
(count *1)
=> 14
#2018-01-1809:57EmpperiCursive REPL removes whitespaces after \n character within a String#2018-01-1809:57Empperiit’s just a display issue but still a bug#2018-01-1809:59Empperisimpler example
“\n    lol”
=> “\nlol”
#2018-01-1810:03Empperiand just to make sure that people don’t think it’s a more general bug here’s a similar example from lein repl:
user=> “\n    lol”
“\n    lol”
#2018-01-1818:42cfleming@niklas.collin You can disable that with Settings-&gt;Languages &amp; Frameworks-&gt;Clojure-&gt;Split and align multi-line strings#2018-01-1818:42cflemingIt’s part of Cursive output formatting, but it has some issues with shorter strings due to the way the formatting works.#2018-01-1818:46EmpperiWeird it would work like that, it's ignoring the EOL characters but removing the whitespaces#2018-01-1818:47EmpperiBut good to know :)#2018-01-1821:17Drew Verleeis cursive (paid) included with when you get the intelliji package? https://www.jetbrains.com/datagrip/buy/#edition=personal i dont see it listed as an integrated development environment#2018-01-1821:19tony.kay@drewverlee they are separate companies. Two licenses.#2018-01-1821:19tony.kaybut worth every penny, I think#2018-01-1821:22Drew Verlee@tony.kay so cursive doesn’t depend on having the paid version of intelliji in any way?#2018-01-1821:24manutter51@drewverlee From the Getting Started guide for Cursive: First, if you haven't already, download IntelliJ here. If you don't have a licence for the Ultimate Edition, the free Community Edition is fine.#2018-01-1821:24manutter51https://cursive-ide.com/userguide/#2018-01-1821:25Drew VerleeThanks. @manutter51 i should have caught that.#2018-01-1901:04cfleming@drewverlee Right, there’s currently no difference using Cursive with the Ultimate or Community editions.#2018-01-1913:56iperdomoi work in a team that uses Emacs/CIDER and Cursive ... with CIDER there is this nREPL middleware (`wrap-out`) that redirects *out* and *err* to all connected clients#2018-01-1913:57iperdomowhen working with a dockerized environment the repl is another server, so from Cursive we use Remote REPL#2018-01-1913:58iperdomobut it seems that Cursive does not understand those messages from the nREPL server ( :out :err)#2018-01-1913:59iperdomoam i right on this assessment ? is this something i could log a feature request on?#2018-01-1914:02iperdomoe.g.#2018-01-1920:13cfleming@iperdomo Cursive does respect those messages, but I suspect the issue is that here they’re not replies to a message Cursive recognises. Do file a feature request and I’ll figure out the best way to handle that.#2018-01-2001:41hagmonkanyone know if IntelliJ 2017.3 breaks Cursive?#2018-01-2002:57cfleming@hagmonk No, I use it.#2018-01-2004:54hagmonk@cfleming oh I’m sorry, I meant 2018.1, just released today #2018-01-2310:13nblumoeDo you have a URL for that? I neither get it from the JetBrains toolbox, nor do I find any announcements.#2018-01-2006:46jysandyI’m trying to create a REPL run configuration for my project, but Cursive tells me that it’s unable to find any modules.#2018-01-2006:47jysandyThis is puzzling, because the Leiningen tool window shows me that a module is indeed present#2018-01-2006:48jysandyThus far, I’ve tried removing the intellij files and recreating the project, but to no avail.#2018-01-2006:49jysandyAny ideas on why this is happening?#2018-01-2006:54jysandyInvalidating caches and restarting solved the issue.#2018-01-2007:45cfleming@hagmonk Ah, no, not yet#2018-01-2009:13cfleming@jysandy Sorry about that - the indexes getting borked can cause all sorts of weirdness.#2018-01-2023:13llsouderhow do you run different profiles via cursive? like cloverage or migratus?#2018-01-2102:40cfleming@llsouder Do you mean how to start a REPL with a different lein profile?#2018-01-2213:07Jakub Holý (HolyJak)Hello! Is there any way to resolve "xyz cannot be resolved" when using a JS library (loaded from a local node_modules)? Code:
(def aws (nodejs/require "aws-sdk"))
(def sts (aws.STS. #js {"apiVersion" "2011-06-15"}))
              ^^^^^^^ aws.STS. cannot be resolved
Thanks!
#2018-01-2215:28urzdsHi!#2018-01-2215:31urzdsHow do I start a Socket REPL with Cursive? I tried to configure a REPL with "Use clojure.main in normal JVM process" and added the -Dclojure.server.repl JVM argument as described here: https://clojure.org/reference/repl_and_main#_launching_a_socket_server However, that results in Error: Could not find or load main class 5555#2018-01-2215:37Jakub Holý (HolyJak)It looks like your arguments is wrong and the port number is interpreted as a class name. Can u post a screenshot of the configuration?#2018-01-2215:49urzdshttps://i.imgur.com/7Nz5CDv.png#2018-01-2215:51urzdsI already tried to escape the spaces using \ , but that had no effect (apart from the \ being literally included in the command line: The error message changed to ... main class 5555\).#2018-01-2216:37Jakub Holý (HolyJak)sorry, no idea 😞#2018-01-2218:51drowsyseems like you need te leave out the quotes completly, and workaround the spaces by replacing them with , (as , is whitespace in clojure but does not separate jvm args)#2018-01-2218:51drowsy-Dclojure.server.repl={:port,5556,:accept,clojure.core.server/repl} looks stupid but works for me#2018-01-2219:52urzds@U44SHEP4N Thanks! I'll try tomorrow. 🙂#2018-01-2219:55urzdsWas simple to test. It works.#2018-01-2301:12cflemingHmm, I see - that’s actually IntelliJ’s JVM args parsing looks like it might be at fault there. Could someone file an issue for this so I don’t forget about it, and I’ll look into it?#2018-01-2312:47urzds@U0567Q30W https://github.com/cursive-ide/cursive/issues/1919#2018-01-2400:40cflemingGreat, thanks!#2018-01-2301:11cfleming@holyjak Sadly, no, but I’m planning to work on that soon.#2018-01-2315:18joshkhis it possible to find all references to a qualified keyword using Cursive?#2018-01-2315:20joshkhliterally right click, Find Usages. i need a coffee. 🙃#2018-01-2315:21joshkhwell since i'm here, are there any Cursive features to find dead code?#2018-01-2315:55joelsanchezregarding the first question, CTRL-B works just like with any var#2018-01-2315:56joelsanchez(`Navigate -> Declaration` just in case you have it remapped)#2018-01-2316:04joshkhthat's odd, Navigate -> Declaration on a keyword doesn't seem to do anything#2018-01-2318:01manutter51Key words aren’t really declared, they just evaluate to themselves.#2018-01-2319:36manutter51That seems odd to me — how can you navigate to the declaration of something that doesn’t have a declaration? But if it works, it works, eh? Only it doesn’t work in my (non-re-frame) code. I can select a keyword, and select Navigate -> Declaration from the menu, and nothing happens. Find Usages works, but not Navigate -> Declaration. Maybe it’s re-frame specific?#2018-01-2319:39joelsanchezworks also on non-re-frame code, maybe @cfleming can enlighten us on this#2018-01-2319:40joelsanchezregarding the "how can it be", I think it simply navigates to the first appearance of the given qualified keyword in the target namespace#2018-01-2320:12manutter51Yeah, I’m probably obsessing over semantics. Then again, I freak out about when you click on “All Unreads” in Slack, and it says, “All caught up, the world is your oyster” 🐙 and I’m yelling “That’s a picture of an octopus, not an oyster!”#2018-01-2323:51bfabrymostly getting used to the new default keybindings. but I'm finding the k key is way overloaded now#2018-01-2400:42cfleming@manutter51 @joelsanchez So previously keywords didn’t have any actual declaration, and you couldn’t navigate via them. Recently I added the concept of “defined keywords”, for things like spec and re-frame which define things using keywords more like vars.#2018-01-2400:43cflemingSo now you can either navigate or not, depending on how the keyword is used in your project. Find usages works either way.#2018-01-2400:44cfleming@bfabry Thanks for the feedback, I’ll take a look. It’s hard, IntelliJ uses lots of keys already.#2018-01-2400:54manutter51Thanks, that makes sense.#2018-01-2413:28kennytiltonI am seeing that problem again when Cursive (it seems) will not delete a blank line when #? dispatchers are present (in a .cljc file). It seems to come and go — after enough fussing the file starts editing again. Until the next time. Are there any clues on this and how to get back to editing once it breaks?#2018-01-2419:10wilkerluciois there a way to disable cursive/intellij index check when we focus in Intellij? If I just stay on the editor it works very fast, but every unfocus/focus seems to make it try to re-check things (like snapshots) and that happens way too often... is there a way to disable so I have to manually ask for refreshes? that would make my workflow way more efficient#2018-01-2508:03nblumoeIs there a way to teach cursive about bindings from clojure.core.match? For me, it shows the bound variables from patterns as cannot be resolved#2018-01-2508:14hagmonk@nblumoe often wondered the same thing, using core.match leaves little yellow failed inspection turds all over my buffer :)#2018-01-2508:39danielcompton@nblumoe there is a way to say to cursive that this macro behaves like one it knows about (`let`?)#2018-01-2508:39danielcomptonIt involves editing an internal config file somewhere, I can’t remember where though#2018-01-2508:41nblumoeThanks, I just checked the light bulb menu and indeed one can make it “resolve as let“. But that alone doesn’t help apparently. Not sure if any of the options will. But this might be the way to go. Investigating….#2018-01-2508:42nblumoehttps://cursive-ide.com/userguide/macros.html#2018-01-2508:44nblumoeI am afraid, this won’t cover match and the following applies: "This support will work in a lot of cases, but we’ll be adding more sophisticated support soon to allow users to help Cursive understand more complicated forms."#2018-01-2508:45nblumoeThere is the “Specify…” option which I don’t quite understand. Maybe @cfleming could quickly explain it. Seems not to be covered in the docs (yet)#2018-01-2508:52danielcompton@nblumoe is there another form that is closer to the macro? The undocumented part is that you can hack an internal file to make it match any macro, not just the five that are specified#2018-01-2509:00cfleming@danielcompton @nblumoe Yeah, sadly Cursive doesn’t understand anything that looks like core.match.#2018-01-2510:22nblumoeWould be great!#2018-01-2509:01cflemingI’ll see if I can add support soon, it’s a library I’ve been meaning to support for a while now.#2018-01-2510:03cfleming@hiskennyness No, that sounds very strange, and very hard to reproduce.#2018-01-2510:03cflemingI don’t have any good ideas unfortunately.#2018-01-2510:04cfleming@wilkerlucio Try Appearance &amp; Behavior-&gt;System settings-&gt;Synchronise files on frame deactivation#2018-01-2510:05cflemingIf you turn that off you may have to manually synchronise a fair bit when files have changed.#2018-01-2513:48wilkerluciothanks, I think that works 🙂#2018-01-2603:36cfleming@souenzzo Did you submit them? I’ll take a look and see if I can reproduce.#2018-01-2603:37souenzzoyep, sumited! forgot to write this 😅#2018-01-2603:36cflemingIn general, using reader conditionals in head position is difficult for Cursive.#2018-01-2703:58cfleming@joelsanchez That is an error message worthy of Clojure, indeed 🙂#2018-01-2704:10cfleming“Computer says no”#2018-01-2918:35mattfordHello hello.#2018-01-2918:36mattfordI'm struggling to get test-integration working.#2018-01-2918:36mattfordctrl-shift-t seems to find or offer to setup tests in the correct namespace#2018-01-2918:37mattfordbut when I try to run all tests in a name space it doesn't find any.#2018-01-2918:37mattfordmy test structure looks like test/kixi/kibana/api-test#2018-01-2919:08mattfordoh I think I misunderstood, I can't run the tests from the calling namespace but rather have to run them from the test namespace.#2018-01-2919:24yonatanelDoes anyone know why IDeferred is considered unresolved? Could it be because IDeferred is defined in a custom macro definterface+ that calls definterface only if not already defined? The code works otherwise.#2018-01-2922:35cfleming@mattford Right, the command will run all tests in the current namespace. Once you’ve done that though, you can then run the previous test action from anywhere.#2018-01-2922:35cfleming@yonatanel Yes, that sounds plausible. Does definterface+ look just like definterface?#2018-01-3007:53yonatanelhttps://github.com/ztellman/manifold/blob/193f5f48972c8e20dd0a9fc41a1311566a9f7bdd/src/manifold/utils.clj#L144
(defmacro definterface+ [name & body]
  (when-not (resolve name)
    `(definterface ~name 
#2018-01-3007:59yonatanelActually, I did edit the manifold source to use the original definterface and put it in checkouts folder which Cursive is aware of, and still had the same problem. I'm not sure what I'm doing wrong.#2018-01-3008:13cflemingThat shouldn’t be required. You can use the “Resolve as…” intention on definterface+, choose “Specify…” and select definterface.#2018-01-3008:13cfleming@yonatanel ^^#2018-01-3002:38cfleming@kenny No, no idea, sorry#2018-01-3022:47kidpollothere is a silly leprechaun in your intellij terminal 😛#2018-01-3100:33tianshufor macro, how about let user write a function or something like spec, receive the params of macro, and return a map like {:fns [(xxx []), (yyy [a b c])], :vars [v1 v2 v3], :bindings [local-v1 local-v2]}#2018-01-3100:35danielcomptonIs there any fast way to drop a #_ on some text? The comment command prints a ; which is not so helpful#2018-01-3100:36danielcompton@kenny the IntelliJ Terminal is really weird, I've found lots of odd behaviour between it and iTerm 2#2018-01-3100:37kennyThe strange part is it doesn't happen in my terminal but it does in my co-worker's.#2018-01-3100:37kennyI haven't found a way to do the #_ thing. It would be helpful.#2018-01-3100:38kennyAlso worth nothing that the comment command does not send parens to a new line whereas typing a ; does.#2018-01-3101:37cfleming@doglooksgood You mean for adding macro support for Cursive?#2018-01-3101:37tianshuyes#2018-01-3101:38cflemingThat’s actually almost exactly what Cursive does internally. I’m planning to open the API for that, but it needs some love first (it was some of the first code I wrote in Cursive and is very crufty, and doesn’t integrate with IntelliJ as well as it could).#2018-01-3101:39cfleming@danielcompton IntelliJ has a “Comment with block comment” command which I’m planning to make do that, but there’s nothing right now.#2018-01-3101:39cfleminghttps://github.com/cursive-ide/cursive/issues/1047#2018-01-3101:42tianshuthat's a good plan!#2018-01-3113:42Drew VerleeDoes cursive support parnifer and in line s expression evaluation that shows right next to the s expression? The latter is sort of like what happens when I debug in Java. Answer to parnifer is yes.#2018-01-3114:54dadair@genekim if you look under Help, I believe there is a menu item that says “... cursive cheat sheet” where ... is download or something. It should bring up a page externally that shows a bunch of cursive specific keybindings. Check if those are working?#2018-01-3114:55dadairIf they aren’t, you could be missing some mappings #2018-01-3117:00genekimOh, great idea, @dadair — thanks! I’ll check it out when I dig my laptop out shortly!#2018-01-3117:17shaun-mahood@genekim: I'm pretty sure those instructions are outdated - the cheatsheet is under Help -> Show Cursive Cheatsheet. There used to be a big song and dance to get keybindings set up and Colin fixed a bunch of that pretty recently.#2018-01-3117:23shaun-mahood@danielcompton: I've setup a shortcut for #_ by recording and binding a macro - it's kind of inconvenient since you have to do it from the start of the form but still better than nothing.#2018-01-3119:30danielcompton@shaun-mahood thanks, I’ll check it out#2018-01-3122:47cfleming@genekim Right, I changed that recently because it was very confusing. However I haven’t yet updated my doc, which is even more confusing 😕#2018-01-3122:48cflemingNot all the commands are mapped because IntelliJ already uses so many keybindings, I have to leave it up to the user which conflicts are acceptable to them.#2018-02-0103:27genekimHi, @cfleming — super helpful. As someone who never used IntelliJ before, it was definitely confusing, because I wasn’t sure I was looking in the right place. Thanks so much — I’m already loving using the REPL inside of Cursive. I’ll be buying my license tonight or tomorrow. PS: @shaun-mahood — great advice, by the way. I love the Cursive Cheat Sheet! It was great seeing all the key bindings in one place!#2018-02-0103:28genekim(Correction: just bought my license. :)#2018-02-0106:20cflemingThanks @genekim!#2018-02-0109:20danmYeah, and I have trouble remembering even the keybinds that there are 😉#2018-02-0118:07kennyFor some reason the Resolve as... &gt; Specify... dialog does not let me choose any vars in re-frame.core. How come?#2018-02-0122:06cfleming@kenny Ummm… I have no idea - it should.#2018-02-0122:06cflemingI’ll test that when I get in.#2018-02-0214:32manutter51@cfleming You know what would be really cool? Here I am getting ready to submit a pull request, and I have to pull out all the pprint and js/console.log statements I’ve been using for debugging during dev. Wouldn’t it be handy if all those statements could be styled with a different background color so they’d be easier to spot?#2018-02-0214:32manutter51Just a stray thought, back to work now.#2018-02-0219:50genekim@cfleming Thanks so much for the quick response — it’s been great using Cursive. If you’re interested, I can write up some thoughts about what it’s like coming from Atom/Visual Studio Code, and what I’m having to do to adapt… Two quick questions? 1. I’m having this problem where I can no longer see the text entry point in the REPL — I spent 15m floating/pinning/redocking/closing/re-opening… Almost tempted to re-install to try to get the text entry area back. In other words, whatever I type in the REPL, I cannot see until I hit ENTER! It was great when I could, though!!! 🙂#2018-02-0219:52shaun-mahood@genekim: Try double clicking on the handle (right above the event log)#2018-02-0219:53shaun-mahoodI just shrunk my repl window to try and recreate your problem and got a little panicky when click and drag didn't fix it 🙂#2018-02-0219:54genekim2. I’m using parinfer mode, and when I type Tab when I’m in a “let binding”, it indents the whole line… instead of inserting a in the middle of the line… I love the demo where the let-bindings are auto-formatted, but I can’t get that to work… Sorry for all the newbie questions! (But despite all my difficulties, I am loving it — goto symbol is fantastic, I’m loving the “wrong arity” detection, and the REPL is wonderful!#2018-02-0219:58genekim@shaun-mahood — “panicky”. Yes! I totally relate to the feeling! Drats… I’m double-clicking everywhere, and not finding anything that brings the REPL text entry area back. Can you post screenshot of where I should click? Sorry! And thank you! 🙂#2018-02-0220:38genekimOMG! @shaun-mahood It worked!!! I had no idea that that area was the text entry area! I thought it was the editor window showing form beneath! Wonderful!#2018-02-0220:39shaun-mahoodAwesome 🙂#2018-02-0301:52cfleming@genekim Interesting idea about a brighter line - that’s part of the IntelliJ UI, but I might be able to emphasise it.#2018-02-0508:13andrzejsliwaif you adding UI customisation, please always make it optional.#2018-02-0508:14andrzejsliwafor me the most missing part is just REPL prompt (with current namespace). If you will print prompt everyone will know where it is#2018-02-0302:05genekim@cfleming — any chance you can also help me understand why tabs in let-bindings aren’t working like they are in your ClojureConf videos? 🙂 Thx so much! https://clojurians.slack.com/archives/C0744GXCJ/p1517601277000618#2018-02-0302:10cfleming@genekim Sure, you don’t need to use tab, IntelliJ will line those up for you when you reformat. You’re looking for Settings-&gt;Editor-&gt;Code Style-&gt;Clojure-&gt;General-&gt;Align let-binding values#2018-02-0302:11cflemingOnce that’s set, when you reformat your code they’ll be lined up automatically.#2018-02-0302:11cflemingI see - yeah, I always use the default colour scheme, I need to check the dark one more frequently.#2018-02-0302:24genekimWow. So cool. I’ll try later tonight! And wow, and I just reused Refactor Variable for first time. And then five other times. So awesome!! AMAZING!!! Thanks again @cfleming. #2018-02-0406:43yonatanelHow do I share my custom formatting with my team? I've accumulated several macros resolve and indentation settings and I want us to stop reformatting each other.#2018-02-0503:54hagmonk@cfleming is it safe to move to EAP 2018.* yet?#2018-02-0503:54cfleming@hagmonk I actually just pushed 1.6.3-eap3 which has 2018.1 support.#2018-02-0503:55cflemingSo as long as Cursive is configured to download EAPs you should be good to go.#2018-02-0503:56hagmonkcool! thanks, I'll give it a swing#2018-02-0504:30hagmonk@cfleming curious, on windows using 2018.1 I can't see the update, but I could see it on the Mac using 2017.3#2018-02-0505:00hagmonk@cfleming I manually downloaded the plugin zip file and installed it from disk - worked fine ¯\(ツ)/¯#2018-02-0511:04cfleming@hagmonk Yeah, that’s a problem - it’s described here: https://cursive-ide.com/userguide/troubleshooting.html under “Cursive on IntelliJ EAP builds”. I should add the other workaround (download the plugin manually) too.#2018-02-0511:29joelsanchez@yonatanel this is my ~/.IdeaIC2017.3/config/options/ClojureResolveSettings.xml:
<application>
  <component name="ClojureResolveSettings">
    <item key="myproject.common.macros/defhandler" resolves-as="clojure.core/defn" />
    <item key="myproject.common.state.actions/defaction" resolves-as="clojure.core/defn" />
    <item key="myproject.common.macros/defstate" resolves-as="clojure.core/def" />
    <item key="myproject.common.macros/defpage" resolves-as="clojure.core/defn" />
  </component>
</application>
most likely in a similar path in your system
#2018-02-0513:23yonatanelAlso ./config/codestyles, which contains indentation (just found it)#2018-02-0516:46shaun-mahood@dustingetz: I think that's the same problem @cfleming referenced a couple messages up ("Cursive on IntelliJ EAP Builds")#2018-02-0516:48Dustin GetzThanks, i see now, it the url doesn’t work for me .. but installing from zip file did work#2018-02-0518:47taylorI’m confused about how to use the Structural Editing -> Thread Form (and Unthread Form)#2018-02-0518:48taylor(apply + (filter number? (map :amount rows))) for example, if I wanted to thread-last those forms, would I be able to use Thread Form to do that?#2018-02-0518:51taylorI think I just figured it out. I have to position cursor on the innermost form, and then repeatedly Thread Form to work my way out?#2018-02-0521:46cfleming@taylor Yes, that’s right.#2018-02-0623:15tony.kayAre the EAPs having any problem with dev profile? I’m seeing erratic visibility of my :env settings in the dev profile. If add re-add the run config, sometimes it works…always works from terminal.#2018-02-0700:27cfleming@tony.kay Not that I’m aware of, no.#2018-02-0700:28cflemingCursive doesn’t really deal with the profile stuff explicitly, just delegates to lein#2018-02-0700:30tony.kayyeah, I figured…just can’t figure out why it works at CLI, but not from run configs. I knew you read from lein, so wondered if there was an issue there somehow. I’ve only seen it in one closed-source project so far, so if I can reproduce it more widely I’ll send you an issue.#2018-02-0700:30cflemingCool, thanks#2018-02-0706:14genekimOh, wow. I’m delighted that I have cursive working on my home machine now, using Settings Repository to sync all my keymaps, etc… I spent 90m getting Figwheel/CLJS repl running inside Cursive REPL, which blew me away — it was some unholy combination of https://github.com/bhauman/lein-figwheel/wiki/Using-the-Figwheel-REPL-within-NRepl and https://github.com/bhauman/lein-figwheel/wiki/Running-figwheel-in-a-Cursive-Clojure-REPL …which ultimately enabled me to run (start-figwheel!) and (cljs-repl). It results in a CLJS REPL prompt, and I can do things like examine my CLJS program state, do things like (js/alert “abc”) But when I try to copy forms from the Cursive editor, I get an floating error box, very much like what was reported here: “Cannot load Clojure form into ClojureScript REPL” https://github.com/cursive-ide/cursive/issues/1285 Is there any guidance on getting CLJS/Figwheel REPLs configured correctly? Again, thanks so much in advance for the help!#2018-02-0706:16cfleming@genekim Is the file you’re trying to load the form from a Clojure file, or CLJS?#2018-02-0706:19genekimOooh…. CLJ… @cfleming :thinking_face: Let me try from a CLJS file! 🙂#2018-02-0706:19cflemingYou can also turn your CLJ file into a CLJS one if that’s what you actually wanted to do.#2018-02-0706:20cflemingRight click in the project view, Convert to…#2018-02-0706:21genekimHoly cow… Wow! THANK YOU! (And sorry for my frequent questions here! But I’m elated beyond words for all the help!!!) @cfleming FWIW, I’m just blown away by how wonderful a real IDE is. Thanks for your amazing work — I’ll write up a more gushing and more lucid thank you soon!#2018-02-0706:38cflemingGreat, glad you’re enjoying it!#2018-02-0712:11sooheonWhat’s the story for adding more refactorings to cursive, maybe taking advantage of work like clj-refactor?#2018-02-0712:15sooheonThere are many little things I miss from emacs, I wonder how difficult it would be to reimplement the most crucial features, maybe even writing the action/refactoring in clojure?#2018-02-0714:42rarous@sooheon clj-refactor is REPL based, Cursive is not#2018-02-0715:04danmHow does Cursive expect multi-arity functions to be formatted? I keep trying to do it like this http://clojure-doc.org/articles/language/functions.html#multi-arity-functions and it tries to remove the trailing ] from the args list unless the content is inline with it (instead of being indented 2 chars)#2018-02-0715:08danmThis is specifically using parinfer mode#2018-02-0715:16mattfordIn a new project, it unreasonably annoys me I have to setup Lein REPL every time. Here, we have hundreds of little projects.#2018-02-0715:16mattfordCan I do something about that?#2018-02-0715:16mattfordNew, as in freshly checked out.#2018-02-0715:16mattfordNot new as in created from scratch.#2018-02-0715:35manutter51IntelliJ provides a somewhat less-than-awesome method. If you bring up your Edit Configurations and click the Share checkbox, it will put an xml file in <project-dir>/.idea/runConfigurations, which you can copy to your new project to bring in the config from the other project.#2018-02-0715:36manutter51I've never actually done that, but I hear it can be done.#2018-02-0718:29mattfordDoes anyone else find space being injected when manipulating strings using slurp etc?#2018-02-0719:48souenzzo@cfleming a have a custom defrule macro (with almost the same syntax) but i cant find that "yellow lamp" to switch the "macro binding"#2018-02-0719:48cfleming@carr0t Yes, if you’re using parinfer, you’ll have to line the function bodies up with the argument vector. That’s a parinfer thing, not a Cursive thing.#2018-02-0719:49cfleming@mattford Ugh, yes, I have a plan to set a run config up by default when importing a project, but I haven’t done that yet. I’ll see if I can do it for the next EAP.#2018-02-0719:49cflemingAlso, do you have an example of space being inserted with slurp?#2018-02-0719:50cfleming@souenzzo It doesn’t come up when you have the caret over a usage of your macro?#2018-02-0719:54mattford"foo" "bar"#2018-02-0719:55mattfordslurp forwards in foo#2018-02-0719:56mattfordturns it to#2018-02-0719:56mattford"foo " bar ""#2018-02-0719:57mattfordWhen I push brackets out through strings that seems the biggest problem, the spaces appear in the strings and i have to clean up.#2018-02-0720:01mattfordcan't make it happen now, so perhaps it's pebkac#2018-02-0720:13cfleming@souenzzo Can you check your intention settings? Settings-&gt;Editor-&gt;Intentions-&gt;Clojure#2018-02-0720:15souenzzoNow working! @cfleming there is some community wiki for cursive?#2018-02-0720:17cflemingThere’s a wiki on the github repo where I’ve put a few things, mostly just things I can point people too.#2018-02-0720:17cflemingI’ll add an entry to https://cursive-ide.com/userguide/troubleshooting.html about this.#2018-02-0720:13cflemingMake sure they’re enabled.#2018-02-0720:16cfleming@mattford You’re right, that’s not right at all. I’ll fix that: https://github.com/cursive-ide/cursive/issues/1936#2018-02-0720:17mattfordawesome#2018-02-0720:17mattford🙂#2018-02-0818:00sparkofreasonAlso posted in #parinfer. Just tried out the newest with Parinfer 3, not having any luck. I switched to Parinfer, but it doesn't seem to be enabled, typing a paren doesn't even show the closing paren. I assume this is because the file isn't correctly indented as discussed in the link above. However I don't see any highlighting to indicate what to correct. Is there something else I'm supposed to be doing?#2018-02-0820:09cfleming@dave.dixon That’s very odd. A few things to check - did the plugin actually get updated? Settings-&gt;Plugins-&gt;Cursive should show version 1.7.0-snapshot1-<something>#2018-02-0820:12cflemingThe marking should be pretty obvious, it looks like this:#2018-02-0820:13cflemingIf you’re not seeing that, could you email me your log file? Help-&gt;Show log in Finder/Explorer, send it to <mailto:/cdn-cgi/l/email-protection|/cdn-cgi/l/email-protection>#2018-02-0820:18sparkofreasonVersion is correct, definitely not seeing what is shown in the screenshot. Just sent the log, and turned on parinfer right before I sent it.#2018-02-0820:18cflemingCool, thanks. Let me take a look.#2018-02-0821:04sparkofreasonIt only seems to have a problem with one project: https://github.com/Provisdom/maali#2018-02-0821:05sparkofreasonNot sure if that helps or if it is still something local on my machine.#2018-02-0821:06cfleming@dave.dixon I can’t see anything unusual in the log. Could you try the following? Help-&gt;Debug Log Settings… and enter #parinfer.debug in there. Reproduce the problem (i.e. enter a ( where you don’t see the corresponding closer) and then send me the log. Then remove that debug log entry or your logs will get huge.#2018-02-0821:06cflemingOk, thanks - I’ll try to repro with that project too when I get in to the office.#2018-02-0821:06sparkofreasonThat stack overflow exception wasn't it? That only shows up when I turn on parinfer.#2018-02-0821:07cflemingReally? I’ll double check that, one sec#2018-02-0821:08cflemingNo, that’s definitely not related. Really weird that you only see that with parinfer on.#2018-02-0821:08cflemingI suspect it must be coincidence somehow, but I’m not sure how.#2018-02-0821:26sparkofreasonYou know, I think I was probably looking at the log backwards. Anyway, I sent the new one with debug on.#2018-02-0822:42mishayet to try it out, but <3 @cfleming and @shaunlebron opieop#2018-02-0900:18sparkofreasonApart from the one problem project, parinfer is really working great now. I really liked the smart mode when using atom, excited that we have it in cursive now.#2018-02-0900:38sparkofreasonIs there any way to to select a namespace-qualified symbol/keyword with a single command? I can select all of my-ns/foo with two "expand selections".#2018-02-0900:43cfleming@dave.dixon Great! I’ll try to repro with that project when I get a chance.#2018-02-0900:44cflemingNo, I don’t think so at the moment - it requires two expansions I think#2018-02-0900:45swlkrJust wanted to hop in here and say parinfer smart mode works great, I’ve found zero downsides, all upside, @cfleming delivered#2018-02-0900:45cfleming@swlkr Great news! @shaunlebron deserves most of the credit 🙂#2018-02-0900:46swlkrTeam work#2018-02-0900:48cflemingDefinitely#2018-02-0900:54sparkofreasonIt would be cool to just select (or expand) based on Clojure syntax, a single key-combo that operated at the level of clojure literals, symbols, and collections. I was able to do part of this for collections, and it's really useful, especially in conjunction with parinfer.#2018-02-0900:56sparkofreasonWith the custom macros I have for collections, it's very quick and easy to do things like cut an entire list and paste it in place of another one. I find myself wanting to do the same with other clojure syntactic elements, e.g. cut the current ns-qualified keyword, and paste it over another.#2018-02-0900:58cflemingThe problem is that it’s also often useful to e.g. just change the name part of a qualified keyword.#2018-02-0901:02sparkofreasonIt's just a different use-case. I agree that you still want to do that. I can almost do what I want with macros using "Move Backward" and "Expand Selection". Works on strings and qualified keywords. For whatever reason, though, "Expand Selection" at the start of a ns-qualified symbol only selects the namespace.#2018-02-0901:06cflemingSo something that people have asked for from time to time is a way to select just sexps. Perhaps that could be generalised somewhat to “Clojure forms”, and could have a slightly different keybinding (e.g. alt-shift-up on OSX, expand selection is currently alt-up)#2018-02-0905:15sparkofreasonIf you had a way to select based on the same logic used for Move Backward/Forward, then I think I could make a macro similar to what I have for s-expressions to work on symbols and literals.#2018-02-0901:07sparkofreasonThat would be cool.#2018-02-0901:12sparkofreasonYou can select s-expressions via keyboard macros. #2018-02-0901:13cflemingHow do you do that?#2018-02-0901:13cflemingSomething like move out backwards followed by expand selection?#2018-02-0901:29sparkofreasonExactly #2018-02-0902:43shaunlebron@taylor and I are having problems running the new parinfer on cljs files in cursive#2018-02-0902:43taylorCLJC too it seems#2018-02-0902:43taylorCLJ seems fine#2018-02-0902:43cfleming@dave.dixon’s repo is all CLJC and CLJS.#2018-02-0902:45shaunlebronsteps to reproduce: 1. new project > clojure 2. parinfer should work in core.clj 3. create new cljs namespace 4. paste in https://github.com/oakmac/atom-parinfer/blob/master/src-cljs/atom_parinfer/core.cljs 5. parinfer seems to not work in the cljs file#2018-02-0902:45taylorit’s really nice when it works though 🙂#2018-02-0902:47cflemingYeah, it’s not working at all in CLJS or CLJC#2018-02-0902:47cflemingOr EDN.#2018-02-0902:47cflemingOk, well at least that should be easy to fix 🙂#2018-02-0902:49shaunlebronhaha, awesome#2018-02-0902:50cflemingUgh, yeah, IntelliJ has this really confusing thing around file types, I’m using the wrong test.#2018-02-0902:50cflemingI’ll fix that and push a new version.#2018-02-0902:50taylorexcellent work, really enjoy using Cursive & Parinfer 👏#2018-02-0902:53taylorI will say when I was first learning Clojure, Parinfer felt like add’l “cognitive load” so I turned it off, but now I hate not having it on!#2018-02-0902:58cflemingSmart mode is much more intuitive I think, I’m hopeful that it shouldn’t add any cognitive load now!#2018-02-0903:01taylorone of my only peeves with prev iteration was that pasted code was often wrongly-indented, seems totally fixed now#2018-02-0903:33cflemingI’ve pushed 1.7.0-snapshot2 fixing that bug /cc @shaunlebron#2018-02-0903:39taylorit’s working for me#2018-02-0904:59sparkofreasonMe too. Thanks for the fast turnaround!#2018-02-0906:40shaunlebronworks here!#2018-02-0906:41gklijsWill try it out soon, kinda had the same like taylor I guess, but now I’m copy/pasting quit some time, which could be faster and less error-prone.#2018-02-0911:12vgamula@cfleming, Hi! Tried new Parinfer in Cursive, looks really great! Is there an option to turn forceRebalance on (like in https://shaunlebron.github.io/parinfer/demo)? Because now I can press enter before closing brackets and they will be moved to the next line. And then I can delete closing brackets using delete button, after that parinfer stops auto-balancing. Also, when closing brackets are in the new line I can't move my cursor to the left using shift-tab.#2018-02-0914:28Joe R. SmithI see “built from 1.7.0-snapshot” in the version notes, but I don’t seem to have any parinfer v3 features (e.g., changing subsequent line indent when I change the length of a preceding form).#2018-02-0917:41firstclassfunccan someone tell me what version of JDK 1.8 people are using that works with Cursive#2018-02-0917:58manutter51I seem to be using 1.8.0_144-b01. No problems using it with Cursive.#2018-02-0917:58manutter51Officially 1.8.0_144 that is#2018-02-1003:27cfleming@vgamula No, there isn’t right now. I’ll look at that next week and see if it seems like a good idea to add it. In general, I’m a fan of less options if possible.#2018-02-1003:27cflemingI’ll try your repro case from your description and see how it works.#2018-02-1003:28cfleming@solussd Are you using snapshot1? There was an embarrassing bug there where parinfer didn’t work in CLJS, CLJC or EDN files (only CLJ). There’s a snapshot2 which fixed that.#2018-02-1003:28cfleming@firstclassfunc Do you mean the JDK used to run IntelliJ itself?#2018-02-1003:28cflemingOr the one used for your projects?#2018-02-1021:25aptHi. I'm trying to reproduce this parinfer example from [1]:
(defn foo [a b]
  (+ a b))
->
(defn foo [a b]
(+ a b))
But when I remove the first two spaces from the second line, it only works (= change the parentheses) if I use delete instead of backspace. When I use backspace, it just joins both lines. Is this a bug or something? [1]: https://shaunlebron.github.io/parinfer/#indent-mode
#2018-02-1104:22cfleming@andre.peric That’s IntelliJ doing that, it tries to be smart about tidying up whitespace when you backspace. Shift-tab should outdent that like as you would expect.#2018-02-1110:01misha@cfleming @shaunlebron I can and am using new parinfer in a team project without breaking things for others! thank you guys again#2018-02-1111:59apt@cfleming Great, thanks!#2018-02-1115:05aptAlso, I'm using ideavim. Seems that tab won't indent in visual mode. shift tab works fine. Is there any workaround?#2018-02-1120:43Joe R. Smith@cfleming I’m running snapshot2 (or, at least it says: “built from 1.7.0-snapshot2)#2018-02-1120:44cfleming@solussd And you’re not seeing any parinfer functionality?#2018-02-1120:44cflemingYou definitely have parinfer enabled in the status widget at the bottom?#2018-02-1120:44Joe R. Smithno, it says it’s in “parinfer” mode (bottom right).#2018-02-1120:44cflemingHmm#2018-02-1120:45cflemingOk, I have some debug logging in there but I suspect it’s not enough to diagnose this. I’m going to add some more and get another build out, I’ll let you know when it’s there.#2018-02-1120:46Joe R. Smithok– some context: I’m running IntelliJ IDEA 2017.3.4 (Community Edition) Build #IC-173.4548.28, built on January 29, 2018 JRE: 1.8.0_152-release-1024-b11 x86_64 JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o Mac OS X 10.13.3#2018-02-1120:47Joe R. Smithand Cursive version: 1.6.3-2017.3#2018-02-1120:47cflemingOk, thanks.#2018-02-1120:47Joe R. Smith^ but it says Built on: 2018-02-08 15:05 Built from: 1.6.3-4-g6df20b8#2018-02-1120:48cflemingOoops, hang on, so you’re not running cursive 1.7.0-snapshot2?#2018-02-1120:49Joe R. Smithhmm, weird.#2018-02-1120:50Joe R. Smithnotice the “built from 1.7.0-snapshot2”#2018-02-1120:50cflemingI think that’s a bug in their repo#2018-02-1120:50Joe R. Smithbut if I filter down to cursive on the plugins page, it shows: Built from: 1.6.3-4-g6df20b8#2018-02-1120:50cflemingOk, so you actually have 1.6.3 installed.#2018-02-1120:51Joe R. Smithhmm, I see no option to update/upgrade#2018-02-1120:51cflemingDid you download 1.7.0-snapshot2?#2018-02-1120:51cflemingNo, because it’s a snapshot you have to download it and install it manually.#2018-02-1120:51Joe R. SmithI’m using the EAP repo#2018-02-1120:52cflemingYes, this is a dev build, so it’s not available to anyone automatically.#2018-02-1120:52Joe R. Smithahh#2018-02-1120:52Joe R. Smith🙂#2018-02-1120:52cflemingSee the instructions here: https://groups.google.com/d/topic/cursive/ZJ4fcp3A988/discussion#2018-02-1120:52cflemingThat repo bug makes it very confusing though - sorry about that.#2018-02-1120:52cflemingI’ll report that to JetBrains.#2018-02-1120:53Joe R. Smithcool. thanks– I’m excited to try it out.#2018-02-1120:53cflemingGreat, let me know how it works for you!#2018-02-1120:53Joe R. Smith:thumbsup:#2018-02-1121:03Joe R. Smithsigh, nevermind, I downloaded the wrong one I think#2018-02-1121:04Joe R. Smith(I’m not running the intellij eap)#2018-02-1121:07Joe R. Smithworks now. 😉#2018-02-1121:40cfleming@solussd Nice 🙂#2018-02-1202:12Drew Verleedid something new roll out? i’m guessing i get updates automatically right?#2018-02-1204:13shaunlebron@drewverlee a dev build for new parinfer version. see here: https://groups.google.com/d/msg/cursive/ZJ4fcp3A988/VVw9I2_pAwAJ#2018-02-1204:13shaunlebronyou will not automatically get it yet#2018-02-1207:09andrzejsliwaok, I found it#2018-02-1221:58shaunlebron@cfleming: tried out the incorrect-indentation markings by loading up the clojurescript compiler repo#2018-02-1222:00shaunlebronthree bits of feedback: - I like the annotation when hovering over the red marks - difficult to go to the next incorrect indentation to fix - I expected to be able to click the “parinfer cannot run based on incorrect indentation” status message at bottom right to show the invalid location - speed is bad on a 11k file#2018-02-1222:00shaunlebronvideo if you want to see it: https://www.youtube.com/watch?v=UBf56R1DTpM#2018-02-1222:01cflemingF2 should jump to the next indentation marker - that’s the standard IntelliJ “Go to next problem”#2018-02-1222:01cflemingI’ll check the speed and see if I can improve that.#2018-02-1222:03cflemingRe: Clicking on the status message - I don’t think IntelliJ users would expect to be able to do that (you can’t on most hints). I’ll think about a way to allow jumping to the problem - perhaps just a reminder that F2 will do it.#2018-02-1222:21shaunlebrondefinitely do what’s idiomatic to the editor#2018-02-1418:46kennyIssue happens on both my Mac and Linux machines.#2018-02-1418:51zyloxsame#2018-02-1418:51zyloxonly tested on mac though#2018-02-1421:23cfleming@kenny Arg, sorry, that slipped off my list - I’ll look at it today.#2018-02-1422:09wilkerlucioany news on regard of disabling printing namespaced keywords on the REPL?#2018-02-1500:49cfleming@wilkerlucio Can you remind me what that’s about?#2018-02-1501:15cfleming@wilkerlucio Actually, I just saw your message on https://github.com/cursive-ide/cursive/issues/1541#issuecomment-365762811. But are you talking about namespaced maps, or keywords?#2018-02-1501:16wilkerlucioyes, that's it, the namespaced keyworks#2018-02-1501:16cflemingBut that issue is about namespaced maps printing.#2018-02-1501:17cflemingYou mean it’s the #:foo{:bar 1} notation you don’t want?#2018-02-1501:17wilkerluciocorrect, I want the old notation#2018-02-1501:18wilkerlucioI found that new one confusing to read (to see the boundaries of the maps)#2018-02-1501:18cflemingOk. It’s tricky with nREPL, as detailed in the issue - I haven’t looked at it again, but I will do.#2018-02-1501:18cflemingYeah, I really don’t like that feature at all.#2018-02-1501:25cfleming@kenny @zylox Ah, the issue is that it doesn’t accept fully-qualified names, it probably should:#2018-02-1501:26kennyOhh. Yeah that confused me. #2018-02-1501:26zyloxI agree, it should hahaha#2018-02-1501:26cflemingFair enough, that’s pretty confusing.#2018-02-1501:27cflemingI’ll see if that widget allows me to do that - I’m just re-using a standard IntelliJ one.#2018-02-1501:28cflemingHmm, the issue is I’m not sure I can allow both - it either has to be all FQNs or simple names, I think.#2018-02-1501:28cflemingRequiring FQNs for things in core would be annoying.#2018-02-1501:39kennyHmm. This feels like the manual way of specifying things so it may fit. #2018-02-1501:40kennyAlso having a + button in the Symbol resolution tab in settings would be nice. #2018-02-1501:40cflemingActually, no, I should have had faith:#2018-02-1613:34frankiesardoHello folks#2018-02-1613:34frankiesardoCurious to try our Parinfer Smart mode but all I see is the Parinfer Indent mode in my Cursive#2018-02-1613:34frankiesardoDo you know how do I activate the Smart Mode?#2018-02-1616:17rarous@frankie you need to have v1.7#2018-02-1616:43frankiesardoI have setup the EAP repo but I can't see it. Also it does not appear in here https://plugins.jetbrains.com/plugin/8090-cursive#2018-02-1616:44frankiesardoOh they are in the dev tab I see#2018-02-1616:27carocadhey guys, does anybody also has problems with clojure.java-time resolving vars? I see that there was an issue for this but somehow my cursive is not resolving those vars 😞 https://github.com/cursive-ide/cursive/issues/1670#2018-02-1621:09carocadit seems that restarting intellij solves the issue#2018-02-1618:06wilkerlucio@cfleming just an anxious person asking: how is the deps.edn going? 😊#2018-02-1619:24Alex Miller (Clojure team)as a workaround, you can clj -Spom to create a pom.xml, then open your project in Cursive as a Maven project. -Spom syncs, so just call it again if you update your deps.edn.#2018-02-1619:25Alex Miller (Clojure team)I work this way with Cursive and works for me!#2018-02-1619:33wilkerluciocool, thanks 🙂#2018-02-1803:41wilkerlucio@U064X3EF3 is there a way to make cursive understand local modules this way? I see when I try to add source paths out of current directory or :local/root, the pom version just seem to ignore those#2018-02-1804:22Alex Miller (Clojure team)Not currently - Maven has no representation for that#2018-02-1619:05zylox@cfleming, any chance that fqn change will be in an eap sometime soon?#2018-02-1621:21cfleming@zylox Do you mean the searching for a var by fqn when customising resolution?#2018-02-1621:22cflemingIf so, then yes - it’ll be in the next one. There’s a good workaround too, which is just to use the simple name in the meantime.#2018-02-1621:22zyloxyes! that.#2018-02-1621:22zyloxi will say on my computer, simple name isnt finding it most of the time#2018-02-1621:23zyloxnot huge, i can still update the xml manually#2018-02-1621:23cflemingHmm, in that case I think the problem is something else.#2018-02-1621:23cflemingThe simple name should find it. Is this for re-frame vars as well, or something else?#2018-02-1621:24zyloxnope, a combination of the new clara stuff and schema stuff#2018-02-1621:24cflemingCan you find the symbol you’re after using Go To Symbol?#2018-02-1621:55zylox(we moved to a private chat, im not ghosting colin dont worry)#2018-02-1809:38p-himikI just upgraded to IDEA 2017.3.4, invalidated cache in my project, and started to see a rather strange behavior:#2018-02-1809:40p-himikIt happens with half of the code. requires are not resolved, false positives on unused aliases etc.#2018-02-1809:45p-himikAnother cache invalidation fixed it somehow.#2018-02-1901:19caleb.macdonaldblackMy auto-complete for project.clj dependencies has stopped working for a while. I did disable all my intellij plugins and re-enable only a select few a while back. Cursive is enabled in intellij.#2018-02-1901:21cfleming@caleb.macdonaldblack You’re probably missing the Maven plugin, which that functionality requires.#2018-02-1901:25caleb.macdonaldblack@cfleming That was it. Thank you!#2018-02-1919:04aptHi. Is there any way to prevent parinfer from automatically modifying files with bad indentation?#2018-02-1919:05aptI'd prefer getting a warning message or something#2018-02-1920:19briantriceYeah, this is a hassle for me, too.#2018-02-1920:20briantriceSomething like a “lazy indent” mode, but maybe that’s what paredit is for.#2018-02-1920:23shaunlebron@andre.peric the latest dev build just highlights the bad indentation without fixing it, and runs Parinfer only after it is manually fixed#2018-02-1921:42apt@shaunlebron Cool, I'll get it. Thanks!#2018-02-1922:20caleb.macdonaldblackI Have a script that exports some environment variables. How can I make them available to be in the cursive REPL? I know I can manually type them into the REPL config. I also know I can run scripts before launch, but anything exported doesn’t seem to be available to my running app.#2018-02-1922:29cfleming@andre.peric check the mailing list, it has details on how to install it. It has to be installed manually for the moment.#2018-02-1922:32cfleming@caleb.macdonaldblack So I don’t have a good solution for this right now, sorry. It’s something that occasionally people need for things like authentication values etc. The only solution I can think of right now is to run the REPL at the command line using lein repl :headless and then connect from within Cursive using a Remote REPL config.#2018-02-1922:42caleb.macdonaldblack@cfleming I’m also running a cljs repl like this: lein run -m clojure.main script/repl.clj#2018-02-1922:42caleb.macdonaldblackWould I be able to get a :headless to work on that somehow?#2018-02-1922:45caleb.macdonaldblackDoes :headless just run it in the background#2018-02-1922:50cflemingRight, :headless runs it in the background and waits for a connection. Unfortunately that doesn’t work for CLJS REPLs since it (currently) requires nREPL#2018-02-1922:50cflemingDoes your CLJS REPL also need the env vars?#2018-02-1922:51cfleming@caleb.macdonaldblack ^^#2018-02-1922:53caleb.macdonaldblackYea they do.#2018-02-1922:53caleb.macdonaldblackSomeone else recommended that I create a bash script to export the vars and then open intellij from bash#2018-02-1922:54caleb.macdonaldblackAnd then intellij and my REPLs will have see the environment variables#2018-02-1923:22cfleming@caleb.macdonaldblack Which platform are you on?#2018-02-1923:22caleb.macdonaldblackMac?#2018-02-1923:23cflemingSo that might be possible, but it’s tricky - Mac apps tend to get their env vars from property lists.#2018-02-1923:26caleb.macdonaldblackOkay I just confirmed that this works for in the java repl#2018-02-1923:26caleb.macdonaldblackMy env vars for cljs are accessed in project.clj so I assume that’ll work#2018-02-1923:27caleb.macdonaldblackI wonder if that makes a difference to whether or now i can use the remote repl#2018-02-1923:33cflemingWell, you wouldn’t need it if you can get your env vars via IntelliJ, right?#2018-02-1923:37caleb.macdonaldblackYea I can get them from intellij. Just trying to weigh up my options.#2018-02-2004:44be9hey Cursive people. How do you usually handle the conflict with Shift-Command-[ which is both “wrap with {}” and “Select Previous Tab” ?#2018-02-2008:03cfleming@be9 I’m afraid if you use both of them, you’ll have to rebind one. Cursive needs a lot of shortcuts, and IntelliJ already uses lots too 😞#2018-02-2008:07be9@cfleming yeah I get it, that’s why I’m asking. what are convenient rebindings in this case or is there a more powerful way to navigate between editor tabs#2018-02-2009:12dirklectisch@be9 I have my tabs disabled and use command-e or command-shift-e to navigate to recent files instead.#2018-02-2009:13dirklectischI got that from the Cursive user guide which has a lot of great IntelliJ usage tips in general. Check out the “Getting Around” section for more help on navigation. https://cursive-ide.com/userguide/navigation.html#2018-02-2011:56apt@cfleming Will the parinfer fix be shipped in the next stable version? Will it be released soon? I'll let my coworkers know when it gets into the stable version#2018-02-2020:02cfleming@andre.peric Yes, it’ll be in the next version. The EAP should be out soon since there don’t seem to be major issues with it.#2018-02-2112:31steveb8n@cfleming just saw Nelson was hit pretty hard by the cyclone. All well in your neighbourhood?#2018-02-2119:03cfleming@steveb8n Yes, we’re all good thanks - it was actually pretty anticlimactic in Nelson proper but the surrounding region was pretty badly hit.#2018-02-2119:23briantriceQ: I’m running a cljs test runner using lein doo slimer test auto and would like to get IntelliJ to highlight various test-related phrases for legibility. Any pointers/suggestions?#2018-02-2119:24briantriceAn alternative would be understanding how to terminal-colorify the output from lein.#2018-02-2120:34briantriceI’m going to switch to karma runner to see whether that makes output better#2018-02-2122:04briantricelein doo karma-slimer test auto ran fine but doesn’t seem to respond to karma.conf.js settings, strangely. So I’m delaying pursuing karma for now.#2018-02-2122:38spiedenis there a way to manually generate stubs? they’d be really useful for specter but cursive’s not offering to#2018-02-2307:01tianshuHow can I try the latest version of cursive that have parinfer smart-mode?#2018-02-2307:45cfleming@doglooksgood Instructions are here: https://groups.google.com/d/topic/cursive/ZJ4fcp3A988/discussion - snapshot2 is the latest version.#2018-02-2307:45tianshuthanks#2018-02-2308:05tianshuI meet this plugin is incompatible with this installation. Is my IDEA too old?#2018-02-2308:06tianshuI just download the jar file and use install from disk.#2018-02-2308:12cflemingNo, you have to download the version corresponding to your version of IntelliJ.#2018-02-2308:12cflemingSo if you’re on IntelliJ 2017.1 you need version 1.7.0-snapshot2-2017.1#2018-02-2308:14tianshugot it#2018-02-2709:10gravIf I copy/paste this in Cursive with Parinfer on:
'({:foo 42}
  {:bar 43})
I get this:
'({:foo 42
   {:bar 43}})
#2018-02-2709:10gravIsn't this a bug?#2018-02-2709:11gravWith a vector instead of a list, it works#2018-02-2711:11claudiusame for me with parinfer3 🙂#2018-02-2722:42cfleming@grav @claudiu Yeah, looks like a bug - I think Cursive is indenting the list like an fn invocation. It’s usually more idiomatic in Clojure to use a vector for things like that.#2018-02-2806:17grav@cfleming Yeah it's actually some test-output that I copy-pasted. Not idiomatic, I agree. Still Clojure though 😉#2018-02-2808:25cfleming@grav Yes, no doubt it’s a bug 🙂#2018-02-2812:47Jakub Holý (HolyJak)@cfleming are there any plans to support https://cider.readthedocs.io/en/latest/indent_spec/ ? Thanks!#2018-02-2813:53gphilipp@cfleming Hi Colin ! I need to pass Artifactory credentials to Cursive so that the Leiningen tool window’s refresh project action can pull dependencies from our private repositories. (Maven settings has a environment variables section, but not Leiningen Settings)#2018-02-2813:54gphilippWhat’s the best way to do it ?#2018-02-2814:56gphilippI found a previous discussion of yours with @spieden: https://clojurians-log.clojureverse.org/cursive/2016-09-27.html#inst-2016-09-27T03:34:06.000517Z#2018-02-2814:56gphilippAny news on that front ?#2018-02-2814:57gphilippThe best solution IMHO would be to copycat the Intellij maven settings UI for environment variables really.#2018-02-2815:56souenzzoeven before the awesome feature of #clara syntax support, the defrule identation started to have problems. I think that it's because it's a custom defrule macro (not the clara defrule macro). There is some way to fix it?#2018-02-2816:07zyloxif you want it to format as a clara rule, but you have a different macro for it, you can set that macro to resolve as the clara.rules/defrule#2018-02-2816:07zyloxthough....dont put the fqn if you use the search window#2018-02-2817:13souenzzoI made it. There is no syntax issue, just formatting issue.#2018-03-0101:50cfleming@U2J4FRT2T You can fix that by customising the indentation as described here, setting it to “Indent”: https://cursive-ide.com/userguide/formatting.html#customisation#2018-02-2816:08gphilipp@cfleming Ok, so re that environment variable thing, I settled on using https://github.com/hschmidt/EnvPane which is super simple and is picked up by IntelliJ 😄#2018-02-2818:52spieden@gphilipp good find!#2018-02-2818:52spiedendidn’t think to try setting macos session-level env vars#2018-02-2818:53spiedenso that works to get the creds read from env?#2018-03-0100:53lgouger@cfleming namespaced keywords aren't being highlighted everywhere they appear in the editor, unlike regular keywords where every occurrence is highlighted. (images to follow)#2018-03-0100:55cfleming@lgouger Right, there’s an issue in the new declared keywords functionality where the declaration is not highlighted (all usages are).#2018-03-0100:56lgougerok, matches what I'm seeing#2018-03-0100:57cflemingIn your example, the non-namespaced keyword “works” because only namespaced keywords are eligible to be treated as declarations - doing it for non-namespaced ones would change the semantics of that keyword everywhere, which seems dangerous.#2018-03-0100:57cflemingSo you won’t be able to navigate to the first example from the usage, and it won’t show up in File Structure.#2018-03-0100:58lgougerok, "works" because all occurrences are usages, none is a declaration#2018-03-0100:59cflemingRight, and Cursive doesn’t treat it as a declaration at all, it’s just a normal keyword.#2018-03-0100:59lgougergot it, thanks#2018-03-0101:00cflemingIn your case, the keyword is long enough that it’s probably unambiguous, but for shorter keywords it could be very confusing. So even if it’s purely for Cursive support, I recommend using namespaced keywords for all re-frame declarations. spec already enforces that.#2018-03-0101:01lgougerthanks, yeah, transitioning that direction#2018-03-0101:02cflemingCool - it’s a good idea even apart from Cursive support, of course.#2018-03-0101:24kennyI also find the lack of namespaced kw highlighting frustrating 🙂#2018-03-0101:28lgougerbut GoTo and Find Occurrences are cool#2018-03-0101:47cfleming@gphilipp Nice solution, but you’re right that it really needs a solution within the IDE, if only so it works correctly on Windows. I’ll investigate that.#2018-03-0115:52gphilippI think it work on windows too. It’s easier because you have dedicated UI to edit your global environment variables in the settings. #2018-03-0101:50cfleming@holyjak Yes, that would be nice to support.#2018-03-0109:33Petrus TheronHow do I find an unmatched ']' delimiter in my project? boot repl won't start because it complains about an unmatched delimiter, but I can't find it. Probably caused by Parinfer after switching to it.#2018-03-0115:50gphilippYes it does. We use
:username [:gpg :env/artifactory_user]
:password [:gpg :env/artifactory_password]
in our project.clj
#2018-03-0219:56andrzejsliwa@cfleming I wonder if we can improve "Run tests in current NS in REPL" to such behaviour: when I'm in file some_namespace.clj or some_namespace-test.clj test will run for both namespaces: - when in name-test.clj, load and run test in name.clj and name-test.clj - when in name.clj, load and run test in name.clj and name-test.clj following the convention of naming test/some-namespace-test.clj, this will improve experience with running test. when I'm changing some code in namespace I would like to know if I broke some tests in corresponding namespaces without switching back to test namespace.#2018-03-0402:03emccuedoes anyone in this neck of the woods have experience using clojure-maven-plugin#2018-03-0402:12emccueI have it to the ppoint where clojure:compile works but regular compile does nothing#2018-03-0402:17emccueAlso, im having issues with imports of records not being resolved in java when those records are defined via macros#2018-03-0402:17emccue(i detailed some of the issues in the main clojure thread, and why I think it might be some cursive config)#2018-03-0407:11gklijsI don't know about the plugin, but if you have no java in the project, it seems right that regular compile does nothing. Do you use a :genclass on the clj files you want to use from java?#2018-03-0415:14misha@cfleming greetings! it seems like cursive does not recognize clojurescript's areduce syntax (hope you see the screenshot, slack complains about lack of free disk space):#2018-03-0417:05ckarlsenI have some custom compojure route macros (for non-standard request methods). They look exactly like compojure.core/GET etc. Is it possible to configure Cursive to correctly resolve these custom macros?#2018-03-0419:20mbjarlandAnybody seen this kind of issue starting a lein repl within cursive:
Starting nREPL server...
...
Error loading clojure.tools.nrepl.server: clojure.lang.RT.mapUniqueKeys([Ljava/lang/Object;)Lclojure/lang/IPersistentMap;
Exception in thread "main" java.lang.IllegalStateException: Attempting to call unbound fn: #'clojure.tools.nrepl.server/default-handler
?
#2018-03-0422:01cfleming@misha https://github.com/cursive-ide/cursive/issues/435, that’s been there for ages, I’ll try to fix this soon.#2018-03-0422:03cfleming@ckarlsen Yes, you can use https://cursive-ide.com/userguide/macros.html. The doc is slightly out of date, there’s now a “Specify…” option in the dropdown which you can use to resolve as any arbitrary macro.#2018-03-0422:03cfleming@mbjarland No, I haven’t seen that. Which version of tools.nrepl are you using?#2018-03-0423:17jonathanhi, I posted this in #beginners but it might actually be a Cursive specific issue as others were not able to reproduce when using nRepl directly. When I print a binding to a multiline string it ignores white-space. But if I call a function on that binding, whitespace is included:
(def multline "aaaaaa
               bb
               cccc")

multline
=> "aaaaaa\nbb\ncccc"
(frequencies multline)
=> {\a 6, \newline 2, \space 30, \b 2, \c 4}
(frequencies "aaaaaa\nbb\ncccc")
=> {\a 6, \newline 2, \b 2, \c 4}
#2018-03-0423:29zyloxthats intersting#2018-03-0423:29zyloxim seeing the same results though#2018-03-0423:38cfleming@jonjanisch @zylox This is an unfortunate feature. Cursive tries to align multi-line strings when pretty-printing, which is often very nice when printing large data structures with multi-line strings. However it has some odd edge cases like this one. You can turn it off at Settings-&gt;Languages &amp; Frameworks-&gt;Clojure-&gt;Split and align multi-line strings.#2018-03-0423:39cflemingI’m increasingly thinking that it shouldn’t be on by default, or perhaps shouldn’t even be a thing.#2018-03-0423:40cflemingFor an example of where it works nicely, try (meta #'defn)#2018-03-0423:41zyloxive seen it be valuable in test failure string printing so id say i'm positive on the feature#2018-03-0423:41zyloxthough @jonjanisch's situation is admittedly confusing#2018-03-0423:41cflemingThe issue is that because of the way fipp works, I can’t modify the way it prints strings that fit on a single line, and I can’t tell ahead of time which ones will.#2018-03-0423:42cflemingI should revisit that and see if I can’t hack something there.#2018-03-0423:43zyloxnothing like a good old string hack#2018-03-0423:43cflemingI know, right?#2018-03-0500:12cflemingUgh, no hack available. The issue is that the data structure is split into formatting ops up front, before any of the layout is available. So I can’t say something like: if there are x chars left on the line use these ops, otherwise use these others.#2018-03-0500:30jonathan@cfleming thanks for the explanation!#2018-03-0501:26jonathansorry for delayed responses, splitting my time between cleaning, baby, and clojure 🙂#2018-03-0501:26cflemingHehe, no problem, that’s commonly my situation too 🙂#2018-03-0501:27jonathanthat issue arose mainly because I wasn't sure how whitespace in Clojure multiline strings was handled so I was debugging by printing the string itself and was confused why a more complicated function included the spaces#2018-03-0501:28jonathanno idea how you have time to build such an awesome product 🙂#2018-03-0501:29cflemingWell, it took several years! The first open beta was right before my daughter was born which delayed things a bit.#2018-03-0501:29cflemingActually she still delays things a bit now that I think about it.#2018-03-0501:30jonathanah awesome, haha. I installed Cursive a day before my daughter was born. And when I finally had time to try it my trial expired 🙂#2018-03-0501:30cflemingHehe, yes, 30 days is not enough under those circumstances!#2018-03-0501:31jonathanyup, I gave emacs a shot but I previously had wrist pain back when I needed to actually use the control key 😄#2018-03-0501:33jonathananyway, back to cleaning... thanks!#2018-03-0522:56genekimHoly cow. Using Lumo for the first time today. Wow, it’s fast and easy to write useful things! Is there a way to run a Lumo REPL on Cursive Mac? I miss having the ability to send stuff to REPL inside Cursive! Thanks!#2018-03-0522:57cflemingSo, you can, but it’s a little fiddly. Use Tubular: https://github.com/mfikes/tubular#2018-03-0522:57genekim(If not, maybe back to Clojure. Cursive has made me quite spoiled. :)#2018-03-0522:57genekimWow, thanks!!! Will check it out!#2018-03-0522:57cflemingI’m planning first-class support for both Lumo and Planck though, Lumo support in particular requires better CLJS support for Node.#2018-03-0522:59cflemingAnd they both need a custom SDK type to be able to resolve symbols correctly.#2018-03-0600:48Drew VerleeRandom suggestion. What about integrating in something like https://github.com/ladderlife/autochrome into cursive? I feel like intelliji diff options are already better then anything out there, having syntax aware changes would be pretty awesome.#2018-03-0601:36cfleming@drewverlee Yeah, I saw that and made a mental note to check whether the diff algorithm is pluggable. I haven’t got around to actually checking it though. I also think that that diff algorithm is pretty expensive for large files with multiple change locations.#2018-03-0601:36cfleming> For example, If you split a 100-line function into two pieces and also make a bunch of changes, it might take like 30 seconds to diff. That’s not great, but you’ll probably spend more than 30 seconds looking at a diff like that anyway.#2018-03-0601:37cflemingWhile that’s true, people will probably get upset if they have to wait 30 seconds to then spend more than 30 seconds looking at it 🙂#2018-03-0601:38cflemingI suspect that there are a lot of degenerate cases that might cause that sort of behaviour. It might be possible to do something like put a time bound on the diff and if it’s violated then default to the previous behaviour though.#2018-03-0601:42cflemingLooking at it, I can’t immediately tell how easy that would be.#2018-03-0601:42cfleming(swapping the algorithm, that is)#2018-03-0601:44Drew Verlee@cfleming Yea, there are a lot of unknowns here for me at least. It seems like a topic that would be well researched but here we are in 2018 without structural diffs? Or i’m i missing something? So i’m not sure what all the dark corners are. If its just a performance issue, then It would be exciting to see what sort of options were out there to make it go faster. Algorithms, etc…#2018-03-0601:45cflemingBoth the associated webpage (https://fazzone.github.io/autochrome.html) and the original blog (http://thume.ca/2017/06/17/tree-diffing/) are well worth a read.#2018-03-0601:46cflemingtl;dr is that general tree diffing is hard (O(n^3) in the naive case IIRC)#2018-03-0601:47Drew VerleeGood point! He did put out a lot of material, i just say this yesterday so i haven’t had time to dig in. I just thought i would mention it here in case it hadn’t caught your eye as it seems like a potentially great addition.#2018-03-0601:47cflemingYes, definitely!#2018-03-0601:47cflemingDo read the tree-diffing blog post, it’s pretty great.#2018-03-0601:48cflemingYou’ll need a cup of coffee though.#2018-03-0601:50Drew VerleeYea. I’ll have to give it a read. If anything It will probably be highly educational. What i remember from algorithms is that even if that truly is the big O you might be able to get away with some combination of algorithms to keep the average acceptable to users.#2018-03-0601:50cflemingAlso, interesting HN comments on the original submission: https://news.ycombinator.com/item?id=15101373#2018-03-0601:51cflemingSure, he talks about using A* to prune the search space, and dynamic programming to keep the runtime under control (at the cost of memory)#2018-03-0601:51Drew VerleeCool, the one algorithm i have ever employed in building something 🙂#2018-03-0601:53Drew VerleeBookmarked it all. Thanks!#2018-03-0601:58cfleming@drewverlee https://hal.archives-ouvertes.fr/hal-01054552/document#2018-03-0601:59cfleming> The tree differencing problem has been largely investigated when considering only the add node, delete node and update node actions [4]. For this problem, many optimal algorithms have are described in the literature. The fastest algorithms of this family [27] run in O(n^3), which can result in significantly long edit script computation time for large source code files. The other issue faced by these algorithms is their inability to uncover moved nodes, which is a frequent action in sourcecode files. It results in unnecessarily big edit scripts which are hard to understand. > When considering move node actions, the problem of finding the shortest edit script between two trees becomes NP-hard.#2018-03-0602:00cflemingBut there are heuristics available.#2018-03-0605:47genekim@cfleming Awesome news on supporting Lumo or Planck — I’m indifferent to either… I chose Lumo because it was the first one where I found support for easy file I/O. FWIW, I loved using it because it was so fast and the fan stayed off on my MacBook Pro. 🙂 (Not complaining about Clojure JVM or CLJS compile times… But it was refreshing! :)#2018-03-0605:48genekim(Not a high priority for me at all… Was wonderful to solve a small problem today with Lumo, though!)#2018-03-0606:22cfleming@genekim Indeed, I use Lumo for a couple of release scripting tasks - the lack of symbol resolution is a pain but for small things it’s still nice. I definitely want good support for it though!#2018-03-0715:31zyloxi could have sworn i had this at one point, but does anyone know how to make the bottom pane not show up when you start a repl#2018-03-0715:32zyloxthe run pane specifically#2018-03-0718:42royalaid@cfleming just curious if there are any updates on https://github.com/cursive-ide/cursive/issues/391? Guessing not but figured it wouldn't hurt to ask#2018-03-0817:09shaun-mahood@zylox: Uncheck "Activate Tool Window" in the Run configuration - it's at the bottom and can get cut off if the window is too small#2018-03-0817:36zyloxthanks a bunch @shaun-mahood#2018-03-0907:16genekim@mfikes Thanks so much for talking with me a couple of days ago — and helping me get tubular running so I could run a Planck REPL. Super cool! I can type in the REPL window, but everytime I send a form to the REPL, I get a namespace error.. What do I type in the REPL to get in the correct namespace? Thx again!#2018-03-0907:28genekimScreenshot: https://www.evernote.com/l/ABXIUvPzWp9FLYepXwvS5qvCjC_TuwlwIgU#2018-03-0907:29genekim( @mfikes — sorry I couldn’t upload screenshot here.. getting the “your storage space exceeded” error from Slack. :)#2018-03-0908:26rarous@genekim send the whole file or the ns form first#2018-03-0912:11mfikes@genekim In Cursive, I usually do Tools > REPL > Switch REPL NS to Current File. This should issue an in-ns command, that you could also type directly into the REPL. It is also important to load the namespace that you want to work in either using Cursive’s Tools > REPL > Load File in REPL. This will issue a load-file, but you can invoke require directly in the REPL.#2018-03-0913:48danmWhen I write Clojure, I often have several namespaces (particularly if following the functional core/imperative shell pattern). I know Cursive can do "run tests in current NS in repl", but can it do "Run all tests in module in REPL"?#2018-03-0915:52jjfinehow does cursive suggest namespaces? i just invalidated my cache and its still suggesting a namespace of a library that i removed a long time ago. eg i type in the REPL (d/ and its suggesting datascript.core which isn't anywhere in my code anymore#2018-03-0915:55jjfineah, it was still in my "External Libraries" deleted it and now i'm good#2018-03-0915:55rauhNot an answer but: I've also had the same issue. Used pedestal.logging :as log ages ago and then switched to clojure.tools.logging. When writing log/info it still sometimes aut-inserts the pedestal logging ns.#2018-03-1000:27cfleming@royalaid So, no, sorry, but lots of people are asking about it. I’ll try to do this soon.#2018-03-1000:29cfleming@carr0t It can’t at the moment sorry, I was planning to add this in the last EAP series but I didn’t get to it.#2018-03-1000:30cfleming@jjfine So that sounds like a bug - it shouldn’t be in your External Libraries if it’s not in your project file.#2018-03-1000:30cfleming@rauh When you see that behaviour, is the pedestal lib still in your External Libraries?#2018-03-1007:44rauhYes, I'm still using it. I just never use their logging ns anymore#2018-03-1010:37cflemingOk, that probably means that there’s an example of pedestal.logging :as log in a dependency somewhere, perhaps in Pedestal itself. I’ll look into weighting the suggestions, with priority given to uses from project code over libraries.#2018-03-1005:01cfleming@genekim BTW see here: https://cursive-ide.com/userguide/troubleshooting.html under “Unresolved symbols from clojure.core when sending forms to REPL”#2018-03-1005:02cflemingI know you’re using CLJS but the principle is the same I believe#2018-03-1006:55snoe@cfleming is the parser api you showed in your macro-error talk from a few years ago available anywhere? Looking at that defn-pattern slide and trying to reverse engineer your api with instaparse is getting pretty nasty. I believe it’s called error-test on https://dev.clojure.org/display/design/Macro+Grammars#2018-03-1006:57cfleming@snoe Sort of, see here: https://github.com/cursive-ide/error-test#2018-03-1006:58cflemingIn particular, as the README notes, that version of the grammar definition was a failed experiment.#2018-03-1007:00cflemingI’m actually just about to switch to a new parser, I’ve had it lurking in a branch for a while now but have not had time to integrate it. It’s based on the regexp VM approach here: https://swtch.com/~rsc/regexp/regexp2.html#2018-03-1007:01cfleming(really awesome series of articles, highly recommended)#2018-03-1007:01cflemingIn my benchmarks, it’s considerably (~10x) faster than spec: https://gist.github.com/cursive-ide/d7e490bd875d575ff485518195aa1e19#2018-03-1007:02cflemingI need to try it on more examples, but I don’t think those are pathological in any way.#2018-03-1007:08snoeThanks a bunch, my google-fu totally failed me there 😛 I’ve been hacking today towards a clojure languageserver protocol implementation today and my respect for the static analysis cursive does is just growing by the hour.#2018-03-1007:19cfleming@snoe No worries, let me know if you have questions!#2018-03-1007:19cflemingI totally recommend a parser based on regexps rather than something like instaparse, BTW.#2018-03-1007:20cflemingBut I’d follow the examples in those articles, I didn’t have success with the derivative parsers that spec uses. The matching is very elegant, but the data capture (i.e. conform) is very tricky.#2018-03-1114:10seriogaHello @cfleming How does macro support https://cursive-ide.com/userguide/macros.html changed in latest versions?#2018-03-1114:19seriogaAlso I cannot find info about import/export file to try to write it manually.#2018-03-1114:22seriogaVersion: 1.7.0-eap1-2017.3#2018-03-1114:34seriogaHm, downgraded to Version: 1.6.2-2017.3 — same behavoiur Looks like smth is broken in the IDE itself#2018-03-1114:47seriogaIDEA 2017.2 — same behavior...#2018-03-1115:24wilkerlucio@serioga a lot of people fall on that confusion, you are supposed to just hit enter with "Resolve mount.core/defstata as..." in focus, don't navigate to options down, that's a mistake#2018-03-1115:26seriogaI've tried this but just nothing happen (no popup is opened)#2018-03-1115:31seriogaIndentation popup works and resolution one does not...#2018-03-1120:58cfleming@serioga Can you send me your log? Help-&gt;Show log in Finder/Explorer. Either DM it here or email it to <mailto:/cdn-cgi/l/email-protection|/cdn-cgi/l/email-protection>
#2018-03-1203:00genekimThank you @rarous and @mfikes and @cfleming! I’ll try it out this week!#2018-03-1220:43tony.kayColin, I notice that in CLJC files, the “reformat” action in Cursive makes a mess of conditional splicing….e.g., this is what I get:
(ns fulcro.client.dom
  (:refer-clojure :exclude [map meta time mask select])
  #?(:cljs (:require-macros [fulcro.client.dom :as dom]))
  (:require
    [clojure.string :as str]
    [fulcro.client.impl.protocols :as p]
    [fulcro.util :as util]
    [clojure.spec.alpha :as s]
    #
even if I try to manually wrap the stuff up, it still forces it down. This makes using parinfer, for example, corrupt the code. I would expect something like:
(ns fulcro.client.dom
  (:refer-clojure :exclude [map meta time mask select])
  #?(:cljs (:require-macros [fulcro.client.dom :as dom]))
  (:require
    [clojure.string :as str]
    [fulcro.client.impl.protocols :as p]
    [fulcro.util :as util]
    [clojure.spec.alpha :as s]
    #
#2018-03-1308:05danielcomptonI’ve tried using the IntelliJ IDE Settings Sync plugin, but AFAICT it just doesn’t really work#2018-03-1308:05danielcomptonBut it did wipe my keymap settings#2018-03-1308:05danielcomptonSo beware if you try it out#2018-03-1311:12mfikes@danielcompton I’ve been using VCS > Sync Settings > Merge for about a year now. I had last used it a few days ago with another computer but now on my main computer I get
7:10 AM	Failed to Sync Settings: Missing commit c396bca6c7d562364c4e4e680f51b95be847f62f
If this is the same option you are referring to, maybe something has gone wrong.
#2018-03-1317:35danielcomptonThis is a new plugin, it doesn’t go over Git, goes straight to JetBrains servers, but I think it is probably based on the same pattern. It doesn’t sync as much as the VCS sync settings one though#2018-03-1317:36danielcomptonI was using that for a while but didn’t realise only on one computer, so it never synced#2018-03-1421:47dragoncubewhat is the way to use this? https://github.com/cursive-ide/cursive/issues/228#2018-03-1513:59dnolenwhen using Debug mode with clojure.main REPL option the -e form which alters var root to disable locals clearing should probably be switched to a Clojure JVM compiler flag#2018-03-1513:59dnolenthe way it works now completely breaks using cljs.main#2018-03-1513:59dnolen@cfleming#2018-03-1519:01rauhIs this new: https://www.jetbrains.com/toolbox/app/ First time I'm seeing it...#2018-03-1519:02rauhOh released April 2016... So not quite new 🙂#2018-03-1519:03manutter51Oh man that’s just like the Creative Cloud menu widget#2018-03-1519:03manutter51Always steal from the great ones I guess 😂#2018-03-1519:35joelsanchezconfusedparrot#2018-03-1522:34hlshipSo I have an odd edge case: I have a macro something like:
(defmacro glob [sym & body] 
  `(let [~sym 1] 
(that's slimmed down, the real thing is doing stuff with callbacks and logging).
#2018-03-1522:35hlshipHowever, I haven't found a way to let Cursive know that the symbol provided is valid in the body.#2018-03-1522:35hlshipThis isn't quite like a def or a let.#2018-03-1522:36hlship(for the Cmd-Enter "resolve as..." command).#2018-03-1600:09cfleming@dnolen Thanks: https://github.com/cursive-ide/cursive/issues/1955#2018-03-1600:10cfleming@joelsanchez Is that CLJ, CLJS or CLJC?#2018-03-1600:12cfleming@hlship Unfortunately there’s no good way to do that right now, your macro would have to resemble something which Cursive currently understands, and I can’t think of anything that looks like that.#2018-03-1718:17hlshipThis was kind of a plea to think about it. I could artificially make it look like a let, but feel dirty about doing that "just" for IDE support.#2018-03-1718:18hlshipYou can see the full macro in this blog post: https://medium.com/@hlship/-575d5047924c ... feedback welcome!#2018-03-1600:13cfleming@dragoncube What sort of REPL are you using? nREPL or clojure.main?#2018-03-1600:14joelsanchez@cfleming CLJ#2018-03-1600:18cfleming@tony.kay I added your cases to https://github.com/cursive-ide/cursive/issues/1805#2018-03-1600:34dragoncube@cfleming I’ve tried both.#2018-03-1600:35cflemingSo when you’re using nREPL, you should get a popup asking for input if you use something like (read-line)#2018-03-1601:15dragoncubeok, for clojure.main it works, I was confused where I have to type my input#2018-03-1601:18dragoncubeit works even without (read-line):
user=> (loop []
  (println (.read (System/in)))
  (recur))

a
97
10
b
98
10
c
99
10
a, b and c my input
#2018-03-1601:20dragoncubebut with nREPL it does not work#2018-03-1601:20dragoncubeok, it is clear now#2018-03-1601:56cfleming@dragoncube Sorry for the confusion. This is a tricky UI problem. All Clojure REPLs suffer from it to some degree (especially under nREPL), but it’s particularly bad in IntelliJ because of how editors work.#2018-03-1601:56dragoncubeyeah, no problem#2018-03-1601:57cflemingThe tl;dr is that editors are strongly typed, so the REPL editor is generally a Clojure editor. That will freak out if you’re trying to type standard text into it, so when I finally add better support for streaming REPLs I’ll need a switch to change that editor to a plain text one.#2018-03-1601:57cflemingI’m still not sure how to explain it to users, especially new users.#2018-03-1601:57dragoncubeI was trying to put cursor (focus) into output region#2018-03-1601:58dragoncubebut after pressing first char it is returning focus to repl editor#2018-03-1601:58cflemingYeah, that’s essentially the same problem. Ideally there would just be one pane, but in order to get the IntelliJ functionality in the REPL editor it has to be a Clojure editor, and the output pane can’t be because it doesn’t contain valid Clojure.#2018-03-1601:58cflemingThat’s why the panes are split in Cursive.#2018-03-1612:59tengstrandI try to add support for “Parinfer, smart mode”. I have IntelliJ IDEA 2017.2.6, and Cursive plugin 1.6.3-2017-2 installed. I try to follow the instructions: https://groups.google.com/forum/#!topic/cursive/ZJ4fcp3A988/discussion I download the file 1.7.0-snapshot2-2017.2, but when I press “Install plugin from disk” I can’t select the file and if I try to unzip it first, I can select it but nothing happens.#2018-03-1621:37cfleming@teng I’m not sure why that should be the case - you don’t need to unzip it.#2018-03-1621:39cflemingBut the new parinfer is now available in the latest EAP, so you can just enable EAPs (https://cursive-ide.com/userguide/#eap) and install that from the repo as usual.#2018-03-1622:22tengstrandNow it works, thanks @cfleming!#2018-03-1808:00rauhQuick-doc for namespaces seems to not pick up any docs anymore. This used to work, no?#2018-03-1810:27danielcompton@rauh I don’t think it will always work in cljc if you have the same function in clj and cljs#2018-03-1821:34cfleming@rauh I noticed that the other day - I’m actually not sure it ever worked.#2018-03-1906:56rauhI'm 90% sure it used to work. I also just upgraded only recently from a 3-4 months old Cursive version. So I can't be more specific when I lost it 😕#2018-03-1907:23claudiuHi, for the docs in cursive I only get ^clojure.lang.IFn when using cursive Version: 1.7.0-snapshot2-2017.3. Is there something I need to config ?#2018-03-2012:41val_waeselynckWhat is the pretty-printer library / strategy used by Cursive for displaying data at the REPL?#2018-03-2021:44cfleming@claudiu How are you invoking the doc there?#2018-03-2106:24claudiu@cfleming shit+k (vim mode), but even with vim disabled by pressing ctrl+q I get the same thing. On a different machine I have cursive 1.6.3-2017.3 and doc lookup works. No idea if it's a config issues or a bug in the snapshot, will try to downgrade tonight and see if the problem persists.#2018-03-2021:44cfleming@val_waeselynck It uses a custom version of fipp internally.#2018-03-2022:02kenny@cfleming My autocomplete seems to have completely broken down - when I type the dropdown does not appear. I have tried restarting the IDE and restarting my computer and I'm still getting the same issue. An error is thrown in Cursive: cursive.psi.impl.synthetic.SyntheticTypeField cannot be cast to cursive.psi.ClojurePsiElement. Is there a quick fix for this as this will be a major productivity hit.#2018-03-2022:03cfleming@kenny Can you send me the whole stacktrace?#2018-03-2022:04cflemingOk, I’ll look at that as soon as I get in to the office.#2018-03-2022:09kennyIt appears to only be happening in a single namespace.#2018-03-2022:09cfleming@kenny It’s related to having a deftype/defrecord somewhere.#2018-03-2022:10cflemingOne with a data field.#2018-03-2022:10kennyYes. Only happens inside a defrecord method.#2018-03-2022:10cflemingOk.#2018-03-2022:10cflemingThat should make it easy to reproduce.#2018-03-2022:50cfleming@kenny https://github.com/cursive-ide/cursive/issues/1961#2018-03-2106:31cfleming@ikitommi Hmm, I don’t think there’s been an issue about that, but I’m totally willing to believe there’s a bug there.#2018-03-2106:31cflemingCould you file an issue for that?#2018-03-2106:31ikitommisure, will do#2018-03-2106:34ikitommihttps://github.com/cursive-ide/cursive/issues/1962#2018-03-2108:57cflemingThanks!#2018-03-2210:14jebberjebIs there anybody here, familiar w/ the idea codebase, willing to give me a few pointers? I’ve got a javafx component (it could just as easily be swing) I’d like to use for my main source editor pane, and trying to get some idea of how difficult that would be to accomplish.#2018-03-2217:37aptHey, I don't know if this is a known issue, but merging files using git might confuse parinfer. Like, when there's a conflict, git inserts lines like >>>>>, HEAD etc, that might cause parinfer to modify some parenthesis. I'm disabling parinfer before using git merge for now. I don't know if there's a better approach.#2018-03-2219:04cfleming@andre.peric Interesting, I hadn’t considered that case. I wonder if IntelliJ will tell me that those files have conflicts so I can disable parinfer on them until they’re resolved.#2018-03-2219:05cfleming@jebberjeb I might be able to help, if not the IntelliJ plugin dev forums are pretty helpful these days.#2018-03-2219:44justinleehey cursive fans. i know that IJ has multiple cursors by using the mouse, but is there some way to get the Cmd-D type functionality from submlime/atom/vscode in IJ/cursive?#2018-03-2219:45justinleeI bound Cmd-D to “find word at caret” but that’s not the same functionality. this is the thing i miss the most by far from atom#2018-03-2223:09danielcomptonIs there a way to 'trick' Cursive into using the :forms on a macro, rather than its actual arguments for param completion?#2018-03-2223:10danielcomptonThe same way that clojure.core does for things like fn and defn#2018-03-2223:10danielcompton
(defmacro fn-traced
  "Defines a traced fn"
  {:forms '[(fn name? [params*] exprs*) (fn name? ([params*] exprs*) +)]}
  [& definition]
  `(if (is-trace-enabled?)
     (fn-traced* 
#2018-03-2223:10danielcomptonI've done this, but Cursive isn't fooled#2018-03-2223:11danielcompton
(clojure.repl/doc fn-traced)
-------------------------
debux.core/fn-traced
  (fn name? [params*] exprs*)
  (fn name? ([params*] exprs*) +)
Macro
  Defines a traced fn
#2018-03-2223:13danielcomptonah, I needed to use :arglists instead of :forms#2018-03-2223:46cfleming@lee.justin.m What does Cmd-D do?#2018-03-2223:48justinlee@cfleming oh worry that would have been helpful. the first time you press it, it highlights the word under the cursor. the next press finds the next occurrence of that word and creates a new cursor there. so if you want to change 5 instances of a variable, you press cmd-d 5 times and then you have 5 cursors.#2018-03-2223:48justinleeit’s incredibly useful because sometimes you don’t even want to change the variable but its a way to get the cursors just where you want them#2018-03-2223:51justinleeon https://www.sublimetext.com/ the first demo on the main page is this feature#2018-03-2223:53cfleming@lee.justin.m See here: https://www.vojtechruzicka.com/intellij-idea-tips-tricks-multiple-cursors/, the last one looks like the closest to what you want, but isn’t quite the same.#2018-03-2223:54cflemingLooks like it automatically selects all occurrences, not the next one on each press.#2018-03-2300:10justinleethanks yea. that last one doesn’t actually work for me for some reason on mac, but it’s pretty close. i guess part of the issue with the cmd-d thing is in the details of how it works.#2018-03-2300:11justinleethe reason why doing it one press at a time is nice is because it helps you make sure you’re not making a change you don’t intend. that’s why i find it more powerful than normal global search and replace#2018-03-2314:23nwjsmithI love the var to test var mapping in Cursive, but many of my tests are written as name-of-var-condition-under-test-test. For example, I have succeeded?-success-test and succeeded?-non-success-test for a function named succeeded?. Is there a way to set up the Var to test var mapping to account for that?#2018-03-2318:11emccueIs there a setting I can put to make cursive stop using java 9?#2018-03-2318:11emccuejdk*#2018-03-2318:13emccueIm getting some errors on my builds that seem related to java 8->9 bugs in my code#2018-03-2318:13emccuebut my target is java 8#2018-03-2519:00justinleehey is there anyway to make cursive be less aggressive on the “X cannot be resolved” messages? It basically fails on all js interop, which makes the warning less useful because of all the noise.#2018-03-2521:14cfleming@nwjsmith I don’t think there is, no. Currently the mapping is set up to map 1-1 between vars and test vars. However I think it’s a reasonable improvement, particularly to map a single var to multiple test vars (I don’t think the other direction is probably as useful). Could you file an issue for that?#2018-03-2521:16cfleming@emccue That’s controlled by the SDK you use for your projects. I guess you created the SDK from a Java 9 install, if you create one from a Java 8 install that should fix it (I don’t think setting the compile target alone is sufficient).#2018-03-2521:20cfleming@justinlee https://github.com/cursive-ide/cursive/issues/1526 is the issue you’re after - sorry, I’ve been planning to fix that for ages.#2018-03-2608:58sooheonJust curious, what do you all have cycle collection type action bound to?#2018-03-2608:58sooheonLooking for a candidate (former emacs user, on osx)#2018-03-2609:00sooheonAlso, what would be the steps toward opening up cursive actions to community development? (in clojure?) There’s a ton of structural editing commands from emacs that would be nice to have in cursive.#2018-03-2609:00cflemingI have it bound to Cmd-]#2018-03-2609:01cflemingI’d like to open up an API for that but I don’t have a clear roadmap to doing so yet.#2018-03-2609:01cflemingIt’s probably one of the easier parts to open up, though.#2018-03-2611:34sooheonYeah, it’s not the most pressing thing, just a nice-to-have. Do you want me to make an issue to track it or are you good?#2018-03-2617:51tony.kayIs anyone aware of why Cursive loses the ability to access env stuff? I’ve got a development profile with CLJ :env definitions. I create a run config, and it works. I switch branches and update lein deps, and they get lost. I can fiddle with the Run Configuration and sometimes get it to work again, but to be honest I’m not sure what makes it start working. Even delete/re-add of it sometimes doesn’t work.#2018-03-2617:51tony.kayRunning a simple lein repl always gets them fine This is using the lein-environ/environ lib#2018-03-2617:55tony.kayHm. I upgraded to environ 1.1.0, and that might have fixed it. Ignore this for now. I’ll re-report it if it happens again.#2018-03-2719:32agigaoHi Clojurians, I think I’m migrating to Cursive and is there any guide available how to debug web app in IntelliJ + Cursive?#2018-03-2720:12royalaid@chokheli I don’t believe so because it just uses the intellij debugger and shows a jvm view into clojure. My recommendation for getting started is to just try throwing down a breakpoint and exploring the tooling from there#2018-03-2720:13royalaidif you have specific questions or want a particular thing from the debugger I might be able to help#2018-03-2721:09cfleming@chokheli It depends what you want to do, really - let me know if you have specific issues you need help with. I demoed a bit of debugging compojure in my talk on the debugger (https://www.youtube.com/watch?v=ql77RwhcCK0)#2018-03-2815:17michaellopezHow do I get Cursive (REPL) to work with this new ClojureScript QuickStart? https://clojurescript.org/guides/quick-start or https://clojurescript.org/news/2018-03-26-clojurescript-command-line where there's no lein.#2018-03-2817:23denik@cfleming is there a reason why the namespace requires aren’t reloaded after a dep has been inferred. I find myself typing (dep/some-fn...) which gets inserted into the ns requires but when I try to run the deps isn’t loaded, which means I need to load the file or go all the way up to the ns form and load it from there.#2018-03-2823:57cfleming@michaellopez I haven’t worked through that yet, I’ll try to do it this afternoon.#2018-03-2823:57cfleming@denik No reason other than that I was going to implement it and forgot. I agree it’s very annoying.#2018-03-2823:59cflemingI can’t find an issue for it either, I was sure there was one.#2018-03-2900:02cfleminghttps://github.com/cursive-ide/cursive/issues/1966#2018-03-3021:28hlshipI'm switching over to Clojure 1.9 and I'm seeing something a touch odd.#2018-03-3021:29hlshipCursive can't seem to resolve this otherwise ordinary var. I've even done a invalidate caches and restart, hasn't changed.#2018-04-0216:28Josh HorwitzHow are people who are using Vim emulation setting up Cursive for most effective editing?#2018-04-0218:58potetm@joshua.d.horwitz I basically still use emacs paredit shortcuts#2018-04-0218:58potetmdon't really conflict w/ vim#2018-04-0218:58potetmI highly recommend single-keystroke paredit shortcuts though#2018-04-0218:58potetmyou use them so much#2018-04-0219:03Josh HorwitzAny recommendations for single keystroke shortcuts?#2018-04-0219:06claudiuI use parinfer, works nicely with vim. Took a while to get used to relying on navigation shortcuts instead of split-windows and tabs. For shortcuts I added alt+other_key, for most of my usual actions.#2018-04-0220:06potetm@joshua.d.horwitz basically http://mumble.net/~campbell/emacs/paredit.html#2018-04-0220:06potetmI honestly imagine that the cursive defaults are pretty sane w/ vim#2018-04-0301:02cfleming@hlship Odd, I’ll check that and see if I can reproduce it.#2018-04-0301:12cfleming@dave.dixon So this is actually a really tricky case. Parinfer usually infers nesting based on indentation, but in complex nesting on a single line there’s no indentation to take cues from. Shaun spent ages trying to make that work.#2018-04-0301:12cflemingThere’s some hope that it might work better in the future since parinfer v3 tracks editor changes so it might be able to be smarter at some point.#2018-04-0301:13cflemingFWIW this is an issue with parinfer itself, not the Cursive integration of it - I can reproduce at https://shaunlebron.github.io/parinfer/demo#2018-04-0303:59sparkofreason@cfleming Thanks. I thought perhaps it was a Cursive issue as I don't see the same behavior with parinfer smart mode in atom. I'll move the discussion to #parinfer.#2018-04-0304:00cfleming@dave.dixon Interesting, I’ll follow it over there, I wonder why the atom version doesn’t suffer from that.#2018-04-0309:18stijnIntelliJ got upgraded to 2018.1 but Cursive plugin is still at 1.6.3-eap2-2017.3#2018-04-0309:18stijndo I have to do anything specifically to be able to upgrade to eap3?#2018-04-0309:19cfleming@stijn A lot of people have reported that. If you go to Settings-&gt;Plugins then select Cursive, do you see an update available?#2018-04-0309:19stijnno, no update available#2018-04-0309:20cflemingIf you hit Browse Repositories, then refresh and search for Cursive, do you see it then?#2018-04-0309:20stijnah ok, I if 'reload list of plugins' then I see an update#2018-04-0309:20cflemingOk, I think this is an IntelliJ bug#2018-04-0309:20cflemingWell, it must be, I don’t do any of that.#2018-04-0309:20stijnit works! 🙂#2018-04-0309:20stijnhaha#2018-04-0309:20cflemingA lot of people have been having problems with it in 2018.1#2018-04-0314:47aptHey, when debugging, is it possible to stop when exiting an expression? (I want to view its stack.) I think that would be equivalent to IntelliJ's method breakpoint.#2018-04-0319:06gklijsYes, just like java, run in debug mode, and set a breakpoint, by clicking just right of the line number, might even be possible to connect with a repl to a running process.#2018-04-0320:35cfleming@lee.justin.m Following on from #parinfer, you need the latest Cursive EAP to get smart mode. Instructions for turning on EAP builds are here: https://cursive-ide.com/userguide/index.html#eap#2018-04-0320:44justinleeThanks!#2018-04-0423:53hlshipA suggested change: when you use the "Join Lines" action, could it recognize when the current line is a comment and#2018-04-0423:54hlshipthe joined line is a comment, and strip off the leading ; (as well as the leading whitespace)?#2018-04-0423:54hlshipAs in: don't make me manually delete the semicolons.#2018-04-0423:54hlshipAny maybe some smarts for not allowing a join into a comment if that will unbalance parenthesis.#2018-04-0822:09kingmobI just installed IDEA and Cursive, I’m following along with the http://cursive-ide.com pages, and when I get to “Keybindings”, it says to go to Settings→Keymap→Clojure Keybindings in the settings…but there’s no such panel. Keymap has nothing underneath it. Is the documentation out of date, or am I missing something? I’m on IDEA 2018.1 with Cursive 1.6.3-2018.1#2018-04-0822:32cfleming@kingmob Sorry, the doc is out of date there - that step is no longer required.#2018-04-0822:32cflemingThe keys are now bound by default, which wasn’t possible previously.#2018-04-0822:32kingmobAhh, ok. I think I found the Cursive settings scattered about in the existing keymaps#2018-04-0822:34kingmobIs there a way to copy a bunch of keymaps now? I’d love to copy over Emacs’s paredit settings into the Mac OS X keymap, if possible…#2018-04-0822:34cflemingYou can print a cheat sheet if you like, Help-&gt;Show Cursive Cheat Sheet#2018-04-0822:34kingmob@cfleming Thx for Cursive, btw!#2018-04-0822:35cflemingSo that is the one use case that is worse under the new way of doing things, unfortunately. I should really provide something you can import to get that over the top of the standard keymap.#2018-04-0822:36cflemingThat was more or less what the previous settings panel did, but it was horribly confusing for new users.#2018-04-0822:36cflemingAnd thanks! Glad you’re finding it useful.#2018-04-0822:37cflemingIf you don’t mind configuring the paredit ones by hand, you can switch to the Emacs keymap, print the cheat sheet, then go back to the OSX 10.5+ one and then just add the emacs ones manually - a bit of a pain, but not too hard.#2018-04-0822:37kingmobNo worries. I just need paredit, not all of Emacs’ bindings. (CIDER has so many bugs w/ ClojureScript, I decided to bite the bullet and learn a new editor/environment.)#2018-04-0822:38kingmobThat’s a good idea, I’ll try that.#2018-04-0914:57kingmobOK, how do I set the REPL prompt? I usually want it to display the ns, but Cursive is ignoring my lein :repl-options…#2018-04-0915:06kingmobAhh, it looks like the ns is at the top of the REPL window, nm#2018-04-0915:32kingmobHmm, it also ignores REPL :welcome message. Would be nice if it didn’t.#2018-04-0920:56cfleming@kingmob What’s the :welcome message?#2018-04-0920:59kingmobNot sure if it’s lein-specific , but there’s a :repl-options key that can set things like a :welcome message, a :prompt, the initial namespace via :init-ns, etc.#2018-04-0920:59kingmobhttps://github.com/technomancy/leiningen/blob/master/sample.project.clj#L362#2018-04-0921:00kingmobNot crucial, just nice to have. I use :welcome to remind me what fns to run to kick stuff off 🙂#2018-04-0921:01kingmobBTW @cfleming, is there a refactoring for cleaning up ns forms? E.g., convert :use to :require, alphabetize requires, etc?#2018-04-1111:30conanI've always wanted this and just yesterday I raised a feature request: https://github.com/cursive-ide/cursive/issues/1975#2018-04-1000:14cfleming@kingmob I’m not sure why :welcome wouldn’t be shown, since Cursive doesn’t mess with that part at all - perhaps it’s a REPLy thing? I’m not sure.#2018-04-1000:14cflemingThere isn’t an ns cleanup yet, although it’s one of the most regularly requested things so it’s near the top of my list. I’m slowly working through the list of cases required to make it work reliably in cljc, which is the main blocker.#2018-04-1000:16kingmobWell, if you can make ns clean-up work in cljs, you’ll be ahead of CIDER. It routinely messed up converting :use to :require.#2018-04-1000:17cflemingNice to know - both clj and cljs are relatively easy, as is cljc if there are no reader conditionals.#2018-04-1000:17cflemingModern cljs actually requires far fewer of them, but the ns form is still one of the main places they’re used.#2018-04-1000:18kingmobOnly other caveat is, be careful removing unused namespaces from ns. Especially with foreign-libs, there can be included namespaces that have no obvious symbols referred to, so it’s easy to assume they’re unused. But they may supply js/ globals or even necessary polyfills.#2018-04-1000:19kingmobBTW, would you suggest cljc as a way to mix cljs fns with their macros… or not?#2018-04-1000:55tony.kayIt depends. If you are writing cljs, and the only reason you need the clj is for a macro, then it can be ok; however, it gets really confusing to have them in the same file. I generally recommend keeping them separate. I beat my head against a wall for almost an entire day doing something that I saw in a file that I thought was written by David Nolen that combined them into a single file. Turns out it was a contrib that had a deeply confusing problem that neither the author nor David caught that combined them in a CLJC file in a way that was impossible to ever work. The reason it didn’t get caught is that the change was for an optimization…so everything looked to work when tested…it was just slower than intended.#2018-04-1000:20cflemingYeah, it can be hard to tell if a namespace is really required. In clj as well, an app can rely on load order (not a good idea, but apps can and do do it)#2018-04-1000:21cflemingI’m probably not a great person to ask about your cljc question, since my use of cljs is very simple (I’ve never actually written a cljs macro)#2018-04-1000:26kingmob@cfleming No worries, and thanks for all your help!#2018-04-1001:08cfleming@kingmob Yes, :welcome is handled by REPLy, which Cursive bypasses altogether.#2018-04-1001:08cfleming(or to be more accurate, lein converts that to :custom-help, which REPLy uses)#2018-04-1001:08cflemingYou could use a user.clj which prints your message, maybe?#2018-04-1002:09kingmobThx, I might try that#2018-04-1016:46kingmob@cfleming Does “Find Usages” ignore profile-specific source paths? E.g., I have a fn that’s only used under env/dev/cljs/, which is only added in the :dev profile. If I run “Find Usages”, it won’t be found, but if I just do plain “Find”, it has no issues locating it.#2018-04-1018:30justinleehey has anybody upgraded intellij on mac? I’m scared to do it because when i upgraded from CE to UE, I lost all of my settings. If i just drag the icon into applications, is that going to work?#2018-04-1018:57manutter51Yeah, I just upgraded to the latest IntelliJ that way, no problems. It asked if I wanted to import my old settings and I said Yes, and boom, ready to go#2018-04-1018:58manutter51If you want a backup copy of everything you could re-name the old app and look for it’s data folder in ~/Library/Application Support#2018-04-1018:58manutter51Looks like the App Support folders are all versioned though, so you should be safe.#2018-04-1018:59manutter51(My version numbers go back to 2017.2, so maybe that’s a recent change)#2018-04-1019:00justinleegreat thanks. it’s working nicely#2018-04-1022:16cfleming@kingmob Is env/dev/cljs marked as a source root, i.e. in blue in the project view?#2018-04-1022:17kingmobYes#2018-04-1022:18kingmobThough env/prod/cljs wasn’t#2018-04-1022:18cflemingHmm, then I’m not sure why find usages wouldn’t find it.#2018-04-1022:20cflemingOnce a source path is marked as such, IntelliJ makes no distinction between them. The profile stuff only affects the actual import itself, i.e. which paths are marked as sources.#2018-04-1022:20kingmobWait, I think I figured it out. The same fn is coming from a different ns in dev. The real thing is only in prod. When I added the prod dir, “Find Usages” found it#2018-04-1022:20cflemingAh, that would explain it.#2018-04-1022:21kingmobDo we need to be careful about specifying resources and exclusing output dirs?#2018-04-1022:22cflemingExcluding output dirs is generally a good idea, yes, particularly with CLJS, since they get filled with gnarly JS code which IntelliJ will otherwise try to index.#2018-04-1022:22kingmobGot it. Thx!#2018-04-1022:23cflemingResources are just slightly different source paths, really.#2018-04-1102:58lukesp@cfleming I am trying to run Cursive in IntelliJ getting Could not locate clojure/spec/alpha__init.class or clojure/spec/alpha.clj on classpath.#2018-04-1103:00cfleming@lukasz.pomorski01 Yes, my apologies, there’s a bug in the latest EAP when creating projects using the Clojure project template if you’re using Clojure 1.9#2018-04-1103:01cflemingIt’s fixed in https://github.com/cursive-ide/cursive/issues/1970#2018-04-1103:01lukespI am brand new to clojure, How could I get this fix?#2018-04-1103:02cflemingThe best solution is probably to create your project with Leiningen. So when you create your project, use the Leiningen option rather than the Clojure one.#2018-04-1103:15lukespgreat it works#2018-04-1103:15lukespthanks!#2018-04-1103:16lukespHow can I get a program to actually output something. Not run REPL but run a core.clj file. It seems to run fine but return nothing#2018-04-1103:17lukesp@cfleming#2018-04-1103:18cflemingYou should be able to right-click the file and choose “Run ‘<filename>’”#2018-04-1103:24lukespwhen I do lein run I get output. When I right click I get no output#2018-04-1103:34cflemingHow are you creating your output?#2018-04-1103:43lukespok I got it to work. Getting familiar with terminology. Thanks 🙂#2018-04-1103:43lukesp@cfleming thanks!#2018-04-1103:44cflemingNo problem, glad it’s working!#2018-04-1104:22royalaid@cfleming Are you aware of an issue with custom symbol resolution being broken?#2018-04-1104:23royalaidand I have to open that via arrow keys#2018-04-1104:24royalaidhttps://imgur.com/a/Hbayh#2018-04-1107:33cfleming@royalaid That’s actually just a confusing part of the IntelliJ UI - you don’t expand the menu out to the right, you select the “Resolve <var> as…” item in the first menu with enter.#2018-04-1107:33royalaidI have tired that, menu just closes out :white_frowning_face:#2018-04-1107:34cflemingCan you send me your log file?#2018-04-1107:35royalaidSure, let me make sure I can reproduce again and am missing something silly. Do you have directions on how to dump the debug log?#2018-04-1107:35cflemingJust Help-&gt;Show log in Finder/Explorer is fine as a first step#2018-04-1107:36royalaidOh, I also use IdeaVim#2018-04-1107:36royalaidthat may be a part of this#2018-04-1107:37cflemingHmm, possibly. Does the menu work for other vars, i.e. can you customise defn or something?#2018-04-1107:37royalaidNope#2018-04-1107:38royalaidCoworker has experienced the same as well so this isn’t isolated to just me#2018-04-1107:39royalaidAHHHHHHHHHH#2018-04-1107:39royalaidOkay#2018-04-1107:39royalaidfound the case#2018-04-1107:39royalaidin side of lein refed library, http-kit in my case#2018-04-1107:39royalaidit break#2018-04-1107:39royalaidbut in my source files its fine#2018-04-1107:39royalaid(or so it seems)#2018-04-1107:40cflemingThat’s… really weird. So you can customise your own macros, but not those from third-party libs?#2018-04-1107:40royalaidfrom the 3rd party source#2018-04-1107:40royalaidthe menu breaks so I can’t follow through#2018-04-1107:40royalaidlet me try to pull it in#2018-04-1107:40royalaidfor context#2018-04-1107:41royalaidhttps://imgur.com/a/ulQMi#2018-04-1107:41royalaidis the file I am trying from#2018-04-1107:41cflemingOh, I see. So it doesn’t work from the definition - does it work if you try to do that from a usage of the macro instead, so a (defreq ...) call?#2018-04-1107:42royalaidhttps://imgur.com/a/pT6So#2018-04-1107:42royalaidand it works#2018-04-1107:42royalaidodd#2018-04-1107:43cflemingYeah, I can reproduce that.#2018-04-1107:43royalaid👍#2018-04-1107:43royalaidalso 👎#2018-04-1107:44royalaidYou want me to follow up with anything?#2018-04-1107:45cfleminghttps://github.com/cursive-ide/cursive/issues/1977#2018-04-1107:45cflemingNo thanks, I’ll track it via the issue.#2018-04-1107:46royalaidThanks for all the hard work!#2018-04-1107:48cflemingNo worries, thanks for the report!#2018-04-1121:15joelsanchezi wish paredit worked with css, such that I could slurp properties inside a block#2018-04-1121:15joelsanchezdreams are free#2018-04-1205:57rarousand in HTML as well#2018-04-1212:00agigaoAny shortcut to view docs in Cursive?#2018-04-1212:33dirklectisch@chokheli Hit F1 on a symbol to read its doc string#2018-04-1212:54agigaowell, it sends me to IntelliJ help#2018-04-1212:55joelsanchezhit CTRL+Q#2018-04-1212:55joelsanchezq as in "doqumentation"#2018-04-1213:04agigaoThanks Joel for the tip, somehow, it turns out the shortcut is - CTRL + J#2018-04-1215:24griersonHow can I get Cursive to (run-tests) every-time I save? I was looking at creating a REPL command which would execute (run-tests) but I would have to keep switch my REPL to the test ns.#2018-04-1215:30griersonhttps://cursive-ide.com/userguide/repl.html#repl-commands like this#2018-04-1218:31tony.kayIs there something I can put in project.clj to cause IntelliJ/Cursive to mark (custom/extra) directories as excluded when I import the project?#2018-04-1220:20polymerisHi. Quick question: how do I remove a Cursive license from an intellij install? Returning a corporate notebook where I was using my personal license.#2018-04-1220:36polymerisOh, found CursiveLicense.xml. Removing that should work, I suppose#2018-04-1220:50cfleming@grierson the doc is slightly out of date there, you can now specify which ns to run the command in.#2018-04-1220:52cfleming@tony.kay No, there isn’t, but it’s a good idea. Something like :cursive/excluded-paths [...]?#2018-04-1220:52cfleming@polymeris Yes, that should work.#2018-04-1220:57tony.kay@cfleming that would be awesome#2018-04-1220:58tony.kayI keep getting everything from node_modules to cljs compiler output in my “open …”#2018-04-1221:04grierson@cfleming is there a way to get tests to run continuously like NCrunch/DotCover/Wallably.js?#2018-04-1221:09kingmob@tony.kay I think you have to right click on node_modules and choose “Mark Directory As > Excluded”#2018-04-1221:10kingmob@cfleming In the top-right of the REPL window, what does the little “clj/cljs” dropdown do?#2018-04-1221:23radswhen using Parinfer v3 I notice that Cursive will reformat the whole file to fix formatting even if I haven't modified those lines#2018-04-1221:23kenny@kingmob It tells you your REPL type. Not really sure why it's a dropdown because it changes automatically.#2018-04-1221:23radsis it possible to make it so Parinfer only reformats code that I've modified since the last save?#2018-04-1221:23radsI got confused about why my code wasn't working because Parinfer reformatted some old code that changed the logic#2018-04-1221:24radssomewhere unrelated to my changes was a map like this:
{:a 0
:b 1}
Parinfer reformatted it silently to this:
{:a 0}
:b 1
#2018-04-1221:39kingmob@kenny You are correct, sir!#2018-04-1223:28cfleming@kenny @kingmob Right, it tells Cursive which sort of REPL you’re connected to. Cursive tries to detect it automatically, but can’t always - it’s a dropdown so you can manually override it if Cursive gets it wrong.#2018-04-1223:28cfleming@grierson No, there isn’t unfortunately, although it’s something I’d love to add.#2018-04-1223:29cfleming@rads Which version of Cursive are you running? That’s concerning because the v3 integration shouldn’t do that.#2018-04-1223:29cflemingThat did happen with the earlier versions.#2018-04-1223:32cfleming@tony.kay You shouldn’t be getting your CLJS compiler output in there, that should be excluded based on your project.clj config. node_modules is not excluded currently, that would definitely be a good use case for an extra key in the project map.#2018-04-1300:07tony.kay@cfleming shadow-cljs, so that info isn’t in the project file for you to find#2018-04-1305:55Empperiit looks like Cursive doesn't work with IntelliJ Ultimate 2018.1? Fortunately still had 2017.3 installed so I can keep working
#2018-04-1305:55Empperiit says Cursive is installed but that's it, nothing works#2018-04-1305:55Empperiand no configurations are visible in menus etc#2018-04-1305:56justinleeIt definitely does work. I’m not sure what happened to your installation #2018-04-1305:57Empperiok good to know, then I might actually spend some time to get it working#2018-04-1305:57Empperibusy day ahead so probably won't do it today#2018-04-1306:36dirklectisch@niklas.collin For me it didn’t update automatically to the most recent version of Cursive. I had to go into the preferences to update it. After that everything worked. Maybe you are in the same situation?#2018-04-1308:14Empperineed to check that out. There was no way to do any updating but guess if I uninstall the plugin and then reinstall it might work#2018-04-1309:43cfleming@niklas.collin Yeah, something about the updates in IntelliJ 2018.1 seems a little flakey#2018-04-1309:43cflemingIf you go to Settings-&gt;Plugins-&gt;Browse Repos-&gt;Refresh then Search for Cursive it should have an update available#2018-04-1309:44EmpperiOk cheers!#2018-04-1309:44cflemingI don’t control any of that part any more, so I’m not sure what happened, but it has also happened to some other users with JetBrains plugins too, so there’s a new bug in there somewhere.#2018-04-1318:57potetmAnyone else having a problem w/ REPL focus lately?#2018-04-1318:58potetmI have a hotkey to give the REPL focus (cmd-3), and it used to give focus to the last REPL pane to have focus (usually the editor pane)#2018-04-1318:58potetmnot it always gives focus to the output pane#2018-04-1318:59potetmin addition esc no longer gives focus to the main editor if the REPL pane is hidden#2018-04-1405:26cfleming@potetm There are separate commands for jumping to the REPL editor or output pane, are those not working for you?#2018-04-1405:26cflemingTools-&gt;REPL-&gt;Jump to…#2018-04-1408:54emccue@cfleming You said in some earlier conversations that you were working on a fork of clojure where you address some interop concerns related to your work on cursive and abstract classes#2018-04-1408:55emccuedo you have a concept for how proper type hinting can be given to java code that consumes clojure AOT compiled sources#2018-04-1408:56emccuelike, the best that can be done now to return properly an "iterable of x" is L[x;#2018-04-1408:56emccue(or whatever the syntax is)#2018-04-1408:56emccuewhich basically means that the clojure side needs to return an array#2018-04-1408:57emccueI ran into this earlier, and it basically means that I cant expose anything that I dont wrap in unchecked RT.invoke calls to java consumers#2018-04-1408:57emccuewhich for me, making a product is fine#2018-04-1408:58emccuebut if I make an internal tool and I want to "write it in clojure", its a big barrier#2018-04-1411:31cfleming@emccue My fork fixes a different problem, mostly around class extension, see here: https://docs.google.com/document/d/1OcewjSpxmeFRQ3TizcaRRwlV34T8wl4wVED138FHFFE/edit?usp=sharing#2018-04-1411:31cflemingYou’re right that there’s no good way to type hint a Clojure function with a generic return type, you’re basically stuck with an unchecked cast.#2018-04-1411:31cflemingAFAIK there’s no way around that.#2018-04-1411:53gklijs@emccue I did some interop with Kotlin, where I set the Ifn's needed, and put functions to use them. This way you can make all the calls to clojure type safe.#2018-04-1416:14sparkofreason@cfleming FYI, not sure if this is an actual issue with cursive or some other combination of factors: https://youtrack.jetbrains.com/issue/IDEA-190262#2018-04-1421:46cfleming@dave.dixon Does disabling Cursive fix that issue? I’m not sure why Andrey thinks it’s Cursive, I can’t see anything in the log to suggest that.#2018-04-1421:49sparkofreasonI did as he advised, but in the process discovered my cursive license had expired, so am running a down-rev version until the license gets renewed. But the issue has not occurred since then.#2018-04-1423:18sparkofreason@cfleming spoke too soon, happened again. Increasingly dubious that cursive is the problem, this time it went goofy in the git dialog. IntelliJ seems to be rather unstable for me of late.#2018-04-1423:44gklijs@dave.dixon I didn't install the 2018.1 because some people had problems. But now there's an 2018.1.1 available with some fixes.#2018-04-1423:47sparkofreasonThat's the version I'm running.#2018-04-1505:08cfleming@dave.dixon Yes, 2018.1 seems to be uncharacteristically buggy#2018-04-1610:58Oliver GeorgeQuick sanity check. Is there a way to refer to goog/DEBUG in cljs where the syntax highlighting won't suggest an error:#2018-04-1611:00Oliver GeorgeAh, image upload didn'twork. Both goog.DEBUG and goog/DEBUG show as "goog.DEBUG cannot be resolved" with greyish background.#2018-04-1611:11joelsanchezeven though slack complains, images work fine#2018-04-1611:12joelsanchezCursive uses to do that with things it can't resolve, it's a fact of life...it also happens with macros#2018-04-1614:55potetm@cfleming yeah so, homing in on the actual prob#2018-04-1614:56potetmwhen I hide the REPL (by, e.g. shift-esc)#2018-04-1614:56potetmif focus was on the REPL, I cannot move focus back to the main editor#2018-04-1614:57potetmI'm not sure if this is related to IdeaVIM, which is an ever-complicating factor#2018-04-1614:58potetmIt seems that Terminal has a special option for this issue: https://intellij-support.jetbrains.com/hc/en-us/community/posts/206375799/comments/115000525530#2018-04-1615:01potetmanother way of stating is: I must remember to esc -> shift-esc if I want to hide the REPL. If I forget that, the full sequence is: shift-esc -> Open REPL -> esc -> shift-esc.#2018-04-1615:02potetmIt'd be optimal for my workflow if focus was back on the editor when I close the REPL, but I'm fine with being able to grab focus by doing shift-esc -> esc.#2018-04-1622:37cfleming@potetm I see, that’s unfortunate. I can’t see any way to modify the way those commands work, they’re totally baked in. One possibility might be to create a keyboard macro for the esc/shift-esc combo?#2018-04-1622:38potetmI'll try a keyboard macro#2018-04-1622:38potetmThanks @cfleming!#2018-04-1622:39cflemingNo worries, sorry, that kind of sucks.#2018-04-1622:39cflemingThe window management around tool windows is occasionally lacking.#2018-04-1701:48justinleehope no one minds, but general intellij question here: can you get get diffs for the whole project instead of file-by-file?#2018-04-1702:05cfleming@lee.justin.m Do you mean diffs of the changes? I do it using the Changes view (View-&gt;Tool Windows-&gt;Version Control-&gt;Local Changes)#2018-04-1702:05cflemingThen Cmd-D after selecting the scope I’m interested in will open a diff view, and I can then move from file to file.#2018-04-1702:07justinlee@cfleming ah yea that’s helpful. i wasn’t using that window. Thanks!#2018-04-1702:09cflemingBy default I think prev/next file are mapped to ctrl left/right, and I map ctrl up/down to prev/next change. I use that view all the time, it’s one of my favourite IntelliJ features.#2018-04-1711:11idiomancyfor some reason in cursive, every time I try to make an end of line comment, it adds whitespace before the comment -- pushing it right until it's at at least column 60#2018-04-1711:12idiomancyI can't find what setting is responsible for that behavior#2018-04-1714:29agigao@idiomancy I have no idea, but I actually like that )))#2018-04-1717:58idiomancyugh, it drives me nuts 😄 I could see how one would like it, so it doesn't bother me that the feature exists, I just really need some way to disable it 😆#2018-04-1721:37cfleming@idiomancy Settings-&gt;Editor-&gt;Code Style-&gt;Clojure-&gt;General-&gt;Comment alignment column, set that to 0#2018-04-1721:48idiomancy@cfleming Thanks! Comment alignment, okay cool. Sorry, I went through every comment related search term I could think of, but that wasn't one of them#2018-04-1812:04lloydsharkSo... I'm doing some ClojureScript on node development and struggling with getting a working repl. I had used the clojure.main option with a parameters file that contained this.
(require 'cljs.repl)
(require 'cljs.build.api)
(require 'cljs.repl.node)

(cljs.build.api/build "src"
                      {:main 'something.core
                       :output-to "out/main.js"
                       :verbose true})

(cljs.repl/repl (cljs.repl.node/repl-env)
                :watch "src"
                :output-dir "out")
This used to completely work for me, but now I get "Cannot load ClojureScript file / form into Clojure repl" when I try to load files via Cursive into my repl. I started looking at using piggieback - but following instructions from https://github.com/clojure-emacs/piggieback and then connecting to it via Cursive hasn't been a complete success yet either. TLDR: What setup are people using for nodejs repls with Cursive?
#2018-04-1821:08cfleming@lloydshark You can get that error when Cursive doesn’t detect the REPL type correctly - you can fix that using the dropdown at the top right of the REPL window. It doesn’t actually change anything about the REPL, it just tells Cursive what sort you’re connected to.#2018-04-1821:51lloydshark@cfleming Ah excellent. That works - such a simple fix 🙂 Out of curiosity is there a better repl setup you would recommend for node with cursive? (I'm not targeting the browser).#2018-04-1906:07cfleming@lloydshark So there isn’t one that’s specifically better for Node (that I’m aware of). If you can get piggieback set up that’s more fully-featured than the clojure.main one, but AFAIK it’s kind of a pain.#2018-04-1906:08cflemingBetter CLJS REPLs is something I’ve been promising “soon” for ages now, and it is still my intention to fix it soon 🙂#2018-04-1909:55lloydsharkNo worries, I wasn't sure with all the recent changes that it might have already happened - but not documented yet.#2018-04-1914:18rnagpalI am trying to have figwheel work with CLJS repl and I am following https://github.com/bhauman/lein-figwheel/wiki/Running-figwheel-in-a-Cursive-Clojure-REPL#2018-04-1914:18rnagpalarticlet#2018-04-1914:19rnagpalI get this error Error loading cemerick.piggieback: java.lang.IllegalStateException: var: #'clojure.tools.nrepl.middleware.interruptible-eval/queue-eval is not public, compiling:(cemerick/piggieback.clj:241:3)#2018-04-1914:20rnagpalI have [org.clojure/tools.nrepl "0.2.13"] as dependency#2018-04-1914:20rnagpaland I do see the queue-eval as public#2018-04-1914:21rnagpalby be cursive refers to an old version ?#2018-04-1921:45cfleming@rnagpal Cursive doesn’t manually inject tools.nrepl or anything like that. There must be one on your classpath somewhere.#2018-04-2017:30justinleeshould cursive be able to resolve :refered symbols? It doesn’t seem to be picking them up for me in a cljs environment#2018-04-2018:15shaun-mahoodFor some reason I don't get the option to resolve custom symbols when I click the lightbulb on an unrecognized form - using IntelliJ 2017.2.6 and Cursive 1.7.0-eap2-2017.2, all I get is the option "Create Function" Any ideas where I should start to troubleshoot this?#2018-04-2018:21shaun-mahoodOh nevermind, I forgot something in my requires and now it all works fine.#2018-04-2019:38cfleming@lee.justin.m Yes, it should. Do you have an example?#2018-04-2019:39justinlee@cfleming I’m doing this [promesa.core :as promesa :refer [then catch]], but then and catch are still highlighted as “cannot be resolved”#2018-04-2019:42justinleeoh wait. i just realized it’s because i’m using shadow and didn’t update the fake project.clj#2018-04-2019:43justinleesorry false alarm#2018-04-2309:02borkdudeHaven’t been using Cursive for a long time. Is it able to rename namespaces across clj/cljc/cljs and all the requires that belong to it?#2018-04-2309:10gklijs@borkdude just did a quick test renaming a cljc namespace, it seems to work, even the namespace of the test clj was changed.#2018-04-2309:18borkdudeHmm, it seems clj-refactor also supports this. Gotta try it.#2018-04-2309:59cfleming@borkdude Cursive doesn’t support this very well, at least yet. You can only really rename the last segment of a namespace name, since anything else requires moving things around. clj-refactor supports this for clj I think, but not cljs or cljc. cljc is actually pretty hard to do right.#2018-04-2403:08Oliver GeorgeI'd so love refactoring to work. It gets super fiddly to manage namespace uses especially if you have ::local-keyword in the code. Expanding them to fully qualified keywords helps but that's fiddly to do manually too.#2018-04-2405:03cflemingI know, I’d love this too 😞#2018-04-2310:00borkdudethought so yes#2018-04-2310:00borkdudethanks#2018-04-2310:00gklijsI only changed the last part indeed..#2018-04-2311:39EmpperiCan I somehow tell Cursive to search clj, cljc and cljs files for references when talking about keywords?#2018-04-2311:39Empperinow it depends on the file type if it finds it or not, which is kinda annoying in full-stack clojure project when for example renaming a keyword or searching where it is used#2018-04-2311:39EmpperiI've ended up using "find in path" and "replace in path" but that is more than sub-optimal solution#2018-04-2322:00cfleming@niklas.collin It shouldn’t be scoped by file type, I’ll check that.#2018-04-2408:31miikkaIn my ClojureScript files, requires for [clojure.spec.alpha :as spec] have spec highlighted "Unused alias" even though I do have (spec/def ..) usage in the file.#2018-04-2408:32miikkaIf I change the require to [cljs.spec.alpha :as spec], then the "Unused alias" indication disappears#2018-04-2408:33miikkaOr if I do use else than (spec/def) such as (spec/assert), that also makes it disappear.#2018-04-2411:09mfikesPerhaps Cursive doesn’t yet have logic for clojure namespace aliasing https://clojurescript.org/guides/ns-forms#__code_clojure_code_namespace_aliasing#2018-04-2413:42sandbagsI just did a rename package refactoring and i'm noticing that it didn't seem to fix any of the requires across the project. Is that an expected outcome?#2018-04-2413:45sandbagsit renamed the reference in :figwheel/`:onload` but not defproject although I guess it might be a bit much to expect it to do that (in this case it was the top-level package that got renamed)#2018-04-2419:35dabrazheHi. Does anyone have experience in setting up Cursive with Boot-clj or cljs?#2018-04-2500:13cfleming@dennisa Yes, there’s a page on the boot wiki about it, it’s still a little rough currently: https://github.com/boot-clj/boot/wiki/For-Cursive-Users#2018-04-2500:14cfleming@miikka I’ll try to reproduce that, because I’ve used spec a bit and that definitely worked for me.#2018-04-2500:14cfleming@mfikes Yes, Cursive does support that, although all that code is complicated and messy now so I’m totally willing to believe there’s a bug there.#2018-04-2500:15cfleming@sandbags Unfortunately the answer is still no better than this: https://github.com/cursive-ide/cursive/issues/621#2018-04-2501:29sandbags@cfleming righto. i wanted to check it wasn’t a bug. My project was not so big that manually fixing things up was a pain. Thanks for the answer.#2018-04-2507:55joelsanchezhow can I control which profiles are used for stub generation?#2018-04-2508:15sandbags@cfleming i don't seem to be able to complete purchase on a license, I click through and get a spinner that never goes away. I am a filthy freeloader so you don't need to worry about broken payment although if it's not local to me it might affect someone buying a commercial license. It might also be an idea to add a warning that the license is going to expire.#2018-04-2508:34cfleming@sandbags Yeah, that happens sometimes, it seems to be an AWS lambda thing. Trying again nearly always fixes it.#2018-04-2508:35cfleming@joelsanchez So I don’t think you can at the moment. What are you trying to achieve?#2018-04-2508:36joelsanchezour project doesn't require React deps by default (it needs a profile for that) and stub generation fails because of this#2018-04-2508:38cflemingOk, check the lein toolwindow (View-&gt;Tool Windows-&gt;Leiningen), open the Profiles tree entry, select the profile you need and then refresh.#2018-04-2508:39cflemingThat should add React as a dep to the project, and then the stubs generation should work.#2018-04-2508:40cflemingI’m curious why it fails without React though, I can’t think of anything which should cause that.#2018-04-2508:43joelsanchezit's a very large monster 🙂#2018-04-2508:43sandbags@cfleming i've given it three tries now and it always seems to get stuck with the spinner right after picking my country.#2018-04-2508:44cfleming@sandbags Oh, is this while the payment popup is up?#2018-04-2508:44sandbags@cfleming yes#2018-04-2508:44cflemingOk, it must be a problem with the payment provider.#2018-04-2508:44sandbagsI see an error in the console related to a new relic js#2018-04-2508:44sandbagsthat could be local, i'll try whitelisting#2018-04-2508:44cflemingDo you have an adblocker or something?#2018-04-2508:44joelsanchezomg stub generation has worked now 😍 thanks so much#2018-04-2508:44cflemingNice 🙂#2018-04-2508:45sandbagshrmm... actually in this chrome profile i don't have an adblocker#2018-04-2508:46sandbagsokay all JS loading related errors are happening when the paddle popup first appears (i.e. before I enter any data)#2018-04-2508:46cflemingNot sure sorry, they may be having issues but they’re quite JS-env sensitive too. I really hate that they have all that crap in there, I’d change provider to one with less tracking if I could.#2018-04-2508:46sandbagsso they might be a red-herring#2018-04-2508:47sandbagshave you tried going through it yourself just to make sure it's not an issue local to me?#2018-04-2508:48sandbagsbut i seem to be stuck though#2018-04-2508:49sandbagsi'll try Firefox#2018-04-2508:49joelsanchezanother question, it looks like "going to definition" with qualified kws only works with some things but not in general (works with re-frame and spec but not in another thing of ours which looks like re-frame) is this intended? can we do anything?#2018-04-2508:49cflemingWorks On My Machine (tm)#2018-04-2508:49cfleming(in Chrome)#2018-04-2508:49sandbagsI switch to FF but am stuck at the same place#2018-04-2508:50cfleming@joelsanchez Yes, Cursive only knows about some forms. Are your forms re-frame wrappers or something similar?#2018-04-2508:50cfleming@sandbags Proxy, maybe?#2018-04-2508:51joelsanchezwe have a large Om project and we developed "re-om", which adds a re-frame-like API to Om#2018-04-2508:52sandbagsOkay I have the answer. I use GasMask to have my DNS track a list of spam/attack servers and autoblock them#2018-04-2508:52sandbagslooks like that list might be including some stuff Paddle are depending on#2018-04-2508:52sandbagsthat's either overzealous or worrying depending on your point of view 🙂#2018-04-2508:52joelsanchezwe can't make Cursive recognize our forms, right? maybe after it's out there (we plan to do so) you can add the forms?#2018-04-2508:53cfleming@sandbags Yeah, they include New Relic I think. My browser doesn’t even let me open https://newrelic.com to see what it does 😞#2018-04-2508:54sandbagsNew Relic is AFAIK a legit instrumentation tool for apps#2018-04-2508:54sandbagsBack when i was in development i used to use them#2018-04-2508:54sandbagsbut that was mid 2000's so who knows#2018-04-2508:55cflemingI’m sure they’ve joined the pond scum race to the bottom that is the modern internet 🙂#2018-04-2508:55sandbagsCould be. Have my license & once again thank you for making and releasing Cursive in a way a hobbyist can use! 🙂#2018-04-2508:56cfleming@joelsanchez If your forms look just like re-frame, you could use the “resolve as…” functionality for your forms to make Cursive think they work like the re-frame ones.#2018-04-2508:56cflemingDo you actually have re-frame as a dep in your project?#2018-04-2508:56joelsanchezno 😞#2018-04-2508:57joelsanchezwhat if I add re-frame, use Resolve as, and then remove re-frame? would that trick Cursive?#2018-04-2508:57cflemingThat was my next suggestion 🙂#2018-04-2508:57cflemingSorry, it’s a bit shit#2018-04-2508:57cflemingI need a better solution for that case.#2018-04-2508:58joelsanchez😂 thank you anyway, I'll try that now#2018-04-2509:01joelsanchezthat worked perfectly, truly a "lifehack"#2018-04-2509:02cflemingHe Resolved His Keywords With This One Weird Trick!#2018-04-2509:02cflemingYou Won’t Believe What Happened Next!#2018-04-2521:03hlshipIn my (really, extrordinarily huge) multi-module app, the "Refresh Leiningen Projects" option doesn't always appear in the command menu ... I often have to use the Leiningen tab and click the refresh button there. Any idea why?#2018-04-2523:15Joe R. SmithIs it possible to wire aligning let bindings, map key/vals, etc to a keystroke? I don’t want them aligned everywhere, just some places. 🙂#2018-04-2611:27jaenShould this still be working? https://github.com/cursive-ide/cursive/issues/1670 Because for me it doesn't seem to be unfortunately#2018-04-2618:32hlshipIt would be occasionally useful for me to be able to rename the REPL window tabs; I sometimes run two different tabs and it can get confusing. If I could rename the REPL tabs to "Client" and "Server", for example, it would help ensure that I had the right tab open when I send code to the REPL.#2018-04-2621:15hlshipIs there a way to activate the "show difference" dialog (for a failed test) without using the mouse?#2018-04-2621:15hlshipThat's the most common time I have to move to the mouse.#2018-04-2623:50justinleedoes anybody use intellij for javascript? somehow I have a warning that I’m catching a throw exception locally. i don’t seem to have any of the linters enabled so I can’t figure out how to turn this stupid warning off#2018-04-2703:05misha@solussd select few lines of a map and call formatter - will format only that map, and not entire ns#2018-04-2708:15gklijs@lee.justin.m I believe somewhere in the configuration you can disable particular warnings.#2018-04-2716:06timgilbertSay, is there a way to get "reformat code" to apply only to the containing form, or better still to the containing top-level form? I use it all the time but my colleagues don't, so I always need to select the function I'm working on if I want to avoid reformatting their code and coming off slightly passive-agressive#2018-04-2716:39rymndhng^ on a slightly related note, has #cursive looked into adding support for :style/indent metadata, this would be a great way to have consistent indentation for macro forms across libraries. See https://cider.readthedocs.io/en/latest/indent_spec/#2018-04-2722:46hlshipAnyone ever see a case where reloaded code just doesn't seem to reload? I'm putting prn into my code for debugging purposes and reloading, no errors in the REPL, but the new code doesn't seem to take effect.#2018-04-2722:46hlshipTrying an "invalidate caches and restart".#2018-04-2722:47hlshipAlso, same situation, breakpoints in the debugger don't trigger, or are "x"ed even for normal lines (e.g., in a function, not a protocol method).#2018-04-2723:15hlshipNow I've blown away and reloaded my big project, wiped indexes, cleared out ~/.m2/repository ... no dice!#2018-04-2723:26hlshipLet's see if a reboot helps....#2018-04-2723:26hlshipNot having a good day.#2018-04-2723:42hlshipNope. Bizarre. I can even verify that the right source is visible to io/resource and yet when I load a namespace or even use eval form in repl, no dice.#2018-04-2723:45hlshipThe classpath of the REPL process looks correct. I don't even know what's going on.#2018-04-2723:46hlshipAlways, when you think the world has gone insane, it ends up being some tiny, understandable thing. But so far I haven't found it.#2018-04-2723:46hlshipe.g., you will almost never find a C compiler bug. If you think you find one, keep looking elsewhere.#2018-04-2723:49hlshipLet's try upgrading to latest IntelliJ.#2018-04-2723:52hlship2018.1#2018-04-2723:54hlshipMay not be a Cursive problem since it's happening in Leiningen REPL 2.7.1 as well.#2018-04-2800:06hlshipAnd just to round out my day:
5:05 PM	Invalid Cursive Build
							This build is more recent than your update period allows. Your update period ends on Jan 10, 2018, and 1.6.3 was released on Feb 8, 2018.
							The most recent available stable build is 1.6.2 (Install)
							Renew your licence on our website.
							If you have renewed your licence, activate it.
#2018-04-2801:18mfikesIf you'd like to use a lein project making use of lein-tools-deps from Cursive, it is now usable, and I've documented some workarounds for some path issues here https://gist.github.com/mfikes/f803fef3013927c376063a3d72b69d60 TL;DR: Your lein project can use deps.edn (and specify Git Deps, :local/root deps). See more at https://github.com/RickMoynihan/lein-tools-deps#2018-04-2801:24cfleming@hlship Sorry, I have no idea why that reloading might not work, the fact that it doesn’t in the lein REPL does suggest that it might not be a Cursive thing but I’m not sure.#2018-04-2801:25cflemingI suspect the breakpoints not working is just a symptom of the code itself not loading.#2018-04-2801:27cfleming@hlship re: your earlier question about why the Refresh command should not appear, I can’t imagine why that might be either - is this from the Cmd-Shift-A search palette?#2018-04-2801:28cfleming@solussd I don’t think there is, no - the best you can probably do is selecting the form and reformatting it as @misha suggested. But for that to work, you need the formatting settings set to align those things, and that’s a global setting.#2018-04-2801:29cfleming@jaen Yes, that should still be working. What are you seeing? Do you get the stubs popup, and do the stubs generate correctly?#2018-04-2801:30cfleming@hlship re: REPL tab names, yes, I’m planning to fix this soon as part of a re-vamp of the REPL UI related to CLJS REPLs, it’s something that’s been discussed on the mailing list too.#2018-04-2801:31cflemingAlso, I don’t think there is a way to show the test differences with the keyboard, but there definitely should be.#2018-04-2801:32cfleming@timgilbert Actually, a “reformat top-level form” command would be great, and is something that has been requested before - I’ll add that.#2018-04-2801:33cfleming@rymndhng It’s something I’d like to support, but I haven’t looked into what would be required. I’m not sure how widely used it is currently.#2018-04-2802:48rymndhngagreed — it’s a chicken and egg kind of problem 😆#2018-04-2802:44aleksandrDo anyone know how to integrate the reagent with-let macro with Cursive IDE?#2018-04-2802:44aleksandrNow It cannot identifies my bindings in the with-let macros#2018-04-2804:29aleksandrIt underscores variables from bindings with an error "variable cannot be resolved"#2018-04-2808:20cfleming@al.vyguzov You can use the Resolve as… functionality, see here: https://cursive-ide.com/userguide/macros.html#2018-04-2810:27jarppeWhen cursive shows "Show difference" in failed tests? I trying to write test tool on top of clojure.test and for some reason my reports don't get "Show difference" option.#2018-04-2810:29jarppeIs something in my reports or does cursive inspect the test form?#2018-04-2810:30jarppeI'm pretty sure I call clojure.test/do-report with identical reports as regular (is ...) forms, but my tests don't get the "Show difference"#2018-04-2818:35jaen@cfleming after opening IntelliJ again the next day I did get the pop-up in the lower right and stubs generated correctly. So it appears the functionality is working after all, it just lacks a bit of discoverability (or could otherwise run automatically maybe?).#2018-04-2820:37hlshipI'm still flummoxed. I'm sure it'll be something obvious once I track it down.#2018-04-2823:03okworiPlease, can someone simply explain what stub generation is and why my IntelliJ Idea cursive plugin throws that notification. I can kinda disable it but would be nice to know its use and should I click Generate now every time I see it and why?#2018-04-2906:46jaen@simon I think that's related to what I asked above – as far as I understand it's a functionality that generates a file with minimal defs for files which generate symbols with macros, so that autocompletion for such namespaces can work. For example https://github.com/dm3/clojure.java-time/blob/master/src/java_time.clj re-exports symbols from namespaces with a macro and without stubs it confuses Cursive – it can't offer completion for this namespace. When the pop-up shows and you ask it to generate stubs, it will (partially) evaluate the macros, to produce a file it can use for completion. So if you value the use of completion, it will be generally a good idea to click that Generate now link. One downside I can see is that there seems to be no way to navigate from the stub to the macro that generated it, so if you want to read the implementation, it's less accessible.#2018-04-2906:47jaen@cfleming is there a way to navigate from a stub to the code that generated it?#2018-04-2907:21cfleming@jarppe So right now this is done statically from the source code, i.e. is has to be an (is (= a b)) form. That’s not extensible at the moment, I’ll look to see if I can do that.#2018-04-2907:22cfleming@simon Yes, @jaen is correct on how this works.#2018-04-2907:23cfleming@jaen No, in general I don’t think that’s possible, there’s generally no information in the generated code that will tie it back to the macro.#2018-04-2907:23cflemingActually, now that I think about that, I’m not so sure - I’ll see if I can do that.#2018-04-2908:35jaenI mean, I don't presume to know how exactly you implemented it underneath, but considering it output just the stubs, it can't be regular macrcoexpansion, can it? Then you could probably thread location metadata through the code that does macroexpansion, I suppose? Depending on how exactly you have this implemented it it can be simple or annoying to do, but hopefully doable? Not a high priority though, you could even just add a navigation action for the whole stub file to it's source file – it's certainly way simpler and almost as useful as navigating per symbol.#2018-04-2908:37jaenAlso, re: usability of that tooltip – maybe it would be a good idea to put it in a bar that appears on top of the file (like for missing file associations or filetype plugin sugesstions)? It would be harder to miss and more discoverable then. Not sure if that's possible for plugins to do it though.#2018-04-2908:44cfleming@jaen The implementation is actually pretty simple - I basically just start a process with the classpath of the module, that requires the namespace and then introspects it. So if those generated vars have any file/line metadata, I might be able to use that.#2018-04-2908:45jaenAh, so you just use macroexpansion and then simplify it, I see.#2018-04-2908:45cflemingre: having it in the in-editor notification, it actually worked like that at the start, but the process was surprisingly difficult to make robust. The in-editor notification drove people nuts when the stub generation didn’t work since it was present constantly.#2018-04-2908:46cflemingWell, I don’t macroexpand myself, but generally loading the ns will as a side-effect create vars via some technique or other.#2018-04-2908:46cflemingSometimes macroexpansion, but sometimes they’re table-driven (e.g. om.dom etc)#2018-04-2908:46jaenI see.#2018-04-2908:47jaenThat's a shame about the ticker tape though. Because I was quite confused why this didn't work until I restarted IntelliJ later and the tooltip popped up.#2018-04-2908:47cflemingIt will also not generate stubs for vars in the ns that Cursive knows about already via its own analysis, to try to reduce duplicates in completion etc.#2018-04-2908:47cflemingYes, I was worried that would happen.#2018-04-2908:48cflemingI could possibly re-visit that and add a Dismiss option to it or something.#2018-04-2908:51jaenWell, at least now I know where I look, but if it's possible to do it robustly with the ticker, it will probably help other people coming across this feature for the first time.#2018-04-2908:51jaenIncidentally, is there any option to force stub generation even if you missed/dismissed that tooltip?#2018-04-2908:52cflemingIt will be re-checked when your project is synchronised - you can force that in the Leiningen toolwindow (View-&gt;Tool Windows-&gt;Leiningen-&gt;Refresh) or using the Refresh Leiningen Projects action#2018-04-2908:54cflemingIdeally it would also be re-checked when the ns form in any file is updated, but that’s tricky unfortunately.#2018-04-2908:59jaenMaybe some context menu item on the tab could work? But refreshing from the leiningen tab is a simple enough workaround.#2018-04-2909:00jaenIncidentally, how are the plans for boot support? Just out of curiosity, really, because writing a task to output a lein project works well enough (except no completion in build.boot unfortunately)#2018-04-2909:31cfleming@jaen I’m planning to start working on better build tool support soon. It’ll start with deps support, and then add boot support using deps for dependencies. I’m using those to investigate the IntelliJ infrastructure for build tools, which the lein integration pre-dates and needs to be moved to.#2018-04-2909:31cflemingI’ll also add shadow-cljs support once I figure out how the moving pieces work.#2018-04-2909:34jaenSounds nice, thanks for the info. I'll probably should look into deps.edn then, I've so far had my own simple edn format for that.#2018-04-3016:48hlshipI've discovered that if you have a bug in your code that keeps other code from executing, then it looks like that other code is refusing to live reload. Definitely should have moved to other work last friday.#2018-04-3020:11hlshipSo it had nothing to do with Clojure or Cursive; the with-redefs I used to mock out chatting to a back-end server ended up bypassing my test code talking to an in-process front-end server. Reloading the code worked, but none of the code was getting executed. My panic on friday was adding logging code and printlns and not seeing them take effect. Now all is explained.#2018-05-0206:59claudiuany way to get http://clojuredocs.org examples into cursive ? 🙂#2018-05-0208:41cfleming@claudiu So I would love to. I spoke to zk about getting a dump which I could include or an API, but nothing has happened yet that I know of.#2018-05-0209:21gklijsIs http://clojuredocs.org open source? Maybe I could implement some API with a pull request, sounds like a fun and doable thing#2018-05-0210:33claudiulooks like it's open source. Find myself looking quite often at the examples posted there, would be great to be able see them in the editor. 🙂#2018-05-0211:35Alex Miller (Clojure team)They used to have an api and a client#2018-05-0211:37Alex Miller (Clojure team)https://github.com/zk/clojuredocs/pull/100 - 3 yr old pr to add the api back :)#2018-05-0305:54flowthingIs it possible to add a keyboard shortcut to Cursive that evaluates a Clojure form? For instance, I'd like to be able to use a keyboard shortcut to evaluate (clojure.tools.namespace.repl/refresh) in whatever tab or pane I currently have open.#2018-05-0313:35javiyeah. The Keymap settings idea let you set those. ie: I have cmd+enter to send current form to active repl I am not sure if there are already some defaults set...#2018-05-0314:36mfikeshttps://twitter.com/mfikes/status/992049711069704192#2018-05-0314:36mfikes^ Demo of using some of the latest WIP for lein-tools-deps from Cursive#2018-05-0319:09cfleming@flowthing Yes, see https://cursive-ide.com/userguide/repl.html#repl-commands#2018-05-0319:22flowthing@cfleming Perfect, thank you! I don't know how I didn't discover that on my own...#2018-05-0319:26cfleming@mfikes Nice!#2018-05-0408:03raymcdermottHi @cfleming I’m having some weird behaviour differences between file loading in a REPL and an interactive session#2018-05-0408:04raymcdermottwhen I try to load this file into the REPL it barfs#2018-05-0408:06raymcdermottif I script the same code into the REPL, it works fine (in both the CLI REPL and the Cursive REPL)#2018-05-0408:10raymcdermottMaybe I have screwed up in some way ?#2018-05-0408:10raymcdermottif not, shall I open a bug?#2018-05-0412:10Alex Miller (Clojure team)I think you’re using gen/fmap wrong#2018-05-0412:11Alex Miller (Clojure team)The spec gen namespace differs from test.check gen in take generator thunks instead of generators #2018-05-0412:11Alex Miller (Clojure team)Your first example used spec gen and second used test.check gen #2018-05-0412:13Alex Miller (Clojure team)If using spec gen, 2nd argument to fmap should be a no-arg function that returns a generator (so you can just add # at the front to make it an anonymous function)#2018-05-0412:14Alex Miller (Clojure team)I don’t think this has anything to do with Cursive#2018-05-0412:17akielIn the “resolve macro as” dialog, there is a “Specify…” option. It asks for a var name. Is there documentation how it works?#2018-05-0413:15tengstrandWhen i stop at a breakpoint and press <alt>+<F8>, I can’t easily execute/evaluate functions from the current namespace, e.g. (my-function). If the function lives in another namespace, I can press <alt>+<enter>. My workaround for functions in current namespace is to wrap it with an ‘identity’ function, e.g.: (identity (my-function)). It worked before without having to import functions in earlier versions of Cursive. I run 1.6.3-2017.2 of Cursive and 2017.2 Community edition of IDEA.#2018-05-0416:03raymcdermott@alexmiller I’ll get my coat#2018-05-0504:03danielcomptonWhat's the difference between the .idea/codeStyles/Project.xml file and /.idea/codeStyleSettings.xml? They seem to be mostly the same#2018-05-0611:17joelsanchezcan we access the repl history as a seq?#2018-05-0617:32CaseyDoes the custom symbol resolution described in the macro page (https://cursive-ide.com/userguide/macros.html) work in clojurescript?#2018-05-0617:32CaseyI don't get the quickfix option to resolve a defxxxx macro in cljs#2018-05-0721:10danielcomptonIt seems like my indentation configuration isn't being saved to the project, even though I have Code Style preferences set to be saved in project configuration#2018-05-0721:10danielcomptonDoes anyone know where to look for it?#2018-05-0800:01hlshipIt looks like Cursive marks a Java class import as unused if it is present only for a type cast.#2018-05-0800:04cfleming@hlship Do you mean in a metadata hint, i.e. ^MyObject obj?#2018-05-0800:04hlshipYes#2018-05-0800:05cfleming@akiel No, it’s not yet, I need to update the doc for that. Basically you can select any var available in your project to resolve as, not just the predefined list.#2018-05-0800:05hlship
(log/trace :event :master-loop
               :zk-id zk-id
               :client-id (str "0x" (Long/toHexString (.getSessionId ^ZooKeeper client))))
is in my code, but the import of ZooKeeper is flagged as unused.
#2018-05-0800:05cflemingHmm, odd - I’ll check that.#2018-05-0800:06cfleming@teng That’s very odd, I’ll take a look at that. Which JVM version are you using for your app?#2018-05-0800:10cfleming@danielcompton I actually don’t know what the difference between those two files is.#2018-05-0800:11cfleming@joelsanchez In your application, you mean? No, you can’t, since it’s stored on the client side of the nREPL connection, in Cursive#2018-05-0800:12cfleming@ramblurr yes, it should work for CLJS. However there’s a bug where that popup isn’t shown at the definition of your defxxx, you’ll have to use the intention from a usage, i.e. where you actually use it like (defxxx ...)#2018-05-0805:41tengstrand@cfleming I use Project SDK 1.8 (1.8.0_151)#2018-05-0806:12Casey@cfleming Ah thanks, using the intention from a usage point works.#2018-05-0806:13CaseyHmm there is something strange though#2018-05-0806:13CaseyI'm using specter, which defines a defnav macro.#2018-05-0806:15CaseyNo intentions popup on that defnav line.. when i press alt+space it says "the file is read only" (this is a specter library file)#2018-05-0807:54joelsanchez@cfleming no, I meant in the REPL, inside Cursive. instead of just using the arrows, can I do a filter on the history to find what I want? (like history | grep ...)#2018-05-0808:37akiel@cfleming I tried the var of my macro. It even has specs. But I think I need something special in the spec to mark binding forms.#2018-05-0813:28MudgeIn Cursive "defn" cannot be resolved. How do I fix this?#2018-05-0813:29Mudge@cfleming Cursive says "defn" cannot be resolved. How do I fix this?#2018-05-0814:10MudgeI want to get this fixed because the indentation for defn is broken because it cannot be resolved#2018-05-0814:20danm@nick319 Sounds like it's not correctly recognised your Clojure project. Have you added your project.clj as a Leiningen project in IntelliJ? And does that correctly reference your source and test directories as such#2018-05-0815:52Mudge@carr0t yes. And it was all working, and then it stopped working#2018-05-0815:54Mudge@cfleming @carr0t I just noticed that cursive has this error:#2018-05-0817:25CaseyI can't find docs on how to start a clojurescript node repl?#2018-05-0817:36Caseymy goal is to get test integration working with clojurescript + doo#2018-05-0817:37Caseyis this possible?#2018-05-0822:04cfleming@ramblurr I’ll check that Specter case#2018-05-0822:05cfleming@joelsanchez The thing is, when the code you type in the REPL is executed, it’s executed in the REPL process, i.e. in your application. This is a separate process from the IDE itself, which is where the history is stored.#2018-05-0822:06cflemingSo the IDE is the client of the REPL connection, and your app is the server.#2018-05-0822:07cfleming@akiel Ah, I see what you mean. Unfortunately this won’t work yet, unless your macro looks just like one Cursive already understands (i.e. a new binding form that looks like a let, or a defxxx form or something similar).#2018-05-0822:08cfleming@nick319 Does that happen on all files, or just on one specific one?#2018-05-0822:25joelsanchez@cfleming sure but, suppose I want to evaluate this
(->> @cursive-history (filter (fn [s] true)))
cursive could send this to the server (unbeknownst to the user of the repl):
(with-local-vars [cursive-history [:whatever :history :cursive :has]]
  (->> @cursive-history (filter (fn [s] true))))
#2018-05-0822:27joelsanchezalternatively, if Cursive sends to the server (ns cursive) (def history ...) before anything else, maybe that would make it possible to access cursive/history?#2018-05-0823:47cfleming@ramblurr re: the CLJS REPL, this is still a little janky but will get better soon. Unfortunately the test integration doesn’t work for CLJS yet, although I hope to fix that soon too.#2018-05-0823:48cfleming@joelsanchez Sure, I see - it’s an interesting idea. I’m actually toying with some ideas about how to make the REPL more interactive at the moment, with more bidirectional communication between the server process and the IDE.#2018-05-0823:53cflemingWhat’s your use case for the history filtering?#2018-05-0905:27Casey@cfleming many thanks for the replies. Definitely looking forward to test integration support for cljs. And generally, Intellij really has some great features there around diffing and idividual test report that could be very nice to have#2018-05-0905:29Casey@cfleming have you used the SQL integration in Intellij to execute SQL snippets against a database? Intellij has this great feature where it highlights the snippets (with a border box) showing you wake you would execute#2018-05-0905:30CaseyWould be very cool to have in a clojure editor.. to integrate the repl more tightly with the editor pane#2018-05-0906:03cfleming@ramblurr Interesting, do you have a screenshot of what you mean?#2018-05-0906:20Casey@cfleming check out this video https://youtu.be/Xb9K8IAdZNg starting at 3:40#2018-05-0906:21Casey(on mobile so it's hard to get the direct link)#2018-05-0906:22CaseyIt's one if my favorite features of SQL editing in Intellij. And I think it would translate very well to clojure too#2018-05-0906:33cflemingI see, interesting, thanks. One issue I see with that is that it’s possible to choose the form to execute in several ways (top-level form, form before the caret, selection) - this could only highlight one of them.#2018-05-0906:34cflemingThere’s a related issue which I can’t search for right now about highlighting the sexp under the caret.#2018-05-0907:13joelsanchez@cfleming my use case was to repeat something I evaluated long time ago, don't want to go all the way back manually#2018-05-0907:26cfleming@joelsanchez Do you know about Tools-&gt;REPL-&gt;Search REPL History? You can narrow down there by typing.#2018-05-0907:27joelsanchez@cfleming of course there had to be a way :) thanks#2018-05-0910:08Casey@cfleming I agree with your observation, the feature as implemented wouldn't work exactly for clojure. But the bounding box highlight that is very very handy for seeing nested expressions. One thing you don't see in the video is that when you press the key to execute a statement,if it's nested, a small I mention pop-up offers you the nested options starting from closest to the top level#2018-05-0910:10CaseyThat said, I was really wishing for this feature in cursive before I found the "execute top level expression under cursor" keybind#2018-05-0910:11CaseyAnyways, thought you'd be interested to see an example if the Intellij editor being more interactive#2018-05-0910:15CaseyAny news on strucurual editing and ideavim? Ref https://github.com/cursive-ide/cursive/issues/1249#2018-05-0911:08lloydshark@ramblurr Don't know if this would help you. But a little while ago I made a template for nodejs / aws lambda that includes instructions for a working cursive cljs repl.#2018-05-0911:08lloydsharkThe repo is here. https://github.com/lloydshark/aws-clojurescript-lambda#2018-05-0911:10Casey@lloydshark Thanks for the link. I've managed now to get a cursive cljs repl with node.#2018-05-0911:10CaseyJust not the clojure.test integration, which according to @cfleming isn't implemented yet#2018-05-0911:12lloydsharkYeah I didn't try that.#2018-05-1011:36mikeyfordQuick one: Is there a faster way to scroll through the REPL history? Ideally I'd like to go through every evaluation one-by-one, instead of line-by-line with the up arrow. (ctrl + up isn't really what I'm looking for, because I need to switch between that and the single up stroke between big blocks and single lines)#2018-05-1012:33mfikes@michael.ford Tools > REPL > Search REPL history shows a list you can scroll through#2018-05-1012:39mikeyfordah great, thanks @mfikes#2018-05-1103:29Oliver GeorgeHey @cfleming We're loving the ability to jump to keyword definitions in re-frame. One annoyance is we can't have our own reg-event-fx wrapper without breaking the jump to keyword behaviour.#2018-05-1103:29Oliver GeorgeJust wondering if there's something I'm missing which would allow that.#2018-05-1103:30Oliver GeorgeRef: https://github.com/cursive-ide/cursive/issues/1470#issuecomment-337448508#2018-05-1114:35kenny@olivergeorge Alt+enter over your symbol, select Resolve as..., the Specify..., and type in reg-event-fx. Select the one in re-frame.core.#2018-05-1121:16Oliver GeorgeReally. Brilliant!#2018-05-1220:14justinleei really like the cmd-b go-to reference feature. is there a similar mechanism (like cmd-o) that would just let you type in an arbitrary function name and go to it?#2018-05-1220:16flowthingLike Go To Symbol? (https://www.jetbrains.com/help/idea/navigating-to-class-file-or-symbol-by-name.html#d371836e25)#2018-05-1220:17justinleeyes! thanks!#2018-05-1220:22flowthingFWIW, Find Action is also really useful if you can't remember the keyboard shortcut for a Paredit command, for example (https://blog.jetbrains.com/idea/2009/06/find-action-saves-time).#2018-05-1405:44Oliver GeorgeBit of a thought bubble but how about using spec's generative features to do "type checking" like behaviour in the IDE: https://gist.github.com/olivergeorge/584b54fe0b1d4c6ce3c7a44ee8c29095#2018-05-1522:33Oliver George@cfleming can’t sell you on this one? :-)#2018-05-1522:51cfleming@U055DUUFS Yep, was just walking to the office 🙂#2018-05-1522:52cflemingIt’s an interesting idea. So you’re thinking something like being able to right click in the editor and say “test this function” or something similar?#2018-05-1600:18Oliver GeorgeI think cursive users would love red squiggles to appear as they are working on code. Clearly that's a big step though. Something that let you check a namespace and identify these bugs would be good so something like "Test Fn" or "Test Ns" sounds like a good step forward.#2018-05-1600:19cflemingRight, red squiggles would require something like https://github.com/arohner/spectrum, which is a neat idea but still alpha state I believe.#2018-05-1600:29Oliver GeorgeI'm not sure why the approach I describe couldn't be applied. Its a "brute force" approach but a simple technique which would (might?) be efficient with a cache. Key thing is the code driving it needs to understand bindings (thus it's an IDE thing).#2018-05-1600:30Oliver GeorgeAll from an idealistic user perspective. You're the expert.#2018-05-1600:31Oliver GeorgeAnyway, just wanted to share.#2018-05-1610:23cflemingWell, it still requires type propagation, which is similar to spectrum or what Cursive does for Java interop#2018-05-1610:25cflemingi.e. in your example, Cursive would have to understand that a should have type string?, and since it’s used as an arg to bar then the IDE would check that particular use by generating from string? and validating it against coll? - is that what you have in mind?#2018-05-1610:26cflemingI’m not sure whether that could feasibly be run in the background, since there are likely to be a lot of these. Caching the results might be tricky too. I’ll think about it, since it would be much easier than using something like spectrum.#2018-05-1611:39Oliver GeorgeI think you're on the same page. There's definitely a price to pay (performance, caching practicalities) but the rewards could be quite interesting. Thanks for listening & taking the time to think about it.#2018-05-1405:46Oliver George(Still requires a JVM to build "facts" so not perfect)#2018-05-1417:12Mudge@cfleming it happens on all my files in the project#2018-05-1417:14Mudge@cfleming Cursive says "defn" cannot be resolved. How do I fix this?#2018-05-1417:17Mudge@cfleming how do I get updates to the cursive plugin or do they happen automatically?#2018-05-1417:33Mudge@cfleming I reinstalled Intellij using the latest version and installed Cursive and now it all works.#2018-05-1419:21rnagpalIs there any way I can fold the brackets#2018-05-1419:22rnagpalwe can fold HTML element tags#2018-05-1419:22rnagpaland functions#2018-05-1419:22rnagpalwould be good to fold code based on brackets too#2018-05-1522:16cfleming@nick319 Oh, I’m glad it’s working - I suspect your indexes must have become corrupted.#2018-05-1522:16cfleming@rnagpal Currently only top-level forms can be folded. Do you think it would be useful to fold forms within top-level forms too?#2018-05-1614:14rnagpal@cfleming yeah. Things like ‘Threading macros’, case statements, cond statements, if get a bit long#2018-05-1614:15rnagpalso would be nice option to fold them to reduce the noise#2018-05-1700:29wilkerlucioI'm getting a very weird behavior on Cursive, I'm separating my source in a few folders, I moved old code to src/ui, and add src/chrome and src/remote, after I refresh the lein project, the src/ui doesn't appear at all in the navigator, it's like it's gone, but it's there for sure, any idea how that can be?#2018-05-1700:31cfleming@wilkerlucio This seems to be a bug in IntelliJ 2018. It happens when source folders are nested inside each other, so both src and src/ui are marked as either source or test folders.#2018-05-1700:31wilkerluciowell noted#2018-05-1700:31wilkerlucioI forgot to update the src from the cljsbuilds#2018-05-1700:32cflemingGenerally this happens when you have a bunch of source paths for something like cljsbuild, but don’t have a top-level :source-paths [] in your project, since Lein will add src by default there.#2018-05-1700:32wilkerlucioyeah, I just updated the cljsbuild ones and now it's good 🙂#2018-05-1700:32cflemingGreat 🙂#2018-05-1700:32wilkerluciothanks!#2018-05-1700:51justinleehave there been parinfer fixes in some of the preview builds? suddenly all of the cut and pasting seems rock solid. 👍#2018-05-1707:07cfleming@lee.justin.m There have been some, yeah - I have some more I’m about to release which will be the last parinfer work in a while.#2018-05-1712:28ikitommiIs there a way not to left-pad comments in the end of line when auto-formatting code?#2018-05-1720:34bj@ikitommi yes, in Editor > Code Style > Clojure > General, decrease the Comment Alignment Column value#2018-05-1721:36ikitommithanks @bj!#2018-05-1804:48tapWhen I connect to nrepl with lein repl :connect <port> command, if I mistakenly run an infinite-loop code in there, when I kill process or close terminal, that infinite running program is terminated too. Is there a way to do the same for cursive? I tried cursive remote repl, but it doesn’t seem to work that way. When I close the repl tab or click stop, the infinite running program still continue.#2018-05-2117:48bj@tap are you clicking Stop REPL or the "Interrupt Current Execution" button next to the play button in the repl? If you click the latter, it should stop running the last command, then you should be able to stop the repl.#2018-05-2123:04tap@bj That works! I didn't realize there's this "Interrupt Current Execution" before. Thanks!#2018-05-2209:11gphilippSometimes the button doesn’t do anything, eg. if a series of IO operation are perfomed in a doseq. Any tip to make it work reliably?#2018-05-2423:30danielcomptonI've just setup a new computer profile on an existing computer and I'm finding Cursive has about a second or so lag every time it tries to show an autocomplete suggestion with this profile#2018-05-2423:30danielcomptonHas anyone noticed this/know how to fix it?#2018-05-2500:02Alex Miller (Clojure team)is it indexing in the background?#2018-05-2500:12souenzzo@danielcompton on my pc, when I switch to JDK10 or GraalVM on Project SDK**, my autocomplete is way slower (JVM8 = faster autocomplete)#2018-05-2500:12danielcomptonAh yep that’s it @souenzzo wondered if it was JDK10 related#2018-05-2500:13danielcomptonI didn’t mention it because I assumed only the IntelliJ JDK would be important and that one is on 8#2018-05-2500:13danielcompton@alexmiller no indexing that I could tell#2018-05-2500:14souenzzoYep. My intellij always use the same JDK (not sure what JDK is). But on project when I switch the SDK affects autocomplete#2018-05-2501:23cflemingThat’s interesting, I’ll see if I can figure out why that is.#2018-05-2501:23cflemingHas anyone noticed this with JDK9? I haven’t heard anything.#2018-05-2501:24cfleming@gphilipp I’ll try to reproduce that, IIRC nREPL just does a Thread.kill() so I’m unlikely to be able to do more than that.#2018-05-2512:23gphilippok thanks, in any case, the button color make it looks like it’s disabled although it’s not 😓#2018-05-2501:50danielcomptonYep I had JDK9 active as my SDK#2018-05-2502:49danielcomptonIt's a little bit better with JDK8 but still noticeable. It only shows up on the completion stuff that shows above the UI (parameters, suggested imports), the completion list below is fine#2018-05-2509:06cfleming@danielcompton What do you mean by “above the UI”?#2018-05-2919:30gravWhat defines whether a repl ends up being clj or cljs? If I start a figwheel-repl, it turns cljs on me, if I start a lumo repl, it stays clj until I change it in the dropdown myself#2018-05-2919:54wilkerlucio@grav I remember @thheller figure that out for shadow-cljs, but I don't remember what was it#2018-05-2919:54vuuviHi everyone, I’m having problems getting cursive to index some functions in other namespaces, in other directories under the source directory#2018-05-2919:54vuuvianyone ever had this problem?#2018-05-2920:24grav@wilkerlucio Thanks. You’re right, shadow-cljs does it as well#2018-05-2922:04danielcompton@cfleming the ones that are suggestions for Class imports#2018-05-2923:12hlshipJust saw this:
4:11 PM	Workspace is restored to how it was in the ‘CEMER-134-iro-product-availability' branch
... does this mean Cursive remembers project layout (and dependencies) on a per-branch basis? That would be great for me ... giant project, constantly switching branches.
#2018-05-3010:41danmWell Cursive calculates dependencies based on the contents of your project.clj doesn't it? So if you check out another branch and the contents of that is different, it'll refresh#2018-05-3010:41danmWhen I do that sort of thing it gives me a popup. "Leiningen project structure has changed, click here to refresh" or something#2018-05-3010:41danmSo if it's just a quick switch to check something and switch back I don't bother, but if I'm doing longer dev I do#2018-05-3010:43danmI do have a lot of different microservice project.cljs in a monorepo though, so it takes it a while to complete the refresh of all of them (it just blindly refreshes everything, rather than just the ones which have changed)#2018-05-3104:23cfleming@grav It’s pretty primitive, it just looks for known banner strings in the output. If you can paste here what a lumo REPL looks like at startup I’ll fix that. I need to do the same for shadow and probably planck too, as well as the new figwheel.#2018-05-3104:24cfleming@hlship @carr0t That’s an IntelliJ thing, and I think it refers mostly to the actual workspace, i.e. toolwindow layout, which files are open etc.#2018-05-3104:25cflemingI’m planning to move the lein support to some infrastructure that IntelliJ has for build tools, it didn’t exist at the time the lein stuff was started. I’m going to use it first for deps and then once I understand it get lein on it too.#2018-05-3106:18grav@cfleming
$ lumo
Lumo 1.8.0
ClojureScript 1.9.946
Node.js v9.2.0
 Docs: (doc function-name-here)
       (find-doc "part-of-name-here")
 Source: (source function-name-here)
 Exit: Control+D or :cljs/quit or exit

cljs.user=> 
#2018-05-3106:20grav@cfleming Ping me if you want me to test it 🙂#2018-05-3113:48mishawhat can I do to render datomic's tagged literals as resolved? I assume stubs are generated properly, because datomic's api functions are resolved#2018-05-3116:08ckarlsenI am using two dependencies that's causing an IndexNotReadyException every time I open a project. The guilty deps are org.clojure/data.xml "0.2.0-alpha5" and cc.qbits/spandex "0.6.0". This is an issue I've seen multiple times over the last months, but occasionally betweens intellij updates the error disappears (and sometimes i'm not working on any projects with these deps). However with 2018.2 EAP and latest cursive EAP I am able to reproduce it. Minimal project setup and stacktrace: https://gist.github.com/ckarlsen84/2aeeddb71e5a049a8048a7f9e1166def#2018-05-3120:44hlshipSeems like I'm constantly having to drag the tab for the REPL to where I want it. Keeps resetting every time I change branches.#2018-06-0100:42cfleming@misha Can you give me an example of what they look like?#2018-06-0100:43cfleming@ckarlsen I’ll look at that, thanks for the repro case.#2018-06-0100:43cfleming@hlship Hmm, I’m not sure - that’s probably an IntelliJ thing. I’m not sure why that would happen.#2018-06-0108:41misha@cfleming https://github.com/Datomic/day-of-datomic/blob/master/tutorial/data_functions.clj#L28-L31#2018-06-0108:42mishathe #db/fn or #db/id#2018-06-0108:51korny👋 hey folks - any discussions/plans around support for deps.edn in cursive? I found this: https://github.com/cursive-ide/cursive/issues/1910 but it mostly seems to talk about using deps.edn from lein or boot.#2018-06-0110:24cfleming@misha Thanks, I’ll take a look.#2018-06-0110:24cflemingHey @korny! Yes, I’m planning that soon, it’ll probably be the next major piece of functionality in Cursive.#2018-06-0115:53Andreas LiljeqvistNot an expert here, but from what I understand git deps isn't included in pom.xml#2018-06-0115:54Andreas LiljeqvistIs there any way to get Cursive aware of git deps when using deps.edn?#2018-06-0115:55Alex Miller (Clojure team)Maven has no concept or way to include git deps#2018-06-0115:56Alex Miller (Clojure team)such a thing could probably be written via a custom wagon (and given the vastness of the Maven ecosystem, someone probably has written something like it)#2018-06-0115:56Alex Miller (Clojure team)but I have no plans to go to those lengths#2018-06-0116:01Andreas LiljeqvistI am using pom.xml instead of project.clj for a project, but have no autocompletion for git deps.#2018-06-0116:02Andreas LiljeqvistSo I suppose it is a question for @cfleming if he is going to support some custom parsing for that use case?#2018-06-0116:03Andreas LiljeqvistOr use the constructed classpath or something...#2018-06-0116:13misha(how) can I turn off "namespeced maps prettyprinting" in cursive repl? I am talking about these:
#:db{:valueType :db.type/ref,
     :isComponent true,
     :cardinality :db.cardinality/one}
I want this instead:
{:db/valueType :db.type/ref
 :db/isComponent true
 :db/cardinality :db.cardinality/one}
#2018-06-0116:34Alex Miller (Clojure team)(set! *print-namespace-maps* false) might work#2018-06-0116:55mishathis does not work, at least when you set it via repl itself. No idea how to eval it prior cursive's nrepl launch#2018-06-0116:56Alex Miller (Clojure team)yeah, I just tried it as well - I suspect it’s due to nrepl’s bindings not being retained (or initially set) between evaluations#2018-06-0116:56Alex Miller (Clojure team)there is probably some way to work around that, but I don’t know what it is#2018-06-0116:57Alex Miller (Clojure team)https://github.com/cursive-ide/cursive/issues/1541#2018-06-0116:57Alex Miller (Clojure team)https://github.com/clojure-emacs/cider/issues/2280#2018-06-0116:57Alex Miller (Clojure team)various expressions of this#2018-06-0116:58misha Open 😞#2018-06-0117:00Alex Miller (Clojure team)https://stackoverflow.com/questions/46854715/turn-off-print-namespace-maps-in-repl#2018-06-0117:00Alex Miller (Clojure team)I think nrepl is the place to push on it#2018-06-0117:00Alex Miller (Clojure team)these are all downstream of that#2018-06-0116:35Alex Miller (Clojure team)although I’m not sure if nrepl binds that by default#2018-06-0116:37favilahas anyone else's intellj been hanging with 0% cpu since the latest cursive EAP?#2018-06-0116:37favilaI'm not sure I can correlate it with cursive, too many things changed#2018-06-0116:44favilaah ok I can reproduce it. If I control-b into clojure.spec.alpha, intellj hangs#2018-06-0116:44favilano cpu, can't close the window#2018-06-0119:09favilatracked this down, not cursive's fault#2018-06-0121:32cfleming@andreas862 I haven’t looked at deps support in enough detail to have started thinking about autocompletion. If you have suggestions about how you’d like it to work I’m all ears 🙂#2018-06-0121:33cfleming@misha @alexmiller Yeah, there’s no good way to configure that at the moment.#2018-06-0208:37Andreas Liljeqvist@cfleming Thanks for the response, no I don't have any suggestions atm#2018-06-0309:03cfleming@ckarlsen So that I don’t forget: https://github.com/cursive-ide/cursive/issues/1996#2018-06-0309:05cfleming@misha Also so I don’t forget: https://github.com/cursive-ide/cursive/issues/1997#2018-06-0310:16ckarlsen@cfleming thanks! I'll report directly to github next time if that's preferable#2018-06-0310:31cfleming@ckarlsen It’s fine to ask here if you’re not sure about something, but a reliable exception with repro case can generally go straight to the tracker, yeah.#2018-06-0420:09richiardiandreaDoes Cursive support clj-refactor's thread/unthread refactoring?#2018-06-0421:43snoe@richiardiandrea yup in the edit->structural editing sub menu (don't have it in front of me)#2018-06-0423:32cfleming@richiardiandrea I haven’t used clj-refactor’s one, but someone reported that Cursive’s was confusingly different - let me know if you need help.#2018-06-0502:22lloydsharkNot sure if its possible - but has anyone tried to use figwheel-main /rebel-readline repl from Cursive?#2018-06-0502:28cfleming@lloydshark The rebel readline part should be unnecessary using Cursive, since it already provides similar functionality. I haven’t actually tried to get a figwheel-main REPL up though.#2018-06-0609:51danmIf I delete a project.clj because it's obsolete, how do I tell Cursive to stop trying to find and read it when it refreshes projects?#2018-06-0611:36cfleming@carr0t In the lein toolwindow (View-&gt;Tool Windows-&gt;Leiningen), select the project.clj and remove it there. You’ll be prompted to remove the associated module if found.#2018-06-0611:50danmAce, ta 🙂#2018-06-0812:57claudiuany ideas why auto-formatting my code would break
#?(:clj [fulcro.client.dom-server :as dom])
turning it into
#?(:clj)    
[fulcro.client.dom-server :as dom]
?
#2018-06-0812:58claudiufor #?(:cljs everything seems ok#2018-06-0813:56rnagpalIn scala, Java, or Typescript Intellij will show the parameter name when the function is called#2018-06-0813:56rnagpalmight be good to have that feature#2018-06-0815:42Björn EbbinghausIs there any way to resolve macro generated symbols, which are not corresponding to existing patterns? I want to use something like this, but the warnings are driving me crazy.
(defaction my-action
  :contexts [a b]
  :parameters [c d]
  (do-something-with a b c d)
#2018-06-0815:58favilaare there any options for getting a tool window (terminal, run-command, etc) to support paredit?#2018-06-0815:59favilathe higher-level problem is I have a repl via a socket or pipe (stdin/out) but I want to use it from cursive with parediting#2018-06-0815:59favila(I am fine with not having any fancy code-aware features)#2018-06-0818:22spiedendoes focus fail to return to the editor after closing the REPL window for anyone else? i.e. with the “REPL” action bound to a key my cursor winds up nowhere when i use i to close the window. hitting escape works fine to return focus to the editor (but REPL window then stays open)#2018-06-1020:41favilaOmg yes I am getting this too. After using an action dialog (like double shift or control -a or anything like that) I’ll get a zombie focus where no cursor appears and it doesn’t seem to receive modifier key presses but some things (arrow keys) act like the cursor is still there#2018-06-1020:43favilaI think it is IntelliJ 2018.1. I’m on Ubuntu#2018-06-1020:45favilaThis is extremely annoying. I usually have to click the mouse somewhere #2018-06-1107:52cflemingHere are some related-looking issues: https://youtrack.jetbrains.com/issue/IDEA-192721 https://youtrack.jetbrains.com/issue/IDEA-181590#2018-06-1107:52cflemingThat first one cites comments in the 2018.1.4 release blog post, which said that downgrading to 2018.1.3 fixed the problem.#2018-06-1107:53cflemingMight be worth trying @U09R86PA4 @U0HM5MJ5V#2018-06-1107:58cflemingHere’s a similar bug saying that it’s fixed in the 2018.2 EAP: https://youtrack.jetbrains.com/issue/IDEA-181590#2018-06-1117:53spieden@U09R86PA4 @U0567Q30W issue is still there in 2018.2 EAP and 2018.1.3 for me on the mac. i’ve tried swapping in various other JDKs with 2018.1.4 as well with no luck#2018-06-1118:57cfleming@U0HM5MJ5V Ok, it might be worth filing a YouTrack issue then.#2018-06-1321:18cfleming@U0HM5MJ5V @U09R86PA4 Could this be your issue? https://youtrack.jetbrains.com/issue/IDEA-191839 It’s reported fixed in 2018.1.5, out now.#2018-06-1321:29spiedenhmm, i’m not getting the behavior described. e.g. when the focus is lost keyboard navigation doesn’t work#2018-06-1321:29spiedeni’ve had this type of issue before and it was eventually fixed by jetbrains i believe#2018-06-1321:29spieden.. so if cursive hasn’t had changes in a relevant area and not everyone is experiencing this shrug#2018-06-1321:30spiedenjust means i make my repl window smaller =)#2018-06-0818:22spiedeni’m only experiencing this in 2018.1/2EAP i think — seems like it may be a general intellij issue#2018-06-1020:21cfleming@claudiu That looks like https://github.com/cursive-ide/cursive/issues/1972, I’ll look at that today.#2018-06-1020:23cfleming@rnagpal Do you mean the inline parameter names in the actual editor?#2018-06-1020:23cfleming@mroerni Sorry, there’s really no good solution for that right now.#2018-06-1020:24cfleming@favila I don’t think there is. Would proper socket REPL support fix that for you?#2018-06-1020:24cfleming@spieden A few people have reported this, and yes I think it’s an IntelliJ issue - sounds like it might be new in 2018.1. Do you have the REPL window docked or floating?#2018-06-1117:43spieden@cfleming it’s docked#2018-06-1117:43spiedentrying 2018.1.3 now (i’m on mac)#2018-06-1117:53spiedenno dice#2018-06-1405:55miikkaHas anyone else experienced thing where the whole IDE gets stuck? No idea if it's IDEA issue or Cursive issue, but it has now happened a couple of times.#2018-06-1405:55miikkaThe beachball just keeps spinning (I'm on macOS) and I have to kill the IDE.#2018-06-1405:56miikkaThis is 2018.1.4 and Cursive 1.7.0-2018.1 although I think I upgraded recently and it maybe already happened once before that. It also has happened for a colleague.#2018-06-1405:56justinleeyea that’s happened to me a couple of times. infrequently, though#2018-06-1407:47cfleming@miikka Does it just lock up with no warning, or does performance degrade until it locks up?#2018-06-1407:55ikitommiI’m the colleague, just hanged, no warning 😞 started hanging few weeks back, upgraded to latest, still doing that, now ~once per day.#2018-06-1407:57cfleming@ikitommi Can you check for automatic thread dumps as described here: https://intellij-support.jetbrains.com/hc/en-us/articles/206544899?#2018-06-1407:57cflemingIf there are some recent ones, can you mail them to me on <mailto:/cdn-cgi/l/email-protection|/cdn-cgi/l/email-protection>?#2018-06-1407:58ikitommisure, I’ll send the next dump!#2018-06-1408:02cflemingCool - if it’s happened recently, you should have some there from recent hangs too.#2018-06-1408:06ikitommisent you the latest dump-logs.#2018-06-1408:09cflemingThanks, I’ll take a look tomorrow.#2018-06-1408:13cfleming@ikitommi @miikka At least in Tommi’s dumps, the problem is the multimarkdown plugin.#2018-06-1408:13cflemingIt’s using a JavaFX webview embedded in Swing, which is just asking for problems.#2018-06-1408:14cflemingIIRC you can tell it not to use JavaFX - if not the other markdown plugin by JetBrains definitely allows that.#2018-06-1408:15ikitommioh, thanks for debugging this!#2018-06-1408:16ikitommiI switched back to Jetbrains official one.#2018-06-1408:17ikitommiI’ll buy you a 🍺 at HEL 🙂#2018-06-1408:17cflemingIt’s a deal!#2018-06-1408:18cflemingI’ll be on most of a 12-hour jetlag so I may fall asleep, but I’ll try 🙂#2018-06-1408:25miikka@cfleming I don't even have the multimarkdown plugin installed, but I'll see if I have logs#2018-06-1408:31miikkasent you some dumps#2018-06-1507:21flowthingI have experienced the same thing, actually.#2018-06-1507:21flowthingI had a different Markdown plugin installed, I'll uninstall it and see whether that makes any difference.#2018-06-1511:24cfleming@flowthing Can you check for the automatic dumps from when it happened and send them to me if you have any?#2018-06-1512:04flowthingWill do if it happens again. Hasn't happened yet after disabling the Markdown extension.#2018-06-1800:21kennytiltonI cannot find it with the google, but there is an Emacs mouse command I had access to in one editor that was wonderful: move point somewhere, now right click an expression (a word, a fifty-line form) to have it copied to the point. Counter-intuitive until I got addicted. Control-right-click moved instead of copying. Does Cursive have that? If not…please?????! I can go for ten minutes using nothing else when refactoring.#2018-06-1800:39cfleming@hiskennyness I’m pretty sure Cursive doesn’t have that, but I’m also not sure I understand how it works. So you put the caret somewhere, then right click on some other form and it gets copied to where the caret is?#2018-06-1800:41kennytiltonAbsolutely. Weird, right? It is an incredible tool. I learned about it when JP Massar a long time Lisper joined our team and asked why our IDE of choice AllegroCL did not have it in their Emacs mode.#2018-06-1800:41cflemingThat is extremely weird.#2018-06-1800:42cflemingIf you want to copy a 50-line form, how do you reliably select it? Do you click on either the opening or closing paren?#2018-06-1800:42kennytiltonThe Franz team responded, “OMG Yes. We remember that!!” and implemented it in half a day.#2018-06-1800:42cflemingHa, no pressure 🙂#2018-06-1800:43kennytiltonClick on opening or closing parens. Pray “undo” has been implemented well. 🙂#2018-06-1800:43cflemingOne issue is that in IntelliJ right click is for context menus, but I’m sure there’s some modifer combo that is free.#2018-06-1800:43cflemingCmd-right click or something.#2018-06-1800:44kennytiltonI am not kidding, it is a gold mine. You know, I would have to remind my self. It might have been option click.#2018-06-1800:44cfleminghttps://www.emacswiki.org/emacs/MouseCopy#2018-06-1800:44cfleming?#2018-06-1800:44cflemingSounds like it might have been the alternative one they talk about?#2018-06-1800:45cfleminghttps://github.com/vsedach/mouse-copy#2018-06-1800:45cflemingThat talks about copying though, not pasting automatically.#2018-06-1800:45kennytiltonBingo, though Emacs has its own langauge, so I am not sure. Use it for a day and you will bug out at how often you end up reaching for it.#2018-06-1800:46kennytiltonYeah, you want it to paste automatically, perhaps as a move so the original gets tossed.#2018-06-1800:47kennytiltonI was LMAO when I saw the Franz team jumping up and down over JP’s suggestion.#2018-06-1800:49kennytiltonMaybe “There is an alternative mouse-copy minor mode that lets you copy or yank an s-exp under the mouse cursor to point by holding down a modifier key (C or C-M, respectively) and left-clicking. ” “s-exp under the mouse cursor” sounds better than some commands that talk about first selecting a region.#2018-06-1800:51kennytiltonIt is the ultimate in structural editing. Well, one ultimate. 🙂#2018-06-1800:53kennytiltonNote that it pulls this off without using the normal copy/cut buffer, so anything in there is undisturbed. That proves to be DWIM.#2018-06-1900:43danielcomptonI'm finding that my custom project indent settings aren't being saved anymore#2018-06-1900:43danielcomptonEven though I have the scheme set to Project, they don't seem to show up in the .idea/CodeStyleSettings.xml file#2018-06-1900:43danielcomptonThey used to, but it seems like something has changed?#2018-06-1900:47cfleming@danielcompton That’s an IntelliJ bug: https://groups.google.com/d/topic/cursive/bVUdp-I-ZYk/discussion#2018-06-1900:48danielcomptonAh, I'm a bit behind on my mailing lists 🙂#2018-06-1900:49cflemingWhich IntelliJ version are you on?#2018-06-1900:49cflemingIt may not have made it into 2018.1.5#2018-06-1900:51danielcomptonJust updated to 2018.1.2#2018-06-1900:51danielcomptonThat update seems to have changed indentation settings further as well 😞#2018-06-1900:51danielcomptonAh, my desktop is on 2018.1.5#2018-06-1900:51danielcomptonand that has the issue#2018-06-1900:53danielcomptonDoesn't seem to be fixed on 2018.1.5#2018-06-1900:53cflemingYeah, it is in their 2018.1 branch but I think it was too late for 2018.1.5#2018-06-1912:28lispyclouds@cfleming Does renaming of functions when requiring them work in Cursive?
(ns my.test
  (:require [korma.sql.fns :refer [pred-like] :rename {pred-like like}))
I am getting "like" cannot be resolved. I want to use the function as like not pred-like
#2018-06-1922:59cfleming@rahul080327 I thought so, but a few people have reported problems with this. I haven’t had time to look into it, I’ll try to do that soon.#2018-06-2001:17lispyclouds@cfleming thanks a lot! 😃#2018-06-2014:29gfrederickshow possible is it to customize cursive such that a particular keybinding sends a particular expression to the clojure repl? extra useful if it could include the current filename#2018-06-2014:36onetom@gfredericks you can create "REPL commands" and then those could be bound to shortcuts via the regular Keymap preference, IIRC#2018-06-2014:37gfredericksCool I'll check that out, thanks#2018-06-2014:38onetomMenu: Tools / REPL / Add new REPL command#2018-06-2014:40onetomyup, indeed if I create such a command it appears under Tools / REPL / Commands and hence you can find it in the Keymap preference too#2018-06-2014:49gfrederickslooks like it doesn't have a mechanism for communicating what file was focused at the time?#2018-06-2014:50gfredericksI'm curious how that relates to https://clojurians.slack.com/archives/C1B1BB2Q3/p1529500805000249#2018-06-2014:51gfredericksmaybe repl commands have a bunch of magical unquoteable locals?#2018-06-2014:52gfredericksthe cursive repl guide doesn't mention such a thing#2018-06-2019:49cfleming@gfredericks It’s not in the guide yet, but there is a list of new substitutions in the release email here: https://groups.google.com/d/topic/cursive/0GzV5h2C4ig/discussion#2018-06-2019:55gfredericks@cfleming peeeeeeeerfectamundo thanks#2018-06-2100:25danielcomptonIs there a way to make Cursive not fully open a file when you are just browsing files?#2018-06-2100:25danielcomptonIn VS Code, Atom, and Sublime (probably others too), clicking on a file doesn't fully open it, it opens it in a tab but with an italicised filename#2018-06-2100:26danielcomptonIf you edit the file then the file is 'fully opened'#2018-06-2100:26danielcomptonBut if you click on a different file, then that file is closed and replaced with the new file#2018-06-2100:26danielcomptonIt means that if you're scanning through a bunch of files, you don't end up with tons of editor tabs#2018-06-2100:28cfleming@danielcompton Not that I know of, no#2018-06-2100:28cflemingBut I don’t actually use tabs myself#2018-06-2100:30danielcomptonDo you just hide the tab bar?#2018-06-2100:33justinleeyea i miss that feature almost as much as Cmd-D#2018-06-2100:33danielcomptonWhat does Cmd-D do?#2018-06-2100:33justinleeit’s the multi-select feature of atom#2018-06-2100:34danielcomptonIntelliJ can do multi-select with the mouse?#2018-06-2100:34danielcomptonOr is that different#2018-06-2100:34danielcomptonOption + Click/drag#2018-06-2100:35justinleeif you do Cmd-F in intellij and then click on “Select All Occurences” that’s basically what it does, except that it is iterative. each time you hit Cmd-D in atom/sublime/vscode it selects one more instance#2018-06-2100:35danielcomptonah#2018-06-2100:35justinleeand it opens up multiple cursors#2018-06-2100:36justinleehitting it once selects the word under the current cursor. and it’s purely text based, so it can help you fix strings and whatnot.#2018-06-2101:30manutter51IntelliJ has "Edit->Find->Add Selection for Next Occurrence" (which I have mapped to ^G), works the same as Cmd-D in Sublime.#2018-06-2102:26justinleehot damn!! Thanks! who on earth named that command lol#2018-06-2100:37justinlee@cfleming slightly off-topic question: i somehow stumbled upon your talk about using parsers in macros and then i watched two other talks about the same topic instead of working. but now i’m curious: did this work go anywhere? i was looking around for libraries but couldn’t find any. it seems like such a great idea.#2018-06-2100:39cfleming@lee.justin.m Yeah, Cursive uses it internally#2018-06-2100:40cflemingI never got around to exposing the error marking in the editor, since it seemed after my talk like there might have been a solution coming in core. But I’m now planning once more to do that.#2018-06-2100:40cflemingI actually re-implemented the parser recently, it’s way faster and has some other nice features like the ability to mark multiple errors in a single form.#2018-06-2100:41justinleeI remember reading in one of the complain-o-ramas somewhere something like “all we wanted were better error messages in macros and instead we got spec”#2018-06-2100:41cflemingCertainly it was all I wanted.#2018-06-2100:42justinleecool. well I certainly wouldn’t expect you to necessarily be releasing something that is important for your livelihood, but I thought I would ask to see where all that went.#2018-06-2100:43cflemingI did open source part of it, but it wasn’t very useful since it was in an experimental stage, and I now consider that approach a failed experiment: https://github.com/cursive-ide/error-test#2018-06-2100:43cflemingThat was basically what I demoed in my talk.#2018-06-2100:44cflemingMy new parser uses regexps rather than PEGs, so the semantics match spec’s better. But I don’t use the derivative parsing technique that spec does, I use a VM approach similar to https://github.com/cgrand/seqexp
#2018-06-2100:45cflemingI based it on this article here: https://swtch.com/~rsc/regexp/regexp2.html#2018-06-2100:46justinleethat’s very interesting. i would have thought the PEG approach would have been much more robust#2018-06-2100:46cflemingInterestingly, it’s way faster than spec, 7-14x in the tests I did: https://gist.github.com/cursive-ide/d7e490bd875d575ff485518195aa1e19#2018-06-2100:47cfleming(which aren’t very comprehensive, just parsing some big ns forms)#2018-06-2100:47cflemingWell, Clojure forms are pretty simple.#2018-06-2100:48cflemingAnd since presumably macros will be developed using spec at some point, they’re likely to match those semantics well.#2018-06-2100:48cflemingThat whole series of Russ Cox articles are awesome, BTW - well worth your time.#2018-06-2100:50cflemingThe main blocker on actually integrating the new work is that I’m going to have to fix up all the extensions I have currently to make them robust to partial parses. Currently the parser either parses the whole form, or fails, so the extensions can rely on all the data being there when they get called. With partial parses that’s not true, so it will be an NPE city until I fix them up using generative testing.#2018-06-2100:51cflemingBut once that works, it will allow things like context-specific completions even when the form has errors, which will be awesome.#2018-06-2100:52justinleewell thanks. a lot to chew here.#2018-06-2100:53cflemingNo worries, let me know if you have more questions.#2018-06-2109:53danm@cfleming It's really handy in Cursive how some forms (e.g (testing "...." don't follow the normal pattern of indenting args at the same level, so the actual test itself is only indented 2 chars instead of in line with the description string. Is that extensible in any way?#2018-06-2109:55danmWe've written a (with-mocks [......] (do stuff macro and at the moment Cursive auto-indents it as
(with-mocks [...
             ...]
            (do stuff))
whereas we'd prefer it to be treated like defn or whatever and be
(with-mocks [...
             ...]
  (do stuff))
#2018-06-2110:27cfleming@carr0t Check out the doc here: https://cursive-ide.com/userguide/formatting.html#customisation. You can achieve the effect you want by configuring the indentation setting to 1.#2018-06-2110:28cflemingIt’s not explained in the doc (I need to do that) but 1 is the number of forms which are considered special and aligned (usually parameters) before the body forms start, which are just indented two spaces#2018-06-2110:28cflemingIn your case, the vector is the parameter, and the (do stuff) part is where the body starts.#2018-06-2110:31cflemingIt’s also not shown in the doc since it went in fairly recently, but if you want to share that customisation with all your team members, you can go to Settings-&gt;Editor-&gt;Code Style-&gt;Clojure, and set the Scheme to “Project”. That will mean that your indentation customisations will be stored in the project files and can be checked in and shared.#2018-06-2110:37danmCool, ta#2018-06-2216:20danm@cfleming So that was really helpful, ta. I now have a related question that may well be much more awkward 😉#2018-06-2216:22danmSometimes I have a cond in a loop/recur, where the conditional or the action is quite long. So ideally I want to split the two across separate lines. E.g.
(cond
  (conditional-1-which-is-very-long)
    (action-1-which-is-also-very-long)
  (conditional-2)
    (action-2))
#2018-06-2216:24danmSo the extra indentation instead of having conditional and action at the same level is to help indicate that they are effectively paired, even though the action doesn't sit within the conditional#2018-06-2216:24danmIs there a way to do that with Cursive? "No, that would be insane to write" is a perfectly valid answer 😉#2018-06-2219:56cfleming@carr0t Haha, no, it’s definitely not insane to write, and I have considered implementing just that. I haven’t yet, though.#2018-06-2319:05kennytiltonCan we add commands to the Cursive editor?
`(defun mouse-insert-sexp-at-point (start-event)
  "Insert the sexp under the mouse cursor at point.
This command  must be bound to a mouse event."
  (interactive "*e")
  (let ((posn (event-start start-event)))
    (let ((sexp-at-mouse-pos
           (with-selected-window (posn-window posn)
             (save-excursion
               (goto-char (posn-point posn))
               (thing-at-point 'sexp)))))
      (if sexp-at-mouse-pos
          (insert sexp-at-mouse-pos)
        (error "Mouse not at a sexp")))))
`
#2018-06-2319:07kennytiltonA conversation on ProLisp broke out about long lost commands. If anyone is curious, copy some clojure into the free AllegroCL for Windows and give it a whirl. I think the commands are there by default. If not ping me and I will figure it out.#2018-06-2320:38kennytiltonHere is what looks like the best source: https://github.com/vsedach/mouse-copy/blob/master/mouse-copy.el#2018-06-2320:38kennytiltonUntested by myself.#2018-06-2401:18wilkerlucio@carr0t what I do is add a line separator between each group, makes then pretty easy to associate IMO:
(cond
  (conditional-1-which-is-very-long)
  (action-1-which-is-also-very-long)

  (conditional-2)
  (action-2))
#2018-06-2418:07manutter51I just upgraded to IntelliJ IDEA 2018.1.5, and now I can't seem to run anything without bumping into some weird error that includes a message about "Too many open files in system). Anybody else seeing that?#2018-06-2419:06manutter51Hmm, seems to have gone away after restarting my laptop. :thinking_face:#2018-06-2501:46caleb.macdonaldblackI’m using cursive and intellij keeps telling me to require a namespace. Every time I do, it adds it then tells me to import again. The namespace alias (eg. [foo.bar :as alias]) is the same as another library that I recently removed. Intellij/cursive still remembers this old library even though I removed it. Cursive also remembers all other requires. I can delete all my requires/imports and cursive does not show issues in my code. If I add something I’ve never imported before I do get errors. I’ve tried invalidating cache and restarting#2018-06-2507:19cfleming@caleb.macdonaldblack That’s really weird, especially that invalidating the caches doesn’t fix it. Invalidating blows all the indexes away and there should be nothing left.#2018-06-2507:21caleb.macdonaldblackYea it recently started acting up like this. I will trying reinstalling cursive and if that doesnt work intellij too. Just wanted to make sure there wasnt something i was missing first. Thanks#2018-06-2507:21cfleming@caleb.macdonaldblack Before you do that, could you send a screenshot of what you’re seeing?#2018-06-2507:21caleb.macdonaldblackOkay#2018-06-2507:21cflemingYou could DM it or mail it if it’s sensitive code.#2018-06-2507:22caleb.macdonaldblackOkay thanks i will do it now#2018-06-2507:28caleb.macdonaldblack@cfleming https://gyazo.com/12fa1af86024ce610835d04286ee4b4c Here I can remove all the imports and I only receive errors for stuff added after the problem started happending#2018-06-2507:29caleb.macdonaldblackHere I am constantly receiving a warning to import https://gyazo.com/86cb94e022f505f98e4f9ca25d061b4e#2018-06-2507:29caleb.macdonaldblackAnd here it remembers the library I removed and I have nothing imported as firebase https://gyazo.com/2588b334f2e8810f5aa7b68fbf375ba5#2018-06-2507:30cflemingIn the firebase namespace, how is initialize-app defined?#2018-06-2507:31caleb.macdonaldblackA function#2018-06-2507:31cflemingOk, I think I see the problem. The issue is that you already have firebase required using fb#2018-06-2507:32cflemingSo what the intention should do there is just change the alias.#2018-06-2507:32caleb.macdonaldblackThats how I’ve got it working so I dont constantly have that warning#2018-06-2507:32caleb.macdonaldblackIf i remove that I still have the issue#2018-06-2507:33caleb.macdonaldblackhttps://gyazo.com/ccdddf20228513bdbcf91776af6eb091#2018-06-2507:34caleb.macdonaldblackThat firebase library its remembering is not listed in any dependencies or project.clj#2018-06-2507:34caleb.macdonaldblackI used to have it but I removed it#2018-06-2507:34cflemingWhat’s weird there is that when you type firebase/ini| it doesn’t autocomplete initialize-app#2018-06-2507:34caleb.macdonaldblackYea init was a function used in the library I removed#2018-06-2507:35caleb.macdonaldblackAnd it autocompletes even though I have nothing required as firebase#2018-06-2507:35cflemingSo if you invalidate the indexes and you’re still getting that, there must be some code somewhere in your project still with that alias defined.#2018-06-2507:35caleb.macdonaldblackThe issue is only in namespaces that had firebase imported too#2018-06-2507:35cflemingInvalidating the indexes blows everything away AFAIK (that’s at the IntelliJ level, but I’m pretty sure)#2018-06-2507:37cflemingDo you have two files defining medial-web.core by any chance?#2018-06-2507:38cflemingIf you do a Navigate->Namespace… and enter medial-web.core does IntelliJ find another one, perhaps in an output directory or something?#2018-06-2507:38caleb.macdonaldblackYea I do actually. I am building cljs to a directory not marked as Excluded.#2018-06-2507:38caleb.macdonaldblackI removed that directory and it works now#2018-06-2507:39caleb.macdonaldblackThat makes sense too. Thank you for your help!#2018-06-2507:43cflemingPhew!#2018-06-2507:43cflemingI was getting worried 🙂#2018-06-2622:07sparkofreasonI'm trying to get a locally hacked version of lein-tools-deps working with cursive. Getting the following output in the event log. Is there a way to get more info, e.g. a stack trace assuming this came from an underlying exception? 2:57 PM Error reading C:\Users\dave\Projects\Compute\command-processor\project.clj /cdn-cgi/l/email-protection:ComputeSoftware/squuid.git: Auth fail /cdn-cgi/l/email-protection:ComputeSoftware/squuid.git: Auth fail Auth fail#2018-06-2622:14cfleming@dave.dixon Is there anything more in your log? Help-&gt;Show log in Finder/Explorer?#2018-06-2720:17spiedenhas anyone else experienced exceptions at the REPL spitting out this entire namespace in red?
CompilerException java.lang.RuntimeException: Unable to resolve symbol: type-name in this context, compiling:((ns cursive.repl.runtime
  (:import [java.lang.reflect Method Field Constructor]
           (clojure.lang Var))
...
 
#2018-06-2720:17spiedenthe exception came from compiling code i typed in#2018-06-2801:23cfleming@spieden No, I haven’t. Does the same happen in a standard lein repl?#2018-06-2816:36spieden@cfleming i PMed you a screen recording#2018-06-2816:39spiedeni had one injection that i tried disabling just in case with no effect#2018-06-2816:41spiedeni’m using lein 2.8.1, 2018.2 EAP (this has been happening for a while though), and 1.7.0-2018.2#2018-06-2904:01arlicleI use clojurescript + boot-cljs+cursive , I can't create a repl, the Context module show <unkown>, and get a error: Run Configuration Error: No modules containning clojure.main found. So how I can do now ?#2018-06-2906:46cfleming@arlicle How are you creating your project in IntelliJ? Using lein and boot-lein-generate?#2018-06-2906:47cflemingThat error normally means that you don’t have Clojure attached to your project.#2018-06-2906:48arlicleI have create it, I can run repl, but I can't connect to boot repl run in my terminal#2018-06-2906:51cflemingThat’s why I’m asking how you create your project - that error message normally means that you don’t have Clojure attached to your project anywhere.#2018-06-2907:17cfleming@arlicle Have you seen this? This is the recommended approach: https://github.com/boot-clj/boot/wiki/For-Cursive-Users#2018-06-2907:18cflemingBasically, you generate a project.clj from your boot file, and then import that into Cursive so it will set up your dependencies correctly.#2018-06-2907:33arlicleI have read it, my profile.clj is from boot-lein-generate#2018-06-2909:46cfleming@arlicle So you have generated a project.clj and then imported it into Cursive? If you open the Leiningen tool window (View-&gt;Tool Windows-&gt;Leiningen), do you see your project registered there? If not, does right-clicking it in the project toolwindow and selecting “Add as Leiningen project” help?#2018-06-2910:39arlicleand I can't add#2018-06-2910:43cflemingWhat do you mean you can’t add? Do you get an error?#2018-06-2910:48arlicleI restart intelj, and it ok now#2018-06-2910:49arliclethank you very much @cfleming#2018-06-2910:51arlicleI can connect to the remote repl now , but still have error : java.lang.ClassNotFoundException: cljs.analyzer clojure.lang.Compiler$CompilerException: java.lang.ClassNotFoundException: cljs.analyzer, compiling:(reagent/debug.clj:49:12)#2018-06-2911:22arlicleI fixed it by this way https://www.davidtanzer.net/david's%20blog/2015/08/22/clojure-compilerexception-java-lang-exception-nothing-specified-to-load-compiling-file-name.html#2018-06-2911:26arliclechange `(ns naotu.core (:require [reagent.core :as reagent] [ajax.core :refer [GET POST]] [cljs-uuid-utils.core :as uuid] ))` to `(ns naotu.core #?(:cljs (:require [reagent.core :as reagent] [ajax.core :refer [GET POST]] [cljs-uuid-utils.core :as uuid] )))`#2018-06-2911:42arlicle@cfleming thank you very much 👍#2018-06-2915:13kennyJust ran into an issue where Cursive throws an exception if I right click on a project.clj and click "Add as leiningen project" and a project with that name already exists. Cursive will add the most recent one and throw an exception. I would've expected some warning message that I already have a project with that name in my projects list.#2018-06-2920:27kennyHow are you planning on identifying the name of a tools-deps project @cfleming?#2018-06-2922:02cfleming@kenny Right now it’s the name of the containing directory.#2018-06-2922:03kennyThat's how I ran into the above exception. I suppose you'll have to handle that more elegantly? 🙂#2018-06-2922:03cflemingThere really isn’t a good solution for that unfortunately - that’s the best I could come up with.#2018-06-2922:04cflemingI hope so, but unfortunately deps doesn’t make that easy.#2018-06-2922:04cflemingAlex is going to write about some discussions they’ve had around this, but he’s been busy.#2018-06-2922:05cflemingSuggestions are welcome 🙂#2018-06-2922:05kennyOh cool. Just to spitball, perhaps if the project has Git enabled you could use part of the Git URI.#2018-06-2922:06cflemingPossibly - the problem is knowing which part to use, and also that the results will be different if you check the project out without git.#2018-06-2922:06cflemingI could also use more of the full project path, but again knowing how much to use is difficult.#2018-06-2922:06cflemingBasically I have to come up with a reproducible name using only the deps file.#2018-06-2922:07cflemingI could also allow a :cursive/name key in deps.edn, but Alex didn’t like that idea.#2018-06-2922:08kennyTBH I don't care what IntelliJ/Cursive names the project. I navigate everything based on directory. So maybe you could name each project based on the full path and give it a "nickname" based on the parent dir.#2018-06-2922:08kennyThe nickname is only there so as to not pollute the project panel with absolute paths.#2018-06-2922:09cflemingIn IntelliJ modules have to have a single name. I’m not sure they allow slashes.#2018-06-2922:10cflemingOne possibility is to use module groups for intermediate directories. There’s still lots of potential edge cases though, such as modules outside the project base dir (which you know someone is going to do sooner or later)#2018-06-2922:12kennyHow about name of the parent directory and if two modules have the same parent, include the parent's parent in the name. Apply recursively until unique.#2018-06-2922:13cflemingThe problem is that due to the way that the IntelliJ external system integration works, I can’t look at information from other modules when determining the name.#2018-06-2922:14kennyWell that makes things tricky... 😬#2018-06-2922:16cflemingThis is a higher-level API than the one I used for Leiningen. It makes lots of things easier, but some things harder. I’m still not sure it’s a good trade-off.#2018-06-2922:16cflemingBut it automatically handles lots of edge cases like the one you found above.#2018-06-2922:16kennyCan you force the user to provide a name?#2018-06-2922:17cflemingI’m still waiting for feedback from JetBrains, perhaps I’m missing something.#2018-06-2922:17cflemingOn every resolve, maybe 🙂#2018-06-2922:17cflemingBut no-one wants that.#2018-06-2922:17cflemingI could force the user to supply a name and then write it to an auxiliary file, but… yuk.#2018-06-2922:17cflemingI just wish tools.deps wasn’t so allergic to naming things.#2018-06-2922:19kennyAre you able to detect if a module with a particular name exists when adding a new module?#2018-06-2922:20cflemingI don’t think so, no, but then I’m not sure what happens - I haven’t tested this much yet.#2018-06-2922:25cflemingNeeds more investigation, and hopefully also feedback from JetBrains.#2018-06-2922:27cflemingI may just end up using the lower level API I used for lein, which is more work but more flexible. The lein integration is mostly pretty solid these days after several years of bugfixes, so I should be able to just copy that.#2018-07-0316:00gfredericksI'm trying to wire up intellij/cursive such that I can have a custom clojure function reformat the code in a file with a single keybinding I'm running into a variety of small problems, and might be stuck#2018-07-0316:00gfredericksI successfully used repl commands to get a clojure function to be called with the current filename as an arg, so I can successfully get the file on disk to be reformatted with a single keystroke#2018-07-0316:01gfredericksthe repl command also has an option to make sure the file is synchronized before making the call, so that's good#2018-07-0316:01gfrederickshowever intellij doesn't reload the file immediately; it'll do it if you focus off and back on to the frame, or if you explicitly call synchronize#2018-07-0316:02gfredericksso I looked into intellij macros, and successfully got a macro that first calls the repl command and then calls synchronize, but now the problem is that apparently the repl command is async and so the synchronization happens before the repl's gotten the chance to rewrite the file#2018-07-0316:03gfredericksI don't know of a way to ask a macro to sleep (which would be hacky and racey anyhow), and I doubt that repl commands should support synchronous things does anybody know of a way to get frames to reload automatically even when focused, as long as they have no pending changes?#2018-07-0316:50tony.kayHm. I’m running a deftest via nREPL from the keyboard shortcut. The test is failing with a clojure spec failure, and IntelliJ hangs. Ideas?#2018-07-0316:52tony.kayAh…looks like it hangs at command line too. Must be a bug in my specs or in spce itself. Not a cursive issue. Might be nice if Cursive could somehow keep such hangs from making a IDE restart necessary.#2018-07-0322:04cfleming@gfredericks Hmm, no, I don’t. External Tools (https://www.jetbrains.com/help/idea/settings-tools-external-tools.html) might be a better solution for this. You’ll be spinning up a new process to format each time, but IIRC there was a GraalVM image of cljfmt kicking around recently which started up pretty fast.#2018-07-0322:04cflemingWhat’s the reformatting tool you’re using?#2018-07-0322:05gfrederickscljfmt and how-to-ns mostly#2018-07-0322:05cflemingHaving the REPL commands sync the files when done is not a bad addition, though, although the macro still wouldn’t wait for it.#2018-07-0322:06gfredericksNo need for a macro at that point, right?#2018-07-0322:06cflemingIf you’re using External Tools, you mean?#2018-07-0322:06cflemingAh, I see#2018-07-0322:07cflemingNo, you’re right, you wouldn’t.#2018-07-0322:07cflemingLet me take a look at that.#2018-07-0322:07gfredericksOh boy oh boy oh boy#2018-07-0322:21cfleming@gfredericks Ok, it’s slightly tricky but I think I’ll be able to do that as part of some REPL refactoring I’m planning shortly to support deps. I’ve filed this to track it: https://github.com/cursive-ide/cursive/issues/2006#2018-07-0322:27cfleming@tony.kay If you have a small repro case of that (i.e. a small case which causes the hang in and out of IntelliJ) then I can have a go at fixing it - I’m not sure what would cause IntelliJ to hang there.#2018-07-0322:31gfredericks@cfleming great, thanks!#2018-07-0406:25vemvIs there a workaround for https://github.com/cursive-ide/cursive/issues/1983 ? i.e. some way for Cursive users to create a custom 'macro' which inserts ;; when hitting the semicolon key#2018-07-0408:50cfleming@vemv I don’t think so, no. I’ll take a look at fixing that shortly.#2018-07-0410:01vemvace, thank you! yeah it can be a source of pain within a team#2018-07-0417:41souenzzohey @cfleming I'm doing a "dom" library like om.dom. There is some pattern/metadata that I introduce and allow cursive to generate stubs?#2018-07-0418:31wilkerlucio@souenzzo fulcro itself does it by using declare statement on the start of file https://github.com/fulcrologic/fulcro/blob/develop/src/main/fulcro/client/dom.cljs#L14-L20#2018-07-0420:17souenzzocan I (def x '[a b c]) (apply declare a b c) or something like it?#2018-07-0420:56cfleming@souenzzo No, I’m afraid Cursive won’t understand that.#2018-07-0420:57cflemingThere isn’t a way to trigger the stub generation for custom namespaces yet, but I’m planning to add it shortly.#2018-07-0510:46p-himikIs it possible to show a function parameters info (`ctrl+p`) for functions used in vectors? Like [table row1 row2 ...]. Would be incredibly useful for Reagent and the like. Another thing - many libraries appear to define a bunch of functions in some namespaces and then write (def some-fn some-ns/some-fn) in core.clj[s]. Cursive doesn't show function parameters info when some-lib.core/some-fn is used in this case.#2018-07-0515:22adamHi. How can I load profiles.clj into CURSIVE REPL? My profiles.clj file starts with: {:dev {:env {:env-name. I need to load it in CURSIVE REPL in order for me to be able to use (:env-name env) in my REPL testing. My ns declaration include: (:require [environ.core :refer [env]]#2018-07-0515:42manutter51Hi @somedude314 I saw you posted this in #beginners first, so I assume you’re just getting started with this?#2018-07-0515:43adam@manutter51 yes but working on a pretty complex system in Clojure already!#2018-07-0515:45manutter51You shouldn’t need to load profiles.clj into your REPL for this. If you’re requiring [environ.core :refer [env]] then (:env-name env) should work for you (if other stuff is set up correctly)#2018-07-0515:46manutter51but there’s a trick to using environ, hang on while I refresh my memory#2018-07-0515:47manutter51Heh, plus I always confuse profiles.clj with project.clj, which doesn’t help 😉#2018-07-0515:47manutter51Anyway, in your project.clj file, do you have the lein-environ plugin added?#2018-07-0515:47manutter51or boot-environ if you’re using boot?#2018-07-0515:48manutter51Actually, I’m remembering a Cursive-specific trick that can come in handy#2018-07-0515:51manutter51Yeah, there it is: In your Run/Debug Configurations window, click the REPL you want to configure, then look at the Environment field in the “Common Options” section. You can click the “…” button and add “environment variables” that environ can read. So you can set up :env-name or whatever, and when you start your repl, you can grab it from env#2018-07-0515:51manutter51I like to use it for things like db credentials, so I don’t have to mess with profiles.clj and keeping all that stuff straight.#2018-07-0516:02adam@manutter51 thanks for the pointers. I will try adding it via the configs and if that doesn't work I will try lein-environ.#2018-07-0521:34amannHas anyone played around with HugSQL before? https://github.com/layerware/hugsql It has a form where you do (def-db-fns "queries.hug.sql"). queries.hug.sql is a separate file on the filepath. The def-db-fns generates a tonne of functions and dumps them in the current ns. My question is whether folks have a workaround to get cursive to recognize/generate those stubs/fns on its own, or if a smattering of (declare my-db-fn-x) etc. is the best path forward#2018-07-0608:45eskosThere's a detail about Cursive I've been meaning to ask as it pops out out every now and then in discussion within my peers; Does Cursive use IntelliJ's parser/AST tooling for analyzing Clojure code? In these discussions I've had it is usually painted as something Cursive wouldn't actually do which in turns is the cause why most IntelliJ refactorings are not available, at least not in their familiar places.#2018-07-0608:46eskosTo be more specific, in one of these discussions the two refactorings were "extract function" and "eliminate duplicates" (it's actually a code analysis tool) and then the discussion sort of went on tangent about how things even work... 🙂 Just asking for clarification, that's all.#2018-07-0608:48eskosAlso I don't mean to imply these wouldn't be available, discussions just sometimes tend to be...curious. Sort of technical shower thoughts.#2018-07-0608:53cflemingNo problem! Shower thoughts are always welcome.#2018-07-0608:54cflemingSo IntelliJ doesn’t actually provide much for that, since every language is so different. It provides tools to build those things, and base classes for the AST etc, but each language needs its own lexer/parser.#2018-07-0608:56cflemingCursive’s is more or less like a reader, so you get back basically a set of forms, but not decorated for things like defn or whatever, that’s added on later.#2018-07-0608:56cflemingThe absence of those refactorings is just because I’ve been busy with other things, no fundamental limitation. Extract/inline binding is there, for example.#2018-07-0608:57cflemingExtract method will be the next I’ll add.#2018-07-0608:57cflemingAnd then various ones for moving things around. They’re harder because they require rewriting ns forms, which is surprisingly hard to do reliably with cljc.#2018-07-0608:59cfleming@amann That’s a classic use case for the stubs functionality. It’s not exposed yet to end users, i.e. you can’t yet say “Do that for this and that ns” but that will happen.#2018-07-0722:00amannCool. Can you have it load an external file, run some clj, and then 💸 ? Also, if you’re looking for beta testers/folks to improve that, I know of a CI/CD company that would… ❤️ this feature very much! ie, CircleCI would be so happy to have HugSQL #justwork#2018-07-0810:22cflemingThe one issue with the stubs for this is that there will be no easy way to detect when they need to be updated - that will have to be a manual refresh.#2018-07-0810:22cflemingi.e. you update your SQL and you’ll have to refresh in Cursive to see the changes.#2018-07-0922:45amannyeah, I mean, that’s better than nothing though, right?#2018-07-1008:51cflemingIt’s certainly better than a poke in the eye with a sharp stick 🙂#2018-07-1017:23amann:slowclap:#2018-07-0609:07p-himik@cfleming Hello. Could you please take a look at my message from yesterday? Thanks!#2018-07-0609:08cfleming@p-himik Oh yes, my apologies. There’s no support for vector functions at the moment, although I agree it would be useful. I’ll have to take a look and see if I can do that - the issue is reliably identifying that that’s what you’re doing (you might just have a vector with some functions in it, for example).#2018-07-0609:09cflemingThere’s an issue for your second question - I should be able to fix that.#2018-07-0609:09p-himikGreat, thanks!#2018-07-0616:25kennytiltonI cannot make out how to tell Cursive that, when calling a function with multiple parameters and breaking lines between them, that the parameters on following lines should align with the param on the line with the function name.#2018-07-0616:26kennytiltonNot that I like that, but I got beat up in a code review for insufficient indentation. 🙂#2018-07-0616:29kennytiltonI looked at the Clojure preferences and (a) saw no examples with a function with params continued to the next line and (b) could not make out how to use the “Intentions” panel to change anything, or if that is its purpose.#2018-07-0616:39p-himik@hiskennyness Like this?#2018-07-0616:39p-himikLet me know if you see the image - I got a warning from Slack about storage space.#2018-07-0616:39kennytiltonYep!#2018-07-0616:40kennytiltonGot it fine.#2018-07-0616:40p-himikThat's what I see with my settings. I'll try to see if I can export them somehow. Note that I do not remember whether I have changed something at some point in time.#2018-07-0616:41kennytiltonOK, thx.#2018-07-0616:46p-himikDoes this work for you?#2018-07-0617:31kennytiltonThx! Gotta run, will try later and let you know.#2018-07-0620:01cfleming@hiskennyness Settings-&gt;Editor-&gt;Code Style-&gt;Clojure-&gt;General, uncheck “Default to Only Indent”#2018-07-0701:26kennytiltonThanks, that seems to have done it. Thanks for all your trouble, too, @p-himik!#2018-07-0700:20justinleeminor feature request: when defing something in the repl, it gets added to autocomplete. right now when i def something short for experimentation (like (def x ...) it is super annoying to type it in again because x will always autocomplete to something else#2018-07-0700:20justinlee(minor in terms of importance)#2018-07-0700:24justinleeor maybe: is there a way to change the “select” key on auto completion? in atom you could set it so that you had to hit “tab” rather than enter. that way if you know what you want to type the code completion doesn’t get in the way#2018-07-0700:25justinleeit isn’t obvious to me how to change that#2018-07-0707:16cfleming@lee.justin.m I don’t think you can change that. In fact, in IntelliJ you can use either, but the semantics are different. Enter will just insert the completion, whereas tab will overwrite the current symbol you’re editing with the completion.#2018-07-0707:18cflemingSo if you’re modifying a symbol, like: my|-long-symbol where the caret is at |, then if you have select a completion of “my-new-symbol” with enter, you’ll end up with my-new-symbol|-long-symbol, whereas if you use tab you’ll get my-new-symbol|#2018-07-0711:15austinbirchDoes anybody know if there is a way to prevent Structural Editing -> Kill copying the killed sexp to the clipboard?#2018-07-0711:38austinbirchActually, I think it’s a more generic question than that. Realised that other structural editing commands are also copying to the clipboard. I often find myself cutting something I want to keep, restructuring the code using structural editing, and then when I paste I’ll get something from the structural editing rather than the original cut. Is there a way to disable using the clipboard for all of the structural editing commands?#2018-07-0713:14bherrmannas a workaround, you might look into a clipboard manager.... they can usually save a history of clipboard changes.... odd that intelij doesnt have one builtin... perhaps they decided that was better to be an OS thing#2018-07-0713:20p-himikActually IDEA does have a clipboard manager - it's called "History" and can be used via "Edit -> Paste From History..."#2018-07-0713:37bherrmannYea, I use that a lot#2018-07-0713:49p-himikWhy do you then say that it doesn't have this option? Or is clipboard manager something entirely different?#2018-07-0800:33bherrmannoh, I mis read what you said. I right click and use "Local History" / "Show History" to show a history of changes to a file.. Which is a poor man's cut/paste history....#2018-07-0800:34bherrmannGood to be aware of "Edit / Paste from History"#2018-07-0810:24cflemingRight, you could paste from history to skip the history entries that have appeared from structural editing. But you’re not the first person to ask for that option, either.#2018-07-0908:36austinbirchThanks very much @U0502D2GL /@U2FRKM4TW, that workaround should be okay. Will just have to learn some new habits! @U0567Q30W Still registering interest in disabling the clipboard for structural editing commands though.#2018-07-1015:35dfcarpenterWhat might cause the clj folder under src to disappear? I have a project that should have both a clj and cljs folder ( created from the re-frame template ) and in cursive the clj folder doesn't show up. The src/clj folder shows up in OSX Finder.#2018-07-1017:11wilkerlucio@dfcarpenter not sure if it's your case, but things can go weird if you have a source path inside another source path (eg: :source-paths ["src" "src/clj"]), you can check if have something like this#2018-07-1017:12dfcarpenterI had added a scripts folder to try out devcards such that I had [src/clj, src/cljs, and scripts]`#2018-07-1017:12dfcarpenterBut thats all I can think of#2018-07-1017:27wilkerlucioin this case I dunno =/#2018-07-1115:53onetomI remember some tool was even explicitly complaining about nested :source-paths, so that's definitely an invalid setup#2018-07-1119:54cfleming@dfcarpenter How did you add those paths, under :source-paths?#2018-07-1200:15csmSo I’m getting an error “Unable to apply parinfer to handler_test.clj due to inconsistent indentation” on every keystroke. Is there an easy way to find where the error is? The IDE isn’t all that usable while this is happening.#2018-07-1200:28cfleming@csm You should see a red bar in the left-hand side of your editor somewhere marking the indentation that isn’t consistent with parinfer.#2018-07-1200:31cfleming@csm like this ^^#2018-07-1200:35csmYeah, I could find it that way, but I was working with a file with >7k lines (all unit tests, fwiw)#2018-07-1200:38cfleming@csm F2 (jump to next error) should find them.#2018-07-1200:39cfleming(sorry, I should have answered your first question with that)#2018-07-1207:33andrzejsliwa@csm just run "Reformate Code", this will fix the indentation in whole file#2018-07-1217:27tony.kaySo, “Find Implementations” used to work for protocols I seem to remember, but it doesn’t seem to work anymore…am I mis-remembering, or regression?#2018-07-1300:05caleb.macdonaldblackIs there any way to avoid intellij slowing right down when there is a mismatched quote or bracket?#2018-07-1303:44cfleming@tony.kay Actually sadly that never worked, it definitely should though.#2018-07-1303:44cfleming@caleb.macdonaldblack Is that using parinfer?#2018-07-1303:45caleb.macdonaldblackYea#2018-07-1314:18tony.kayYeah, it would be nice if find implementation also worked on multimethods…#2018-07-1509:27cfleming@tony.kay Yeah, indeed it should. Fortunately find usages works pretty well for that, since every implementation is also a usage.#2018-07-1608:322foodHey guys. I'm getting an error with Cursive when using lein-tools-deps. "Error reading /.../project.clj: Unable to locate Clojure's edn files". The project runs nicely with lein, but Cursive can't do anything. Any ideas?#2018-07-1608:37cfleming@tormathi That sounds to me like it can’t find the clojure command. I’m not that familiar with the plugin, but IIRC you can configure the path to the command somehow?#2018-07-1609:182foodTried specifying the path to clojure executable (/usr/local/bin/clojure) to no avail...#2018-07-1612:16p-himikI'm not familiar with the plugin, but I'm just curious - how and where do you specify this path?#2018-07-1609:412foodReinstalling intellij and cursive fixes it. However, I did that a few days ago to fix the same error and it worked but the error resurfaced today. :face_with_rolling_eyes:#2018-07-1609:45cflemingYeah, reinstalling should never be necessary#2018-07-1612:06mfikes@tormathi I've been using that plugin for quite a while without that ever happening. I would be interesting to see if it recurs.#2018-07-1612:092foodI work with others on the same project that have not experienced this issue either. I work on Linux though and they don't, maybe it has something to do with that.#2018-07-1614:24Yehonathan SharvitHi there, I am new to Cursive. I am struggling to configure cursive on a clojure project#2018-07-1614:28Yehonathan SharvitI created a REPL configuration. I am able to launch it. But I don't get any prompt. I see this error:
Error loading complete.core: Could not locate complete/core__init.class or complete/core.clj on classpath.
#2018-07-1614:37Yehonathan SharvitI solved it by adding to my dependencies: org.clojure/tools.nrepl #2018-07-1614:38Yehonathan SharvitNow I have a strange issue: I am able to send expressions to evaluation from the editor. But I cannot enter any expression in the REPL#2018-07-1614:38Yehonathan SharvitI don't have a prompt#2018-07-1615:13Yehonathan SharvitI found it. I amin darcula theme. The boundaries of the input window below the REPL window are really hard to see#2018-07-1615:26manutter51Who can fix typos on the Conj CFP form?#2018-07-1621:13Alex Miller (Clojure team)“Baltimore”?#2018-07-1621:16manutter51That and there’s 2 “m’s” in “accommodations”#2018-07-1621:18Alex Miller (Clojure team)fixed#2018-07-1621:18Alex Miller (Clojure team)thx!#2018-07-1621:03cfleming@manutter51 Probably no-one in #cursive 🙂#2018-07-1621:03cfleming@alexmiller is probably the best person to ask.#2018-07-1621:03manutter51doh, I was sure I was in #clojure when I typed that facepalm#2018-07-1700:11cfleming@viebel Sorry about the problems - how did you set this project up? If you’re using Leiningen you should have tools.nrepl already.#2018-07-1705:28Yehonathan SharvitThe problem I have is that the frame of the REPL input window is really light so it doesn't look like a window: see screenshot above. @cfleming do you know how I can fix that?#2018-07-1711:29manutter51This is an interesting question to me too. I did a little searching and found this page: https://intellij-support.jetbrains.com/hc/en-us/community/posts/206331249-Where-Can-I-find-Other-Dark-UI-Themes- and especially this comment:
IDE themes (Preferences/Appearance&Behavior/Appearance/Theme) are just java Look&Feels. Implementing a new L&F is a tough  task, it took a lot of resources to make the Darcula theme... Note  that it's technically possible to install any third-party L&F into  JVM and use it in WebStorm/PHPStorm ( see  for instructions), but it will most likely look ugly and break the UI in many places.
#2018-07-1711:30manutter51So I think maybe you and I are going to be disappointed.#2018-07-1711:34manutter51I had a very similar problem to yours when I first started with Cursive/IntelliJ/Darkula only in my case the divider between the REPL input and the REPL output moved all the way to the bottom and I didn’t notice, so I thought it was all the REPL there was. I was typing in the output window, and nothing was happening (of course) and I was very confused for a while.#2018-07-2516:13genekimHoly cow! The same thing happened to me! Thankfully @cfleming helped me get it back — was quite debilitating! 🙂#2018-07-2516:15genekimIn fact, I was almost ready to try reinstalling. 🙂#2018-07-1711:36manutter51But that said, once I fixed the problem I knew what to look for, and I’ve become so used to the faint coloring on the frame that I don’t really notice it any more.#2018-07-1722:39cfleming@viebel @manutter51 Yes, there’s basically nothing I can do about that - sorry. I didn’t realise it was a problem since I always use the light theme. I could potentially make the divider wider, but I don’t think I could make it lighter without overriding the Swing drawing of that component, which is likely to look really strange. It’s interesting, this is the first time I’ve heard of that as a problem (I’ve heard the frame collapse problem that @manutter51 mentions)#2018-07-1722:41manutter51Yeah, and that’s probably just an IntelliJ thing, not really a Cursive thing.#2018-07-1722:43manutter51It hasn’t bothered me since then, and the screen shot seems to show a faint-but-visible divider. @viebel I wonder if the gamma is set differently on your monitor than it is on mine? That might lower the contrast and make the divider harder to see.#2018-07-1722:44cflemingRight - there are various weirdnesses with Darcula.#2018-07-1722:44cflemingI agree - it seems quite visible to me, but I’m a lousy test case because I’m colourblind.#2018-07-1821:55joelsanchezREPL seems fine to me, using the dark theme too. interesting that you're colorblind 😮#2018-07-1822:00cflemingI’m only fairly slightly colourblind, so I have trouble distinguishing dark purple from dark blue, for example, or dark red from dark brown. But Darcula is pretty dark, so that may be the issue.#2018-07-1822:01cflemingMy uncle can only tell a red trafficlight from a green one by the position 😮#2018-07-1822:11justinleei wonder if the red light looks green or the green light looks red. or if he sees a color that none of us understand 🙂#2018-07-1823:47cflemingProbably the last one, I think.#2018-07-1903:25cflemingCursive deps support is out! https://groups.google.com/d/topic/cursive/32tfBegzfVc/discussion#2018-07-1903:25cflemingFeedback very welcome, as always.#2018-07-1906:56dhklJust got the email. Super excited about this. Thanks Colin!#2018-07-1907:36cfleming@dhkl Cool, let me know how it works for you!#2018-07-1909:04cfleming@flowthing Do you get any details if you click on that?#2018-07-1909:04flowthingNo, unfortunately not. 😕#2018-07-1909:04cflemingOr is there anything in your log? Help-&gt;Show log in Finder/Explorer#2018-07-1909:05flowthingYes there is, actually, just a sec...#2018-07-1909:09cfleming@flowthing If you go to Settings-&gt;Build, Execution, Deployment-&gt;Build Tools-&gt;Clojure Deps, is the path to ‘clojure’ command set correctly? Does it show a version below it?#2018-07-1909:09flowthingLet's see...#2018-07-1909:12flowthingThe path is set correctly (it's set to /usr/local/bin/clojure and it works when I run it from the command line), but it says "Command timed out" below it.#2018-07-1909:12cflemingHmm#2018-07-1909:12flowthing
❯ brew info clojure
clojure: stable 1.9.0.381
#2018-07-1909:13cflemingIf you do clojure -Sdescribe on the command line, is it quick to return? The timeout is set to 5secs IIRC#2018-07-1909:13flowthingIt returns pretty much immediately#2018-07-1909:14flowthing
❯ time clojure -Sdescribe
{:version "1.9.0.381"
 :config-files ["/usr/local/Cellar/clojure/1.9.0.381/deps.edn" "/Users/eerohe/.clojure/deps.edn" ]
 :install-dir "/usr/local/Cellar/clojure/1.9.0.381"
 :config-dir "/Users/eerohe/.clojure"
 :cache-dir "/Users/eerohe/.clojure/.cpcache"
 :force false
 :repro false
 :resolve-aliases ""
 :classpath-aliases ""
 :jvm-aliases ""
 :main-aliases ""
 :all-aliases ""}
        0.03 real         0.01 user         0.01 sys
#2018-07-1909:14flowthingMy deps.edn file is in its default state.#2018-07-1909:14cflemingI wonder what’s going on there.#2018-07-1909:15cflemingOne sec#2018-07-1909:16flowthingThere are also some StackOverflow errors that mention Cursive namespaces/classes in the IDEA log, but I'm not sure whether they're related to this or something else.#2018-07-1909:16cflemingI think they’re unrelated.#2018-07-1909:16cflemingDoes this happen for all projects?#2018-07-1909:17flowthingI've tried multiple, yeah. I just created a new project that has just {:deps {org.clojure/core.cache {:mvn/version "0.7.1"}}} in the deps.edn file.#2018-07-1909:18cflemingHmm, actually I see the timeout is 1 sec, I remember bumping that up to 5 sec to make it work on my machine, but I don’t understand why it should take so long.#2018-07-1909:18cflemingThat change got lost in my various trials of how this should work looks like.#2018-07-1909:20flowthingHa! I found the issue.#2018-07-1909:20flowthingIt's not really related to Cursive.#2018-07-1909:21flowthingFor some reason, the Shell path setting under Tools > Terminal was borked. I set it to /usr/local/bin/bash and now it works.
#2018-07-1909:21cflemingThat’s bizarre.#2018-07-1909:22cflemingI’m using an IntelliJ utility class to execute that process, I never imagined it would use that setting.#2018-07-1909:22flowthingHeh, that's weird. But it certainly seems to.#2018-07-1909:23flowthingWell, sorry about the wild goose chase, but I guess something useful came out of this, at least.#2018-07-1909:24cflemingYes, absolutely. I’ll debug that tomorrow and see if I can figure out where that value is being used. If it does turn out to be important I’ll flag an error if what it points to doesn’t exist or isn’t an executable file.#2018-07-1909:25cflemingBut probably I’ll just execute that process another way - it shouldn’t require a full shell. I wonder if that’s why it took so long on my machine.#2018-07-1909:28flowthingAnyway, thank you very much for deps.edn support! Seems to work great now that that got sorted out.#2018-07-1909:40cflemingGreat! Let me know if there are any other issues, I’ll get another build out soon fixing any issues people find.#2018-07-1909:41cfleming@flowthing BTW are you on OSX?#2018-07-1909:42flowthingYes. #2018-07-1909:42cflemingGreat, thanks.#2018-07-1911:14p-himikWould it be possible to somehow resolve such requires? Or at least remove the highlighting for such statements.#2018-07-1911:15p-himikI'm using shadow-cljs to make such imports work.#2018-07-1911:15p-himikMaybe it would be possible to not mark anything as unresolved when the first item in a vector in :require in CLJS is a string?#2018-07-1911:19p-himik(there shouldn't be :as in :refer on the image, but you get the idea)#2018-07-1915:34kennyIs there a way to switch a Leiningen project to deps.edn?#2018-07-1915:39kennyI switched the project by deleting the .idea and .iml file in my project, selecting "Import Project", selected my project folder, and then chose Deps. Not sure if there is an easier way to do that. Is there a way to specify aliases Cursive should use to resolve things?#2018-07-1919:27gklijsWhat I sometime do is open the project from the project.clj file, opening from deps.edn probably works, and then choose recreate project or something like that.#2018-07-1919:35kennyThis does not work with deps.edn.#2018-07-1920:42cflemingHmm, that should work - I’ll try that and fix it if it doesn’t.#2018-07-1920:43cfleming@kenny Do you get an error or something when you try that?#2018-07-1921:29kenny@U0567Q30W The little banner that usually says "Add project" did not appear.#2018-07-1921:30cflemingOh, you mean that there wasn’t a menu item for that? Yes, I haven’t added that yet.#2018-07-1921:30cflemingBut if you close the project, then open it again using the deps.edn instead of the project.clj, I would hope that will work - I’ll test that today.#2018-07-1922:05kenny@U0567Q30W Does open it using deps.edn mean clicking Open then selecting the actual deps.edn file in the file browser?#2018-07-1922:07cflemingRight#2018-07-1921:38gfredericksis there a way to get cursive licenses to work with the intellij license server? caveat: I have no idea what any of that means#2018-07-1921:39cfleming@gfredericks No, but I was waiting for someone to ask about it.#2018-07-1921:39cflemingIs that something that would be desirable?#2018-07-1921:40cfleming(the tl;dr is that you have your licences registered with a server that the IDE checks against, instead of mailing licence files around)#2018-07-1921:40gfredericksmodulo the above caveat, I believe so#2018-07-1921:40gfrederickswe already do our intellij licenses that way, and the cursive ones are manual and every year some sort of mystical process happens#2018-07-1921:41cflemingYeah, I have no idea how companies with lots of licences manage it. A few of them have written to me from time to time saying some variation on “we have a total mess internally, this is nuts”.#2018-07-1921:41gfredericksbut they never ask about the license server thingamabob?#2018-07-1921:42cflemingThere is a possibility that that might happen in the future, but I don’t know when (relies on JetBrains)#2018-07-1921:44gfredericksdoes this mean you'll start the process and it'll just be blocked on them, or you'll wait for more users to ask for it?#2018-07-1921:45cflemingIt requires them to develop functionality, they were planning it for this year but I don’t know if that will happen. There’s also uncertainty about how it will work, i.e. migrating existing licences onto their system.#2018-07-1921:46gfredericksroger; thanks#2018-07-1921:42cflemingStrangely, no.#2018-07-1921:42cflemingLiterally no-one has ever asked me about that.#2018-07-1921:42cflemingI even added a FAQ entry before I released in anticipation of the questions which never came 🙂#2018-07-1922:08kennyIs there a way to specify aliases Cursive should use to resolve things?#2018-07-1922:08cflemingNo, currently it tries to add all source roots etc that it can. Is this for dependencies?#2018-07-1922:09cflemingI guess this should work more or less like the lein integration, where you can choose which you want to use.#2018-07-1922:26kennyYes, this is for dependencies. I have dev deps that aren't resolved.#2018-07-1922:32cfleming@kenny Ok, I’ll fix that for the next build.#2018-07-1922:32kennyBTW, how do you handle :override-deps?#2018-07-1922:33kennyOr will aliases work like the lein integration, like you mentioned?#2018-07-1922:38cflemingSo, I don’t handle those, I just get dependencies back from t.d.a#2018-07-1922:38cflemingI’ll have to pass the aliases to it though, or rather use the aliases to correctly construct the map I pass to it.#2018-07-1922:38cflemingAll the dependency resolution, overriding etc is handled by the lib.#2018-07-2001:03cfleming@p-himik I’m planning to improve all of that shortly, hopefully in this EAP cycle.#2018-07-2003:02steveb8nHow do I enable deps.edn aliases in my project so that the dev deps are included in the repl classpath?#2018-07-2003:02steveb8nI presume RTFM but I can’t find what I’m looking for#2018-07-2003:10cfleming@steveb8n I’m fixing that right now 🙂#2018-07-2003:10steveb8ngreat. should I wait or is there a workaround for now?#2018-07-2003:11cfleming@steveb8n @kenny Would you want aliases enabled or disabled by default?#2018-07-2003:11steveb8nI’m trying to enable aliases using CLI params#2018-07-2003:11cflemingI think waiting is the only option, sorry.#2018-07-2003:11steveb8nok#2018-07-2003:11steveb8nI’d like to have same as lein: pick which aliases are enabled in the run config#2018-07-2003:12kennyI prefer explicit enabling.#2018-07-2003:12cflemingOk. Lein actually has a series of common profiles which are enabled by default, deps doesn’t really have that (except :test I guess).#2018-07-2003:13kenny@steveb8n You can start a nrepl and connect to it in Cursive.#2018-07-2003:13steveb8nthx, I’ll try that#2018-07-2003:13cflemingThat will mean that in every new project you’ll have to enable those deps.#2018-07-2003:13kennyYep#2018-07-2003:13steveb8nthat’s ok with me too. I don’t mind the extra step to know exactly what’s happening#2018-07-2003:13cflemingOk.#2018-07-2003:14cflemingI’ll only enable :test by default then.#2018-07-2003:14steveb8nwhen I noobed Cursive, I was a bit confused how “dev” was auto-enabled#2018-07-2003:14kennyYou could have an IDE level setting for default aliases to cater to users who want aliases automatically used.#2018-07-2003:14cflemingYeah, I’ll think about that - that’s probably the best solution.#2018-07-2003:23steveb8n@kenny remote nrepl worked. thanks#2018-07-2003:25steveb8nfyi I’m working on a Datomic Ions project and using the new Ion lib is much easier in deps.edn than lein. hence the question. thanks for adding this, starts nice and fast too#2018-07-2011:14mikeyfordHey there, n00b question here, when I'm running the debug REPL and I'm exploring variables in the debugger, is there an easy way to def a variable of interest so that I can start poking it in my REPL session? (e.g. I'm interested in a symbol that's defined in a let)#2018-07-2013:11kennytiltonYou want to code (let [x 42]...) and then get at x in the REPL? let bindings are not like def vars, so no.#2018-07-2013:12flowthingI haven't tried it myself, but I think https://github.com/vvvvalvalval/scope-capture is precisely for that sort of thing.#2018-07-2013:36mikeyfordscope-capture looks neat, but for my use cases I can achieve something similar with as much effort doing
(let [x 1
      _ (def y x)])
while debugging. It's really handy that I can inspect the let bindings in the cursive debugger, I guess I just wondered there was a tool in the debugger where I could go one step further and assign them globally to a symbol of my choosing in a quick and easy way.
#2018-07-2311:48onetomI've just experienced the sync failed error too after git cloned a project from one machine to another. After I changed the Terminal shell setting from /Users/onetom/.nix-profile/bin/fish to /Users/onetom/.nix-profile/bin/bash pressing the refresh icon in the Build panel suddenly started to work. When I changed it back to fish it kept on working. I guess it's not trying to do something bash specific after the build has downloaded all the dependencies. (I'm on macOS and using nix-shell normally, but since IntelliJ is not very nix-aware, I just set my Clojure Deps / Path to 'clojure' command to /nix/store/qr9054vgrg34gv0jnm5qm826ih1645xc-clojure-1.9.0.381/bin/clojure)#2018-07-2313:05conanis it possible to specify lein profiles when running a clojure.main process?#2018-07-2313:18conanthis seems relevant: https://github.com/cursive-ide/cursive/issues/1036#2018-07-2322:07cfleming@U053032QC Yes, that’s the issue you want. I’ll try to fix that in the next EAP since I’m working on a lot of the REPL/execution stuff.#2018-07-2409:47conanthanks thanks thanks!#2018-07-2421:23cfleming@U053032QC BTW are you still suffering from the long classpath problem?#2018-07-2508:42conanYes, but I’ve made sure my maven repo has a short path, and excluded lots of Amazonia which was responsible for 50% of my deps :face_with_rolling_eyes:#2018-07-2508:43conanThe path length is key as it’s the multiplier#2018-07-2314:17wilkerluciohello, trying to test the new deps support, how can I "remove" a project so I can it again as a deps instead of leiningen?#2018-07-2317:46conanleiningen tool window > remove, then you can remove the module from the project and start again#2018-07-2317:48wilkerluciothanks, I figured that, then you can use the project modules to add the deps, one caveat that I noticed is that you must close and open the project again after that to get the deps tab#2018-07-2322:08cflemingYes, and the module should be automatically removed these days.#2018-07-2322:08cfleming@U066U8JQJ Yes, that deps tab issue is annoying, I’m going to fix that shortly.#2018-07-2314:27manutter51Try opening the project settings and looking for it under Libraries#2018-07-2318:20llsouderI hide my repl window using "hide" button (the one with the picture of a vertical box and an arrow). Anybody know get it back? I found that if I run a new repl the window comes back and I can switch to my running repl.#2018-07-2318:20llsouderWhen I hide other windows, like project, I get a tab which can be used to restore the window.#2018-07-2318:25manutter51In my IDE, the hidden REPL window minimizes to a tab in the lower right corner. If you can’t find it there, look under View -> Tool Windows -> REPL.#2018-07-2318:27justinlee@llsouder I’ve remapped Cmd-2 to the “REPL” command. Cmd-1 (for the project window), Cmd-2 (for the REPL), and Cmd-9 (for git), are what I use all the time#2018-07-2318:29justinleeit’s nice to have them to keys because hitting the keys again minimize them, so you can pull up the repl and then get rid of it with just key commands#2018-07-2320:33kennyI am receiving this exception when using my dev alias:
Error unmarshaling return; nested exception is: 
	java.lang.ClassNotFoundException: com.amazonaws.SdkClientException (no security manager: RMI class loader disabled)
Full stacktrace in logs: https://pastebin.com/2z8dwK9d. My dev alias contains com.datomic/ion-dev {:mvn/version "0.9.175"}. The exception does not occur when that dep is commented out.
#2018-07-2320:33kennyI am able to run clj in this project.#2018-07-2320:40kennyTurns out I didn't have the ion-dev dep downloaded. If I make sure ion-dev is downloaded, I do not receive the exception.#2018-07-2322:09cfleming@kenny The deps alias comes from the system deps.edn file, and adds deps itself to the classpath.#2018-07-2322:10cflemingThat ion-dev error is really weird, that should be downloaded on demand.#2018-07-2322:11cflemingOh, is it possible you enabled the alias but didn’t sync your project after doing that? That’s not done automatically yet, I need to fix that.#2018-07-2322:22cflemingOne thing to note is that REPLs and other processes are not (yet) executed using the CLI tools, so the classpaths may not be 100% correct yet.#2018-07-2411:34Jakub Holý (HolyJak)I have noticed that the "Structural Editing" part of https://cursive-ide.com/userguide/ still only mentiones Paredit. Isn't Parinfer now equally good / better and thus worth mentioning? Or is it still just for those interested?#2018-07-2411:49SchpaaI certainly find the Parinfer mode easier to use#2018-07-2415:30justinleei’ve gotten so used to it that i find myself screwing up braces in javascript all the time now#2018-07-2415:30justinleethe idea that i have to deal with closing braces is an insult 🙂#2018-07-2421:24cfleming@holyjak Yes, the doc is just out of date. I’m planning to automate taking the screenshots, which is the really time consuming part.#2018-07-2421:24cflemingWhich will make updating the doc much less of a chore.#2018-07-2519:05manutter51A few weeks ago I started getting errors with Cursive’s built-in lein deps functionality and also with the repo indexing for https://repo1.maven.org and clojars. I fixed it at the command line by manually adding the Kaspersky CA cert to the cacerts file for Java, but IntelliJ is still unhappy. Just curious if anyone else is seeing that? The error is
sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
#2018-07-2519:06manutter51I can get to http://maven.org and http://clojars.org just fine via the browser, so I don’t think it’s a proxy/firewall issue#2018-07-2521:18cfleming@manutter51 Have you changed the JDK you’re using to run IntelliJ? I used to see that error a lot when running the IDE with JDK6 was still a thing.#2018-07-2521:19manutter51Yeah, I upgraded to Java 1.8.0_181 and added it in as the current JDK in IntelliJ#2018-07-2521:20manutter51What was weird was this just suddenly started happening out of the blue, no changes to the installed Java, to the IDE, or to any plugin.#2018-07-2521:20manutter51or wait, I take that back, I think I did get a Java security update just before it happened.#2018-07-2521:21manutter51What’s suspicious to me is that the cert it’s unhappy about is a Kaspersky cert, and I know there’s some politics happening around that.#2018-07-2521:22manutter51but then I’d think a lot of people would be seeing similar problems#2018-07-2521:22cflemingBut did you change the JDK that’s used to actually run IntelliJ? If you go to About IntelliJ IDEA, there’s an option there to copy your setup - can you paste that here?#2018-07-2521:22manutter51Ah, hmm, let me check…#2018-07-2521:23manutter51Hmm, it won’t let me copy, but it’s saying the JRE is 1.8.0_152#2018-07-2521:24manutter51
IntelliJ IDEA 2018.2 (Ultimate Edition)
Build #IU-182.3684.101, built on July 24, 2018
Licensed to Mark Nutter
Subscription is active until September 25, 2018
JRE: 1.8.0_152-release-1248-b8 x86_64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
macOS 10.13.6
#2018-07-2521:24manutter51I figured out how the copy thing worked 🙂#2018-07-2521:24cflemingOk, so you’re still using the Jetbrains one.#2018-07-2521:25manutter51Is there a way to change that?#2018-07-2521:25cflemingThere is, but you don’t want to do that 🙂#2018-07-2521:25manutter51heh#2018-07-2521:25cflemingActually, you could try it to see if it fixes your problem.#2018-07-2521:25manutter51That’s actually a fresh install of IntelliJ btw — I thought I’d give that a try just for grins#2018-07-2521:26cflemingHmm, there used to be an action to do that but I can’t find it now.#2018-07-2521:27cflemingAh, yeah, open the action finder and search for “Switch boot JDK”#2018-07-2521:28cflemingMake sure it’s a JDK 8, but you could try a different one.#2018-07-2521:28manutter51Ok — where’s the action finder?#2018-07-2521:29manutter51oh there it is#2018-07-2521:31manutter51looks like that’s working 😄 Thanks a ton#2018-07-2521:36cflemingHuh, that’s very strange. I don’t understand why that’s happening, but I’m glad it’s working for you 🙂#2018-07-2521:58manutter51It probably has something to do with the fact that I manually installed the missing cert in my system install of Java, with keytool#2018-07-2521:59cflemingOh right, I guess if you installed it in the JetBrains JRE that should make that work too.#2018-07-2521:59manutter51but why the problem arose in the first place, just for me...? 🤷#2018-07-2521:59cflemingThat I don’t know.#2018-07-2615:25timgilbertSay, any particular reason the various REPL key shortcuts (load namespace etc) don't work in the REPL input window?#2018-07-2708:43SchpaaSame experience, same question#2018-07-2711:50onetomwhich namespace would be loaded if you are not focused on a specific file? for example you can have multiple files visible if you split your editor area horizontally or vertically#2018-07-2619:41kanweiis there a way to make "case" statements align?#2018-07-2619:41kanwei
(case tab
                       :settings (and (= "true" js/enterprise)
                                      (= "admin" js/role))
                       :portal-logins (= "true" js/enterprise)
                       :settings-overview (= "true" js/enterprise)
                       :email-templates (and (= "true" js/enterprise)
#2018-07-2622:20cfleming@timgilbert So, sort of - the idea is that those keys mean “Load this namespace I’m in into the REPL”, and when you’re in the REPL editor you’re not in an editor pane representing a namespace. There’s an old issue about that, I’ll see if I can fix that soon: https://github.com/cursive-ide/cursive/issues/601#2018-07-2622:21timgilbertCool, that describes my issue well, yeah#2018-07-2622:21timgilbertI wind up needing to use the mouse a lot when doing repl stuff#2018-07-2622:22cfleming@kanwei No, there isn’t right now. I’ve thought about it but it’s hard to do without aligning all case statements everywhere, and sometimes the target values are long and would look strange. It would probably work better for case than for cond though, since arbitrary conditions can be very long.#2018-07-2622:22cfleming@timgilbert What do you use the mouse for?#2018-07-2622:22timgilbertSwitching from the repl window to the editor#2018-07-2622:23cflemingThere are keyboard shortcuts for that. ESC will always take you from the REPL back to the editor, and there are actions you can bind to jump to the REPL editor or output pane.#2018-07-2708:41SchpaaHm, never could get that to work the way I wanted. Sometimes I can press shift-esc to escape the REPL back to the editor but most often there is no reaction when esc or shift-esc. #2018-07-2622:23timgilbert(I guess there's a keyboard shortcut, but I've just replatformed to Windows and my shortcut muscle memory doesn't work anymore)#2018-07-2622:23timgilbertI will probably do that as a workaround, yeah, thanks!#2018-07-2708:41SchpaaHm, never could get that to work the way I wanted. Sometimes I can press shift-esc to escape the REPL back to the editor but most often there is no reaction when esc or shift-esc. #2018-07-2702:43kennyDoes the REPL not use the aliases you select in the Deps panel?#2018-07-2703:12cfleming@kenny Well, it uses the classpath of the project, which should match those aliases since that’s what’s synced to the project. But the REPLs don’t use deps directly for calculating their classpath yet - that’s coming soon.#2018-07-2703:13cflemingThere is an issue about a mismatch: https://github.com/cursive-ide/cursive/issues/2010#2018-07-2708:42SchpaaOn another tangent, is it possible to have the awesome rebel-readline repl in cursive?#2018-07-2711:19cfleming@schpaencoder That’s really weird - the ESC-goes-to-editor thing is really ingrained in IntelliJ, to the point where it actually can’t be changed for e.g. IdeaVim.#2018-07-2711:58SchpaaGuess it’s my setup then, since I can escape away from every other tool window. #2018-07-2711:21cflemingRe: rebel-readline, no, it’s not, but I think the Cursive REPL should already offer pretty much everything it does. If there are specific things you’re missing, let me know.#2018-07-2712:03SchpaaThe thing that bug me the most is that tab is not code completion in the repl (but indent). I have to control space and I fail at that every single time :-). Also, I would think completion trumps indentation (of importance when in the repl) although I see that a lot of allowance (of screen estate) has been given the prompt, so I might be in a minority here. #2018-07-2711:42biscuitpantscan cursive not automatically change the repl type when changing files?#2018-07-2711:55onetomyou mean between clojure and clojurescript? what would it do in case of .cljc files?#2018-07-2711:57biscuitpantseven in the case of plain clj and cljs?#2018-07-2722:06cfleming@U0HJ7CX6H The issue is that the type of the editor you’re using doesn’t determine how your REPL functions. Cursive doesn’t do anything to actually make your REPL be a CLJS one, the dropdown just tells Cursive what sort of REPL it actually is, which affects some operations.#2018-07-2722:06cflemingCursive tries to autodetect that but doesn’t always do it right. I’m going to fix some more cases soon.#2018-07-2712:03SchpaaThe thing that bug me the most is that tab is not code completion in the repl (but indent). I have to control space and I fail at that every single time :-). Also, I would think completion trumps indentation (of importance when in the repl) although I see that a lot of allowance (of screen estate) has been given the prompt, so I might be in a minority here. #2018-07-2717:15kennyIt'd be nice if the user level aliases were somehow marked or separated from the project level ones.#2018-07-2721:02cfleming@kenny You mean from the ones coming from the system or user deps.edn?#2018-07-2721:05kennyYes#2018-07-2722:03cfleming@schpaencoder If you just want to use tab to complete, you should be able to remap that in the keybindings, although I’ve never tried it.#2018-07-2722:03cflemingBut that will change that everywhere in the IDE obviously.#2018-07-2809:45wilkerlucio@cfleming I noticed in the deps panel that the aliases namespaces are not visible (maybe you are calling name to display then?), is that intended? I was trying to add a :local namespace to my user aliases so I could distinguish then from project aliases, but there is no namespace in the UI#2018-07-2810:53cfleming@wilkerlucio Hmm, yeah, I’m probably just calling name. Does deps even support namespaced aliases?#2018-07-2810:54wilkerluciojust checked, it supports#2018-07-2810:55cflemingOk, I’ll fix that - should be trivial.#2018-07-2810:56cfleminghttps://github.com/cursive-ide/cursive/issues/2017#2018-07-2915:55alexpashkovHello, I need some help with Cursive.#2018-07-2916:48genekim@cfleming A totally non-urgent question, but something I’ve been dying to ask. Off the top of your head, what are your top 3 things you love and not love about working inside of IntelliJ? If you had a magic wand, what one thing would you change about it? PS: I got Cursive this January after watching a talk you gave at Clojure/conj — fell in love immediately. I loved the way you acknowledged the 1MM+ lines of code in IntelliJ dedicated to handling incorrect ASTs — much easier than handling correct ASTs! 🙂#2018-07-2918:12justinlee@alexpashkov123 cursive does static analysis, so it needs to know about your dependencies. you need to point it to a lein project file or a pom#2018-07-2918:55kenjIs there a way to make Cursive reindex dependencies (preferably automatically) when new deps are added to a project.clj file, and lein deps (or some other command which causes the deps to be downloaded) is run? It seems "File -> Invalidate Caches / Restart" does the trick, but that's kind of annoying when adding new libraries#2018-07-2921:24cfleming@alexpashkov123 There are a couple of things that can cause that. The first is not having that file under a source root (you should get a warning about that) and the other is not having your project set up correctly. How did you set this up?#2018-07-2921:25cflemingIf you’re using lein, check in the lein toolwindow (View-&gt;Tool Windows-&gt;Leiningen) to see if your project.clj is registered there. If it isn’t, right click it in the project view and select “Add as Leiningen project”#2018-07-2921:28cfleming@risinglight It should prompt you to refresh when you change the project file, but if it doesn’t check the Lein toolwindow and hit the refresh button there. Or you can search for the action “Refresh all Leiningen projects”#2018-07-3015:12tbaldridgeI have a project.clj file that contains a :certificates entry. I can't start the project because Cursive errors out saying that the file does not exist. However it does exist, and seems to work fine if I comment out the :certificates line, or if I run the project through lein. Any ideas?#2018-07-3015:12tbaldridge:certificates ["dev/resources/server-nexus-01.pem"] is what the line looks like#2018-07-3016:43joelsanchezwhen I change the source folders in Project structure it's not saved for the next session...should I give up and change the project.clj?#2018-07-3017:56alexpashkov@cfleming I opened File-&gt;Project Structure and there was a bunch of stuff under Problems. It was late and I remember there was something about clojaras and maven (something wasn’t indexed). I had to press update and warnings went away. Thanks everybody!#2018-07-3017:58kenj@cfleming thank you!#2018-07-3018:01emccueIs there a way to trick cursive into ignoring an undefined symbol in a macro I made?#2018-07-3018:01emccueI have a macro that lets me write#2018-07-3018:01emccue(m+ a b c | :custom d)#2018-07-3018:01emccueand have that expand to#2018-07-3018:01emccue{:a a, :b b, :c c, :custom d}#2018-07-3018:02emccueand the vertical line is seen as an undefined symbol#2018-07-3018:06emccueI can (declare |) but I don't know how to make that declaration "follow" the importing of the macro#2018-07-3018:49kennyCan you refresh the Deps every time you start a REPL? I find myself forgetting to hit the refresh button after a deps change and getting an old classpath.#2018-07-3019:07danielcompton@kenny you can turn on a warning when your project.clj is out of date#2018-07-3019:07kennyFor the Deps integration?#2018-07-3019:07danielcomptonBut I find it gets a bit annoying #2018-07-3019:07danielcomptonAh, are you talking about deps.edn?#2018-07-3019:07kennyYes#2018-07-3019:08danielcomptonOh, I’m not sure. I’d imagine that feature would come eventually #2018-07-3023:14cfleming@tbaldridge So Cursive has a problem in that it runs lein in-process and thus can’t change the CWD. I do a bunch of black magic with the http://c.j.io protocols to support what I can, but if something uses (File.) there’s not much I can do. I’ll try that and see if I can fix it.#2018-07-3023:14cflemingAs a workaround, you can run lein headless and then connect a remote REPL to it from within Cursive.#2018-07-3023:15cfleming@joelsanchez Yes, you should 🙂#2018-07-3023:15cfleming@kenny I haven’t implemented that for deps yet, I’ll try to get that in there soon.#2018-07-3023:57cfleming@kenny You asked about being shown whether aliases are system, user or project aliases the other day. Unfortunately there’s no way at the moment to distinguish the system deps.edn from the user one (`-Sdescribe` returns a list of files and no info about which is which).#2018-07-3023:58cflemingI can show which come from your actual project, is that still useful?#2018-07-3103:33kenny@cfleming Yes.#2018-07-3101:05emccue(ignore my question I figured it out)#2018-07-3102:25potetm@cfleming re baldrige’s q: it’s not just running a repl that’s the problem — the project fails to load (i.e. none of the navigation features, etc work unless you comment out the cert line)#2018-07-3102:25cfleming@potetm That’s not good.#2018-07-3102:26potetmyeh 😕 you get a red box complaining that it can’t find the cert file#2018-07-3102:27potetmworkaround is lein deps from the command line then comment out the cert#2018-07-3102:28potetmonly problem is you have to keep the edit in project.clj while avoiding checking it in#2018-07-3102:30cfleming@potetm https://github.com/cursive-ide/cursive/issues/2020, I’ll try to reproduce that now.#2018-07-3102:30potetm@cfleming :thumbsup: lemme know if you have any issues — happy to help any way I can#2018-07-3103:13cfleming@potetm @tbaldridge Ok, that’s fixed for the next EAP, out shortly.#2018-07-3103:13cflemingThere was actually an embarrassingly old issue for it already: https://github.com/cursive-ide/cursive/issues/1156#2018-07-3103:24tbaldridge@cfleming awesome! I and my co-workers thank you 😄#2018-07-3103:34potetm@cfleming ty ty!#2018-07-3103:37cfleming@kenny This is what it looks like.#2018-07-3103:38kennyCool. I’d prefer sorted by project first. #2018-07-3103:39cflemingOk, let me check how tricky that is.#2018-07-3103:54cfleming@kenny It’s not immediately obvious how to do that, sorry.#2018-07-3122:47kennyLocal dependencies specified in :aliases are not added as a module to the project. Is this intentional?#2018-08-0100:25cfleming@kenny They should be if you use that alias to sync the project. Is that not working for you?#2018-08-0121:34kennyIt was not for the project I was testing. I'll double check tomorrow when I get back on that computer.#2018-08-0122:34cflemingOk thanks, I’ll see if I can repro today too.#2018-08-0122:42kennyI know one interesting aspect of that particular project was that the dependencies were circular. A -> B -> A. B is included under an alias defined in A and A is in the :exclusions of B.#2018-08-0122:49cflemingThat is… “interesting” 🙂#2018-08-0200:40cfleming@kenny So the Cursive code currently won’t work for something that funky - it doesn’t handle circular deps at all.#2018-08-0200:41cflemingThat’s because it does an initial pass to gather all the modules before resolving them all using tools.deps. So it doesn’t have the level of detail of something like :exclusions#2018-08-0200:42cflemingIf you think it’s important to fix that, I might be able to do something - let me know.#2018-08-0200:48kennyI'll describe the reason for the circular dependency to let you decide the level of importance. We have a DB utility project and a test-components project. test-components is only ever included in a project via an alias (typically for testing). test-components has a clojure.test fixture that initializes the database with a set of test data. We then test the DB utility project against this test data. If it's possible to detect, I'd say you should at least show some sort of warning that behavior will not be what you expect (i.e. changing a file in a local dependent project will not be recognized in the REPL).#2018-08-0103:08cflemingCursive 1.8.0-eap4 is out now! If you’re on Windows you can now use deps in Cursive, let me know how it works for you.#2018-08-0103:08cfleming@tbaldridge @potetm This contains your fix too, have at it!#2018-08-0115:01ocHas anyone seen this issue? On the latest intellij + cursive versions. 10:56 AM facade.password must not be null: facade.password must not be null 10:59 AM Error running 'REPL for <project name>': facade.password must not be null#2018-08-0122:31cfleming@oc No, I’ve never seen that. That’s not something I recognise from Cursive, could that be from a lein plugin?#2018-08-0213:19ocI do not have any lein plugins added to the project. here's the stacktrace if it's helpful. java.lang.IllegalStateException: facade.password must not be null at cursive.leiningen.LeiningenUtil.standardArgs(LeiningenUtil.kt:116) at cursive.leiningen.project.LeiningenProjectDetails$getProjectDetails$1.invoke(ProjectDetails.kt:123) at cursive.leiningen.project.LeiningenProjectDetails$getProjectDetails$1.invoke(ProjectDetails.kt:103) at cursive.leiningen.project.LeinShimProvider.withShim(ProjectDetails.kt:51) at cursive.leiningen.project.LeiningenProjectDetails.getProjectDetails(ProjectDetails.kt:117) at cursive.leiningen.project.LeiningenProjectsManager$reimportAllProjects$task$1.run(LeiningenProjectsManager.kt:131) at cursive.leiningen.LeiningenUtil$runTask$1$1.run(LeiningenUtil.kt:76) at com.intellij.openapi.progress.impl.CoreProgressManager$TaskRunnable.run(CoreProgressManager.java:736) at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$1(CoreProgressManager.java:157) at ... here's the project.clj if thats helpful#2018-08-0213:22ocIt's been happening for a few days when I upgraded to the latest intellij. is there a way to 'reinstall' cursive? I removed the plugin/restarted/reinstalled/restarted but it didnt help, not sure if there's anything left on the disk after an uninstall. my friend can run the project with cursive without issues.#2018-08-0123:00kennyI forked Depot and opened it as a Deps project and all the defs are marked as "cannot be resolved." Any idea why?#2018-08-0123:01kenny#2018-08-0123:02kennyTried opening and closing the project and refreshing the deps. No dice.#2018-08-0123:02cflemingNo, that’s very strange.#2018-08-0123:02cflemingIs this an open source project?#2018-08-0123:02kennyhttps://github.com/Olical/depot#2018-08-0123:02kennyFork https://github.com/kennyjwilli/depot#2018-08-0123:02cflemingDoes invalidating indexes help?#2018-08-0123:02kennyI'll try.#2018-08-0123:03kennyAlways annoying to do that because I need to close out all my REPLs 😞#2018-08-0123:03cflemingYeah, sorry about that 😞#2018-08-0123:06kennyYeah that fixed it.#2018-08-0123:06cflemingPhew.#2018-08-0123:06cflemingSorry about the REPLs though.#2018-08-0123:07kennyGave me a chance to get up and stretch, so it's all good 🙂#2018-08-0200:51kennyIs there a way to disable the Run: window popping open every time I start a REPL?#2018-08-0204:27genekimI love rainbow coloring of parens, but in Dark mode, the blue parens are almost impossible to see — is there a way to take out blue from the rainbow palette? Many thanks!!!#2018-08-0207:29cfleming@genekim Yep, you can customise all the colours in Settings-&gt;Editor-&gt;Color Scheme-&gt;Clojure#2018-08-0217:42genekimAwesome, @cfleming! Thank you! PS: on my laptop screen (12" MacBook), the dark blue is almost invisible. Surprised at how visible it is on a monitor.#2018-08-0222:21cflemingYeah, I only work on a monitor, but I also don’t use Darcula.#2018-08-0207:29cfleming@kenny I’m going to fix that shortly. Which REPL type are you using?#2018-08-0217:07kennylocal#2018-08-0215:27gfredericksdoes cursive have any mitigation for the problem of jumping to the definition of a var that's defined by an unusual macro where the macro call doesn't actually mention the symbol?#2018-08-0215:27gfredericks(or is that supposed to work already?)#2018-08-0216:19Joe LaneAny way to know the current priority of https://github.com/cursive-ide/cursive/issues/2010 ? Is there a different workaround than putting my resources directory in my src directory?#2018-08-0217:32kenny@lanejo01 We currently store some configuration and that bug would break our whole workflow since most projects require that configuration. The configuration is stored in a project called config. If I start a REPL and try and slurp the config, as that issue shows, I also receive the IllegalArgumentException. However if I depend on the config project in my app project, I am able to slurp the config resource. Any resource within my app project still receives the IllegalArgumentException though.#2018-08-0217:34kennyRunning (System/getProperty "java.class.path") shows that the resources directory is not on the classpath.#2018-08-0217:38kennyLooks like any path in :paths besides src is not included in the REPL classpath.#2018-08-0217:39kennySame applies for :extra-paths in an alias.#2018-08-0217:40Joe LaneWhat do you mean “project called config” ? an intellij project or a cursive project?#2018-08-0217:42kennyIt's a Cursive Deps project.#2018-08-0218:17chgrahamUsing the latest IntelliJ Community and Cursive plugin, I am getting the "symbol cannot be resolved" error. I have tried invalidating caches and restarting to no effect. In a require call I have [uncomplicate.neanderthal.vect-math :as vm :refer [exp! fmax fmax! linear-frac!] exp! cannot be resolved, but my own function that calls exp! compiles fine. linear-frac! (for example) can be resolved. Does anyone have a suggestion to solve this problem? [EDIT: ok, looking at the source code for the vect-math package, most of the entry points are defined using defmath or defmath! macros, and only the symbols of functions defined by defn are able to be resolved by Cursive/IntelliJ.]#2018-08-0218:50potetm@cfleming That changed worked great. Thanks!#2018-08-0219:17gravUsing amazonica, I get code completion in the repl. But in the editor, everything is cannot be resolved. I know amazonica is using Java reflection. Is that related? How come it’s working in the repl, though?#2018-08-0219:28onetomis there an easy / clean way to edit my ~/.clojure/deps.edn with Cursive? it wants to create a project around it... 😕#2018-08-0219:40gfredericksnevermind about the macro question, I found https://github.com/cursive-ide/cursive/issues/147#2018-08-0219:44vuuvidoes anyone use liberator with cursive? Any way to get defresource to be recognized as a valid macro?#2018-08-0220:22justinlee@alexkeyes hitting alt-enter and marking its resolution doesn’t work?#2018-08-0220:25vuuvinope, because liberator uses the defresource macro in order to create endpoint resources for an API#2018-08-0220:25vuuvifor whatever reason it doesn’t resolve#2018-08-0222:42cfleming@gfredericks No, unfortunately. Is this an internal macro or one I can look at?#2018-08-0222:42cflemingSorry, reading from the top, didn’t see the later comment to ignore.#2018-08-0222:42cfleming@lanejo01 Deps stuff is currently being worked on actively, I’ll hopefully look at that one today.#2018-08-0317:24Joe LaneA solution I found for this is to just mark the resources directory as a Resources Root in Intellij. Then it “Just Works” 🙂#2018-08-0222:44cfleming@chgraham You may be able to make that work by resolving those macros as either def or defn, depending on what they look like. See here for some (slightly out of date) details: https://cursive-ide.com/userguide/macros.html#2018-08-0222:45cfleming@potetm Awesome! Thanks for letting me know.#2018-08-0222:46cfleming@grav Resolution in the REPL works differently to the editor, it actually introspects the running environment. But if you’re using Amazonica, you should be prompted to create stubs which will make the resolution work in the editor too.#2018-08-0223:08kennyWould be cool if Cursive could detect if a REPL is running and, if one is, use that for editor resolution.#2018-08-0222:46cfleming@onetom Not really, but I’ll add it to the to-do list since that would be useful.#2018-08-0222:47cfleming@alexkeyes You should hopefully be able to make that work using: https://cursive-ide.com/userguide/macros.html, depending on what that macro looks like.#2018-08-0304:35cfleming@potetm @tbaldridge I just fixed another lein certificates bug, which prevented REPLs being run through leiningen when that entry was present - it’ll be in the next build.#2018-08-0304:35cflemingThere may be more circumstances I’ll have to fix, the lein integration is always pretty much whack-a-mole#2018-08-0308:50danmDoes anyone know, if I have disabled stub generation for a namespace, how I go about reenabling it? My Googling is failing me...#2018-08-0310:38cfleming@carr0t File-&gt;Project Structure-&gt;Modules-&gt;[your module]-&gt;Clojure to enable it, then refresh your lein projects to get the prompt.
#2018-08-0311:58danm❤️#2018-08-0311:59danmBah, exception on generating. It's going to be a dependency conflict somewhere, I just need to find it#2018-08-0314:35vuuvithanks @cfleming that fixed the problem!#2018-08-0315:25tony.kayI’m trying to add a resolution in com.rpl.specter for macros (which is a dep). Doesn’t seem to want to allow me to do it. The sym resolution in the prefs doesn’t have a ‘+’ button either. Any way I can get these resolving?#2018-08-0315:26tony.kaymenu appears, but when I select resolve… it doesn’t present the normal menu#2018-08-0315:32tony.kayworkaround found: Clone specter, set the resolution via that project, and it fixes it for all#2018-08-0319:11kennySay I have namespace parent that depends on child1 and child1 depends on child2. If I load parent in the REPL, Cursive will load child2, child1, and parent. If I change child2 and load parent in the REPL, only child2 and parent will be loaded, not child1. Should child1 also be loaded because a namespace it depends on changed?#2018-08-0321:18cfleming@tony.kay Do you mean that you’d like to resolve as… something which you don’t currently have added to your project? Yes, that’s annoying, I think that everything which you could potentially resolve as should be in that list, whether it’s attached to the project or not.#2018-08-0321:20cfleming@kenny I don’t think so, since vars are dynamically looked up at invocation time. The only time that would become a problem would be if you have dynamic linking enabled, which you generally don’t during development.#2018-08-0519:16chgrahamProblems with (latest version) Cursive's REPL input history list: (1) Up arrow key does not get history item until there's at least 2 items in history list (2) [No matter how many items in REPL history list,] sometimes the up arrow key (and down arrow key, for that matter) do nothing until another item c/w <return> is typed at the REPL input area.#2018-08-0522:11cfleming@chgraham Could you comment on this issue with some repro steps, please? I have seen something similar myself, but I tried to reproduce that issue and couldn’t. https://github.com/cursive-ide/cursive/issues/2003#2018-08-0702:03wilkerluciohello, today I decided to click on the button to generate stubs from a deps project, but it triggered an error:#2018-08-0702:03wilkerlucio
Error generating stubs for module workspaces: Exception in thread "main" java.io.FileNotFoundException: Could not locate cljs/closure__init.class or cljs/closure.clj on classpath., compiling:(/private/var/folders/pp/h6rzplc92z9g5ghxdyxghvvm0000gn/T/create-stub8284594259110546595.clj:2:1)
					at clojure.lang.Compiler.load(Compiler.java:7526)
					at clojure.lang.Compiler.loadFile(Compiler.java:7452)
					at clojure.lang.RT$3.invoke(RT.java:325)
					at user$eval2038.invokeStatic(form-init6387638623671932986.clj:1)
					at user$eval2038.invoke(form-init6387638623671932986.clj:1)
					at clojure.lang.Compiler.eval(Compiler.java:7062)
					at clojure.lang.Compiler.eval(Compiler.java:7052)
					at clojure.lang.Compiler.load(Compiler.java:7514)
					at clojure.lang.Compiler.loadFile(Compiler.java:7452)
					at clojure.main$load_script.invokeStatic(main.clj:278)
					at clojure.main$init_opt.invokeStatic(main.clj:280)
					at clojure.main$init_opt.invoke(main.clj:280)
					at clojure.main$initialize.invokeStatic(main.clj:311)
					at clojure.main$null_opt.invokeStatic(main.clj:345)
					at clojure.main$nu... (show balloon)
#2018-08-0702:03wilkerlucioand since then I can't get my project to proper recognize the symbols, from deps or from lein, seems like the project got broken and it's not coming back, is there some way to get around and it back?#2018-08-0702:06wilkerlucioI tried removing the .idea and adding the project back, but no luck there#2018-08-0702:14wilkerlucionever mind, the issue was that I moved core dependencies like clojure and clojurescript to a separated alias to avoid exposing then as regular deps, but for that to work I also have to check it on the aliases on my project, all working now#2018-08-0703:11wilkerlucio@cfleming thanks for putting the labels on project/system aliases on deps, had you though about giving then separated "folders" on the UI?#2018-08-0703:12cflemingI hadn’t, but that might be possible. I’d have to try it out, the checkbox trees are a little funky in Swing.#2018-08-0703:13wilkerluciohehe, 2018 and we still have a hard time there 😛#2018-08-0709:54Empperiif I drag a cljs file from one package to another it's namespace is not updated accordingly neither are other namespaces which are depending on it#2018-08-0709:56Empperialso, if I use refactor->rename with a cljs namespace it updates it's name on that file just fine but all requires requiring that specific namespace get swapped with just the name I gave. Example:
(ns foo.bar)
; rename above to:
(ns foo.watta)

; in some other namespace I originally had:
(ns foo.other
  (:require [foo.bar :as fb])

; but after refactor->rename I get:
(ns foo.other
  (:require [watta :as fb])

; which obviously does not work...
#2018-08-0709:57Empperihaving these two problems at the same time make reorganizing cljs code pain#2018-08-0709:58Empperiversion I'm using: Built on: 2018-08-01 14:59 Built from: 1.8.0-eap4 Version: 1.8.0-eap4-2018.2#2018-08-0710:00Empperimy current workaround for these issues is to search for references before making any changes, then make the change and then go through the search results I got and fix all references manually#2018-08-0710:01Empperibeen doing a major refactoring for this one cljs app for the past two days and I think I could have got this done in less than one if these issues did not exist#2018-08-0711:36joelsanchezis "cursive" a play on "recursive"? someone needed to ask#2018-08-0712:16danmI assumed it was "joined up handwriting", but you could be right#2018-08-0714:32slipsetAs a emacs user it makes me curse...#2018-08-0715:56dnolenare deps.edn aliases supported when starting a plain REPL?#2018-08-0715:58kenny@dnolen Yes. If by plain REPL you mean a Local REPL.#2018-08-0715:58dnolenhrm it doesn’t seem to work?#2018-08-0715:58dnolenI have an alias with :extra-paths and I don’t see this on the classpath?#2018-08-0715:59dnolenby plain REPL I mean Local REPL via clojure.main#2018-08-0715:59kennyAh. That one is a bug https://github.com/cursive-ide/cursive/issues/2010#2018-08-0716:00dnolen@kenny so :extra-deps work but not :extra-paths?#2018-08-0716:00kennyThere is a workaround https://github.com/cursive-ide/cursive/issues/2010#issuecomment-410319862 but IntelliJ doesn't remember that on restart.#2018-08-0716:00kennyYes#2018-08-0716:02kennyFYI, if A depends on B and B has :paths with "resources", Cursive will add B's resources dir to the classpath.#2018-08-0716:06RichardUsing the new figwheel-main with cursive, I'm able to get a connected browser window and a working repl. Only thing is, cursive (Idea?) still thinks the repl is a clojure repl, so I can' t load my clojurescript code into it (using the default ALT+Shift+L). Any suggestions on how to allow the cursive editor to load the file into the repl? I guess how to tell cursive the repl is now a Clojurescript repl?#2018-08-0803:09cfleming@richard238 There’s a dropdown in the REPL toolbar that you can use to switch from clj to cljs. I’m planning to fix the automatic switching for some new REPL types in the next build.#2018-08-0803:13cfleming@joelsanchez No, I had an idea that I might make a series of IDEs for different languages (before I truly appreciated how much work it was). I was going to use a typographic name for each one that reflected the characteristics of the language. Cursive handwriting has a lot of similarities to Clojure - it’s quite individual to each person, can be very pretty but can also be totally incomprehensible 🙂#2018-08-0803:14cfleming@slipset By an amazing coincidence, that’s how I feel about Emacs 🙂#2018-08-0804:41cfleming@dnolen @kenny I don’t think that’s right, :extra-paths should work. The error was in overriding :paths at the root.#2018-08-0816:07kennyI swear I ran into :extra-paths not being included on the classpath but after double checking just now, they definitely are.#2018-08-0804:41cflemingThat’s fixed now for the next build, hopefully tonight or tomorrow.#2018-08-0804:44cfleming(more generally, the error was the priority given when merging conflicting map elements)#2018-08-0807:16tapWhat's the difference between these 2 forms? Why one is ambiguous while the other one isn't?#2018-08-0807:17tap#2018-08-0809:28cfleming@tap Because Cursive doesn’t know that new Thread calls the constructor.#2018-08-0809:29tapGot it. Thanks!#2018-08-0809:29cfleming(it should, but it doesn’t)#2018-08-0816:31chrispsIs there any particular reason why I don’t have access to the js-namespace in Cursive? I’m using shadow and connect to a repl via it#2018-08-0816:32chrispsI can compile anything other than js/-stuff#2018-08-0816:32chrispsit showsin the browser, reloading is nice, but if I try js/alert, nada#2018-08-0816:32chrispsI get a CompilerException java.lang.RuntimeException: No such namespace: js, compiling:(null:1:1) #2018-08-0816:33chrispsvscode with calva works fine, but I like intellij#2018-08-0816:36chrispsperhaps this is related to shadow, not sure#2018-08-0816:38chrispsIs there some config-dump I can provide to help out?#2018-08-0816:48chrispsFrom what I can understand, the repl is still in clj mode#2018-08-0816:51mfikes@chris.schreiner Can you evaluate *clojurescript-version* in your REPL to confirm you are actually in a ClojureScript REPL?#2018-08-0816:52chrispsNo I cannot, its not in cljs, even if the combobox says so#2018-08-0816:52chrispsCompilerException java.lang.RuntimeException: Unable to resolve symbol: *clojurescript-version* in this context, compiling:(null:0:0)#2018-08-0816:53mfikesCan you evaluate *clojure-version*?#2018-08-0816:53chrispsyes, => {:major 1, :minor 9, :incremental 0, :qualifier nil}#2018-08-0816:53mfikesYeah, that means you are in a Clojure REPL.#2018-08-0816:54chrispsok, confirmed#2018-08-0816:54mfikesGenerally you need to start a ClojureScript REPL from the Clojure REPL (or have things set up in Cursive to help do that for you)#2018-08-0816:55chrispsI guess my cursive setup is quite sparse, since I connect with the ‘use Leining repl port’#2018-08-0816:56chrispsI start shadow with server, and watch et al#2018-08-0816:56mfikesYeah, by default you will get a Clojure REPL. You need to explicitly do more to get a ClojureScript REPL.#2018-08-0816:56chrispsok, thats a start, thanks for the input#2018-08-0816:58mfikes@chris See https://shadow-cljs.github.io/docs/UsersGuide.html#cljs-repl, in particular the bits about shadow/watch and shadow/repl#2018-08-0816:59chrispsyes, I’ll do that, btw, I remember something I did with a (shadow.cljs…. command in the repl#2018-08-0817:01chrispsbeautiful, that was it, thanks @mfikes#2018-08-0822:27spiedenanyone know how to create a new project that uses deps.edn?#2018-08-0822:28spiedentried “from existing sources” and clicking the deps.edn file like i might a project.clj#2018-08-0823:13mfikes@spieden Be sure you are running the EAP version of Cursive#2018-08-0823:24mfikesNormally, instead of “from existing sources,” you would pick “from external model” and chose Deps.#2018-08-0823:31cfleming@spieden That should work, but @mfikes is right, you need the EAP for that to work.#2018-08-0823:58cfleming@spieden BTW: https://groups.google.com/d/msg/cursive/NQIJzhGjfEY/hdNXUco8CgAJ#2018-08-0910:54chrispsCan I print the result of some expression in the editor, or does it always have to be printed to the repl?#2018-08-0910:58chrispslike, temporary inline printing of the result of the expr#2018-08-0910:59cfleming@chris It has to be printed in the REPL right now. There’s an issue for that and I’m planning to fix it soon.#2018-08-0910:59chrispsOkey#2018-08-0912:06tbaldridge@cfleming Downloaded eap5, works like a charm with my :certificates project.clj. Thanks!#2018-08-0914:33brown131I noticed this morning that there's a number "5" in a brown box next to the Clojure icon for one of my project.clj files. I've never seen this before. What does it mean?#2018-08-0917:14spieden@mfikes @cfleming ah thanks, i glossed over that the feature was EAP!#2018-08-0919:32cfleming@tbaldridge Great!#2018-08-0919:33cfleming@brown131 Can you share a screenshot of what you mean?#2018-08-0919:47brown131#2018-08-0919:49cfleming@brown131 I have no idea what that is, I’ve never seen that. It’s not Cursive doing it. A plugin you have installed, maybe? Or it may be something in IntelliJ I’ve not seen before.#2018-08-0920:04vuuvi@brown131 that’s a bookmark in Intellij#2018-08-0920:04vuuviI use them all the time#2018-08-0920:04vuuvihttps://www.jetbrains.com/help/idea/managing-bookmarks.html#2018-08-0920:05vuuviI didn’t know you could put them on files, but that’s pretty useful.#2018-08-0920:44marshallquestion for folks: how do you manage your AWS creds in cursive REPLs? I have been setting up each individual REPL configuration with my AWS_ACCESS_KEY and secret key as envars in the REPL configuration I was wondering if there was a way to use the AWS cli profiles or something less onerous than pasting in your envar creds in each new project repl you configure Since I use/access many different AWS accounts I don’t want to configure a ‘global’ credential set#2018-08-0920:44marshalli havent actually tried using an AWS_PROFILE envar#2018-08-0920:44marshallguess i should 🙂#2018-08-0920:48marshallaaaand yep it works#2018-08-0920:48marshallwell, sorry for the noise (unless folks have other/better ideas) 🙂#2018-08-1003:19steveb8nsorry if this question is a repeat: when using deps.edn, if I add a new dep, how to I get the project to sync and include the new dep in the classpath / deps tree etc?#2018-08-1003:30steveb8nI found I can delete/open the project to get it to sync so I have that as a workaround. is deps.edn update built yet?#2018-08-1003:50Alex Miller (Clojure team)if the deps.edn modification is updated then the cache is invalidated#2018-08-1003:51Alex Miller (Clojure team)so if you change it, you should not have to do any other explicit steps#2018-08-1003:51Alex Miller (Clojure team)oh, sorry I didn’t realize I was in #cursive :) was answering for tools.deps in general#2018-08-1003:53steveb8nNo problem 😀#2018-08-1004:04cfleming@steveb8n So it should happen automatically if you have auto-import selected, but there’s a bug which is fixed for the next EAP which prevents that from happening. Till then, open the Deps toolwindow and hit the refresh button, or you can right-click on a particular project if you have a big multi-module project and just refresh that.#2018-08-1004:26steveb8nthanks. I tried that and it works great. I have auto-import on so I must be hitting that bug. all good now#2018-08-1015:17bjAre there any plans to ever enable force-balancing for parinfer?#2018-08-1015:23bjrelated to https://github.com/cursive-ide/cursive/issues/1964 and https://groups.google.com/forum/#!topic/cursive/ZJ4fcp3A988 It's enabled by default in atom and feels really nice to use. Maybe it's because I'm in the habit of not having to worry about parens from that editor, but I still end up in malformed expressions in cursive which means for some edits it's not safe to rely on parinfer and instead I have to remember to use structural editing shortcuts (usually for raising and wrapping).#2018-08-1105:09cfleming@bj I’ve been meaning to write that up, force balance also produces some really non-intuitive behaviour#2018-08-1105:10cflemingI tend to resist tons of config options, but that seems like a good candidate since there’s really no perfect solution so people should be able to choose their poison.#2018-08-1215:48p-himikHow does Cursive resolves multiple definitions of the same ns? E.g. I have overridden a couple of Reagent ns as a sort of quick fix. The fix includes adding a signature to an already existing function. The problem is that sometimes Cursive highlights usages of these new signatures, and sometimes it does not. It can switch its behavior after any change I make.#2018-08-1317:04potetmDo there happen to be any plans to warn on ^{:deprecated "foo"} vars (e.g. w/ a strikethrough as they do w/ Java)?#2018-08-1319:07dnolenhrm in a multi-module project it doesn’t seem I can access the Deps tab? Leiningen tab comes up fine#2018-08-1319:32cfleming@dnolen That can happen when the project is first created, if you close the project and re-open it will appear.#2018-08-1319:32cflemingThat’s fixed in the next EAP#2018-08-1319:33dnolenah great - yeah seems fixed now#2018-08-1319:39cfleming@potetm Not currently, but there should be. I’d like that myself for Java interop actually.#2018-08-1319:47vuuvi@cfleming is there any plan on adding in midje support to cursive?#2018-08-1319:55dnolenhrm what about paths that are “out of content root”? do I need to symlink to make the Deps stuff happy?#2018-08-1319:56dnolenI have a mono repo where we have paths like "../other-lib"#2018-08-1323:20cfleming@dnolen Hmm, that won’t work at the moment, I can add that. I think symlinking would be the best for now, yeah. Are those paths shared across different projects?#2018-08-1323:21cflemingi.e. do you have two projects which each use ../other-lib?#2018-08-1323:21cfleming@alexkeyes Probably not, at least not in the short term. I believe Midje is more or less abandoned, and it’s hard to support due to the number of macros it uses.#2018-08-1412:36vuuvithanks for the response. it makes a lot of sense. We are trying to move back to clojure.test anyway.#2018-08-1323:22cflemingI did try once and gave up, I have more useful macro support tools now so I could have another go but I don’t think many people use it any more so it’s unlikely to be a priority.#2018-08-1323:36cfleming@p-himik I think in that case Cursive should resolve to both, but it’s possible there’s some weirdness there. When you say it highlights usages, do you mean the transient highlighting in the editor, or the Find Usages command?#2018-08-1402:33p-himikI mean, sometimes it underlines them as errors, sometimes it does not. The error is "Incorrect arity".#2018-08-1422:45cflemingThat’s very strange. I assume your redefined functions use the same arities as the originals?#2018-08-1502:40p-himikNo, as I mentioned earlier: "The fix includes adding a signature to an already existing function."#2018-08-1502:41p-himikThe error is caused by the new arity, but the error is sporadic, and it shouldn't even be an error.#2018-08-1323:41cfleming@potetm https://github.com/cursive-ide/cursive/issues/2029#2018-08-1323:42cfleming@dnolen https://github.com/cursive-ide/cursive/issues/2030#2018-08-1323:57dnolen@cfleming k thanks#2018-08-1323:59cfleming@dnolen If those paths are shared by various projects I think you’ll still have problems since different modules can’t share the same content root. In that case I think you’ll have to make a deps project out of it and use :local/root.#2018-08-1400:00dnolen@cfleming they aren’t sharing the same content root far as I can tell#2018-08-1400:00cflemingOk great.#2018-08-1400:00dnolenI just need to add something to the classpath outside of the project directory#2018-08-1400:00cflemingSure, that will work.#2018-08-1414:29dabrazheHas someone a good setup for Clojure (eg boot-clj) and Clojurescript setup for Electron development (and backend dev) together in Cursive, can you share it?#2018-08-1418:28joshkhmuch love for cursive! just something i've noticed: after running something in the repl, i have to press the up arrow key twice to get to the previously run function. and every once in a while i get no history at all no matter how many times i press up until i run another function - then the history returns.#2018-08-1418:29joshkhobviously not a big deal. just thought i'd mention it.#2018-08-1420:00kennyI have had that problem too.#2018-08-1421:31joshkhbug brothers.#2018-08-1422:43cfleming@joshkh @kenny This is the issue, but I can’t reproduce it: https://github.com/cursive-ide/cursive/issues/2003#2018-08-1504:17rbarkerI’m getting this error as well on my new old Mac. Never had it previously.#2018-08-1512:00gravGot this one as well on both Antergos Linux machines that I’m working with.#2018-08-1512:00gravI’ve never evaluated 2 so many times before#2018-08-1512:01grav@cfleming If you install a clean Antergos (maybe even in a VM), then install IDEA from the official repo, and then Cursive EAP, I bet it’s reproducible#2018-08-1516:32mikeyfordYes, this is happening to me too on macos 10.13.6. I've noticed it most when I jump to the REPL from the editor but had resisted a bug report because I can't figure out when it does and doesn't happen.#2018-08-1521:59cflemingThanks everyone, this is really tricky. I spent some time with @joshkh debugging this yesterday and still couldn’t reproduce the problem myself.#2018-08-1422:54kennyTricky. FWIW it happens on both my Ubuntu and Mac machines.#2018-08-1422:58joshkhhappens on my mac as well:
IntelliJ IDEA 2018.2 (Community Edition)
Build #IC-182.3684.101, built on July 24, 2018
JRE: 1.8.0_152-release-1248-b8 x86_64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
macOS 10.13.6
#2018-08-1510:48dottedmagWhat does error "No modules containing clojure.main" during REPL configuration mean?#2018-08-1510:51dottedmagI see, I needed to download Clojure into the project.#2018-08-1510:56dottedmag~How do I switch between editor and REPL windows using a keyboard shortcut?~ Cmd-\ and Esc#2018-08-1519:08tmarbleCursive newbie here... Seems like IntelliJ is barfing on one of my deps -- claiming it can't "index it"?#2018-08-1519:09tmarblehow do I make IntelliJ feel better and/or restart /redo the indexing?#2018-08-1519:09tmarbletried restarting it...#2018-08-1519:17SchpaaInvalidate the cache#2018-08-1519:17SchpaaFilemenu#2018-08-1519:17manutter51There’s an option in the File menu to “Invalidate caches and restart”#2018-08-1519:17manutter51lol, I’m too slow a typist#2018-08-1519:24tmarbleah ok thx!#2018-08-1600:52kennyWhen creating a new local REPL in a Deps project, the UI does not auto select your module if there is only one module in your project. Seems like it should do that.#2018-08-1601:07cfleming@kenny I’ll fix that, thanks: https://github.com/cursive-ide/cursive/issues/2033#2018-08-1601:12cflemingAlso @kenny, I think you asked about this one a while back: https://github.com/cursive-ide/cursive/issues/2031#2018-08-1601:14kennyBTW another thing I keep into (even with the auto-import in the latest release) is changing my deps.edn and it not refreshing or not refreshing before I start my REPL. This, of course, causes the REPL classpath to be out of date with what my deps.edn has and can lead to very confusing results. Would it be possible to have a check to see if the current deps.edn is different than the deps.edn that Cursive knows about when starting a REPL?#2018-08-1601:15kenny... and if it is, force a refresh.#2018-08-1601:15cflemingYeah, the auto-import stuff is based on IntelliJ infrastructure, and I can’t figure out exactly when it actually requests a refresh - it seems like it’s not very aggressive.#2018-08-1601:16cflemingI’ll check to see if I can do that.#2018-08-1601:17kennyAwesome, thanks!#2018-08-1609:41ikitommiHi. Is there a list of good IDEA setting when using Cursive on osx? Got a new computer and after installing the latest Ultimate + Cursive UI the editor seems bit slow (changing tabs, opening large EDN-files etc.). The default memory max setting is some hundreads on Mbs.#2018-08-1610:46dottedmagHow do I start a cljs REPL in Cursive for Figwheel.Main project?#2018-08-1610:52dottedmagThere is some documentation for lein-figwheel, but it does not seem to be relevant.#2018-08-1611:56bhauman@dottedmag it works with the new https://figwheel.org/docs/scripting_api.html You will need to adjust the following instructions to work with it: https://github.com/bhauman/lein-figwheel/wiki/Running-figwheel-in-a-Cursive-Clojure-REPL#2018-08-1612:04dottedmag@bhauman It seems that Cursive does not run clj, so the main question is how to bring in the dependencies.#2018-08-1612:04dottedmag@cfleming Am I right, or am I mistaken?#2018-08-1612:09bhaumanI believe it can now, but you could use lein in the short term to validate it can be done.#2018-08-1614:49chrispsWhat is the most common case for Cursive not showing re-frame symbols? (shadow-cljs)#2018-08-1615:41mfikes@dottedmag (and @bhauman) If you are willing to use the EAP of Cursive (which has support for deps.edn), setting up a figwheel.main REPL in Cursive is trivial. Just pick “Use clojure.main in normal JVM process” and in the Parameters box put something like
-m figwheel.main -b base
or however you start your REPL. Leave off the -r as Cursive supplies it.
#2018-08-1616:09amannDoes anyone know of a way to get the code inspection to also warn/show globally unused vars instead of just local ones? It’s 🔪 day for the codebase and I’d like to knock off as much dead code as possible.#2018-08-1616:17amannFWIW it looks like Cursive doesn’t expose an inspector for “Unused Global Symbol”?#2018-08-1620:01amann@cfleming this twould be :dope:#2018-08-1620:03amann(only pinging you so that this doesn’t completely fall off your :satellite_antenna: since it’s late in your tmz)#2018-08-1622:42cfleming@U344U5FNH Yeah, the offline inspection doesn’t work for Clojure and I don’t know why. Thanks for the prompt, I’ll ask about it in the JetBrains forum and hopefully it’ll be a quick fix.#2018-08-1622:43cflemingCursive actually does mark some global symbols as unused in the editor, but not all of them for performance reasons. It shouldn’t have false positives (i.e. if it’s marked as unused there, it’s unused, but it won’t mark them all)#2018-08-1714:35amannYeah, I mainly wanted to get it in the inspector. Getting it in the editor is muy bueno, but being able to review all the ish at a high level :thumbsup: :thumbsup: :thumbsup:#2018-08-1617:44dottedmag@mfikes Do I need to do something else to make it work (maybe some checkbox in project settings)? I have installed EAP build, put -A:fig into parameters field of REPL, and it runs runs java -classpath <...> clojure.main -A:fig -r#2018-08-1617:45dottedmagI don't see any libraries from deps.edn in -classpath#2018-08-1617:45mfikesI don’t think you can put an alias there#2018-08-1617:45mfikes(Dunno)#2018-08-1617:46dottedmagYes, because it does not run clojure wrapper at all.#2018-08-1617:46mfikes(I effectively just copied the :main-opts from what would be in the :fig alias into the Parameters box.)#2018-08-1617:47dottedmagRight, it can be done. But now I need to get all the libraries from the deps.edn and add them as libraries to the project manually?#2018-08-1617:51mfikesNo. With the EAP build you should be able to refresh your deps (from the Deps tab on the right), and they will automatically be added#2018-08-1617:54dottedmagAh, I need a Deps project.#2018-08-1618:00dottedmagNow it works, groovy.#2018-08-1618:00dottedmag@mfikes Thank you.#2018-08-1618:25pvrvHey people! 🙂 Would you know ? currently in intellij: double clicking or ctrl-w on aa - selects the whole symbol or namespace how to select only ‘aa’ in? http://aa.bb.cc aa-bb-cc :aa#2018-08-1620:12sgerguriHas anyone bumped into an issue with unresolved symbols when using Luminus? I have just created a new project through lein new luminus my-app, but when I import it in Cursive (Personal license on latest community IDEA version) I get lots of unresolved symbols, mostly coming in courtesy of mount. I'll take any suggestions on how to resolve this as it's rendering Cursive unusable for this little project of mine.#2018-08-1621:27ChrisHello, I just added java sources to my project in Cursive and now when I go to start the REPL, I get the following error: Error running 'REPL for ag': Cannot run program "java".#2018-08-1621:28ChrisWhen I run leiningen from the command line things work. When I run lein compile it works too and then I can start the REPL. Looks like I don't have JAVA_HOME set in IntelliJ or for the Cursive plugin. I tried to set the environment variable in the runner but that didn't work.#2018-08-1621:28ChrisAny ideas on how to set JAVA_HOME for Cursive?#2018-08-1621:33Chris@cfleming#2018-08-1621:45ChrisLooks like setting :java-cmd explicitly in my project.clj file did the trick.#2018-08-1622:40cfleming@ikitommi I have my IntelliJ set to use 2G (on a 16G laptop) and that works well - it’s probably overkill, but I usually have 2-3 big projects open at the same time.#2018-08-1622:41cfleming@chris.schreiner When you say “not showing” the symbols, what do you mean?#2018-08-1622:45cfleming@dottedmag @mfikes Yes, you’ll need to use a Deps project for this. I also need to add support for running REPLs with aliases, which is not there yet.#2018-08-1622:46cfleming@vim55k Currently that’s only possible by dragging with the mouse. That’s been a little contentious, but on balance for Clojure I find it more useful than selecting segments when using “expand selection”.#2018-08-1622:48cfleming@sgerguri I’ll try that today and see if I can reproduce. Sometimes the Cursive indexes can get messed up, and the best way to fix them is to use File-&gt;Invalidate caches/Restart, but if the symbols are defined using macros or in other dynamic ways Cursive can struggle too.#2018-08-1622:50kennyIs there a way to run some code in the REPL using the test fixtures for the namespace you're in?#2018-08-1622:52cfleming@kenny Not without wrapping it in a deftest and using the test integration.#2018-08-1622:52cflemingBut that should work, although it’s a little messy.#2018-08-1622:52kennyI can do that but I don't see a way to get the result to the REPL.#2018-08-1622:52cflemingOh, I see.#2018-08-1622:52kennyI could prn it but that's ugly.#2018-08-1622:52kennyOr pprint. But still ugly.#2018-08-1622:53kennyMy eyes like colors 🙂#2018-08-1622:53cflemingI can’t think of a non-ugly solution, sorry.#2018-08-1622:53cflemingHaha, yes, and indentation 🙂#2018-08-1622:53kennyOh well.#2018-08-1622:54kennyActually, is there a way to get the code behind the caret in a custom REPL command?#2018-08-1622:54kennyBecause I have this:
(defmacro test-env
  "Executes `body` after running all fixtures."
  [& body]
  `(let [once-fixtures# (join-fixtures (:clojure.test/once-fixtures (meta *ns*)))
         each-fixtures# (join-fixtures (:clojure.test/each-fixtures (meta *ns*)))
         fixtures# (join-fixtures [once-fixtures# each-fixtures#])]
     (fixtures#
      (fn []
        
#2018-08-1622:54sgerguri@cfleming Thanks! The issue specifically seems to happen with mount only - and can be easily reproduced on a fresh luminus app if you just jump through to mount.core.#2018-08-1622:55cflemingYou might be able to do it using an internal function from clojure.test, but I can’t remember well enough how all that works.#2018-08-1622:55cfleming@sgerguri Ok, I’ll try that, thanks!#2018-08-1622:55sgerguriThat triggers a StackOverflowException inside IntelliJ, and it does the same when you navigate back. I've tested this across different IDEA versions - 2017.2, 2018.2.1 community and ultimate.#2018-08-1622:55kennyThe macro I sent initializes the test env. I just need a way to get the form before the caret.#2018-08-1622:56cfleming@sgerguri Which Cursive version are you on? The recent EAPs have a fix for at least one SOE problem.#2018-08-1622:56sgerguriLatest stable.#2018-08-1622:57cflemingOk, if you’re willing to run the EAP, hopefully that will fix the problem.#2018-08-1622:57sgerguriLet me give that a spin - will report back shortly.#2018-08-1622:57cfleming@sgerguri See here: https://cursive-ide.com/userguide/index.html#eap#2018-08-1622:58cfleming@kenny See here: https://groups.google.com/d/topic/cursive/0GzV5h2C4ig/discussion#2018-08-1622:59cfleming~form-before-caret or ~top-level-form should do what you want.#2018-08-1623:00kennyOooo. That definitely opens up some possibilities.#2018-08-1623:00kennyCan you share REPL commands across computers?#2018-08-1623:00cflemingIndeed - if there’s anything else that would be helpful there, let me know.#2018-08-1623:00cflemingGood question - one sec.#2018-08-1623:01cfleming@kenny They’re stored in repl-commands.xml - if you share that file, then I think that should work, yes.#2018-08-1623:01dottedmagIs there a way to have typed (, { or [ wrap current selection instead of replacing it?#2018-08-1623:02cfleming@dottedmag Settings-&gt;Editor-&gt;General-&gt;Smart Keys-&gt;Surround selection on typing quote or brace#2018-08-1623:02dottedmagYay, thanks.#2018-08-1623:03sgerguri@cfleming the EAP definitely fixes that issue. Thanks for the stellar support here on Slack, Colin - looking forward to the next stable release.#2018-08-1623:03cfleming@sgerguri Great, thanks for letting me know! Next stable should be out in a week or two.#2018-08-1623:08sgerguriJust realised I mixed two issues together - the SO and the symbols not resolving. I reported the former, which I ultimately discovered by trying to resolve the latter, so apologies about the confusion!#2018-08-1623:10sgerguriInvalidating caches does not help. The symbols are effectively defined using macros, so I'm guessing that is expected behaviour for now - but if there's any possibility of this getting better in the future then I will certainly very much appreciate it! 🙂#2018-08-1623:20cfleming@sgerguri What does the macro look like? There is some support for telling Cursive to resolve a macro form like def, defn etc, which may be sufficient.#2018-08-1623:21sgerguri
#?(:clj
    (defmacro defstate 
      "Defines a state. Restarts on recompilation. 
       Pass ^{:on-reload :noop} to prevent auto-restart
       on ns recompilation, or :stop to stop on recompilation."
      [state & body]
      (let [[state params] (macro/name-with-attributes state body)
            {:keys [start stop] :as lifecycle} (apply hash-map params)
            state-name (with-ns *ns* state)
            order (make-state-seq state-name)]
          (validate lifecycle)
          (let [s-meta (cond-> {:order order
                                :start `(fn [] ~start)
                                :status #{:stopped}}
                         stop (assoc :stop `(fn [] ~stop)))]
            `(do
               ;; (log (str "|| mounting... " ~state-name))
               ;; only create/redefine a new state iff this is not a running ^{:on-reload :noop}
               (if-not (running-noop? ~state-name)
                 (do
                   (~'defonce ~state (DerefableState. ~state-name))
                   (mount-it (~'var ~state) ~state-name ~s-meta))
                 (~'defonce ~state (current-state ~state-name)))
               (~'var ~state))))))
#2018-08-1623:21sgerguriPossibly the #?(:clj) is confusing it?#2018-08-1623:22cflemingThat’s possible, the cljc support can be flakey sometimes - it’s a tricky problem. Let me generate a luminus project now actually, and I’ll try it out - one sec.#2018-08-1623:26cfleming@sgerguri Ok, I have a luminus project open, where am I looking for the unresolved symbols?#2018-08-1623:27cflemingOh, I see what you mean by the defstate thing.#2018-08-1623:28sgerguriAnywhere a defstate is used - core is a good example.#2018-08-1623:28cflemingYeah, you can choose to resolve defstate as def and that works well - see https://cursive-ide.com/userguide/macros.html#2018-08-1623:29cflemingDoc is slightly out of date, it looks like this:#2018-08-1623:29cfleming#2018-08-1623:29cfleming#2018-08-1623:29sgerguriMarvellous, I'm off to do that immediately.#2018-08-1623:30sgerguriWorked a treat. Again, thanks for the stellar support.#2018-08-1623:30cflemingNo problem!#2018-08-1704:03tony.kay@sgerguri I was just noticing that Mount 0.1.13 seems to have problems for me, but 0.1.12 is fine…try going back a version#2018-08-1704:04tony.kay@cfleming defstate was working fine for me, but in 0.1.13 it loses its mind, and I can no longer access the “resolve as” menu for it at all#2018-08-1704:05tony.kay#2018-08-1704:05tony.kayIf I drop back to 0.1.12 it’s fine#2018-08-1704:07tony.kay1.8.0-eap5#2018-08-1704:32tapThis is content in my deps.edn file {:aliases {:x {:jvm-opts ["-Xmx10G"]}}}. When I start repl via command line with this command clj -A:x, I can slurp a big file in that repl. But for Cursive repl, I've selected x inside Deps window but I still can't slurp a big file. Am I missing anything?#2018-08-1704:33tapDoes Cursive use deps.edn's :jvm-opts?#2018-08-1707:11cfleming@tap No it doesn’t yet - that will be in the next EAP.#2018-08-1707:12tapOk. No problem#2018-08-1709:23cfleming@tap BTW you can run that REPL in Cursive by manually adding the JVM opts to the “JVM args” field in your REPL run config.#2018-08-1709:27tap@cfleming Thanks. I'm doing the other way around. Start clj repl from command line, start nrepl server inside it and have Cursive remote connect to it#2018-08-1709:27cflemingYeah, that will work too.#2018-08-1709:32tapI'm perfectly fine with not yet fully supported and work in progress. Just that the release notes in mailing list aren't clear about what's already implemented and supported and what's not ready.#2018-08-1709:32tapOr maybe I haven't read it carefully. (That's why I asked about it)#2018-08-1709:46cflemingFair enough - having a better roadmap and change log is on my to-do list.#2018-08-1709:46cflemingI don’t think that is documented anywhere right now.#2018-08-1710:28roklenarcicrenew page doesn't work for me#2018-08-1710:28roklenarcicError processing request: [0]#2018-08-1710:28roklenarcicah, christ, my adblocker ruined it#2018-08-1710:29roklenarcicI always forget I have that installed#2018-08-1806:37cfleming@roklenarcic Hehe, yeah, I have my firefox so secure that half the web doesn’t work.#2018-08-1904:20onetom@dottedmag @mfikes i was wrangling with nrepl+figwheel.main+cljs-repl+cursive config last week too. while i've also realized that the Use clojure.main in normal JVM process works, it doesn't pretty print the results of my evaluations i send to it with shift-cmd-p, like it does with the remote nrepl config. i've documented my setup for my colleagues here: https://github.com/enumatech/cljs-abi-viewer/tree/block-explorer#start-using-a-clojurescript-network-repl-with-cursive#2018-08-1907:01cfleming@onetom I’m planning to add that soon, so that the clojure.main REPL will use a prepl-style structured output which will allow Cursive to do more useful things with it.#2018-08-1923:22Oliver GeorgeIs there any documentation for setting up a repl for 'clojure deps' project? I have the 1.8.0-eap6. I get some output about a task (below) but no repl prompt.
9:19:32 AM: Executing task...
9:19:37 AM: Task execution finished.
#2018-08-1923:22Oliver GeorgePerhaps I'm not understanding the configuration screen.#2018-08-1923:23Oliver George#2018-08-1923:59cfleming@olivergeorge Just set up a local REPL as usual, either the “Use nREPL in normal JVM process” or “Use clojure.main in normal JVM process” options should work.#2018-08-2000:00cflemingOne thing that is currently missing is the ability to use aliases to start your REPL - since those options use the project classpath they will use the aliases that were used to sync the project to IntelliJ.#2018-08-2000:25Oliver GeorgeThanks @cfleming#2018-08-2101:17sooheonAlternative is just to start the REPL with the aliases and flags you want, and connect to it as a remote repl #2018-08-2108:49Petrus TheronIntelliJ with Cursive does not seem to be indexing deps.edn dependencies, e.g. (:require [datomic.api]) via com.datomic/datomic-free {:mvn/version "0.9.5697"} in deps.edn. Auto-import is enabled and IntelliJ prompts to refresh dependencies when I touch deps.edn. What am I doing wrong?#2018-08-2110:57cfleming@petrus What’s the behaviour you’re seeing? Are the symbols not being resolved? I can’t think of anything that should cause that. It’s definitely working for dependencies in general, I don’t know why datomic would be different.#2018-08-2110:58Petrus Theron#2018-08-2110:59Petrus Theronwhere :deps in deps.edn contains this#2018-08-2110:59Petrus Theron@U0567Q30W not sure if you can see my image uploads due to Slack limits?#2018-08-2111:10cfleming@petrus Yes, I can - Slack complains, but does show them.#2018-08-2111:11Petrus Theronno, I don't get a prompt for stubs
#2018-08-2111:15cflemingIf you open the Deps toolwindow and press the refresh button, do you see it then?#2018-08-2111:15cflemingWhen it’s done refreshing, I mean?#2018-08-2111:15cflemingIt’ll come up as a notification, bottom right.#2018-08-2111:16Petrus Theroncool, didn't know about the deps tool window. I can see datomic-free is listed as a recognized dependency of my project#2018-08-2111:16Petrus Theronso this shows up, which looks like stubs#2018-08-2111:17cflemingNo, that’s IntelliJ autocompleting from classes - those are the compiled class names.#2018-08-2111:17Petrus Theronbut no suggestions come up for a known function#2018-08-2111:17cflemingSo after refreshing, still no stubs prompt?#2018-08-2111:18cflemingCan you check the Event Log, View-&gt;Tool Windows-&gt;Event Log for anything relating to stubs?#2018-08-2111:25cfleming@petrus ^^ (pinging because I’m off to bed shortly)#2018-08-2111:25Petrus Theronahhh, I see stub prompt now. I always ignored this#2018-08-2111:26Petrus TheronGreat 🙂 It works after generating stubs. I didn't know I needed to do that for suggestions to work#2018-08-2111:26cflemingYeah, that’s because Cursive indexes source, and Datomic doesn’t have any.#2018-08-2111:27cflemingSo that will create function stubs introspected from the namespaces which Cursive can work with.#2018-08-2110:58Petrus Theron#2018-08-2110:59Petrus Theronwhere :deps in deps.edn contains this#2018-08-2111:10cfleming@petrus Do you get a prompt to create stubs? Did you do that?#2018-08-2111:26Petrus TheronGreat 🙂 It works after generating stubs. I didn't know I needed to do that for suggestions to work#2018-08-2113:35jhughesHi, clojure noob and intellij noob here? I can get the Clojure REPL to work in Intellij, but can't seem to get Clojurescript REPL to. Can't someone give me steps to make this happen?#2018-08-2113:54lloydsharkIf you are targeting node and want a clojurescript repl in Cursive then I have some instructions in this project.#2018-08-2117:04jhughesthanks, it looks very helpful 👍#2018-08-2113:54lloydsharkhttps://github.com/lloydshark/aws-clojurescript-lambda#2018-08-2114:26manutter51I followed the instructions here: https://github.com/bhauman/lein-figwheel/wiki/Running-figwheel-in-a-Cursive-Clojure-REPL#2018-08-2117:04jhughesthank you#2018-08-2202:00hagmonk@cfleming how does one add a module to the scope of the current REPL? I could have sworn I figured out how to do this, but no longer …#2018-08-2202:02cfleming@hagmonk The scope of the current REPL is basically a module. So as long as the REPL’s module depends on the new one, it should be automatically in scope. You’ll have to restart the REPL after adding it, though.#2018-08-2202:03hagmonkHmm, that’s definitely the case already. I can eval expressions just fine, but Load file in REPL keeps complaining that the file isn’t in the right scope …#2018-08-2202:04cflemingHmm#2018-08-2202:05cflemingSo this works weirdly in deps because of how the propagation works - it doesn’t actually use a module dependency but creates a library with the source roots from the other module and depends on that instead. I wonder if that is breaking things.#2018-08-2202:05cflemingSo you have modules A and B, A depends on B using :local/root and you can’t load files from B into a REPL run using A?#2018-08-2202:06hagmonkThat’s correct. Let me kill this REPL and just make sure I’m not hallucinating#2018-08-2202:09hagmonkYeah confirmed, I required a B namespace in A’s core.clj. Loaded A’s core.clj just fine. I jumped to definition of B’s ns from A’s core.clj, taking me to B’s core.clj. Tried to load file into REPL and it claimed B’s core.clj wasn’t in scope#2018-08-2202:09cflemingOk, let me try that.#2018-08-2202:09hagmonkI can eval single forms from B just fine, though#2018-08-2202:10cflemingYeah, only file loading has that check#2018-08-2202:11hagmonkah ha, so my hallucinations must be explained by means not related to Cursive#2018-08-2202:24cfleming@hagmonk https://github.com/cursive-ide/cursive/issues/2039#2018-08-2202:54cflemingUgh, so this is really funky#2018-08-2202:54cflemingThe standard “with libraries” scope only gets classes out of it, not sources.#2018-08-2202:56cflemingThat’s going to be annoying.#2018-08-2204:02hagmonk@cfleming aww that’s a pain. My first thought though was: can it not just pick the last active REPL and send the file there? But then I wondered about the semantics of multiple REPLs, and worse, multiple REPLs who share a common dependency … I think the hallucinations are starting again …#2018-08-2204:03cflemingYeah, it’s a bit tricky - this feature was basically to prevent confusion when users have multiple REPLs open.#2018-08-2204:04cflemingBut it’s not impossible to solve, I just have to figure out how to bend IntelliJ to my will.#2018-08-2204:47cfleming@hagmonk Phew, fixed for the next EAP.#2018-08-2204:47cflemingJetBrains had my back in the end.#2018-08-2204:59hagmonkAnd I just renewed my subscription today, so I can actually get that update :)#2018-08-2205:05hagmonkHmm random question - is there an equivalent of CIDER’s command to evaluate the expression in the REPL and put the results in the current buffer? I find myself using that quite a bit when writing tests, missing it now that I’m back in Cursive full time#2018-08-2206:42cfleming@hagmonk So not at the moment. The problem is that you get a combinatorial explosion of “Evaluate top form/form before point/selected form and then output it/add it as a comment/replace the original with it” etc. I have a plan to extend REPL commands to allow these sorts of combinations to be created.#2018-08-2206:43cflemingAnother workaround solution (also useful for other things) would be a “Copy last command output” action which you could then paste.#2018-08-2215:14joelhello all, is there any way to step/debug withing records? for some reason my breakpoint is marked as invalid when putting it in a record code#2018-08-2215:15joelsame for go-blocks#2018-08-2216:07sparkofreasonI'm running Cursive on Windows, but most of my CLI environment runs in WSL. Any thoughts on making this work short of a Windows version of clj?#2018-08-2216:29conanI have this setup; I share my project directories between Windows and WSL without any trouble. I think I end up with two maven repos, but ¯\(ツ)/¯#2018-08-2216:30conanjust remember to set git's core.autocrlf to input - you never really want CRLF anywhere#2018-08-2216:30conanOh I also have to set my env vars twice, but I actually never run REPLs from the WSL environment because the cursive one is so much better#2018-08-2216:52sparkofreasonThanks, I forgot to mention I was referring to the deps.edn support. Does that work for you? I have the setup you describe, and it does work great except for deps.edn.#2018-08-2216:52sparkofreason^^^Should have mentioned I was referring to deps.edn support.#2018-08-2218:23richiardiandreaso I am configuring a shadow-cljs with shadow#2018-08-2218:23richiardiandreaand I go to Run conf#2018-08-2218:23richiardiandrea#2018-08-2218:23richiardiandreais this running a shadow-cljs watch build or just a normal nrepl build?#2018-08-2218:23richiardiandrea(I guess the latter)#2018-08-2218:29richiardiandreaand is there a way to launch a deps.edn repl with the new Cursive?#2018-08-2218:30richiardiandreaI see a Clojure Deps configuration#2018-08-2219:39richiardiandreaand I still see I need project.clj with lein-tools-deps in there or the deps are not actually resolved#2018-08-2222:48cfleming@joelmarty2 Unfortunately that doesn’t work because of the way Clojure generates its classnames. I have a plan to fix it but haven’t managed to yet.#2018-08-2307:29joelthanks for the answer. Keep up the good work 🙂#2018-08-2222:49cfleming@dave.dixon I’m hoping you should be able to make this work. Here’s the plan:#2018-08-2222:50cfleming1. Settings-&gt;Build, E, D-&gt;Build Tools-&gt;Clojure Deps-&gt;Global settings-&gt;Use tools.deps directly and pick a version.#2018-08-2222:51cfleming2. In that same config, point Cursive to your user deps.edn. Cursive should only need to read it so I think you could put it under WSL, otherwise put it in Windows somewhere and point your WSL version to it using CLJ_CONFIG.#2018-08-2222:53cflemingCursive should now work with tools.deps, and hopefully they can interoperate ok. You may end up with two maven caches, or it may be possible to tell the WSL CLI to use your Windows one.#2018-08-2222:53cflemingLet me know how that works!#2018-08-2222:55cfleming@richiardiandrea There isn’t yet, no, but it mostly works. The case that doesn’t work yet is if you want to use different aliases to run your REPL than you want to use to sync the project to Cursive.#2018-08-2222:55cflemingBut you don’t need a project.clj now, as long as you’re running the EAP - some very brief instructions are here: https://groups.google.com/d/msg/cursive/NQIJzhGjfEY/hdNXUco8CgAJ#2018-08-2222:58cflemingIf you want to use an alias with :main-opts, you can work around that by manually entering “JVM Args” in the REPL run config.#2018-08-2222:59richiardiandreaoh ok cool then, I will be trying this#2018-08-2222:59richiardiandreathank you for now, will ask if something does not work 😄#2018-08-2223:12richiardiandrea@cfleming ups, I receive: Could not initialize class com.intellij.externalSystem.JavaProjectData#2018-08-2223:14richiardiandreaoh looks like it is not finding the executable#2018-08-2223:17richiardiandreauhm no, still not really working...#2018-08-2223:19richiardiandreaCan't find bundle for base name messages.JavaCoreBundle, locale en_CA#2018-08-2223:19richiardiandreawill open an issue#2018-08-2223:40sparkofreason@cfleming Works! Thank you!#2018-08-2300:19cfleming@richiardiandrea How are you importing that project?#2018-08-2300:29richiardiandrea@cfleming Import Project, expand and seelect deps.edn, then filling up the next window with path to clojure#2018-08-2301:07richiardiandreaA couple of quirks, my clojure is in a custom folder and for some reason the locale is CA. I opened an issue but feel free to ping me here any time#2018-08-2302:34cfleming@richiardiandrea Can you add the full stack trace for the locale error to that issue?#2018-08-2302:35richiardiandreaSure I can do that, how do I get it though? It is the only thing I see in that window#2018-08-2302:38cflemingI’m trying to figure out how to set the locale in IntelliJ#2018-08-2302:40cflemingYou could try this: Help-&gt;Edit Custom VM Options…, enter -Duser.country=US there, restart and see if that helps.#2018-08-2302:41cfleming@richiardiandrea ^#2018-08-2302:42richiardiandreaWill try that thanks a lot afk right :)#2018-08-2302:44cflemingNo rush 🙂#2018-08-2320:28richiardiandreaadded them! I was wondering if you have a spare Cursive logo file somewhere so that I cna use it in a blog post?#2018-08-2401:05cflemingYou could snag the one from the homepage, it’s an SVG: https://cursive-ide.com/images/logo.svg#2018-08-2402:04cflemingAlso @richiardiandrea did adding the locale fix the exception?#2018-08-2402:24richiardiandreaThank you! And unfortunately not#2018-08-2302:35cflemingYou can probably find it using Help-&gt;Show log in Finder/Explorer#2018-08-2302:35richiardiandreaOh ok will try#2018-08-2308:56agigaoHi there, cursive successfully retrieved dependency (using generate -> add to dependency), but REPL doesn’t seem to find it: returns fileNotFoundException:
CompilerException java.io.FileNotFoundException: Could not locate yada/yada__init.class or yada/yada.clj on classpath., compiling:(core.clj:1:1)
#2018-08-2311:10cfleming@chokheli For that dependency to show up you’ll have to refresh your project to ensure the dep is synced to IntelliJ, and then restart your REPL.#2018-08-2311:11cflemingYou can refresh the project and check that the dep appears in your dependency tree in either the Leiningen or Deps toolwindows, depending on which you’re using.#2018-08-2312:06raymcdermottis the test / REPL integration missing for deps.edn projects? I can’t find it 😞#2018-08-2400:47kennyI have a user.clj on the classpath that does this:
(ns user
  (:require
    [clojure.spec.alpha :as s]
    [expound.alpha :as expound]))

(set! s/*explain-out* expound/printer)
When I start a REPL I get this:
Exception in thread "main" java.lang.ExceptionInInitializerError
	at clojure.main.<clinit>(main.java:20)
Caused by: java.lang.IllegalStateException: Can't change/establish root binding of: *explain-out* with set, compiling:(user.clj:6:1)
	at clojure.lang.Compiler.load(Compiler.java:7526)
	at clojure.lang.RT.loadResourceScript(RT.java:379)
	at clojure.lang.RT.loadResourceScript(RT.java:366)
	at clojure.lang.RT.maybeLoadResourceScript(RT.java:362)
	at clojure.lang.RT.doInit(RT.java:482)
	at clojure.lang.RT.<clinit>(RT.java:336)
	... 1 more
Caused by: java.lang.IllegalStateException: Can't change/establish root binding of: *explain-out* with set
	at clojure.lang.Var.set(Var.java:223)
	at user$eval708.invokeStatic(user.clj:6)
	at user$eval708.invoke(user.clj:6)
	at clojure.lang.Compiler.eval(Compiler.java:7062)
	at clojure.lang.Compiler.load(Compiler.java:7514)
Any idea why? Perhaps because the nREPL hasn't connected yet?
#2018-08-2401:11cfleming@raymcdermott There’s nothing lein-specific about it, but it does rely on nREPL (for the moment). If you use a clojure.main REPL it won’t work, but if you use “Use nREPL in normal JVM process” it should work.#2018-08-2401:12cfleming@kenny I’m not sure - do you get that running it outside Cursive as well? Is that with deps or lein?#2018-08-2401:12cflemingI don’t think it’s anything to do with nREPL.#2018-08-2402:49Alex Miller (Clojure team)it is nrepl#2018-08-2402:50Alex Miller (Clojure team)s/*explain-out* is a dynamic variable. to be able to set! it, it must have been bound in a binding somewhere higher on the stack. The clojure.main repl does this, nrepl does not.#2018-08-2402:51Alex Miller (Clojure team)https://github.com/clojure/clojure/blob/master/src/clj/clojure/main.clj#L85#2018-08-2402:55Alex Miller (Clojure team)in some cases (alter-var-root #'s/*explain-out* (constantly expound/printer)) may work better for you#2018-08-2407:34cfleming@alexmiller Interesting, thanks for the explanation.#2018-08-2407:34cflemingThat sounds like it should be simple to fix in nREPL, at least.#2018-08-2407:49cflemingI filed this: https://github.com/nrepl/nREPL/issues/44#2018-08-2409:17raymcdermott@cfleming I must have missed the news that you can use a standard nREPL with a deps.edn project. Thanks - it’s working great again#2018-08-2411:16Alex Miller (Clojure team)deps.edn can be used to run Clojure programs and an nrepl client is just a program#2018-08-2412:24llsouderAnybody have some "standard" keybinding for cursive?#2018-08-2412:25llsouderI am using the vim plugin too, maybe I should switch back to intellj mode?#2018-08-2412:26llsouderand just deal with all the "j"s and "k"s I accidentally type 🙂#2018-08-2412:48sgerguri@llsouder I mostly use the defaults, with a few extra mappings and some remapped to avoid conflicts on MacOS; I also use the Vim plugin, and that's how I tend to navigate - I don't use the sexpr-jumping chords. I find that it works well.#2018-08-2412:57llsouder@sgerguri what functions are you mapping in your "extra mappings"?#2018-08-2413:00sgerguriJust those that are REPL-related - switching between REPL and editor window, reloading and syncing, sending form under caret for eval (though the last one might just be mapped by default). I also have test integration set up, but again that might be coming in through the default settings. I haven't changed things in there in a long time, and the Keymap has improved dramatically compared to what the situation was just a couple of years ago.#2018-08-2414:19raymcdermott@alexmiller - yeah, sorry I meant specifically nREPL with #cursive#2018-08-2416:39onetom@cfleming how the classpath is being calculated for the local nREPL and clojure.main run configurations in a deps project?#2018-08-2416:41onetombtw, in the clojure.main case, the -classpath is not double-quoted, but in the nREPL case it is. i just noticed it when i copy-pasted the repl command lines into a scratch and it got syntax-highlighted differently#2018-08-2416:42onetomnREPL case:
/Library/Java/JavaVirtualMachines/jdk-10.0.2.jdk/Contents/Home/bin/java "-javaagent:/Applications/IntelliJ IDEA.app/Contents/lib/idea_rt.jar=55773:/Applications/IntelliJ IDEA.app/Contents/bin" -Dfile.encoding=UTF-8 -classpath "/Library/Java/JavaVirtualMachines/jdk-10.0.2
...
:/Users/onetom/Library/Application Support/IntelliJIdea2018.2/clojure-plugin/lib/tools.nrepl-0.2.12.jar" clojure.main -i /private/var/folders/5m/ssz2l6_n7z74d31b2q5wbfl00000gn/T/form-init5295767744484685351.clj
#2018-08-2416:42onetomclojure.main case:
/Library/Java/JavaVirtualMachines/jdk-9.0.1.jdk/Contents/Home/bin/java "-javaagent:/Applications/IntelliJ IDEA.app/Contents/lib/idea_rt.jar=56747:/Applications/IntelliJ IDEA.app/Contents/bin" -Dfile.encoding=UTF-8 -classpath /Library/Java/JavaVirtualMachines/jdk-9.0.1
...
:/Users/onetom/.m2/repository/org/clojure/data.priority-map/0.0.7/data.priority-map-0.0.7.jar clojure.main -r
#2018-08-2416:44onetomjust saying, because maybe the clojure.main case might need some shell escaping... unless there is some magical reason why are they quoted differently#2018-08-2417:07dpsuttonquestion for a coworker: how can one prevent cursive from indexing a really big edn file? He's getting stack overflow errors#2018-08-2417:10manutter51maybe move it into its own folder, then right click the folder and select Mark Directory As -> Excluded — probably not ideal, but I believe that will work#2018-08-2417:11dpsuttonah it's by directory, not file?#2018-08-2417:11dpsuttonthanks#2018-08-2417:11manutter51Yeah it took me almost a year to figure out I could Exclude the logs directory. “Find In Project” is a LOT less spammy now.#2018-08-2417:12dpsuttonawesome. we were looking around in context menus but always by file and not on the directory. thanks a bunch#2018-08-2420:13dealyHi I recently upgraded intellij to the latest version and I can no longer see the leiningen tool window, nor run my clojure project. I'm running cursive 1.7.0-2018.2 and leiningen plugin 0.0.3. Any ideas?#2018-08-2420:14manutter51Maybe try File -> Invalidate Caches & Restart?#2018-08-2420:14dealythink i tried that already, but will try again#2018-08-2420:16manutter51Wait, Leiningen plugin? Cursive does its own lein stuff, you shouldn’t need a separate plugin and I would think having one might be a problem#2018-08-2420:17dealyhrmmm, could be I noticed that the plugin is very old#2018-08-2420:18manutter51Yeah, I’m pretty sure you want that one turned off#2018-08-2420:36dottedmagI see rebel-readline in classpath for REPL, but I can't figure where it comes from. The project is deps.edn one, and I do have rebel-readline-cljs in :extra-deps for some of the aliases, but not in default :deps.#2018-08-2420:44cfleming@dpsutton Wow, that must be a big file.#2018-08-2420:45dpsutton1 sec i'll tell you#2018-08-2420:45cflemingIs it very deep, i.e. lots of structures nested to a really deep level? I’d be interested to see the stacktrace for the SOE#2018-08-2420:46cfleming@dealy Yes, you have to remove the Leiningen plugin, it’s very old and Cursive’s support is much more sophisticated (and was based on that plugin a long long time ago, with the authors’ blessing).#2018-08-2420:46cfleming@dottedmag You can see the dependency tree in the deps toolwindow so you can see how it’s being pulled in.#2018-08-2420:46dpsutton5600 lines of #:db{:ident :breeze.Immunization/status, :valueType #:db{:id 20}, :cardinality #:db{:id 35}} and similar#2018-08-2420:46dpsuttonless than a meg#2018-08-2420:47cfleming@dpsutton That should definitely not provoke an SOE.#2018-08-2420:47dpsuttonmy coworker agrees 🙂 lol#2018-08-2420:47cflemingHehe#2018-08-2420:47dpsuttonyeah we were surprised to see a stack overflow on it#2018-08-2420:47dpsuttonit's not heavily nested to my knowledge#2018-08-2420:48cflemingIf you could email a copy of the SOE stacktrace, it would be much appreciated. Is it possible that the SOE was actually provoked by some other file in the project, especially a CLJC one?#2018-08-2420:48dpsuttoni'm not sure we chased that thread#2018-08-2420:48dpsuttonemail?#2018-08-2420:48dpsuttonwhat's preferred?#2018-08-2420:48cflemingThere’s at least one SOE fixed in the latest EAP - are they on the EAP or the latest stable?#2018-08-2420:48cfleming<mailto:/cdn-cgi/l/email-protection|/cdn-cgi/l/email-protection>#2018-08-2420:48dpsuttonstable i think#2018-08-2420:49dpsuttonwill do#2018-08-2420:49dottedmag@cfleming Oh, I see some of aliases checked, but I don't remember checking them. Thanks.#2018-08-2420:49cfleming@dpsutton Ok, if they switch to the EAP that might be fixed.#2018-08-2420:49cfleminghttps://cursive-ide.com/userguide/index.html#eap#2018-08-2420:54cfleming@onetom I’m not sure about the quoting, it’s IntelliJ that actually constructs the classpath - I use an API to set the elements and then it constructs. It’s usually right, but I don’t always understand its reasons 🙂#2018-08-2421:23dealy@cfleming thanks, yea removing the old plugin did the trick#2018-08-2511:28Petrus TheronHow do I link deps.edn for existing Cursive project?#2018-08-2511:29Petrus TheronI see this in options#2018-08-2511:43Petrus TheronI can't figure out how to do it 😕#2018-08-2603:21cfleming@U051SPP9Z I wrote a bit about this on the ML: https://groups.google.com/d/msg/cursive/NQIJzhGjfEY/hdNXUco8CgAJ#2018-08-2603:22cflemingIf you’re looking to add a new deps module to an existing project, then View-&gt;Tool Windows-&gt;Deps, hit + and then select the deps.edn file.#2018-08-2519:01kenjI’m getting [symbol] cannot be resolved when setting up a brand new cljs project. What’s weird is the auto-complete works but Cursive seems to think these things don’t exist.#2018-08-2519:05kenjI realize I can turn the warning off, but I’m wondering if I’m doing something otherwise wrong#2018-08-2602:01erichmondI might be a complete moron, but I can’t for the life of me get cursive to read a deps.edn file when starting a REPL#2018-08-2602:02erichmondhas anyone done this successfully?#2018-08-2602:15steveb8n@erichmond @petrus I struggled when I switched also. I find the best way now it to 1/ add the deps.edn file. 2/ delete the project 3/ import the project and select the deps.edn file. that will start the wizard and load it#2018-08-2602:16steveb8nthere’s also a “deps” tool window which you can use to refresh/play with the deps.edn config#2018-08-2602:20erichmond@steveb8n thanks! where is the deps tool window? and once you import the project with deps.edn the REPL will pick it up?#2018-08-2602:26erichmondwow, that did it, thanks @steveb8n 😄#2018-08-2602:26steveb8nI use the “find action” action to open the “deps” window#2018-08-2602:27steveb8nit’s not keymapped by default#2018-08-2602:27steveb8nand yes, once imported you can create a run config that builds the classpath using the deps.edn#2018-08-2602:28steveb8nand it starts much faster than lein. FTW#2018-08-2604:10tapI'm only work in zero Java project for the past 2 years. Is there a way to force Navigate > Class to only search for clojure namespaces, not java classes when I'm on non-clojure related files such as README.md?#2018-08-2604:10tap#2018-08-2604:10tap#2018-08-2604:10tapI mean this ☝️#2018-08-2607:39eskos@tap I've noticed the lack of this one as well, but haven't bothered to report it as feature request/bug yet. Would make tons of sense to have it work exactly as you describe 🙂#2018-08-2806:08onetomi just created a new deps project by
mkdir xxx
cd xxx
echo '{:deps {org.clojure/clojure {:mvn/version "1.9.0"}}}' > deps.edn
idea .
and then just press next next next. my Preferences / Build Tools / Maven / Repositories list is empty. doesn't it supposed to have maven and clojars by default? i would like to use the package and version autocompletion in my deps.edn.
#2018-08-2809:43mhuebertNot sure if this is a bug per se — but these little hints don’t seem to appear for macros, only regular functions#2018-08-2913:27wilkerlucio@cfleming on that, cljs also doesn't auto-complete macros, but once you type it it's recognized#2018-08-2913:28wilkerluciothe same issue kind applies to auto-import, doesn't work when pointing to macros, but work for fns#2018-08-2921:53cfleming@U066U8JQJ Hmm, that’s definitely a bug. I’m pretty busy right now but when I get a chance I’ll look at that.#2018-08-2810:31cfleming@tap @suomi.esko I don’t think that’s possible - I don’t think I can override the class navigation. What you can do is rebind the actions, which I’ve done - I have Cmd-O goto Class, Shift-Cmd-O goto ns, Ctrl-Shift-O goto file.#2018-08-2811:45tapAh, that's perfectly solve my problem. Thanks!#2018-08-2810:31cfleming@onetom That should work, I’ll try it tomorrow.#2018-08-2814:59onetomI tried it on another machine and the default repo list was not present after importing the fresh project. (by idea . i meant Import Project from IntelliJ's opening screen and double clicking the deps.edn.#2018-08-2821:58cflemingOne question - do you have the Clojure CLI installed on those machines? The repos come from the system deps.edn, perhaps Cursive can’t find it for some reason?#2018-08-3002:58onetomI do have a user-local installation, yes, so even outside of my project's nix-shell, i have clj on the $PATH.
$ clj -Sdescribe
{:version "1.9.0.391"
 :config-files ["/nix/store/m0qiv8040pxkybmcp7vhzl0q8ia6h5l3-clojure-1.9.0.391-prefix/deps.edn" "/Users/onetom/.clojure/deps.edn" "deps.edn" ]
 :install-dir "/nix/store/m0qiv8040pxkybmcp7vhzl0q8ia6h5l3-clojure-1.9.0.391-prefix"
 :config-dir "/Users/onetom/.clojure"
 :cache-dir ".cpcache"
 :force false
 :repro false
 :resolve-aliases ""
 :classpath-aliases ""
 :jvm-aliases ""
 :main-aliases ""
 :all-aliases ""}
#2018-08-3002:59onetomand you can see that the default repos are there too in the system deps.edn:
$ cat /nix/store/m0qiv8040pxkybmcp7vhzl0q8ia6h5l3-clojure-1.9.0.391-prefix/deps.edn
{
  :paths ["src"]

  :deps {
    org.clojure/clojure {:mvn/version "1.9.0"}
  }

  :aliases {
    :deps {:extra-deps {org.clojure/tools.deps.alpha {:mvn/version "0.5.442"}}}
    :test {:extra-paths ["test"]}
  }

  :mvn/repos {
    "central" {:url ""}
    "clojars" {:url ""}
  }
}
#2018-08-3007:23cflemingOk, and Cursive is configured to find that executable, I assume?#2018-08-3103:00onetomit seems correctly configured for me:
$ /nix/store/qxzhmfmv8k248m869icyfb2xnj2lc63b-clojure-1.9.0.391/bin/clojure -Sdescribe
{:version "1.9.0.391"
 :config-files ["/nix/store/m0qiv8040pxkybmcp7vhzl0q8ia6h5l3-clojure-1.9.0.391-prefix/deps.edn" "/Users/onetom/.clojure/deps.edn" "deps.edn" ]
 :install-dir "/nix/store/m0qiv8040pxkybmcp7vhzl0q8ia6h5l3-clojure-1.9.0.391-prefix"
 :config-dir "/Users/onetom/.clojure"
 :cache-dir ".cpcache"
 :force false
 :repro false
 :resolve-aliases ""
 :classpath-aliases ""
 :jvm-aliases ""
 :main-aliases ""
 :all-aliases ""}
#2018-08-3103:02onetombut clojure cli itself and its default config are in different directories, so you shouldn't derive the location of the deps.edn from the path of clojure or clj, but from the :install-dir in the output of clojure -Sdescribe.#2018-08-3121:05cflemingYes, I do that.#2018-08-3121:06cflemingHmm, I wonder what’s happening. I didn’t get a chance to try this the other day - I’ll try to look at this early next week.#2018-08-2810:31cfleming@mhuebert That’s odd, that should definitely work.#2018-08-2811:15mhueberthm it doesn’t seem to work for any of my macros#2018-08-2820:22csm“Quotes must be balanced inside comment blocks” orly?#2018-08-2820:47cfleming@csm That’s a parinfer thing#2018-08-2820:57csmmy only complaint about that is that it checks after every keystroke, so when there’s an error (according to parinfer) it slows down the IDE a lot#2018-08-2821:26justinleeis there a “close everything” action/key? would be super convenient when things get messed up#2018-08-2821:32justinleeand my “everything” I mean all open parens, braces, and brackets#2018-08-2821:58cfleming@lee.justin.m The problem with that is where to put the closers - it’s a surprisingly hard problem.#2018-08-2821:59cflemingIt’s basically what parinfer does, and parinfer uses indentation to figure out where the closing ones should go.#2018-08-2822:02justinlee@cfleming i mean just close out all the way to the top level. it would only make sense at the end of a top-level form.#2018-08-2822:02justinleenot something that you could do in the middle of a form#2018-08-2822:03justinleeparinfer still gets badly confused on cut and paste sometimes, and I can generally fix things easily enough, but it is typically very annoying to fix the final close outs which can be something complicated like }])}]]))#2018-08-2822:24cfleming@lee.justin.m Right, but what you’re proposing would have the same problem or worse, since parinfer at least does a reasonable job by using indentation.#2018-08-2913:20Chris@cfleming Do you have a roadmap up anywhere with what you're planning for cursive in the coming months?#2018-08-3000:32cfleming@chris547 I don’t in any organised fashion, but I absolutely should have.#2018-08-3000:33cflemingI’m also planning a feedback tool in the IDE itself so you’ll all be able to tell me what you want me to work on.#2018-08-3000:34cflemingMy rough plans are: Finish deps support, improve REPL support in various ways, improve CLJS in various ways (better REPLs/test integrations etc and also better source analysis)#2018-08-3113:02ChrisThat's great! The REPL stuff appeals to me as I'd love a better experience - is there anyway I could see what you're thinking/beta test/ provide feedback here? Right now I use a clj file in a non source root and run most of my commands from that window.#2018-08-3113:03ChrisI'm basically trying to implement the idea of keeping all my repl history organized by date, etc#2018-08-3119:06ChrisMy ideal workspace would be to have just an editor window for looking at source, one windown for entering REPL commands, and one for output with all the code completion, etc that cursive gives - that seems to be my basic workflow#2018-08-3013:35idiomancyis there a way to add to the leiningen tasks panel with more tasks? want lein test-cljs, lein test-clj etc#2018-08-3013:35idiomancyI can always make run configs. I'm just curious#2018-08-3013:55danmIs boot support still "Coming at some point maybe" because the boot->lein script works well enough? 🙂#2018-08-3015:46kennyIs it possible to sort the Deps Aliases by project then system? When you have 20+ aliases between system and project, it starts to require too much mental effort to sort through them. I almost always am only looking to enable project aliases.#2018-08-3015:47kennyI may even prefer the two to be in entirely separate folders - Project Aliases and System Aliases.#2018-08-3023:21cfleming@idiomancy I can’t remember the details but that was trickier than I thought - Run configs are the only solution right now, sadly. Perhaps one solution might be to show links to the configured Leiningen run configs in the tree there for easy access.#2018-08-3023:22idiomancyThat makes sense to me#2018-08-3023:22idiomancyReally not a huge priority though#2018-08-3023:22cfleming@carr0t Yes, I’m afraid so. I realise it’s still painful. I’ve been working a lot on Deps and I’m hopeful that much of that work will help with Boot support.#2018-08-3023:23cfleming@kenny Yeah, someone else asked about that. Sorting those is actually surprisingly tricky due to Swing details, but putting them in separate folders might be an option.#2018-08-3111:25pedrorgirardiHi there! Does anyone using IdeaVim know how to close the auto complete popup without pressing Esc, since Esc will switch to Normal Mode 😞#2018-08-3112:00lispyclouds@pedrorgirardi I kinda work around it by pressing space 😛 Not the best way but kinda works and Im still in INSERT#2018-08-3112:02pedrorgirardiOh okay, thanks @rahul080327! I#2018-08-3120:20vemv👋 I wonder what Colin thinks of https://github.com/cursive-ide/cursive/issues/1967 ? Seems much desirable#2018-08-3120:20vemv(and one of the very last points of contention between emacs and cursive users at work)#2018-08-3121:04cfleming@vemv It’s definitely something I’m planning to support, but I haven’t investigated what’s involved.#2018-08-3121:27vemv:thumbsup: thanks for letting me know#2018-09-0307:46slipset@cfleming: about to purchase a couple of Cursive licenses for the infidels at the office.#2018-09-0307:47slipset#2018-09-0307:47slipsetI wanted to upload a picture showing what I was to complain about, but slack won’t let me. Anyways, there’s a checkbox which says “Are you a reseller”.#2018-09-0307:48slipsetIMO, since it’s a checkbox, it should not ask a question, but rather be a statement, like “I am a reseller”.#2018-09-0307:48slipset</nitpick>#2018-09-0308:55Andreas LiljeqvistIs that question required for tax purposes or something? Kind of doubt that people are scalping Cursive#2018-09-0318:55mishahow much (or how to see) default cursive clojure/java repl's xmx value?#2018-09-0318:57gfredericksmaybe via a generic mechanism for seeing the CLI args of a running process on your OS?#2018-09-0318:57mishaps + grep? opieop#2018-09-0318:58gfredericksyep#2018-09-0318:58mishathanks )#2018-09-0323:10cfleming@slipset I’ll file an issue and tag it with “Tiny violin”, my new favourite issue tag 🙂#2018-09-0323:11cfleming@andreas862 No, that’s for software resellers - when I started selling Cursive I was amazed to find that this was still a thing.#2018-09-0411:26Andreas Liljeqvist@cfleming Are you able to share what % of sales are via resellers? Would be really interesting to know#2018-09-0418:13rnagpal:prep-tasks [["shell" "sh" ".submodule-init"] "javac" "compile"] in cursive fails#2018-09-0418:14rnagpalhttps://github.com/cursive-ide/cursive/issues/1667#2018-09-0418:14rnagpalFor me it fails with this command :prep-tasks [["shell" "cp" "index.html" "resources/public"]]#2018-09-0421:42dottedmagHow do I debug Specified aliases are undeclared: [:idea]? The alias is right there:
:aliases { ,,,
           :idea {:extra-deps
                  {:com.bhauman/figwheel-main {:mvn/version "0.1.7"}}}
           ,,,}
#2018-09-0506:50chrispsI don’t know if this is related to Cursive, but it manifests there as these ‘… cannot be resolved’ highlights, thinking perhaps there is something obvious I have forgotten to do (which I assume)#2018-09-0709:48agigaoCan you please share the color scheme? ^^ Thanks#2018-09-0514:03Chris@cfleming Is there a trick to getting cursive to auto recompile any java source classes without restarting the repl? Right now I am just restarting the REPL as that seems easiest - but seems like we should be able to do something better#2018-09-0514:47slipset@chris547 I seem to remember that @ztellman has a thing for this...#2018-09-0514:48slipsethttps://github.com/ztellman/virgil#2018-09-0514:49slipsetI have no idea how this interacts with cursive, though. #2018-09-0519:25ChrisThat's pretty cool, @slipset I think it would work with cursive REPL as it just loads a lein repl so it seems like it would work - thanks!#2018-09-0709:48agigaoCan you please share the color scheme? ^^ Thanks#2018-09-0601:28cfleming@dottedmag Where are you getting that error? I suspect that you have to enter the alias without the colon, but Cursive should accept both forms. I’ll fix that, but remove the colon for now.#2018-09-0601:30cfleming@chris547 The problem is that you have to recompile the java source but then also dynamically load the new classes into the open REPL - that’s not supported right now, although it would definitely be a nice feature. One thing you can do is to run the REPL as a debug REPL, and then IntelliJ will offer to reload the new classes into the process for you using the debug connection - I use that a lot.#2018-09-0605:39dottedmag@cfleming This happens while trying to refresh a project. I don't enter aliases anywhere, only checking them on/off in Deps tab.#2018-09-0605:39dottedmagIt used to work, but broke, I think, after latest IDEA update.#2018-09-0605:40dottedmagI'm not sure if that update also included a Cursive update.#2018-09-0608:00ben.mumfordmy intellij has upgraded via snap to 2018.3-EAP and i need to reinstall cursive. i can't see it in the new-fangled plugins page. any advice?#2018-09-0608:01ben.mumfordis cursive even supported by this new version?#2018-09-0609:36slipsetWhen you do the right thing on a Java interface in intellij, it asks you which of the implementations of the interface you want to go to, ie it gives you a selection of all known interfaces.#2018-09-0609:36slipsetIs there such a thing for Cursive and protocols?#2018-09-0609:36slipsetie, bring up a list of known implementations of a function in a protocol and jump to one of them?#2018-09-0609:37slipsetJumping to the protocol definition is almost always exactly not what I want 🙂#2018-09-0612:09claudiu@ben.mumford don't think so. Pycharm is also incompatible. Seems like we have to wait a bit 🙂#2018-09-0612:44cfleming@dottedmag Ok, thanks - I’ll take a look and see if I can reproduce that. I’m travelling right now so it might take a few days.#2018-09-0612:45cfleming@ben.mumford No, it doesn’t yet. As I mentioned above I’m travelling right now, sadly downgrading is probably the only option.#2018-09-0612:46cfleming@slipset No, but there absolutely should be.#2018-09-0612:48slipsetNo need, I just wanted to make sure Cursive doesn’t have it. Since emacs doesn’t. #2018-09-0612:48cflemingHaha#2018-09-0612:48cflemingCursive will have it sometime soon though.#2018-09-0616:52richiardiandreaMy colleague @davidcerezoinigo and I are having some trouble with using deps edn projects in a monorepo, is there any quirk with .cpcache we need to be aware of when importing them (latest Cursive eap)#2018-09-0622:10cfleming@richiardiandrea Not that I’m aware of, what are you seeing?#2018-09-0706:42emilaasaIs there a way to convert a deeply nested form like: (clojure.walk/keywordize-keys (json/parse-string (:body (client/get "myurl")))) into a threading macro variant?#2018-09-0706:42emilaasalike an editor action thingie#2018-09-0707:36steveb8nloving the new deps.edn support. just one annoyance, the REPL output window that pops up when starting a run config. Can that popup be disabled? I don’t see any use for it#2018-09-0712:58tbaldridge@cfleming I'm going to be "that guy" and make a bug report with a very limited amount of data. At work my REPLs only ever print one exception. I can submit forms and get results, but if there's any sort of error (compiler or runtime) I get a stacktrace for the first error, and after that, nothing. It doesn't hang the REPL, I simply get no response.#2018-09-0712:59tbaldridgeSame effect if the exception happens via run-tests command sent with a keybinding, loading a file, etc.#2018-09-0712:59tbaldridgeSo I can get sessions like this:#2018-09-0713:00tbaldridge
Loading foo.bar....
=>(+ 1 2)
3
=>(run-tests)
Running tests....
=> (/ 1 0)
=> (let [foo/bar 34] x)
=> (+ 1 2)
3
#2018-09-0713:01tbaldridgeThe "...." lines being lines where we start to load a file, run a test, and then nothing.#2018-09-0717:37bastiI ran into the same issue 😢#2018-09-1018:25richiardiandreaThis is what I see#2018-09-1018:25richiardiandrea@cfleming @U3ULRULMA#2018-09-1018:26bastiYeah so it applies to local linked transitive dependencies. Sometimes only though .. I had a project where it worked fine :thinking_face:
#2018-09-1019:14richiardiandreain my case above it is a monorepo - data point#2018-09-1103:32cflemingThat’s just coming back from deps - I’ve seen that error on the command line sometimes too.#2018-09-1103:33cflemingI don’t know why it’s required sometimes and not others - might be a question for #tools-deps.#2018-09-1103:34cflemingThe workaround is to specify :deps/manifest :deps in the dependency alongside the `:local/root’#2018-09-1103:38richiardiandreaOh ok got it I had never seen that, thank you Colin!#2018-09-0719:22sparkofreasonTrying to implement a class using gen-class and use it in the REPL. Project is using deps.edn. What is the correct workflow in cursive? Currently getting IncompatibleClassChangeError when trying to import.#2018-09-0801:26cfleming@emilaasa Yes, Edit-&gt;Structural Editing-&gt;Thread/Unthread form - you’ll need the caret on the inner form you want to thread, like: (clojure.walk/keywordize-keys (json/parse-string (:body <caret>(client/get "myurl"))))#2018-09-0801:26cflemingThen you can use that action repeatedly to thread the whole thing.#2018-09-0801:27cfleming@steveb8n That’s https://github.com/cursive-ide/cursive/issues/2031, fixed for the next EAP build.#2018-09-0801:27cflemingAs a workaround you can clear that flag manually in your run config.#2018-09-0801:28cfleming@tbaldridge I’m travelling with my family right now, but I’ll look at that when I can. Looks like a clojure.main REPL?#2018-09-1022:48tbaldridgeNo problem, I've gotten by with it for a few months, and it's finally something I thought I should bring up.#2018-09-1022:49tbaldridgeBut no, it's a lein repl. I work with a lot of emacs users though, so there's a fair amount of middleware involved for pretty printing exceptions and the like. Nothing abnormal, just a pretty heavy lein file.#2018-09-0801:30cfleming@basti What are you seeing?#2018-09-0910:36mishahow do I get rid of one of the 2 in tooltips? adds an extra step to "I wanna see the signature" (`cmd` + hover over sym)#2018-09-0910:36misha#2018-09-0910:38misha(I have no idea where the second one comes from (and which is the second one out of these 2))#2018-09-0910:41mishaok, it is: cmd+`;`, dependencies, – Clojure-1.9.0, apply wherever it came from.#2018-09-0910:44mishaseems relevant: https://github.com/technomancy/leiningen/issues/1343#2018-09-0916:49genekim@cfleming A non-urgent recommendation: for months, I was going to ask in Slack, “how do I interrupt a REPL in cursive, like when I’m in infinite loop?” Yesterday, I was surprised when I was re-reading “Getting Started” documentation which referenced it. And holy cow, it worked — I hadn’t seen it because I always thought the button was greyed out. Recommendation: add a little color to that button to signal that it’s an active button. Thanks as always!#2018-09-0917:17mfikesHah Gene, you are talking to someone who is color blind#2018-09-0917:43manutter51That sure looks like a "disabled" button to me, tho. Needs much more contrast if it's supposed to look active/clickable.#2018-09-0919:06misha#2018-09-0919:06misha#2018-09-0919:06mishadisabled vs enabled#2018-09-0919:22dpsuttoncan anyone help a new intellij user? I've installed emacs+ patched (thanks for supporting that Colin!) and I dont' know how to enable the keybinds. It doesn't seem to be enabled by default#2018-09-0920:27richiardiandreaI wrote a lil' blog post, maybe what you are looking for is the one at the end? https://andrearichiardi.com/blog/posts/clojurescript-cursive-shadow-setup.html#2018-09-0920:55manutter51Looks like the enabled/disabled button issue might be a light theme vs dark theme issue.#2018-09-1013:52cfleming@misha Yeah, when that happens it’s often because you have two Clojure versions attached somehow. But in that case it looks like two copies of the same Clojure version.#2018-09-1013:53cfleming@genekim Yes, that makes sense. I think @manutter51 is right that it’s worse in the dark scheme, I haven’t noticed it but I’m a light theme kind of guy.#2018-09-1013:59cflemingI’m just reusing a built-in IntelliJ icon there, so I’ll check if there’s a more appropriate/visible one.#2018-09-1014:20deaddowneyHi I'm using cursive with Gradle managing my build. Cursive is incorrectly detecting my source roots one level too high, e.g. src/main rather than src/main/clojure. Is that expected?#2018-09-1014:25deaddowneyIt's actually not happening in src/main but in src/dev#2018-09-1015:26dnolenI’m developing a mono-repo where I have multiple modules - which are linked together through deps.edn, however Cursive doesn’t seem to understand this and I can’t get it to load a file into the REPL because it belongs in a different module#2018-09-1015:27dnolenI can just require manually - but that’s a bit annoying#2018-09-1016:20cfleming@dnolen That’s https://github.com/cursive-ide/cursive/issues/2039, which is fixed for the next build.#2018-09-1016:20cfleming@deaddowney How are you managing that - using gradle-clojure?#2018-09-1016:25deaddowney@cfleming yes. I created the project using the clojurescript template on the gradle-clojure page#2018-09-1715:03Joe LanePaging @U0516KEV7#2018-09-1016:26cfleming@deaddowney Ok, that’s probably a bug report for them - Cursive doesn’t actually do anything there.#2018-09-1016:27cflemingIf there’s something that Cursive is doing incorrectly let me know, but that’s probably more about how gradle-clojure communicates with Gradle which gets picked up by IntelliJ#2018-09-1016:31ghadihttps://docs.oracle.com/javase/specs/jvms/se10/html/jvms-5.html https://docs.oracle.com/javase/specs/jvms/se10/html/jvms-6.html#2018-09-1023:47simonIs there a way to indent a let block so that the forms align? ex.
(let [x   "a"
      xyc "b"]
rather than
(let [x "a"
      xyc "b"]
#2018-09-1023:49simoncurrently the result of cmd-alt-l is the later#2018-09-1103:32mfikes@simon.orlovsky Yes. Preferences, Editor > Code Style > Clojure, General, Align let-binding values#2018-09-1108:48danmHmm. Exception during stub generation. I can see what has happened, but I have no idea how to fix it...#2018-09-1109:07danmMy error is Error generating stubs for module availability-event-builder: java.lang.NoSuchMethodError: com.fasterxml.jackson.databind.JavaType.isReferenceType()Z, compiling:(core.clj:209:1). Is there a cache that is used for stub generation that I should be clearing or something? com.fasterxml.jackson.databind is referenced by a library (also written by our team and under a different folder in the same IntelliJ project, added as a separate lein project) that the module in question is pulling in#2018-09-1109:36stijnhey, I'm trying to migrate a project from leiningen to deps.edn, but I'm not getting it imported. I can run from the command line with -m and -r.#2018-09-1109:36stijnthe first thing I'm seeing is that in the deps.edn config the Clojure command 'failed'#2018-09-1109:37stijnunder 'Use CLI tools (recommended)'. the path is /usr/local/bin/clj#2018-09-1109:38stijnand the idea.log shows java.lang.ClassNotFoundException: clojure.java.api.Clojure#2018-09-1109:47stijnalso /usr/local/bin/clojure does not work either#2018-09-1109:49stijnok, when I use tools.deps directly it works#2018-09-1111:22manutter51@carr0t Under the File menu there's Invalidate Caches / Restart, have you tried that?#2018-09-1112:00cfleming@stijn When that command fails, is there anything useful in the log? Help-&gt;Show log in Finder/Explorer#2018-09-1112:00cflemingYou’re on OSX IIRC, right?#2018-09-1112:01stijnno, archlinux, I'll recheck the logs, but I didn't see anything when opening that dialog#2018-09-1112:02stijnno, no error in the log#2018-09-1112:02cflemingOk, I’ll fix that - you should definitely at least get a sensible message there.#2018-09-1112:03stijnbut, like I said, if I use tools.deps directly everything works properly#2018-09-1112:04stijnmaybe it's because I have both the arch package clojure and the clj command line tool installed#2018-09-1112:04stijni'll try to remove the arch package#2018-09-1112:05cflemingOr a more detailed one, at least. Where do you have the CLI stuff installed? If you look in Settings-&gt;Build, Execution, Deployment-&gt;Build Tools-&gt;Clojure Deps, does it correctly detect the version and the config dir?#2018-09-1112:06stijnhmmm, ok I don't have clojure separately installed on arch, just the CLI tools#2018-09-1112:07stijn
❯ which clj
/usr/local/bin/clj
❯ which clojure
/usr/local/bin/clojure
#2018-09-1112:08stijndoes the version of the script matter?#2018-09-1112:09cflemingNo, but I want to see if Cursive is managing to get the results from clojure -Sdescribe#2018-09-1112:10stijnok, I have installed the latest version and now I do not get an error message#2018-09-1112:10cflemingVery strange#2018-09-1112:10stijnand it properly detects CLI version in IntelliJ#2018-09-1112:11stijni had version 1.9.0.273, now on 391#2018-09-1112:13cflemingOk. It’ll probably be hard to determine what was going on now it’s fixed, but I’m glad it works 🙂#2018-09-1112:13stijnhaha, yeah 🙂#2018-09-1112:14stijnIs there a way to see the stacktrace of the exceptions that the deps sync is throwing?#2018-09-1112:14stijnoh, ok, in the log 😉#2018-09-1112:14cflemingI hope so!#2018-09-1112:16stijnnot that it's helping though...#2018-09-1112:16stijn
Caused by: com.intellij.openapi.externalSystem.model.ExternalSystemException: java.lang.String cannot be cast to java.io.File
        at cursive.deps.ToolsDepsResolver.resolve(ToolsDepsResolver.kt:65)
        at cursive.deps.DepsProjectResolver.resolveProjectInfo(DepsSupport.kt:273)
        at cursive.deps.DepsProjectResolver.resolveProjectInfo(DepsSupport.kt:240)
        at com.intellij.openapi.externalSystem.service.remote.RemoteExternalSystemProjectResolverImpl.lambda$resolveProjectInfo$0(RemoteExternalSystemProjectResolverImpl.java:37)
        at com.intellij.openapi.externalSystem.service.remote.AbstractRemoteExternalSystemService.execute(AbstractRemoteExternalSystemService.java:58)
        at com.intellij.openapi.externalSystem.service.remote.RemoteExternalSystemProjectResolverImpl.resolveProjectInfo(RemoteExternalSystemProjectResolverImpl.java:37)
        ... 23 more
#2018-09-1112:17cflemingIs there a cause exception after that?#2018-09-1112:18stijnthat's the last one#2018-09-1112:19cflemingWhat’s the first one?#2018-09-1112:19cflemingActually, can you just paste the whole lot?#2018-09-1112:19stijnsure#2018-09-1112:19cflemingPerhaps via DM#2018-09-1207:21joshkhwhen sending forms to the REPL (CMD SHIFT P) i get a RuntimeException mentioning that symbols can't be resolved in this context:
(+ 1 2 3)
CompilerException java.lang.RuntimeException: Unable to resolve symbol: + in this context, compiling:(/myproj/test/myproj/core_test.clj:21:1) 
#2018-09-1207:24joshkhany idea what i'm doing wrong? 🙂#2018-09-1212:12cfleming@joshhk See here: https://cursive-ide.com/userguide/troubleshooting.html#2018-09-1212:12cflemingWhoops @joshkh ^^#2018-09-1212:35joshkhperfect! thanks.#2018-09-1213:03tbrookeThis is somewhat off topic but I was looking through the Jetbrains newsletter and saw MPS and read about it - it looks pretty cool - I Googled and found an old repository: https://github.com/semperos/clojure-mps - I just wondered if anyone had explored MPS or had any experience with it especially with Clojure#2018-09-1213:05cfleming@tbrooke Not off topic at all! MPS is indeed very interesting. I’ve been meaning to take a closer look at it for ages but have never got around to it.#2018-09-1213:06cflemingI think the potential to use projectional editing of the code is an idea with a lot of scope.#2018-09-1213:06cflemingI hadn’t seen that repo, thanks.#2018-09-1213:17kwladykaWhat is the status of deps.edn, clj and figwheel-main integration? It looks like crusive doesn’t recognise dependencies after create clj -A:new figwheel-main form-validator-demo.core --reagent#2018-09-1213:19bhauman@kwladyka you will want to use the https://figwheel.org/docs/scripting_api.html#2018-09-1213:19bhaumanto start figwheel from a REPL#2018-09-1213:20kwladykaI mean I can’t jump to the source (cmd+down), it looks like editor doesn’t see deps#2018-09-1213:29claudiuThis might help seems like there's a bit of config work. https://groups.google.com/d/msg/cursive/NQIJzhGjfEY/82vDQ1GFCAAJ#2018-09-1213:21kwladyka#2018-09-1213:21kwladyka#2018-09-1214:26cfleming@kwladyka How did you import that project into Cursive?#2018-09-1214:28cflemingInstructions are here: https://groups.google.com/d/msg/cursive/NQIJzhGjfEY/hdNXUco8CgAJ, if you didn’t do something that looks like that then try that and see if it works.#2018-09-1308:43kwladykaI just opened the folder#2018-09-1308:45kwladykaI don’t have this choice "Import project from external model"->"Deps"#2018-09-1308:45kwladykaonly leiningen#2018-09-1308:49kwladykaoh it is about beta version of cursive, does it mean I have to install beta to use deps.edn stuff?#2018-09-1308:59kwladykaI installed beta and now see deps#2018-09-1308:59kwladykabut import stuck 😕#2018-09-1309:02kwladykaok it didn’ stuck, but intellij window was super hidden. Like 1x1px or I don’t know. I had to click “show all intellij windows” and then enter full screen mode to find a window#2018-09-1309:02kwladykaBut maybe it is my local issue. I don’t know.#2018-09-1309:02kwladykaIt shouldn’t be connected to the import#2018-09-1309:03kwladykadependencies are detected now#2018-09-1311:50stijnis there a way to specify environment variables during the 'sync' of a deps.edn project?#2018-09-1311:51stijni have trouble downloading the datomic jars since they are hosted on AWS S3 and you only have access with your AWS credentials properly setup#2018-09-1405:10cfleming@stijn There isn’t right now but that’s a good idea. A workaround would be to download the deps first using the command line so they’re in your local repo, and then sync within Cursive.#2018-09-1408:23Yehonathan SharvitI am having issues with tools.deps#2018-09-1408:24Yehonathan SharvitI have configured Clojure Deps with CLI tools#2018-09-1408:25Yehonathan SharvitThen I created a “Clojure Deps” Configuration#2018-09-1408:25Yehonathan SharvitAnd when I run the configuration I get an error
Couldn't read deps.edndeps.edn (No such file or directory)
#2018-09-1408:26Yehonathan Sharvit#2018-09-1408:27Yehonathan SharvitI am running Version: 1.8.0-eap6-2018.2#2018-09-1408:59joelHello#2018-09-1408:59stijn@cfleming i'm working around this now by starting idea from the command line with the env variables set in the shell. downloading the deps on cli works too indeed.#2018-09-1409:02joelI have an issue concerning a run configuration, I have a "lein run" config, and I specify a +dev profile. I use environ to retrieve my environment variables but none of the variables I defined in the :dev :env map are present at runtime. Any idea what could be the cause ?#2018-09-1410:15mike_ananevHello. How to change "comment line" behaviour from ; to ;; ?#2018-09-1411:24caleb.macdonaldblackCan I set up my formatting to align these args like maps do?#2018-09-1417:33bmcferrenI consistently get this error when I try to evaluate an expression while paused at a breakpoint: java.lang.RuntimeException: Unable to resolve symbol: instantiation_hash in this context, compiling:(NO_SOURCE_PATH:0:0) Might you guys have a suggestion on what I might have wong with my intellij / cursive setup?#2018-09-1417:36bmcferrenCursive Version: 1.7.0-2018.1#2018-09-1417:36bmcferrenIntelliJ IDEA 2018.1.1 Community Edition#2018-09-1418:23kanweihow do you type hint basic javascript DOM elements? basic stuff like
(.getElementById js/document "dd-container")
#2018-09-1418:23kanwei.getElementById is unresolvable as is#2018-09-1418:39justinlee@kanwei its a known issue with cursive. all js interop has that issue, as far as I know#2018-09-1418:40kanweithat is... unfortunate#2018-09-1508:17cfleming@viebel I’ll look at that on Monday, I haven’t played around much with the task run configurations yet.#2018-09-1516:29Yehonathan SharvitOK. Please let me know how to make it work#2018-09-1707:11Yehonathan Sharvit@cfleming Just a reminder …#2018-09-1707:15cfleming@viebel One question - what does the task you’re trying to run do?#2018-09-1708:39Yehonathan SharvitI just want to open a REPL for a project that has deps.edn but no project.clj#2018-09-1709:56cflemingFor that you don’t need to use the tasks - use a Local REPL type as described here: https://cursive-ide.com/userguide/repl.html#2018-09-1709:57cflemingThe doc is slightly out of date - you’ll have two options “Use nREPL in normal JVM process”, and “Use clojure.main in normal JVM process”. Probably the nREPL option is the best - nREPL will be automatically injected into the classpath.#2018-09-1709:57cfleming@viebel ^^#2018-09-1712:42Yehonathan SharvitI am getting an error while creating opening a folder with deps.edn#2018-09-1712:44cflemingCan you close that error message and send the screenshot of the underlying Import Project dialog?#2018-09-1715:57Yehonathan Sharvit#2018-09-1715:58Yehonathan SharvitHere it is. Sorry for the delay. I was trapped into some business meetings#2018-09-1716:47Yehonathan Sharvit@cfleming ⬆️#2018-09-1808:06cflemingHmm, strange, that looks fine. I’ll try to reproduce that later.#2018-09-1809:50Yehonathan SharvitThanks a lot#2018-09-1918:05Yehonathan Sharvitany progress @cfleming?#2018-09-2007:22cfleming@viebel No, sorry - I’ve been battling build tooling in the end. I have actually seen something similar to this but haven’t set to reproducing it properly yet.#2018-09-2007:28Yehonathan SharvitOk. no worries#2018-09-2007:28Yehonathan SharvitLet me know when you find something#2018-09-2007:28Yehonathan SharvitWhat do you mean by ” battling build tooling in the end”?#2018-09-2007:55cfleminghttps://twitter.com/CursiveIDE/status/1042377074365935616#2018-09-2007:55cflemingAnd https://github.com/JetBrains/gradle-intellij-plugin/issues/321#2018-09-2716:58Yehonathan SharvitDid you find something related to my issue ?#2018-10-0208:52cfleming@viebel No sorry, I’ve been chasing down other bugs. I’ve seen something like this myself but I’ve never been able to reproduce it when I’m debugging.#2018-10-0314:19cfleming@viebel I think I have fixed this: https://github.com/cursive-ide/cursive/issues/2062. I never managed to reproduce exactly what you were seeing, but I did reproduce something similar which I had seen. Let me know if this is still a problem after the next release.#2018-10-0314:19Yehonathan SharvitWhen the next release will be out?#2018-10-0314:43cflemingI’m just doing it now#2018-10-0314:45Yehonathan SharvitCool. Good luck#2018-10-0314:52cflemingOk, that should be available now.#2018-09-1508:18cfleming@joelmarty2 I’ll look into that - because Cursive uses a trampoline that may not work correctly. As a workaround, you can specify the env vars in the run configuration itself. Could you file an issue for that and I’ll try to fix it properly?#2018-09-1714:55joelyou got it: https://github.com/cursive-ide/cursive/issues/2050#2018-09-1714:59cflemingThanks!#2018-09-1508:20cfleming@mike1452 Settings-&gt;Editor-&gt;General-&gt;Smart Keys-&gt;Use ;; for line comments#2018-09-1508:20cfleming@caleb.macdonaldblack Sadly no.#2018-09-1508:21cfleming@mcferren Are you using JDK9+ for your project? Someone reported that some of the evaluation stuff was broken there.#2018-09-1508:33mike_ananev@cfleming Hello! There is no such option "Use ;; for line comments" in Settings->Editor->General->Smart Keys. Idea 2018.2.3 CE, Cursive 1.7.0-2018.2#2018-09-1508:33cfleming@mike1452 Oh right, I added that recently, it’s probably only in the latest EAP.#2018-09-1508:34cflemingI hoped to have that as a stable build but ClojuTRE interrupted that - it should be next week.#2018-09-1508:34mike_ananev@cfleming Ok, thanks.#2018-09-1508:34cflemingIf you want to use the EAP see here: https://cursive-ide.com/userguide/index.html#eap#2018-09-1508:41mike_ananev@cfleming Thanks. Enabled EAP updates and now I see it. Thank you for this great product.#2018-09-1516:21bmcferrenthanks for your help @cfleming java version "10.0.1" 2018-04-17 Java(TM) SE Runtime Environment 18.3 (build 10.0.1+10) Java HotSpot(TM) 64-Bit Server VM 18.3 (build 10.0.1+10, mixed mode) what version should I be running?#2018-09-1517:53Yehonathan Sharvithow can we configure the color of the rainbow parenthesis?#2018-09-1519:21bmcferrenalso, where in preferences to change JDK version? (sry for newbie intelij question) 🙂#2018-09-1618:32cfleming@viebel Settings-&gt;Editor-&gt;Color Scheme-&gt;Clojure#2018-09-1618:35Yehonathan SharvitThanks a lot!#2018-09-1618:33cfleming@mcferren File-&gt;Project Structure-&gt;Project-&gt;Project SDK#2018-09-1618:33cflemingI’ll try to look at that debugger problem this week.#2018-09-1618:36Yehonathan SharvitAnother silly question: is there a way to make the preferences window not modal? (So that we can change some options and see how it applies in the editor without having to close the preferences window)#2018-09-1707:06cfleming@viebel No, I don’t think so. Some offer a preview (like code style) but most do not.#2018-09-1707:11Yehonathan SharvitOK. good to know#2018-09-1709:17drowsyI just upped the Cursive to 1.8.0-eap6, and now every run configuration fails with 'httpSettings.PROXY_EXCEPTIONS must not be null' when you set a manual proxy but leave the exceptions blank.#2018-09-1709:17drowsyIt's easy to work around by just fill in exceptions, but it worked in older versions.#2018-09-1709:59cfleming@drowsy I filed https://github.com/cursive-ide/cursive/issues/2049 and I’ll fix it for the next EAP.#2018-09-1917:18vuuvidoes anyone have any information about the style guide cursive uses when formatting code?#2018-09-1917:28manutter51I believe it’s based on this: https://github.com/bbatsov/clojure-style-guide#2018-09-1917:29shaun-mahood@alexkeyes You can also find (and set) the specifics from within Cursive by going to Settings -> Editor -> Code Style -> Clojure#2018-09-1917:42vuuviawesome thanks guys!#2018-09-2012:27dabrazhe@alexkeyes This piece takes on code readability http://tonsky.me/blog/readable-clojure/#2018-09-2115:51vuuviThanks!#2018-09-2022:20shaun-mahoodIs there a way to set a keyboard shortcut to switch which of 2 repl windows are active/will receive form evaluations?#2018-09-2022:23cfleming@shaun-mahood Unfortunately I don’t think so. Forms are always sent to the “active” REPL, which is the one with the selected tab. AFAIK you can’t switch those tabs with keys. If this would be useful feel free to file an issue for that.#2018-09-2022:25shaun-mahoodWell, it would be fantastically useful right up until you get the CLJ/CLJS combined repl built - then I would probably never use it again. Happy to file an issue, though.#2018-09-2200:51polymeris#2018-09-2200:52polymeris☝️ The docs (https://cursive-ide.com/userguide/macros.html) say I should be able to choose from a few resolution forms like def or -> but I don't see them?#2018-09-2201:12kenny@U0FTV149X Use the Enter button instead of the right arrow button.#2018-09-2201:18polymeristhanks!#2018-09-2417:25hcarvalhoavesHi! I'm using schema.core/defmethod, how can I customise Cursive to make it aware of the arguments scope like a regular defmethod? (I see the Edit intention settings but I'm not sure how to use it, and docs on the website don't mention it).#2018-09-2417:28rarousExactly the same as the thread above…#2018-09-2417:30hcarvalhoavesActually, it isn't, since none of the built-in options is correct for this form.#2018-09-2417:31hcarvalhoavesBut cursive somehow understands the schema.core/defn macro out of the box... so somehow, somewhere, it should be possible to customise.#2018-09-2510:01cfleming@U1LCB75M2 That’s a tricky one, since the built in defmethod won’t work for that. I’ll add support for that, I missed it when adding schema support.#2018-09-2510:02cfleminghttps://github.com/cursive-ide/cursive/issues/993#2018-09-2514:27hcarvalhoaves@cfleming by the way, do you plan on exposing a way to customise those macros? I would be fine adding it myself if the plugin exposed some hook to do that.#2018-09-2514:28cfleming@U1LCB75M2 Yes I do, but it’s a long term project due to some bad architectural choices made early on which are proving difficult to fix.#2018-09-2514:31hcarvalhoavesok, hope you can find the time to do it!#2018-09-2420:38bmcferrenHi @cfleming By chance did you have any fortune recreating that evaluate issue with the versions I listed? The feature is a big time saver. I would be so grateful for help you could share.#2018-09-2510:18cfleming@UCEKLQ24T I didn’t sorry but I’ll look at it before the next EAP. I’ve filed this so I don’t forget: https://github.com/cursive-ide/cursive/issues/2054#2018-09-2510:18cflemingOne thing to check - the symbol you’re trying to evaluate is actually instantiation-hash, right? i.e. with a - rather than a _#2018-09-2513:48bmcferrenit is an underscore _ I use underscore in order to quickly discern variables from functions and I use underscores instead of hyphens out of scorn from bugs Id experienced earlier in the angular side of my career. I just checked another variable that doesn't involve an underscore and the same issue arises#2018-09-2513:49bmcferren#2018-09-2513:49bmcferrenI did notice that (+ 1 1) does evaluate#2018-09-2513:50bmcferrenso it seems related to variables and scope#2018-09-2423:50asilvermanHi everyone, In my work environment, we use IntelliJ with Cursive to develop clojure microservices. Are you familiar with any good tutorials that exercise this IDE?#2018-09-2500:06billPedestal has some decent getting started guides http://pedestal.io/guides/index#_getting_started#2018-09-2500:04billOn a new laptop running Build #IU-182.4323.46, built on September 3, 2018 I installed Cursive 1.7.0-2018.2 and restarted IntelliJ as prompted. At IntelliJ startup I expect to be prompted for my Cursive license key but I’m not. In a new Leiningen project, when editing core.clj, I expect to see a “Cursive” menu item on the context menu but I don’t. I don’t see a way to open a REPL either.#2018-09-2503:46kharusHi, Is it possible to make scratch files working with Cursive? I’m creating a clojure scratch files in IntelliJ. But auto-complete in scratch file doesn’t work. Everything else works fine - I can edit code and send it to REPL.#2018-09-2510:41cfleming@kharus Unfortunately I think that’s still tricky, the scratch files are weird. I’ll try to fix that soon.#2018-09-2510:47cfleming@bill I’ve replied over on the mailing list.#2018-09-2511:03Sy Borg#2018-09-2511:04cfleming@sy_borg See here: https://cursive-ide.com/userguide/troubleshooting.html#2018-09-2511:08Sy Borgthat flag, right. thanks#2018-09-2511:09cflemingIt’s more that the problem is loading into a namespace that you didn’t expect. Loading that namespace into the REPL will fix the problem, but may still be confusing if you’re not clear where your code is being loaded.#2018-09-2511:13Sy Borgit works for me with that flag set, but when it's not I still get the error (even after 'Switch REPL NS to current file')#2018-09-2511:14cflemingYou need to load the namespace into the REPL or evaluate the ns form to actually create the namespace. “Switch REPL NS…” just does in-ns which has the problem described in that article.#2018-09-2511:14cflemingi.e. you want “Load file in REPL” or to evaluate the ns form.#2018-09-2511:19Sy BorgI see, but I don't need the whole file. though, I suppose, I don't have other choice#2018-09-2511:32cflemingYes, you can just load the NS form.#2018-09-2511:32cflemingBut it really depends on where (in which namespace) you actually want your loaded code to end up.#2018-09-2513:36wilkerlucio@cfleming hello, I got situation where Cursive is complaining that I have a ciclic reference, but I dont, its a cljc file that requires the macros on itself for cljs,eg :#2018-09-2513:36wilkerlucio
(ns com.wsscode.pathom.connect
  #?(:cljs [:require-macros com.wsscode.pathom.connect])
  (:require [clojure.spec.alpha :as s]
            [com.wsscode.pathom.core :as p]
            [com.wsscode.pathom.parser :as pp]
            [com.wsscode.pathom.trace :as pt]
            [clojure.math.combinatorics :as combo]
            [#?(:clj  com.wsscode.common.async-clj
                :cljs com.wsscode.common.async-cljs)
             :as p.async
             :refer [let-chan go-promise go-catch <? <?maybe <!maybe]]
            [clojure.set :as set]
            [clojure.core.async :as async :refer [<! >! go put!]]))
#2018-09-2513:36wilkerlucioit complains that com.wsscode.pathom.connect requires com.wsscode.pathom.connect, but that was always ok#2018-09-2513:37wilkerlucionow a bunch of comands don't work because Cursive don't want to run that (running tests for example)#2018-09-2513:40cfleming@wilkerlucio I don’t think anything has changed with that code in a while - was Cursive ok with this namespace previously?#2018-09-2513:40wilkerlucioyes, it was, started the problem since the last EAP I think#2018-09-2513:41wilkerluciothis is a very common practice to do in cljc files to have macros available on CLJS from the file#2018-09-2513:48wilkerluciothe project is public, you can try yourself if you want: https://github.com/wilkerlucio/pathom/#2018-09-2513:54wilkerlucioand I'm running it though deps.edn (I only use lein to build the jar and publish)#2018-09-2514:12cflemingOk, I’ll try it out, thanks#2018-09-2514:23cfleming@wilkerlucio Here’s the problem. That project depends on nubank/workspaces, and that one depends on com.wsscode/pathom:2.0.4. So this project depends on itself, and that is confusing things.#2018-09-2514:25wilkerluciohumm, gotcha, so I guess I can make some alias shuffling to get it to run witouht workspaces, I don't it on CLJ side anyway, thanks for looking it up!#2018-09-2514:27cflemingYou can use:
nubank/workspaces          {:mvn/version "1.0.0-preview8"
                                             :exclusions [com.wsscode/pathom]}
#2018-09-2514:27cflemingUgh, you get the idea#2018-09-2514:27cfleming@wilkerlucio ^^#2018-09-2514:27cflemingI tested that, it works.#2018-09-2514:27wilkerluciothanks, I didn't know :exclusions works on deps, awesome!#2018-09-2514:29wilkerlucioI add the exclusions on the 2 places where workspaces is required but I still get the ciclic error#2018-09-2514:29wilkerluciothis is my launch config:#2018-09-2514:29wilkerluciohttps://www.dropbox.com/s/kvsbxaucgpx8x8v/Screenshot%202018-09-25%2011.29.26.png?dl=0#2018-09-2514:30wilkerluciois that correct?#2018-09-2514:30cflemingDid you refresh your project after modifying the deps.edn?#2018-09-2514:30wilkerlucioyes#2018-09-2514:30cflemingYou should no longer see pathom in your dependencies under the deps toolwindow.#2018-09-2514:31wilkerlucioits gone there: https://www.dropbox.com/s/cii543ubw4xppxi/Screenshot%202018-09-25%2011.31.15.png?dl=0#2018-09-2514:31cflemingYou’ll need to expand out workspaces since it’s pulled in transitively.#2018-09-2514:31wilkerlucio(I expanded the workspaces, not there too)#2018-09-2514:31cflemingHmm#2018-09-2514:32wilkerluciohttps://www.dropbox.com/s/syjcukewea184wx/Screenshot%202018-09-25%2011.32.17.png?dl=0#2018-09-2514:32cflemingAnd you don’t see it in the project toolwindow under External Libraries?#2018-09-2514:32wilkerlucioIll try restarting intellij, just in case#2018-09-2514:33wilkerlucioI think I know whats wrong#2018-09-2514:34wilkerlucioI see it under Libraries on project, I still have that on the lein side, so that might be it#2018-09-2514:34cflemingOh right, did you import from lein or from deps?#2018-09-2514:34wilkerlucioboth#2018-09-2514:34cflemingYeah, you should only use one of them in Cursive.#2018-09-2514:35wilkerlucioI only added lein because it keeps asking to do it when you open the project.clj#2018-09-2514:35wilkerluciocan we disasble that once deps is on?#2018-09-2514:35cflemingOh, I see - yes, that should definitely go.#2018-09-2514:37wilkerlucioI just removed the lein module, re-add the deps and tried over, but still complaining... I'm trying to restart IntelliJ now#2018-09-2514:37cflemingCheck the lein toolwindow to make sure that the project is no longer registered.#2018-09-2514:38wilkerlucioyeah, I removed from that window#2018-09-2514:39wilkerlucionope =/#2018-09-2514:39wilkerluciohttps://www.dropbox.com/s/ozswu4xktmr6xg6/Screenshot%202018-09-25%2011.39.15.png?dl=0#2018-09-2514:39cflemingIs the lib still under External Libraries?#2018-09-2514:40wilkerluciogot it, removing by hand from Libraries on the project#2018-09-2514:40wilkerlucioseem like it added back again when I refresh the deps project, which is strange given the exclusions is there#2018-09-2514:40cflemingAnd it’s definitely not in the dependencies tree in the deps toolwindow anywhere?#2018-09-2514:41wilkerluciono, not at all in the deps dependencies#2018-09-2514:41cflemingThat’s very weird.#2018-09-2514:41cflemingBut now if you refresh your deps project from the deps toolwindow, the lib stays gone?#2018-09-2514:41wilkerlucioand I confirmed if I refresh the project I get it on external libs again#2018-09-2514:42cflemingThat’s if you refresh via deps, right?#2018-09-2514:42wilkerlucioyeah#2018-09-2514:42wilkerluciohttps://www.dropbox.com/s/ceoafcec3u1y51e/Screenshot%202018-09-25%2011.42.18.png?dl=0#2018-09-2514:43cflemingThe only think I can think of is that it might be deps classpath caching or something.#2018-09-2514:43cflemingIf you get the classpath via deps on the command line, is pathom in there?#2018-09-2514:44wilkerluciolet me check#2018-09-2514:45wilkerlucionot there:#2018-09-2514:45wilkerlucio
Wilker-Nu-2:pathom wilkerlucio$ clj -Spath -A:dev,:provided,:test,:http-drivers
src:/Users/wilkerlucio/.m2/repository/org/clojure/data.json/0.2.6/data.json-0.2.6.jar:/Users/wilkerlucio/.m2/repository/org/clojure/clojure/1.9.0/clojure-1.9.0.jar:/Users/wilkerlucio/.m2/repository/commons-codec/commons-codec/1.11/commons-codec-1.11.jar:/Users/wilkerlucio/.m2/repository/org/clojure/core.specs.alpha/0.1.24/core.specs.alpha-0.1.24.jar:/Users/wilkerlucio/.m2/repository/org/clojure/spec.alpha/0.1.143/spec.alpha-0.1.143.jar:/Users/wilkerlucio/.m2/repository/org/apache/httpcomponents/httpasyncclient/4.1.3/httpasyncclient-4.1.3.jar:/Users/wilkerlucio/.m2/repository/slingshot/slingshot/0.12.2/slingshot-0.12.2.jar:/Users/wilkerlucio/.m2/repository/org/apache/httpcomponents/httpcore-nio/4.4.6/httpcore-nio-4.4.6.jar:/Users/wilkerlucio/.m2/repository/spec-coerce/spec-coerce/1.0.0-alpha6/spec-coerce-1.0.0-alpha6.jar:/Users/wilkerlucio/.m2/repository/commons-io/commons-io/2.6/commons-io-2.6.jar:/Users/wilkerlucio/.m2/repository/com/wsscode/spec-inspec/1.0.0-alpha2/spec-inspec-1.0.0-alpha2.jar:/Users/wilkerlucio/.m2/repository/clj-http/clj-http/3.8.0/clj-http-3.8.0.jar:/Users/wilkerlucio/.m2/repository/org/apache/httpcomponents/httpcore/4.4.9/httpcore-4.4.9.jar:/Users/wilkerlucio/.m2/repository/clj-tuple/clj-tuple/0.2.2/clj-tuple-0.2.2.jar:/Users/wilkerlucio/.m2/repository/riddley/riddley/0.1.12/riddley-0.1.12.jar:/Users/wilkerlucio/.m2/repository/commons-logging/commons-logging/1.2/commons-logging-1.2.jar:/Users/wilkerlucio/.m2/repository/org/apache/httpcomponents/httpclient/4.5.5/httpclient-4.5.5.jar:/Users/wilkerlucio/.m2/repository/org/clojure/math.combinatorics/0.1.4/math.combinatorics-0.1.4.jar:/Users/wilkerlucio/.m2/repository/potemkin/potemkin/0.4.4/potemkin-0.4.4.jar:/Users/wilkerlucio/.m2/repository/camel-snake-kebab/camel-snake-kebab/0.4.0/camel-snake-kebab-0.4.0.jar:/Users/wilkerlucio/.m2/repository/org/apache/httpcomponents/httpmime/4.5.5/httpmime-4.5.5.jar
#2018-09-2514:47cflemingI’m afraid I don’t know what more to suggest sorry, when I add those exclusions here it definitely gets removed and everything works.#2018-09-2514:48wilkerluciomight be some other type of cache, I'm starting trying cleaning the .idea and starting over#2018-09-2514:48wilkerluciois there any other place I might need to clean cache from?#2018-09-2514:48wilkerlucioand thanks a lot for hanging with me on this#2018-09-2514:48cflemingBefore trying that, try re-cloning the project and just importing the new copy, only using deps.#2018-09-2514:50wilkerlucioI just saw a pom.xml there facepalm#2018-09-2514:50wilkerluciowhen I re-imported it seemed to use maven and pathom was in the libs, my guess the pom.xml was screwing things#2018-09-2514:51cflemingEven so, the library name was Deps: <whatever> right? So it was deps adding it.
#2018-09-2514:51cflemingBut maybe deps uses the pom under the hood? Seems unlikely, but who knows.#2018-09-2514:52wilkerluciono luck with that, still getting it, I'll try your suggestion and clone it again#2018-09-2514:56wilkerluciothere is some weird cache it seems#2018-09-2514:57cflemingDoes the clone work correctly?#2018-09-2514:57wilkerlucioeven if I completly remove the workspaces dep, pathom still shows up in External Libraries#2018-09-2514:57wilkerluciono, new clone, same issue#2018-09-2514:57cflemingThat’s bizarre.#2018-09-2514:57cflemingLet me close my project and re-open it, one sec.#2018-09-2514:59cflemingI can’t get that lib to re-appear no matter what I do.#2018-09-2515:00cflemingAnd the only changes to the version I cloned from your repo are the two exclusions.#2018-09-2515:01wilkerlucioyeah, the thing about removing the workspaces and it still living there is bizarre#2018-09-2515:01cflemingIt’s even weirder that re-cloning the repo doesn’t fix it.#2018-09-2515:01cflemingDid you clone from the link you sent me?#2018-09-2515:01wilkerlucioyeah#2018-09-2515:01wilkerluciocloned into a new folder#2018-09-2515:02cflemingThen I have no idea, sorry.#2018-09-2515:02cflemingThat is definitely what the problem is, but I can only :shrugemoji: as to what is actually going on.#2018-09-2515:03wilkerluciono worries, should be something weird here, I'll try to clean some libs and try over again, I'll let you know if works out#2018-09-2515:03cflemingOk, thanks, I’d be interested to know if you figure it out.#2018-09-2515:13wilkerlucioI figured, the pathom dep was coming from fulcro-inspect actually, not workspaces, adding exclusion there fixed the dep issue#2018-09-2515:14wilkerluciobut weirdly, now it can't require core.async, CompilerException java.io.FileNotFoundException: Could not locate clojure/core/async__init.class or clojure/core/async.clj on classpath., compiling:(com/wsscode/pathom/core.cljc:1:1) , but the core.async is present on the deps, cursive can navigate to it, sorry, too many problems I'm bringing on a batch XD#2018-09-2517:33wilkerlucio@cfleming I just got it working using IntelliJ classpath#2018-09-2517:34wilkerluciobut when I do via Deps on the REPL command menu, the core.async is not going on the classpath#2018-09-2517:34wilkerluciobut when I try via terminal using clj it works (using same aliases)#2018-09-2518:01wilkerlucioone more hint: I works if I manually add the aliases to the REPL configuration, but the same aliases are already checked in the Aliases under deps menu, is expected to have to manually add those again to the deps run?#2018-09-2518:52cfleming@wilkerlucio I don’t get it, why didn’t it appear in the classpath from the deps CLI then?#2018-09-2518:55wilkerluciolet me clarify, because I might just had a wrong assumption#2018-09-2518:55cflemingAnd in my project, fulcro-inspect doesn’t pull that dependency in.#2018-09-2518:55cflemingOh, one sec#2018-09-2518:56cflemingRe: this: > I works if I manually add the aliases to the REPL configuration, but the same aliases are already checked in the Aliases under deps menu, is expected to have to manually add those again to the deps run?#2018-09-2518:56cflemingYes, it’s expected to have to add them to the run config. This is because you will probably want to use different aliases when running than when syncing your project.#2018-09-2518:57wilkerlucioyeah, that's were I find my assumption wrong, but it makes sense#2018-09-2518:58wilkerlucioif more people get this, might worth to add a note on the deps alias, something like (project aliases will not be considered, you have to add the ones you want)#2018-09-2519:14cflemingSure, this all needs proper documentation.#2018-09-2514:27wilkerluciothanks, I didn't know :exclusions works on deps, awesome!#2018-09-2515:42tanzoniteblackif I have a form like
(clj-time.coerce/from-sql-time (:some_key (first (korma/exec-raw ["select now() as some_key -- obfuscated"]))))
How can I get cursive to change it to:
(-> ["select now() as some_key -- obfuscated"]
    korma/exec-raw
    first
    :some_key
    clj-time.coerce/from-sql-time)
I know there's a Thread form command, but no matter where I place the carrot, it seems to only thread the most narrow sexp?
#2018-09-2515:43tanzoniteblacknevermind, immediately just figured it out after asking. Just run the command again in the next sexp up and it pulls it into the -> form inside of it#2018-09-2515:44tanzoniteblackI'm trying out cursive after having used emacs+cider for several years, so adjusting to a slightly different way of thinking in the editor. With cider & clj-refactor, you highlight the sexp you want put into the threaded form, so that is what I was expecting and couldn't get to work#2018-09-2610:30dazldi kind of wish that the shortcut to go to the repl would toggle between repl and last window#2018-09-2613:13witekHi. I am trying Cursive for a ClojureScript project with deps.edn. After crating and adding pom.xml with clojure -Spom most of the "... cannot be resolved" messages are gone. But I still have many. This one for example: (.-head js/document) causes ".-head cannot be resolved". And (.log js/console "hello world") causes ".log cannot be resolved". How to deal with this?#2018-09-2618:31rarousCursive does not have recognition for JS modules especially for global and browser APIs#2018-09-2618:33rarousIt would need to require IDEA WebDevelopment plugins (not included in community edition) or implement it from scratch (probably time expensive)#2018-09-2614:28scarytomWhen importing a leiningen project into intellij using cursive, I notice that all the project dependencies have a scope of "Compile". I would expect test dependencies to have a scope of "Test". Is there any way to fix this?#2018-09-2615:12scarytomI raised a new issue for this here https://github.com/cursive-ide/cursive/issues/2055#2018-09-2617:29cfleming@dazld I did consider that - the problem then is that you have to think about where you are currently to know what the command is going to do.#2018-09-2708:15dazldit’s like the quake console, toggle in, toggle out. I guess the context is usually pretty clear.#2018-09-2708:16dazldI do miss this, and it gets in the way for me every day#2018-09-2708:17dazldmaybe an option to make it behave this way could be a solution..#2018-09-2708:17dazldor another keymap#2018-09-2617:30cfleming@witek Yes, JS interop is currently very noisy because it’s almost impossible to do correctly - I’m going to fix that soon.#2018-09-2620:12shaun-mahood@cfleming I'm trying to get the new EAP to start a REPL with a deps.edn based project - have you got anything written or could you point me in which direction I should be trying now? There are a bunch of new options and I'm not sure which one I should be trying to get work (Local REPL with Deps is the direction I'm leaning but getting an error "No modules containing clojure.main found")#2018-09-2620:27cfleming@shaun-mahood That error normally means that you don’t have Clojure attached to any modules as a dependency.#2018-09-2620:31cflemingAs to the options you might want, there are two axes now - the type of REPL and how you want to run it. The type of REPL is basically a choice between nREPL (RPC style) and clojure.main (streaming style). Currently Cursive support is better for nREPL so I’d choose that unless you have a good reason not to.#2018-09-2620:32cflemingFor execution, I’d use Deps for Deps projects, since that will allow you to use aliases etc when running.#2018-09-2620:57shaun-mahoodOk, how would I translate clojure -m figwheel.main into the format it's expecting? Nothing I've tried seems to work (screenshot in thread)#2018-09-2620:57shaun-mahood#2018-09-2620:58shaun-mahoodNot sure if this pasted correctly or not, I got a message from slack and not sure if you can see it or not#2018-09-2620:58cflemingYeah, Slack moans but then shows the image anyway.#2018-09-2621:00shaun-mahoodOh good - wasn't sure if it showed it to anyone else 🙂#2018-09-2621:00cfleming@shaun-mahood There’s an issue with the clojure.main REPL type which means that you can’t specify figwheel.main as the main class. I’m planning to fix that for the next EAP.#2018-09-2621:00shaun-mahoodOh that makes me feel better about things 🙂 I guess I'll leave the rest of this until then and just work on the leiningen docs#2018-09-2621:02cflemingOk - one thing to beware of is that all those options have changed, as you noticed. I’m hoping to get a stable build of this EAP out sometime soon, but I’m travelling so times are a little unpredictable right now.#2018-09-2621:04cflemingI’m also planning to document all this myself soon as well - perhaps I could combine what you have into the Cursive docs? Or at least if you have notes about what’s worked well from you I can document from there from a Cursive POV and Bruce can use it from a Figwheel POV?#2018-09-2621:04shaun-mahoodYeah, I'll probably focus on the stable build for now and update when the new build comes out - my real project is still using lein so I'm not in any hurry.#2018-09-2621:08shaun-mahoodMy immediate plan is to document the "simple" way to use lein from a new project with just CLJS, the way I've got it running for me with CLJ and CLJS, and then another bit with the full build (CLJ, CLJS, Integrant, Uberjar, and SSL) for both dev and production. I'll send you a link to the figwheel specific docs as I get them done, but would be happy to adapt into a more Cursive centric form or you can just steal what you want.#2018-09-2621:10cflemingOk, that sounds good. I’ll be interested to see that as well since I don’t use CLJS myself.#2018-09-2621:11shaun-mahoodDo I need to worry about the Intellij version for anything, or just the Cursive version?#2018-09-2621:11cflemingJust the Cursive version.#2018-09-2621:11shaun-mahoodPerfect!#2018-09-2703:48shaun-mahood@cfleming My first attempt at documenting figwheel-main is at https://github.com/bhauman/figwheel-main/pull/97 Since you’ve changed the way the REPL works and might be looking at documenting that further, I found it really hard to find anything related to how to use the different REPL options anywhere (for the non-EAP versions). Might be worth using figwheel-main as an example for some of the new options since it can be run a few different ways.#2018-09-2705:31mishaI wonder, if there could/will be a way to "resolve sym as s/def", @cfleming What I am actually after, is cmd+click on keyword to go to spec definition, if available. And it does not work, when you have spec defined with a custom s/def-like macro.#2018-09-2708:07cfleming@misha You should be able to do that now using the “Specify…” option.#2018-09-2708:07cflemingThat will allow you to resolve as any var you have available in your project.#2018-09-2709:30vasacHi, is there a way to format code according to this https://github.com/bbatsov/clojure-style-guide#one-space-indent
Use a single space indentation for function (macro) arguments when there are no arguments on the same line as the function name.
;; good
(some-fn
 even?
 (range 1 10))

;; bad
(some-fn
  even?
  (range 1 10))
#2018-09-2710:22cfleming@vasac Yes, I’m not in front of IntelliJ but it’s something like Settings-&gt;Editor-&gt;Code Style-&gt;Clojure-&gt;General-&gt;One space list indent#2018-09-2710:23cflemingCIDER can also be configured to do the reverse these days, but I can’t remember the config off the top of my head.#2018-09-2710:23vasacThanks, it works 🙂 - I miss that one.#2018-09-2715:19misha@cfleming it works! ♥️ (go to spec definition after resolving custom macro as s/def) but if macro is too clever (first arg is not a keyword) - it does not :(#2018-09-2720:09cfleming@misha No, the macro will have to have exactly the same shape as the one you’re resolving as.#2018-09-2807:18claudiusilly question, but thinking I'm missing something. Is there any way to send the current form to the repl ? I have send top-form and form before caret what I want sometimes is to just send the current form that I'm in. ex:
(comment (let [x (mount-app app)]
   (prn (:a1 x))) ) 
#2018-09-2807:20claudiuI run send top form but, after that I just want to send the prn to the repl (I do form before caret, but it's a bit annoying)#2018-09-2808:15cfleming@claudiu If you select the form both Send to… forms will send the selection instead of what they would normally do.#2018-09-2809:00mishayeah, but to do that you need to either: - format code the way which allows you to just triple-click the form (line) to send it to repl - or precise-click specifically after the form to send form-before-caret - or precise-select form - or multiple steps of shift+alt+left/right all of which break the flow harold#2018-09-2809:05mishawhat really would be cool, is sending to repl all forms, current selection is touching. the same way formatting works now: select nothing – file is formatted, select few lines of a hash map - only that hash map will be formatted#2018-09-2809:07mishaotherwise it is tricky to "send current form": you are in the nested form, how many layers to send? 1? what if caret is in the middle of symbol? send just symbol? or always send form around it? unless it is top-form-symbol with nothing around it? ugh...#2018-09-2809:32claudiu(prn (:a1 x)) was just thinking the current form I'm in depending on the cursor. Basically the one that has the first ( to the left. If my cursor is on n send the prn, if my cursor is on 1 send (:a1 x).#2018-09-2809:32claudiuselecting it works nicely 🙂 thank you#2018-09-2809:35cflemingRight, it’s tricky - a few people have asked about a “send current form” which would be the immediately surrounding form as @claudiu describes. Or something that allows you to select the scope you want, something like the introduce refactoring does.#2018-09-2809:36cfleming@misha Generally I find the best option is to be somewhere in the form (or at the end of it) and use Expand Selection#2018-09-2810:02manutter51I have a project with a directory structure like this:
project
  > src
    > clj
    > cljs
      > foo
        > bar
          thing.cljs
  > test
    > cljs
      > foo
        > bar
          thing-test.cljs
The test directory gets marked as Test Sources Root, but then none of my tests will run because they’re all in foo.bar.thing-test, not cljs.foo.bar.thing-test. So I click on test and do “Unmark as Test Sources Root,” click on cljs underneath it, and select “Mark Test Sources Root” and everything works, except I come back to my project later, and discover that test is back to being marked as the Test Sources Root. How can I convince it that I want the Test Sources Root to be cljs and not test?
#2018-09-2810:04manutter51(This behavior is happening across multiple iterations of Invalidate Caches / Restart, btw — IDEA 2018.2.4, Cursive 1.8.0-eap7-2018.2)#2018-09-2810:54manutter51Aha, caught it in the act! If I make changes to project.clj, and import changes, it jumps back to selecting the test dir as the Test Sources Root.#2018-09-2811:03manutter51Interesting: if I rename test to tst, then when I import lein changes, it unmarks cljs, but does not mark tst. Saves me a step, at least.#2018-09-2811:11joelsanchezhave you tried :test-paths, :resource-paths and :source-paths? I find that cursive ignores changes done through Project Structure, but obeys project.clj#2018-09-2811:21manutter51Woot, didn’t know about :test-paths in the project.clj, that fixes it perfectly! Thanks much, one less mystery in my way.#2018-09-2811:34joelsanchezEinstein said there are only two things that are truly infinite: the universe and the number of possible keys in project.clj...and he's not sure about the universe#2018-09-2811:34manutter51Einstein was wise.#2018-09-2813:03stijnwhat does this error mean? Error running 'REPL': Error creating RunProfileState#2018-09-2813:04stijn(i'm using clojure.main repl with deps.edn)#2018-09-2813:38scarytom@cfleming can you comment on why Cursive marks directories defined in :resource-paths in the project.clj as source roots rather than resource roots? I have a java+clojure project and when I run the junit tests in intellij, none of my resources are available because of this.#2018-09-2813:55cfleming@manutter51 Right, Cursive obeys project.clj - that’s the source of truth. If you want to change how directories are marked it has to be done there for reproducibility.#2018-09-2813:55cflemingThat’s also how e.g. the Maven integration works.#2018-09-2813:56cfleming@stijn It means you should send me your log file 🙂#2018-09-2813:56manutter51That’s cool — I didn’t have a :test-paths key at all (didn’t know there was one) and apparently there’s a default value.#2018-09-2813:57cflemingYeah, that can be tricky actually. Lein has defaults for :source-paths and :test-paths but Cursive will also pick paths up from e.g. cljsbuild config. So if you have src/cljs configured in cljsbuild Cursive will mark both src (from the :source-paths default) and src/cljs (from cljsbuild), and confusion will ensue.#2018-09-2813:58cflemingEspecially since if you have no :source-paths at all it’s confusing that the value for it comes from defaults.#2018-09-2814:03stijn@cfleming 😄#2018-09-2814:04stijnI did thorough restructuring of my project with local/root deps and removing/importing of modules, so that might have caused it. when I import the project from scratch it worked#2018-09-2814:16cfleming@t.denley I’ll reply over on your GH issue, but the tl;dr is that it’s by design due to unfortunate differences between IntelliJ’s and Leiningen’s understanding of what a resource folder is.#2018-09-2814:16cflemingThe original issue with gory details is here: https://github.com/cursive-ide/cursive/issues/241#2018-09-2814:16scarytomthanks#2018-09-2814:17cflemingThere’s a workaround which is described in that issue and also https://github.com/cursive-ide/cursive/issues/833 which might work for you, which is modifying the compiler resource patterns.#2018-09-2814:17cflemingDepending on what it is that you need copied.#2018-09-2814:24scarytomthanks -- #833 pretty much describes my issue entirely#2018-09-2814:25scarytomI'll try that workaround. Sad that I have to get everybody in my team to apply this though.#2018-09-2814:39cfleming@t.denley Yeah, it’s unfortunate. Let me know if you can’t work around it and I can look at it again, but IIRC there wasn’t really a good fix which wouldn’t significantly break someone’s use case.#2018-09-2814:40scarytomI've already applied the workaround, and it does solve my immediate issue, thanks#2018-09-2814:40cflemingOh great. If you’re sharing some or all of your .idea config in your VCS, the change should get to your coworkers.#2018-10-0116:34jarppeSuddenly the stubs generation for Datomic fails. I get the message that stubs must be generated, but that keeps failing with message "Leiningen aborted for module vaahtera: Disable stub generation for module vaahtera"#2018-10-0116:55jarppeEvent log says: 01/10/2018 19.45 Stub generation required Your project requires namespaces which need stubs to be generated. Generate now 19.54 Leiningen aborted for module vaahtera: Disable stub generation for module vaahtera 19.54 Stub generation required Your project requires namespaces which need stubs to be generated. Generate now 19.54 Leiningen aborted for module vaahtera: Disable stub generation for module vaahtera 19.54 Stub generation required Your project requires namespaces which need stubs to be generated. Generate now 19.54 Leiningen aborted for module vaahtera: Disable stub generation for module vaahtera 19.54 Stub generation required Your project requires namespaces which need stubs to be generated. Generate now#2018-10-0117:14jarppeIDEA log file has: 2018-10-01 20:14:21,246 [ 745102] INFO - il.indexing.FileBasedIndexImpl - Rebuild requested for index ClojureSymbolMeta java.lang.Throwable at com.intellij.util.indexing.FileBasedIndex.requestRebuild(FileBasedIndex.java:70) at cursive.stubs.ReplStubsNotifications$createNotification$1$whenDone$1.run(Stubs.kt:213) at cursive.stubs$generate_stubs$fn__6643$process__6644.invoke(stubs.clj:294) at cursive.stubs$generate_stubs$fn__6643.invoke(stubs.clj:363) at cursive.task$backgroundable$reify__6451.run(task.clj:12) at com.intellij.openapi.progress.impl.CoreProgressManager$TaskRunnable.run(CoreProgressManager.java:736) at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$1(CoreProgressManager.java:157) at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:580) at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:525) at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:85) at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:144) at com.intellij.openapi.progress.impl.CoreProgressManager$4.run(CoreProgressManager.java:395) at com.intellij.openapi.application.impl.ApplicationImpl$1.run(ApplicationImpl.java:314) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745) 2018-10-01 20:14:21,269 [ 745125] INFO - il.indexing.FileBasedIndexImpl - scheduleIndexRebuild, reason: checkRebuild 2018-10-01 20:14:21,292 [ 745148] INFO - .diagnostic.PerformanceWatcher - Pushing properties took 6ms; general responsiveness: ok; EDT responsiveness: ok 2018-10-01 20:14:21,952 [ 745808] INFO - .diagnostic.PerformanceWatcher - Indexable file iteration took 648ms; general responsiveness: ok; EDT responsiveness: ok 2018-10-01 20:14:21,953 [ 745809] INFO - indexing.UnindexedFilesUpdater - Unindexed files update started: 1148 files to update 2018-10-01 20:14:26,260 [ 750116] INFO - .diagnostic.PerformanceWatcher - Unindexed files update took 4307ms; general responsiveness: ok; EDT responsiveness: ok#2018-10-0120:33cfleming@jarppe Can you email me your log file to <mailto:/cdn-cgi/l/email-protection|/cdn-cgi/l/email-protection>?#2018-10-0206:44jarppeJust sent the logs, hope it helps. If there's anything I can do to help to solve this just ask.#2018-10-0200:19royalaidIs there a way to move kv-pairs around via keybinding?#2018-10-0200:19royalaidideally up or down a row#2018-10-0208:51cfleming@royalaid Yes, Edit-&gt;Structural Editing-&gt;Move form up/down will move paired forms if you’re at the start of one, like this: {:a 1 |:b 2 :c 3} where | is the caret.#2018-10-0208:52cflemingThat also works for some other forms e.g. let bindings.#2018-10-0215:49royalaid🙌 #2018-10-0220:56joelsanchezhello. suppose I want to edit some code in a dependency, and load it in the REPL. what's the way of doing this with Cursive?#2018-10-0220:57joelsanchezsince the code in dependencies is opened in a "read-only" way, I don't see an easy way of doing it#2018-10-0221:04joelsancheza way to do it is to go to Project settings -> Libraries, add the source folder as Sources, and delete the library from the list. that way the code is editable and can be loaded with "Send (...) to the REPL", and symbol resolution works as expected. a better way?#2018-10-0221:05tanzoniteblackif you're using lein, you can also take advantage of "checkouts" to load the library as a module inside the project#2018-10-0221:05tanzoniteblackbut I haven't found a better way then that yet either#2018-10-0221:35cfleming@joelsanchez No good solution for that sorry - workarounds that I can describe in the doc are very welcome.#2018-10-0221:38cflemingIf you’re using deps you can override your main dependency with a git one and do it that way.#2018-10-0222:32joelsanchezthank you both. I will try checkouts, since I'm using lein#2018-10-0222:39joelsanchezcheckouts work just fine, if anyone is interested. just need to change the "refresh dirs" of tools.namespace. thanks#2018-10-0300:09tmarble@cfleming do you have an estimate as to when figwheel-main support might land in an EAP release?#2018-10-0306:07caleb.macdonaldblackIf it isn’t already supported, I think it would be really cool to be able to link in comments in cursive like this: https://docs.oracle.com/javase/7/docs/technotes/tools/windows/javadoc.html#see#2018-10-0318:00cfleming@caleb.macdonaldblack There’s nothing like that at the moment. Do you mean basically JavaDoc-like formatting? I think the closest Clojure ever gets is markdown support (codox and some other things support variants of this), which could support linking etc.#2018-10-0320:18cfleming@tmarble I don’t, sorry - my schedule is a little unpredictable right now. There’s a fix in the latest EAP (out today) to facilitate using it in clojure.main style REPLs though.#2018-10-0320:19cflemingA writeup on that is forthcoming.#2018-10-0320:24tmarbleCool! Thank you!#2018-10-0322:33cflemingPSA: Cursive should now work with the latest IntelliJ 2018.3 EAP build: https://groups.google.com/forum/#!topic/cursive/PSobReMG7bI#2018-10-0407:06gravWhen connecting to shadow-cljs server from Cursive via a "remote" configuration, is it possible to get Cursive to execute some code (eg api/watch and api/nrepl-select)?#2018-10-0409:36claudiu@grav I have it commented in the user.clj and after connecting to the repl I run the code selecting the repl I want to use https://github.com/fulcrologic/fulcro-lein-template/blob/develop/resources/leiningen/new/fulcro/shadow-cljs/src/dev/user.clj#L10#2018-10-0408:57cfleming@grav Do you mean when the REPL connects? There’s no way in Cursive to do that, but you might be able to use user.clj to do it at the Clojure level? If that doesn’t work let me know, and I can think about adding it to Cursive.#2018-10-0408:58gravYes, when the REPL connects. Can you explain what you mean with user.clj?#2018-10-0408:58grav@cfleming ^#2018-10-0409:00cfleming@grav Sure, when a Clojure REPL connects, if there’s a user.clj file at the root of the classpath (i.e. in a src folder, not in a namespace) then it will load that file automatically when it starts.#2018-10-0409:00cflemingDo you want that code executed in clj or cljs?#2018-10-0409:01cflemingI don’t know if cljs has something similar - #clojurescript could probably tell you.#2018-10-0409:01gravIn clj. It will (as I understand it) launch a cljs repl#2018-10-0409:01cflemingOk, then user.clj should work for you I think.#2018-10-0409:01gravSo I guess user.clj would work. I'll try it!#2018-10-0409:01cflemingGreat, let me know how it works.#2018-10-0409:08gravOk, so shadow-cljs server does execute whatever's in user.clj, but calling the above-mentioned functions causes an exception. If I execute it with a remote REPL connection, it works.#2018-10-0409:08gravMaybe I should search for a hook in shadow-cljs that can execute the code, whenever a remote repl connection is initiated.#2018-10-0409:10gravOr you could implement an "evaluate this file after connection" option for remote REPL configurations 🙂#2018-10-0409:10cflemingHehe#2018-10-0409:10gravThe exception is
Exception in thread "main" java.lang.ExceptionInInitializerError
	at clojure.main.<clinit>(main.java:20)
Caused by: clojure.lang.ExceptionInfo: missing instance {}, compiling:(user.clj:4:1)
, but it's probably got something to do with shadow-cljs
#2018-10-0409:11cflemingIn general I’m a little reluctant to duplicate functionality that’s in clojure itself, although admittedly user.clj has a discoverability issue since a lot of people ask about this.#2018-10-0409:12gravHaha, yes. It's a bit magic. But I get your point about duplicate functionality. I could probably ask thheller about a hook in shadow-cljs#2018-10-0409:12cflemingI think the first stop would be to investigate the exception - it’s possible that it’s something simple. thheller may have ideas about that too.#2018-10-0409:15gravOk. will do! Thanks 🙂#2018-10-0412:29dilvanHow to change the spacing for hiccup vectors? I know the standard is just one space, but I have difficulties in seeing this amount of space. I tried File->Settings->Editor->Code Style->Clojure but could not find an option to indent vectors (such as the one used by hiccup html code).#2018-10-0414:44martinklepsch@cfleming hey 🙂 I'm just trying to setup cljdoc with Cursive on a friends computer and some resource that should be on the classpath can't be found. Specifically a file that's part of a :local/root dependency: https://github.com/cljdoc/cljdoc/blob/master/deps.edn#L43 We are on the latest EAP release, is this supposed to work and we're doing something wrong?#2018-10-0414:45cfleming@martinklepsch Yes, that should work, what are you seeing?#2018-10-0414:46martinklepschhttps://github.com/cljdoc/cljdoc/blob/master/modules/shared-utils/src/cljdoc/util.clj#L12 This line is throwing with "Cannot open <nil> as a reader" (i.e. file not found)#2018-10-0414:47cflemingThis is in a REPL?#2018-10-0414:48martinklepschWe're trying to load the namespace via CMD + Shift + L#2018-10-0414:49cflemingOk, let me clone that and try, one sec#2018-10-0414:49martinklepschthank you, much appreciated. I'm so clueless about Cursive haha#2018-10-0414:50cflemingYour friend is on 1.8.0-eap8 right?#2018-10-0414:52cflemingJust waiting while it downloads the internet…#2018-10-0414:53cflemingI get this error when syncing the project: “Manifest type not detected when finding deps for cljdoc/shared-utils in coordinate {:local/root “../shared-utils”}”#2018-10-0414:53cflemingDid you get that?#2018-10-0414:55martinklepschI don't think so. What specifically are you referring to with "syncing the project" running clj for the first time?#2018-10-0414:55cflemingNo, when importing the project into Cursive.#2018-10-0414:55cflemingHow did you do that?#2018-10-0414:56cflemingSo that error message comes back from deps, and is of mysterious origin. But what’s weird is that the path is wrong.#2018-10-0414:58cflemingOh wait, it’s actually complaining about analysis-runner, not cljdoc#2018-10-0415:00cflemingI fixed that problem by making modules/analysis-runner/deps.edn look like:
{:paths ["src" "resources"]
 :deps {cljdoc/shared-utils {:local/root "../shared-utils"
                             :deps/manifest :deps}}}
#2018-10-0415:09cflemingI see the problem you’re seeing, and for some reason those paths are coming through as:
/Users/colin/.gradle/caches/modules-2/files-2.1/com.jetbrains.intellij.idea/ideaIC/183.3283.2/f6ecc94209dbdecaea93389221b330c52f8f367d/ideaIC-183.3283.2/bin/modules/analysis-runner/src
/Users/colin/.gradle/caches/modules-2/files-2.1/com.jetbrains.intellij.idea/ideaIC/183.3283.2/f6ecc94209dbdecaea93389221b330c52f8f367d/ideaIC-183.3283.2/bin/modules/analysis-runner/resources
#2018-10-0415:09cflemingInvestigating….#2018-10-0415:53martinklepschOk we just tried with the :deps/manifest addition and the issue seems to remain the same but we're not 100% certain we did everything correct. Is there something specific we need to watch out for when launching the REPL process?#2018-10-0415:53martinklepsch(we tried clearing .cpcache FWIW)#2018-10-0415:58cfleming@martinklepsch No, this appears to be a large can of worms inside Cursive and tools.deps. I’m not sure exactly what the problem is, but my working theory is that it’s something to do with the CWD because I call tools.deps as a library.#2018-10-0415:58cflemingStill investigating…#2018-10-0416:00martinklepschOk cool, no rush ✌️#2018-10-0416:15cfleming@tmarble I have one, and a debugger 🙂#2018-10-0416:16tmarblesweet!#2018-10-0416:16cflemingIt’s complicated however since IntelliJ starts background processes to do this stuff.#2018-10-0416:44cfleming@martinklepsch This is partly a tools.deps bug, and partly a Cursive bug.#2018-10-0416:45cflemingAlex says: > Transitive local deps with relative paths are a problem and that’s a known issue#2018-10-0416:46cflemingYou have that because cljdoc requires modules/analysis-runner, and that requires ../shared-utils.#2018-10-0417:04martinklepschInteresting. I never ran into that for some weird reason then @cfleming#2018-10-0417:04cfleming@martinklepsch https://dev.clojure.org/jira/browse/TDEPS-74#2018-10-0417:04cflemingThat doesn’t look exactly like what’s happening in Cursive, but I think it’s related.#2018-10-0418:03cfleming@martinklepsch https://github.com/cursive-ide/cursive/issues/2065#2018-10-0418:18martinklepschthanks for digging into this today Colin! Can cursive run the clj process with an alias somehow? I'm thinking of adding an alias with the source paths and dependencies manually added as a workaround#2018-10-0418:19cfleming@martinklepsch Yes, you can do that. However it might be tricky if you run into the bug with the initial sync since Cursive has to do that first to know which aliases are available.#2018-10-0418:20cflemingIf you manage to get past that, then View-&gt;Tool Windows-&gt;Clojure Deps, open the cljdoc project, under Aliases select the aliases you need and then hit refresh.#2018-10-0418:21cflemingWhen starting a REPL you can add the aliases in the REPL Run Configuration page.#2018-10-0418:21martinklepschok cool, we'll give that a shot#2018-10-0419:38kennyI see Run with Deps was added to the REPL run config. If I am creating a REPL, shouldn't Cursive ignore my :main-opts for any aliases I specify?#2018-10-0419:39kennyThe behavior I am seeing is: I have a :test alias that has :main-opts specified and when I click the Run button to open the REPL, it runs my tests in the REPL window and then exits the process. Nifty, but not what I expected.#2018-10-0420:03cfleming@kenny I don’t think so, those are required to e.g. supply -m figwheel.main for a figwheel REPL#2018-10-0420:04cflemingDeps does have the concept of separate alias types for things like this, but AFAICT no-one actually uses them and Cursive effectively always passes -A.#2018-10-0420:04kennyOh I misunderstood. I thought those were for specifying aliases to start a REPL with that differ from the project aliases.#2018-10-0420:06kennyIs that something that will be added before deps support is complete?#2018-10-0420:12cflemingYou mean support for different alias types?#2018-10-0420:12cflemingI’m not sure, I think it’s pretty confusing.#2018-10-0420:17kennyNo. I mean I can select the aliases Cursive uses to resolve things in my project by going to the Deps panel and checking the boxes. I may not want to start a REPL using those same aliases though.#2018-10-0420:23cfleming@kenny That works now, those aliases are independent.#2018-10-0420:23kennyOh. How do I do that?#2018-10-0420:24kennyi.e. I want to resolve my project with aliases :test and :dev but only start my REPL with :test.#2018-10-0420:28cflemingYou choose :test and :dev in the boxes in the toolwindow as always, and when running your REPL choose to run with deps and just put test in the aliases box.#2018-10-0420:29cflemingBut, that will use :main-opts from that alias.#2018-10-0420:29kennySo that's the problem I started with.#2018-10-0421:15cflemingRight, there’s no way to avoid that right now except to split that alias into two I guess.#2018-10-0421:15cflemingOne part with deps, and one with main-opts#2018-10-0421:25kennyI guess. I'd prefer to not have to make code changes due to tooling though.#2018-10-0421:26cflemingI’m afraid that’s the only option right now, if your main opts stop the REPL running and you need the test deps.#2018-10-0421:32kennyIt seems like the only real solution is to separate out -R and -A. In practice I don't ever use -R - CI runs tests using -A and Cursive starts the REPL with aliases and ignores :main-opts. But it makes sense for the case.#2018-10-0421:33cflemingSure. I spoke to Alex about it and he didn’t seem to be aware of anyone actually using the different types, and said he always uses -A. I’ll think about a way in which most people can just add some aliases there but you can partition them if you want.#2018-10-0421:34cflemingmaybe accept either alias, alias, alias or -Ralias -Calias or whatever.#2018-10-0421:34cflemingIf no flag types are entered, then everything is -A.#2018-10-0421:36kennyMakes sense, I think. So you could do something like this :dev, -R:test?#2018-10-0421:38kennyIt almost seems like REPLs that are started via :main-opts should be another option entirely.#2018-10-0422:10cflemingWhy would they need another option?#2018-10-0422:18kennyBecause it sounds like there are two distinct tasks a user would want to do: 1. Run a custom REPL launched via :main-opts 2. Start a REPL with a particular set of aliases#2018-10-0422:18cflemingAllowing the different alias types would meet both those needs though, right?#2018-10-0422:19cflemingI mean, :main-opts comes from an alias.#2018-10-0422:23kennyRight. I was trying to simplify things for users because the tools-deps alias flags can be quite confusing.#2018-10-0422:23cflemingYeah, they are. I think -A by default unless you specify is hopefully a good middle ground.#2018-10-0422:26kennyPerhaps. Though it threw me a bit because I expected the aliases in the "Run with Deps" option to operate in the same way that clicking an alias in the Deps panel does.#2018-10-0422:27cflemingWell, they do, except that the ones in the Deps panel are only for dependency resolution, so :main-opts is implicitly ignored since nothing is executed.#2018-10-0422:27kennyThus my initial confusion.#2018-10-0617:40AzzuriteI'm reading my (windows) environment properties into a map. The properties contain names with parenthesis, which are converted to keys. In the nREPL in Cursive those keywords with parenthesis are printed wrongly when I print the env map: https://i.imgur.com/VyjRawd.png#2018-10-0617:41Azzuritehowever, I then wanted to try to reproduce it with another function of my own, but it doesn't even highlight the output at all: https://i.imgur.com/Sei5tqe.png#2018-10-0617:41Azzuriteis this a "feature" of the REPL with Cursive?#2018-10-0617:46AzzuriteI'm very new to clojure and using the luminus template#2018-10-0618:00joelsanchezkeywords and symbols can't contain parentheses for obvious reasons, but keyword will allow them anyway, that's why this is possible#2018-10-0618:00joelsancheztry evaluating :hey) and then (keyword "hey)") to see what I mean#2018-10-0722:25cfleming@azzurite Yes, @joelsanchez is correct - Cursive has to re-read output forms to pretty print and highlight them, so that will break for non-readable keywords.#2018-10-0807:41Azzuriteis there any reason why the return value of my other function was not highlighted at all?#2018-10-0807:51cfleming@azzurite probably because it’s unreadable. I can’t immediately see why, but the :test(x) would be my best bet.#2018-10-0807:52AzzuriteBut why did it work (wrongly) for the other function with the same issue :D :D#2018-10-0807:54cflemingI don’t know off the top of my head - I don’t have a REPL in front of me.#2018-10-0807:54Azzuriteit's fine, I was just wondering, but it seemed weird when I encountered all this 🙂#2018-10-0807:54cflemingIn general, using properties like that will cause extreme weirdness in the printing.#2018-10-0807:58Azzuritewhen does it switch from the single line map format to the multi-line one?#2018-10-0809:00Andreas LiljeqvistI have a problem with parinfer breaking the structure. Introduced a few eaps ago#2018-10-0809:01Andreas Liljeqvist(let [{:keys [a 5]|} {}]) presses backspace (let [{:keys [a 5|} {}])#2018-10-0809:02Andreas Liljeqvist| is caret#2018-10-0809:58cfleming@azzurite I don’t know - it will depend on the details of what went wrong. At the end of the day I could debug and give you a detailed analysis of the cases you show me, but the advice is still going to be the same - don’t do that 🙂#2018-10-0810:00cfleming@andreas862 That’s not new, it’s been in there for a long time. It’s a known parinfer problem. The issue is that parinfer can’t infer the parens correctly there since there’s no indentation to work from.#2018-10-0810:00cflemingThere are some relevant parinfer issues, one sec…#2018-10-0810:03cfleminghttps://github.com/cursive-ide/cursive/issues/1964#issuecomment-381807916#2018-10-0810:09Andreas LiljeqvistBoth atom parinfer and the online demo of parinfer forces balance from what I can see#2018-10-0810:10cflemingThe online demo allows you to choose#2018-10-0810:10cfleminghttps://shaunlebron.github.io/parinfer/demo#2018-10-0810:10cflemingBut it’s not clear cut, there are cases where forceBalance also creates real strangeness.#2018-10-0810:12Andreas Liljeqvistah, I was looking at https://shaunlebron.github.io/parinfer/#2018-10-0810:05cflemingI’ve been meaning to add the flag mentioned there but have not yet.#2018-10-0817:32ChrisIs there any support for having a clojure file that has access to all the rest of the projects namespaces and vars, but is outside of the source roots? The best I have found so far is to use a Scratch file for this, but is there a better way? Even if the REPL command window could be backed by a file, and we could edit it like any other file, that would be great too. @cfleming#2018-10-0821:41cfleming@chris547 Can you describe a bit why you need this?#2018-10-0908:08stijn@chrisadegraaf is this to have REPL history in a file? the way I usually do this is by adding the source root to a leiningen profile or deps.edn alias. every developer can setup its own aliases and include files the way they want#2018-10-0915:25Chris@stijn Yes, that is the intent - the problem with adding it as a source root is that when, using the reloaded workflow, I do a (reset) it will detect all namespaces that have been changed and recompile them, including my repl history file, which has commands I don't want to run#2018-10-0915:28Chris@cfleming So I do most of my coding at the REPL and as I jump between features, I have a lot of code that is specific for the features. When I used the standard REPL window with history, I would have a hard time finding REPL commands from several days ago. Now, that I've moved my REPL commands to separate files it's much easier to organize and it's also easy for me to share REPL files with team members in a way that doesn't have to be put in a source root. However, it's not straightforward on how to achieve this in Cursive. Even getting the REPL editor console separate from the output would be helpful as I'd like the editor in one pane and the RePL output in another.#2018-10-0915:29ChrisCursive is superior for all the reasons that IntelliJ is great for Java, however the REPL support isn't very flexible in my experience from the sense of encouraging people to use the REPL#2018-10-0915:43Chris@stijn @cfleming So far, the only way I have been able to achieve this is to use Scratch files - they have access to all the project objects and functions, are namespace aware, etc but do not get picked up by the (reset) command#2018-10-0915:44marshallI seem to have hit an issue with the “Run with Deps” REPL I have an Environment variable for my AWS_PROFILE set and it works fine with the clojure.main & IntelliJ classpath REPL. When I switch to Run with Deps the envar appears not to be set correctly, as I’m getting auth errors against AWS APIs. @cfleming#2018-10-0918:15stijn@chrisadegraaf you can specify refresh dirs for tools.namespace set-refresh-dirs. I don't use reloading anymore, but I remember that I solved it that way#2018-10-0918:38Chris@stijn Thanks, I wasn't aware of that option. What do you use now?#2018-10-1006:28stijnwe try to use as much as possible just standard repl for development. if we really need to run a backend application (mostly a web api) we use (start-your-web-server #'the-handler) which gives you a web server that will always have the latest eval'ed version of your code from the repl.#2018-10-1006:29stijnit does have some drawbacks (like renaming functions might introduce problems), but it also removes the complexity of having a 'component'-like system#2018-10-1716:46ChrisThanks for this information, @stijn (sorry for the delayed response ) but it's much appreciated.#2018-10-0920:59cfleming@chris547 The problem with scratch files is that they won’t be shared with your team members.#2018-10-0920:59cflemingI do need to fix them because they’re occasionally useful, but I’m not sure they’re a great fit for this.#2018-10-0921:00cflemingThere’s another option - set up a source dir in a profile as @stijn suggests. Then you can use that profile when syncing your project to Cursive, so Cursive will set up a source root for it. But don’t use the profile when running your REPL, that way it won’t be on the classpath and tools.namespace won’t find it. Cursive will still let you execute code from it though.#2018-10-1018:05ChrisOkay, I will give this a try as well - sounds like what I want. Will report back asap.#2018-10-1716:54ChrisI think I got this to work, added a :cursive profile to my project.clj file and then enabled the cursive profile in the Leiningen settings in Cursive/IntelliJ. Thanks again!#2018-10-1716:55cflemingAwesome, thanks for letting me know.#2018-10-0921:01cflemingOr possibly set-refresh-dirs might be another solution, but I’m not familiar enough with tools.namespace to know.#2018-10-1000:29souenzzoHey I'm trying to use clojure 1.10.0-beta2 + midje 1.9.3 + jvm11 and I'm having trouble generating stubs exception on thread#2018-10-1000:29souenzzo
2018-10-09 21:25:46,039 [ 788322]   INFO - il.indexing.FileBasedIndexImpl - Rebuild requested for index ClojureSymbolMeta 
java.lang.Throwable
	at com.intellij.util.indexing.FileBasedIndex.requestRebuild(FileBasedIndex.java:70)
	at cursive.stubs.ReplStubsNotifications$createNotification$1$whenDone$1.run(Stubs.kt:213)
	at cursive.stubs$generate_stubs$fn__6643$process__6644.invoke(stubs.clj:294)
	at cursive.stubs$generate_stubs$fn__6643.invoke(stubs.clj:363)
	at cursive.task$backgroundable$reify__6451.run(task.clj:12)
	at com.intellij.openapi.progress.impl.CoreProgressManager$TaskRunnable.run(CoreProgressManager.java:736)
	at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$1(CoreProgressManager.java:157)
	at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:580)
	at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:525)
	at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:85)
	at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:144)
	at com.intellij.openapi.progress.impl.CoreProgressManager$4.run(CoreProgressManager.java:395)
	at com.intellij.openapi.application.impl.ApplicationImpl$1.run(ApplicationImpl.java:314)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at java.lang.Thread.run(Thread.java:745)
2018-10-09 21:25:46,109 [ 788392]   INFO - il.indexing.FileBasedIndexImpl - scheduleIndexRebuild, reason: checkRebuild 

#2018-10-1001:40Alex Miller (Clojure team)there were issues in midje with Java 11. I sent a PR yesterday that was merged. not sure if you’re using that or not.#2018-10-1003:06souenzzo@U064X3EF3 I'm on midje 1.9.3 https://github.com/marick/Midje/blob/master/CHANGELOG.md#193---2018-10-09 ; Wrong typo, edited on main post. tnx.#2018-10-1009:31miikkaI'd like to configure my Cursive REPL to automatically have a tap function that prints the stuff to the REPL. I'm now running this manually to get *out* right:
(let [out *out*]
  (defn repl-prn [& args]
    (binding [*out* out]
      (apply prn args))))
(add-tap repl-prn)
#2018-10-1009:32miikkaIf I do just (add-tap prn), it goes to the terminal where my boot instance is running.#2018-10-1009:34miikkaOh, and by the way, is there a way to tell Cursive that if I use a function called foo, I always mean that it's some.namespace/foo and that Cursive should add a (:require [some.namespace :refer [foo]]) if I use that function somewhere?#2018-10-1010:17cfleming@miikka So I’m not very familiar with the tap stuff yet, but that looks like a good use case for bound-fn: https://clojuredocs.org/clojure.core/bound-fn#2018-10-1010:18cflemingAre you running the REPL under boot and then connecting via a remote REPL from Cursive?#2018-10-1010:18cflemingRe: your foo question, not yet but I’m planning to add that, yes.#2018-10-1011:39sgerguri@cfleming Is deps support on the roadmap for the foreseeable future?#2018-10-1011:39cfleming@sgerguri Yes, it’s in the latest EAP, and nearly finished.#2018-10-1011:39sgerguriAh splendid!#2018-10-1012:21stijnit works pretty well! 😄
#2018-10-1013:47danmWill deps support make boot support easier as well, or are they totally separate things?#2018-10-1017:40simonThis might be an intellij question but — how would one add syntax highlighting for a build.boot file so that is not just plaintext like a .txt file?#2018-10-1018:12tanzoniteblackif you want to change syntax highlighting for all .boot files, you can do it in the File Types section of the intellij settings#2018-10-1108:46Rachel WestmacottIs there an easy way to run all tests in a project within Cursive?#2018-10-2215:12ChrisCouldn't you create a repl command and then call (clojure.test/run-all-tests)? @cfleming (assuming a repl is open?)#2018-10-2315:31cflemingYes, you could definitely do that - you wouldn’t get the integration with the red/green icons, but other than that it should work fine.#2018-10-2315:36cflemingI do plan to add a proper test runner at some point, but there’s been surprisingly little demand for it.#2018-10-1108:49cfleming@peterwestmacott No, sadly - I’ve been meaning to add a test runner, but right now you’ll have to use lein or whatever you’re using to build.#2018-10-1109:55Rachel Westmacottit looks like it isn’t too much code to add a helper function to my user ns, I just didn’t want to be doing something needless.#2018-10-1110:22cfleming@carr0t I’m not sure. It might make it easier to support boot projects using deps.edn for their dependencies, and in general understanding IntelliJ’s new build tool framework has helped too.#2018-10-1110:26martinklepsch@cfleming I'm just looking into fixing cljdoc for cursive — can you tell me where I can set an alias again? 😄#2018-10-1110:26martinklepsch(that will be used for any cursive invocations/classpath calculations)#2018-10-1110:28cflemingThere are two parts - when Cursive syncs the project, which means it works out which libs you’re using and where your source roots are. For that part, you generally want the superset of the various aliases you use. That’s in View-&gt;Tool Windows-&gt;Clojure Deps, then open the Aliases tree, select the ones you want and hit the refresh icon.#2018-10-1110:29cflemingThat should cause Cursive to find your deps (you can check that in the deps Tool Window too) and your source roots (will be marked in blue or green in the Project Tool Window)#2018-10-1110:29cfleming@martinklepsch ^^#2018-10-1110:29martinklepschI have this but am not seeing an aliases tree#2018-10-1110:30martinklepschthe Clojure Deps window is empty, this comes up once I press the wrench#2018-10-1110:31martinklepschah wait, I think I might have missed something#2018-10-1110:35martinklepschok, well. I just moved everything to jars now and it seems to be working 👍#2018-10-1110:35martinklepschI also dropped the alias because it actually doesn't make much of a difference#2018-10-1110:51mhuebertIs macro-resolution support for better-cond something that could make its way onto the roadmap? (https://github.com/Engelberg/better-cond/issues/5) I've seen better-cond come up in discussion several times recently and would like to use it, but I rely so much on Cursive's refactoring support that I can't bear all the unresolved symbols #2018-10-1110:52cfleming@martinklepsch That’s not the deps toolwindow you’re looking at there.#2018-10-1110:53cflemingThat’s the settings pane.#2018-10-1110:53cflemingView-&gt;Tool Windows-&gt;Clojure Deps is the menu sequence that will take you to the toolwindow#2018-10-1110:54cfleming@mhuebert Yes, definitely - I like the look of better-cond myself.#2018-10-1110:54martinklepsch@cfleming I know but there wasn't a project listed there. There is now but earlier it was empty#2018-10-1110:56cflemingRight, you’ll have to import the project for that to show anything. There are no docs yet but I wrote a bit about this here: https://groups.google.com/d/msg/cursive/NQIJzhGjfEY/hdNXUco8CgAJ#2018-10-1117:34mike_ananev@cfleming Why I can't choose Deps in Mac version? (it is disabled)#2018-10-1117:43cfleming@mike1452 Because that module is managed with Leiningen.#2018-10-1119:21mike_ananev@cfleming Sorry. Didn't catch...can't find how to run deps via Lein section?#2018-10-1119:22cfleming@mike1452 When you set that project up, you imported it using leiningen, right?#2018-10-1119:22cflemingSo I guess you have both a project.clj and a deps.edn.#2018-10-1119:23mike_ananevYes. I have both. But I didn't import, just Opened project folder#2018-10-1119:25mike_ananev@cfleming Got it. I removed project.clj, re-imported project again, selected deps.edn (external model) and now Deps section is active.#2018-10-1119:26cflemingRight, when you open the project folder if you have both project files there you have to tell Cursive which you want to use (the external model question)#2018-10-1208:16joelHello, is there a way to specify in a lein project that my :resource-paths in the :dev profile is to be treated as a "test resource" and not a "resource" in intellij ?#2018-10-1209:06AzzuriteI don't know of a way, but why would that ever be important? Just make a :test profile with different resources#2018-10-1213:56joelsanchezto expand on @azzurite’s answer https://stackoverflow.com/a/33486387#2018-10-1220:26hlshipIs there a way to edit the template file used when creating a new namespace? I don't like the [clojure.test :refer :all] when a test namespace is created.#2018-10-1221:41AzzuriteFile -> Settings -> Editor -> File and Code Templates It's really not like it's hard to find 😛 https://www.google.com/search?q=intellij+edit+file+template#2018-10-1320:38wilkerlucio@cfleming using the latest cursive i'm having issues with the indentation settings, I set something to indent on 0 but cursive doesn't respect it, I see this on cljc files, maybe it maybe setting the indent param for a form in clj and trying apply from cljs (or some confusion like that)?#2018-10-1320:39wilkerluciooh, sorry. I did better tests now, so when I try to set the indent for a form like comp, when I do it from cljc or cljs files, it doesnt work#2018-10-1320:40wilkerluciobut then I did in a clj file, from that it got right, and after that the indentation was also correct on cljs and cljc files#2018-10-1323:56tony.kayI'm working with someone that uses emacs...what is the code formatting that cursive uses (I'm thinking they could use the same lib if is an OSS thing)?#2018-10-1517:14bastiIs there an organize/optimize imports mechanism in Cursive?#2018-10-1517:16kennyNo 😞 See https://github.com/cursive-ide/cursive/issues/1197.#2018-10-1607:55miikkaI miss this feature all the time!#2018-10-1607:56miikkaActually just opened Clojurians to ask for this feature#2018-10-1519:20cfleming@tony.kay Unfortunately it’s not a lib or OSS - Cursive has to use the IntelliJ formatting framework, so it’s not usefully portable. It should be possible to configure Cursive to match Emacs, but I’m not sure about the other way around.#2018-10-1519:20tony.kaythanks#2018-10-1521:17Azzuriteis there some way to disable the warning .-body cannot be resolved in the cljs code (.-body js/document)?#2018-10-1609:08cfleming@azzurite Sadly no, but I’m planning to fix that soon: https://github.com/cursive-ide/cursive/issues/1526#2018-10-1611:55Azzurite🙂 nice#2018-10-1617:05souenzzoAnyone using the cursive repl with tools-deps and piggieback / nrepl ? I cant find how to inject the middleware#2018-10-1618:13Azzuriteis it possible to define a script or commands to be run after a integrated REPL starts? I want to start a nREPL and then (figwheel.main.api/cljs-repl) to make it a cljs REPL#2018-10-1620:32cfleming@azzurite Usually the best option is to use user.clj for that, because it’s not Cursive specific.#2018-10-1620:32cfleming@souenzzo I’m not sure about that sorry, someone with more CLJS experience will have to chime in.#2018-10-1620:48Azzurite@cfleming thanks! however, if I provide a user.clj, that gets executed on every REPL. But I want two REPLs running: one for clj, one for cljs, so that doesn't work 😞 anyway, I'll just continue using a REPL command. I just hoped it'd be possible to get rid of this extra step#2018-10-1620:50Azzurite@souenzzo I have it working with leiningen 😄 sorry, not using tools-deps#2018-10-1620:50souenzzo@azzurite you can specify the "user" namespace via profiles 🙂#2018-10-1620:53isakWhen I send something to the REPL from a file (text selection, then Ctrl-Shift-P), it doesn't get evaluated if it ends with a newline. Is this intentional? I see it matches the behavior of typing into the REPL prompt, but doesn't seem useful in this context.#2018-10-1621:10cfleming@isak Definitely not intentional, could you file an issue with repro instructions for that?#2018-10-1621:11isak@cfleming ok, will do#2018-10-1709:23Rachel Westmacott@azzurite I usually have a function for this in my user ns, and bind it to a keyboard shortcut via ‘Edit REPL Commands’ and ‘Preferences -> Keymap’, but I guess that @souenzzo’s suggestion of profiles means you can set up separate run configurations for each, so it’s only one action to start a Cljs REPL (though I can’t seem to find a keyboard shortcut setup for specific run configurations… :thinking_face: )#2018-10-1709:25AzzuriteI have the same setup, was just wondering if it was possible to remove that last bit 😄 The different profiles would theoretically work, but when I run the clojurescript REPL directly in the namespace, cursive doesn't register that the REPL finished starting and just assumes it's still starting up (because the "start cljs repl" command never finishes, presumably), so that doesn't work#2018-10-1709:26Rachel Westmacottoic… hmmm#2018-10-1709:25Rachel Westmacott(ah… Alt + Shift + F10)#2018-10-1719:36royalaid@cfleming is there an easy way for me to correct static analysis of https://github.com/Engelberg/better-cond?#2018-10-1720:18kidpolloWas the run test under caret option removed?#2018-10-1720:19kidpolloI dont see it#2018-10-1720:19kidpollobut i see it documeted here https://cursive-ide.com/userguide/testing.html#2018-10-1800:41paramemeShould I be able to see Cursive plugin here?#2018-10-1807:13claudiu@cfleming (probably been asked before). But do you have any plans in regards to clojure.spec integration (in docs and stuff like that) ?#2018-10-1807:17cfleming@royalaid I’m planning to add support for that - in the meantime someone suggested resolving it as for but I don’t think that will work.#2018-10-1817:01royalaidCan confirm, does not work#2018-10-1807:17cfleming@kidpollo Definitely not removed, it should still be there. In the menu it will now have the name of the test, like “Run ‘test-name’ in REPL” (I think, I don’t have Cursive open here)#2018-10-1807:18cflemingThe doc is out of date there.#2018-10-1807:18cfleming@parameme See “Cursive on IntelliJ EAP builds” here: https://cursive-ide.com/userguide/troubleshooting.html#2018-10-1807:20paramemeThanks @cfleming#2018-10-1807:19cfleming@claudiu Yes, I’d like to add more support, suggestions are welcome!#2018-10-1807:55claudiu@cfleming Was just thinking that would be nice to:#2018-10-1807:56claudiu- show spec at the bottom in the docs#2018-10-1807:57claudiu- go to spec. keyboard shortcut if there's s/fdef or if it's a namespaced keyword that has a spec#2018-10-1807:58claudiuhttps://github.com/gnl/ghostwheel looks really promising but no clue if intellij has a way to figure it out#2018-10-1808:06claudiuAsking because by design specs can be added pretty much anywhere in the project (as far as I can tell). So was thinking that it would be really awesome if cursive could track them down in the code for me 😄#2018-10-1816:34Joe R. SmithIs there some trick to getting Cursive to correctly indent, e.g. defn arguments in ClojureScript (like Clojure)?#2018-10-1816:35Joe R. Smithit’s highlighting my clojurescript, but doesn’t recognize defn#2018-10-1819:02Azzurite@solussd what do you mean with "correctly indent"? how is it "wrongly indented" now?#2018-10-1819:04Joe R. Smith@azzurite
(defn blah
      []
      (println "This is \"wrongly\" indented"))


(defn blah
  []
  (println "This is \"rightly\" indented"))
#2018-10-1819:05Joe R. SmithWhen it doesn’t recognize a symbol, it defaults to function indentation. In the case of my ClojureScript sourcecode, it can’t resolve defn.#2018-10-1819:06Joe R. SmithCursive indents subsequent lines of calls to a Clojure macro with 2 spaces, and the character width of the function in the case of a function call, by default#2018-10-1819:07Azzuritehm weird for me it always automatically does the correct one#2018-10-1819:23Joe R. Smithyeah, something is different about my environment#2018-10-1819:33isak@solussd do you have anything listed here? I think this is where it is customized:#2018-10-1821:37cfleming@solussd The problem is the symbol resolution, not the indentation - that’s what you’ll have to fix.#2018-10-1821:37cflemingSo Clojure is indented correctly, but not CLJS?#2018-10-1821:38cflemingDo you see ClojureScript as a dependency in your Project toolwindow under External Libraries?#2018-10-1821:52cflemingIf that all looks ok, there’s always File-&gt;Invalidate Caches and Restart… which sometimes helps cases like this.#2018-10-1821:52cflemingIt’s the IntelliJ version of restarting something when it goes bad.#2018-10-2114:50joshkhwhat's the "right way" to import a project which uses deps.edn?#2018-10-2114:56joshkhthings seem okay if choose "create project from existing sources", but i can't start a repl configuration.#2018-10-2115:02joshkh(Cursive Version: 1.7.0-2018.2)#2018-10-2115:04drowsy@joshkh I think you need 1.8.0-eap2 for the deps.edn support (https://groups.google.com/forum/#!topic/cursive/32tfBegzfVc/discussion)#2018-10-2115:13joshkhah, that did the trick! deps.edn is now an important option. 🙂#2018-10-2115:15joshkhany clue why my run button is still disabled?#2018-10-2115:25drowsyhave you tried creating a new run configuration off this template using the plus top left?#2018-10-2115:29joshkhthat did it. thanks, @drowsy. apparently my brain is still stuck in the lein workflow.#2018-10-2115:32drowsyYeah, the create/run REPL options in the context menu where really convienent.#2018-10-2116:55cfleming@drowsy @joshkh They’ll be there for deps in the next EAP: https://github.com/cursive-ide/cursive/issues/2064#2018-10-2119:27idiomancyHey, you know what would be sick to add to that feature? The ability to associate repl command to a run configuration. I always have to wait for my cljs repl to load before I can run my (do (use 'figwheel-sidecar.repl-api) (start-figwheel!) (cljs-repl)) command#2018-10-2119:28idiomancyif they were linked, I could launch my whole project with one click#2018-10-2119:53joshkhcheers @cfleming, and thanks for making our lives easier 👍#2018-10-2120:06dpsutton@idiomancy that's how cider works with cljs repls and it is quite nice#2018-10-2120:35cfleming@idiomancy Can’t you do that using user.clj?#2018-10-2120:40idiomancywell, the trick is, I'm running 2 repls to get clojurescript going. I run the local clojure repl and then I connect to it with a remote repl, at which point I run the figwheel script. So I want it to be run on the remote repl, but not the local repl#2018-10-2120:44cflemingI see - yeah, profiles won’t work for that either.#2018-10-2120:44cfleming@idiomancy Thanks for the use case, I can see how that would help with remote REPLs.#2018-10-2120:53idiomancythanks for the IDE!#2018-10-2213:20Rachel Westmacottis there any way to suppress specific “… cannot be resolved” warnings?#2018-10-2213:20Rachel WestmacottI’m aware that I can add type hints to help the resolution, but I can’t seem to find the right thing to add to (.getElementById js/document "app") to make it happy#2018-10-2215:34favilais there a "reformat all these lines" command? I don't just mean reindent; I mean essentially pretty-print it, e.g. take one long multi-form line and turn it into several#2018-10-2215:35favilaright now I copy paste into a repl, quote it, and then paste the printed form back. I was wondering if there was a better way#2018-10-2215:46Azzurite@peterwestmacott this is in progress: https://github.com/cursive-ide/cursive/issues/1526#2018-10-2216:47isakIs there a way to protect against crashing (or freezing) IntelliJ from accidental massive printing on the console?#2018-10-2218:35onetom@idiomancy btw, you should use figwheel-main; it's a lot simpler i have some skeleton project for it with explanations of how it's been put together and why: https://github.com/onetom/clj-figwheel-main-devcards on another project, i've also experimented with nrepl, but i couldn't really make it a one step startup process either. i've documented that setup rationale too: https://github.com/enumatech/cljs-abi-viewer/tree/block-explorer#start-using-a-clojurescript-network-repl-with-cursive#2018-10-2314:33hmaurerHi! Quick question: do the standard REPL commands in Cursive (i.e. evaluate form, load file in repl, change namespace, etc) not work with the cljs/figwheel repl?#2018-10-2315:22grzmreturning to explore Cursive again. Starting from a fresh IntelliJ (IntelliJ IDEA 2018.2.5 (Community Edition)) and Cursive (Version: 1.8.0-eap8-2018.2) install. I've got a deps.edn project. When I open the project for the first time, I'm using "auto-import". I'm getting a sync failed error message, as well as a separate window that mysteriously displays only clojure/java/api/Clojure#2018-10-2315:23grzmRecommendations for further debugging?#2018-10-2315:36cfleming@peterwestmacott No, there isn’t, but I’m planning to fix the cljs interop case specifically.#2018-10-2315:37cflemingWhich is the issue that @azzurite quoted there.#2018-10-2315:37cfleming@favila There isn’t, but there really should be.#2018-10-2315:39cfleming@isak No - I’m planning to partially fix that with an “interrupt printing” button, but that will only fix the client side (which is usually the problem).#2018-10-2315:39cfleming@hmaurer They should work with both.#2018-10-2315:40cfleming@grzm Can you send a screenshot of that?#2018-10-2315:42grzm@cfleming would you prefer to the channel or DM? (got one queued and ready)#2018-10-2315:42cfleming@grzm Either is fine, or email to <mailto:/cdn-cgi/l/email-protection|/cdn-cgi/l/email-protection> (depends if there’s anything sensitive in there)#2018-10-2315:44cfleming@grzm Can you send me your log file? Help-&gt;Show log in Finder/Explorer. Probably best to send that via email.#2018-10-2315:49grzm@cfleming sent!#2018-10-2316:13cfleming@grzm I can’t see that one, for some reason gmail isn’t letting me download it. But can you post a screenshot of your config screen? Settings-&gt;Build, Execution, Deployment-&gt;Build tools-&gt;Clojure Deps#2018-10-2316:14cflemingDid you configure the path to your clojure command there?#2018-10-2316:29hmaurer@cfleming perhaps I am doing something wrong then; I get “Cannot load ClojureScript form into Clojure repl”#2018-10-2316:41grzm@cfleming I'm failing to find the configuration you're looking for 😕 Is that accessible from a menu? Some button on a window?#2018-10-2316:44hmaurer@cfleming problem solved#2018-10-2318:26grzm@cfleming found it (`s/Settings/Preferences/` on my system) And updating the path to the clojure script has gotten me further.#2018-10-2319:38hmaurerI am having some trouble with generating stubs for my project (lein + shadow-cljs). Getting the following error:
Error generating stubs for module elogic
Java HotSpot(TM) 64-Bit Server VM warning: Option UseConcMarkSweepGC was deprecated in version 9.0 and will likely be removed in a future release.
What should I do?
#2018-10-2320:01hmaurerI’ve solved this issue, however I am still running into some sort of indexing problem. One of my file contains this declaration:
(ns elogic.intro
  (:require [devcards.core :as rc :refer-macros [defcard deftest]]
            [elogic.ui.components :as comp]
            [cljs.test :refer-macros [testing is]]))
Cursive does not pick up the devcards.core import (and the macros). If I cmd-click on devcards.core, it brings me to a javascript file. I’m using lein and shadow-cljs.
#2018-10-2320:06hmaurerProblem solved, it wasn’t an issue with Cursive itself 🙂#2018-10-2320:12hmaurerOther question: where is Cursive storing the Resolve as... settings?#2018-10-2321:57sparkofreason"interrupt current evaluation" for the REPL doesn't always seem to work. Particular case I'm noticing occurs when I load a file instead of sending forms individually. I'd like to be able to stop it without killing the process so some cleanup code can be run. I like loading the file because it doesn't pollute the command history, as opposed to selecting all and evaluating.#2018-10-2410:26danmI know I've asked this before, but I have forgotten the answer 😞 I had a Clojure project in my workspace. As it's a monorepo I actually have lots of projects in there. I deleted one of them I no longer need, went into File > Project Structure > Modules and removed the module from the list. But when I Refresh Leiningen Projects it still complains that it can't find that project.clj file for the deleted project#2018-10-2410:26danmWhat do I need to do to get Cursive to stop looking for that project?#2018-10-2412:05polymerisIn my project.clj, if I (def foo 1) and then use that in defproject as ~foo, cursive complains about Attempting to call unbound fn: #'clojure.core/unquote: Attempting to call unbound fn: #'clojure.core/unquote. Am I doing something wrong?#2018-10-2412:51polymerisOh, nevermind. there was an error in another project.clj -- didn't realize cursive refreshed all modules, not just the one I had just modified#2018-10-2415:35isakIs there a way to get cursive to not hike me wayy to the right when I start a comment at the end of a line? I see this, but not sure what I would set it to:#2018-10-2415:37isakOh never mind, looks like setting it to 0 works#2018-10-2422:27frankiesardoHello everyone. Trying the new deps.edn integration (sleek!) but I was wondering: how do I get an integrated REPL using it?#2018-10-2422:31frankiesardoI can try and run the repl task but it finishes with no output#2018-10-2422:34frankiesardoSecond question: what's a good keybinding set to use with Parinfer? Older versions of Clojure had an emacs-like Paredit keyset and now it's gone. I'm happy to embrace Parinfer, I was just wondering if there was an opinionated set to use as a starting point for inspiration#2018-10-2422:43isakI can't speak to parinfer, though with paredit, some keys that have worked pretty well for me in IntelliJ are Ctrl-Space {W,A,S,D} for Splice sexp killing backwards, Slurp backwards, Kill, and Slurp Forwards respectively @frankie#2018-10-2422:45frankiesardoThanks @isak!#2018-10-2422:47isaknp. It is kind of intuitive if you play any games, may not make sense otherwise#2018-10-2423:27cfleming@frankie That looks like you’re running a deps task there - what you want to do is configure a REPL as with the lein integration, but select the deps option instead. Hopefully it’ll be clear but if it’s not let me know, things have moved around a bit.#2018-10-2509:15frankiesardoOk I've updated Cursive and I've found the option , it works!#2018-10-2509:16frankiesardoOne thing tho: if I launch clj -A:repl from the terminal and I do things like (js/alert "Hi") or invoke functions from my namespace, everything works. When the repl launches from clojure.deps it cannot find the js namespace or my user defined namespaces#2018-10-2509:19frankiesardoAutocomplete works but actual resolution doesn't#2018-10-2509:21frankiesardoOh, I found the problem: you have to select clojure.main rather than nREPL, is that expected?#2018-10-2503:36salam@carr0t take a look at the second comment in this github issue (and don’t forget to vote for the issue): https://github.com/cursive-ide/cursive/issues/1215#2018-10-2516:37kennytiltonI am having trouble with testing Clojure with IntelliJ/Cursive. I can "run tests in current NS in REPL" but the menu item to "run test under caret" is disabled. That is the immediate problem, perhaps related to deftest being highlighted in orange with the hover deftest cannot be resolved. My own functions resolve fine. Is there some trick to 'test under caret'? Thx!#2018-10-2516:42kennytiltonOK, never mind. I am on someone else's app and they have their own deftest. <sigh>#2018-10-2517:55tanzoniteblackhow do I send a "Cancel evaluation" command to the repl?#2018-10-2517:55tanzoniteblack(i.e. I screwed up and am attempting to deref something that'll never return anything...)#2018-10-2518:16isakjava.exe End Task 🙂#2018-10-2519:47Azzurite@tanzoniteblack https://i.imgur.com/aFE4f9X.png , you can also bind a key to it, search for "interrupt" in the key map#2018-10-2519:48Azzurite@isak for good measure#2018-10-2520:09tanzoniteblackThanks!#2018-10-2520:10tanzoniteblackthat button doesn't seem to be active if I send a test to the repl though, does that sound right to you?#2018-10-2520:13dpsuttoni've heard the button doesn't have a lot of contrast so might appear inactive when it actually is#2018-10-2520:13dpsutton(not a cursive user, just something i remember hearing)#2018-10-2520:15tanzoniteblackoh, you're right, @dpsutton#2018-10-2520:31Azzuriteyeah it's exactly the same grey as disabled buttons, it's a very poor choice. but it at least works if you know that you can click it#2018-10-2522:26tony.kayI’m trying tools dep support in EAP…when I try to use local root I get “no such alias ‘dev’” defined, and deps update fails. I have a :dev alias in the local deps.edn, but one of the incoming projects from local root does not#2018-10-2623:48idiomancydid you make any progress with this? For me it doesn't event synchronize and I get an error saying cannot execute, please download tools.deps in Settings#2018-10-2623:49tony.kaynot really…I hacked around a bit, but didn’t get it to work well#2018-10-2623:58tony.kayyou might want to do a brew install clojure, and then go to the deps settings and make sure it points to the program /usr/local/bin/clojure#2018-10-2623:58tony.kayor tell it to download and use the library#2018-10-2622:59hlshipI'm going over my special keyboard to map some new keys to Cursive commands. I noticed there's a "Re-run failed tests" action (possibly, that's generic IntelliJ) but it's never enabled, even after I cause a test to fail. Am I doing something wrong, or is there a way to have Cursive work with this command ... seems handy.#2018-10-2702:07cfleming@hiskennyness You should be able to fix that by using the “Resolve as…” function to resolve the custom deftest as the built-in one.#2018-10-2702:07cfleminghttps://cursive-ide.com/userguide/macros.html#2018-10-2702:09cfleming@tony.kay I see, I think Cursive is probably checking that the alias exists in the root project but not the transitive deps. Could you file an issue for that please, and I’ll fix it?#2018-10-2703:01tony.kay@cfleming Done. https://github.com/cursive-ide/cursive/issues/2075#2018-10-2703:01tony.kayThanks#2018-10-2711:37kennytiltonAwesome, @cfleming. Thx!#2018-10-2714:42cfleming@hlship Sorry, I didn’t reply to this yesterday. I think you’re right that that must be an IntelliJ action - it’s not a Cursive one. I’m guessing that will work once I make an integrated test runner.#2018-10-2913:15vinaiI've just started moving from Cider to Cursive. So far I'm happy, working on the .clj section of a (lein based) project. However, now I need to do some work on the .cljs and .cljc section of the project. I am wondering how I can start the cljs (figwheel based) repl. In Cider I was using cider-jack-in-clj&cljs or sometimes started each repl individually. How is it done in Cursive? Is it common to run both repls (clj and cljs) at the same time? Do I have to create a separate run config to start the cljs repl, as described in https://github.com/bhauman/lein-figwheel/wiki/Running-figwheel-in-a-Cursive-Clojure-REPL?#2018-10-2913:16vinaiDoes Cursive identifies different cljs repls more or less automatically, or do I need to supply them as options in the run configuration somehow?#2018-10-2915:14chrispsJust curious, why would you move from Cider?#2018-10-2915:51vinaiI found it breaks every couple of months, and I spend a day yakshaving until I can get back to work. The last 6 months since the last major update I've been juggling a bunch of snapshot versions. I guess I'm looking for a more stable dev environment.#2018-10-2915:52chrispsSad to hear that, same experience with Cursive#2018-10-2915:52vinaioh noes.#2018-10-2915:52vinaiI'll see how this works out. I want to give it a serious try.#2018-10-2915:52chrispslein or deps?#2018-10-2915:53vinaiThe main project is lein. But if that works out okay, I'll also try working on another, smaller, deps cljs project that targets node.#2018-10-2915:53chrispsok#2018-10-2916:04raymcdermottI’m using the clojure.main repl and noticed that load-file does not seem to load deps by default … is that a known issue?#2018-10-2918:02vinaiFor now I'm following https://groups.google.com/d/msg/cursive/F38vY9SQ1qI/VbAcGiX_AQAJ which works okay, even though it would be nice to encapsulate the startup somwhow.#2018-10-2918:29cfleming@chris.schreiner I’m curious about regular Cursive breakages, I’m not aware of any and no-one has reported them. What are you seeing?#2018-10-2918:31cfleming@vinai Yes, that sort of thing is the best you can do right now probably, Cursive doesn’t have integrated CLJS REPLs yet. That’s the next thing I’m going to add when deps support is done.#2018-10-2918:31cfleming@raymcdermott Hmm, I would have expected that to work.#2018-10-2918:32raymcdermottif I use deps with nREPL, same problem#2018-10-2918:32raymcdermottbut if I use the IntelliJ classpath, it works#2018-10-2918:32cflemingThat’s definitely worth an issue so I don’t forget to investigate it.#2018-10-2918:32raymcdermottso I’m flummoxxed#2018-10-2918:33raymcdermottok - where do I report it?#2018-10-2918:34cflemingLink is in the room status line ^^^#2018-10-2918:34raymcdermottLOL who reads the screen 😉#2018-10-2918:35cflemingRTFSL 🙂#2018-10-2918:35raymcdermottha#2018-10-2920:33vinaiWhat is the current status regarding tools.deps support? Is it a good idea to try and use Cursive with a deps.edn based project already?#2018-10-2920:34vinaiIs there maybe a link to an issue or a post to follow progress?#2018-10-2922:47cfleming@vinai If you’re on the current EAP build tools.deps support is pretty good now, people are using it on real projects.#2018-10-3004:06vinaiThanks. I will check it out in a little while, too.#2018-10-3014:33claudiuwas wondering is there any reason why (:require [module :as my-module :refer [a b c]]) cursive will not highlight with gray if a is not used in the file, seems to work just for my-module ?#2018-10-3017:05cfleming@claudiu Just because I haven’t done that yet - I’m planning a few new features around require :refer which will help that.#2018-11-0112:06claudiuawesome 🙂 thank you#2018-10-3019:58Azzurite@vinai I work with a single run config for a REPL. I start it two times, and in one i just do (figwheel.main.api/start "dev")#2018-10-3019:59vinaiOh, interesting. Starting the same config twice seems like a simple approach, too. Thanks, will try that tomorrow#2018-10-3020:01vinaiI'm not yet using figwheel-main however, but I'll just call figwheel-sidecar.repl-api/start-figwheel! and cljs-repl.#2018-10-3109:19stijnis there a command in the REPL to reload changed files in a certain source folder? (or exclude a folder)#2018-10-3110:43Azzuriteyou could use https://github.com/clojure/tools.namespace instead#2018-10-3110:44Azzuritesee https://github.com/clojure/tools.namespace#disabling-refresh-in-a-namespace#2018-10-3110:51stijni'm specifically trying to avoid that#2018-10-3111:42Azzuritecould you explain why 1. you can't sync everything + 2. you want to avoid tools.namespace?#2018-10-3111:45AzzuriteI'm interested as I'm relatively new to clojure and can't come up with a reason#2018-10-3115:07mitchelkuijpers@stijn there is a sync files in repl command which does that#2018-10-3115:08mitchelkuijpersBut not only a certain folder...#2018-10-3115:09mitchelkuijpersBut we use that instead of tools.namespace because we are running our REPL in an OSGI container, and it works pretty well!#2018-10-3116:29mitchelkuijpersI have a macro like this:
(with-test-env env
    .... some body)
which basically adds a env locally, is there someway to have cursive resolve this so I don't get warnings?
#2018-10-3119:13Azzuritein the settings under "Languages -> Clojure -> Symbol Resolution" you can make one symbol (like with-test-env) resolve like some other symbol (in this case I guess you would like def). To add that, you have to export the symbol resolution settings, change the resulting file, adding your symbol resolution and then reimport it Oh and you have to restart intellij after for it to show#2018-11-0109:07mitchelkuijpers@UCULU82G3 Thank you for the detailed instructions but it is more like a let so marking it as a def doesn't work 😞#2018-11-0100:25frankiesardoHello folks. I remembered at one point Cursive used to pick up js externs when I was using dot syntax in ClojureScript. Now I am in a new project and I have some cljs like foo.bar.baz and I don't know how to make Cursive not highlight it as a warning. Any help or link to a faq/doc that can point me in the right direction?#2018-11-0100:31frankiesardoIt seems to work only on global window objects like js/ReactNative.Text but not from js object defined in another namespace
(ns my.ns) (def ReactNative (js/require "react-native")) (ns other.ns (:require [my.ns :as my])) my/ReactNative.Text ;; <- gives warning
#2018-11-0100:42frankiesardoMaybe we can do something like (def React ^js/React (js/require "react"))#2018-11-0100:38frankiesardoAlso, when infer externs is set to true, aren't most of the infer generated automatically? Can Cursive ignore the warming when the extern is generated?#2018-11-0115:52dazlddid you try invalidating caches?#2018-11-0116:28tanzoniteblackctrl + {left, right} seem to work oddly in strings (i.e. I would expect it to jump to the end of the word if I hit ctrl + right, but instead it jumps to the end quote of the string. Is there a way I can alter this behavior?#2018-11-0513:49carocadhey guys, is there a way for cursive to recognize npm modules required through the namespace form? I keep getting warnings that the symbols are not defined 😕#2018-11-0514:33Andreas Liljeqvistis there any way to display args for a function in the bottom of the screen? Like Emacs for example#2018-11-0514:34Andreas Liljeqvistcljs.user=> (+| cljs.core/+: ([] [x] [x y] [x y & more])#2018-11-0514:41Andreas LiljeqvistUsing quick documentation requires ctrl-q and having the caret at the symbol#2018-11-0520:47dnolenhrm suddenly having trouble launching a REPL - and exception with something about Runner Run not registered#2018-11-0520:47dnolenanybody seen something like this before?#2018-11-0521:25dnolenwhen I try a second time I see a different error Manifest type not detected when finding deps for com.foo/core in coordinate {:local/root "..."}#2018-11-0521:47dnolenalso I note that my deps now fail to sync with Specified aliases are undeclared: [:dev]#2018-11-0607:10cfleming@dnolen That last one at least sounds like https://github.com/cursive-ide/cursive/issues/2075#2018-11-0611:52dnolen@cfleming thanks so just add an empty matching alias?#2018-11-0611:52dnolenis this a regression? I thought this worked just fine before#2018-11-0621:41cfleming@dnolen I’m not sure, I’ve been travelling and haven’t had time to look at it. I’m hoping to fix that today or tomorrow. I guess an empty matching alias would be the best workaround, yeah.#2018-11-0621:42dnolenI tried that, didn't work#2018-11-0621:42dnolenI think the first error is a show stopper#2018-11-0621:42dnolenRunner Run not registered#2018-11-0621:42cfleming@stijn No, I don’t have a way to control ns loading by folder/package, sorry.#2018-11-0621:43cfleming@dnolen That’s really weird - have you just upgraded IntelliJ or anything like that?#2018-11-0621:44cflemingCan you mail me a copy of your log? Help-&gt;Show log in Finder#2018-11-0708:39sooheonHey, I can switch between “tabs” in tool windows (in terminal for example) with CMD + shift + [, but this doesn’t work in the CLJ repl. I can’t find an easy shortcut to switch between two repls (server + figwheel, for example). Does this exist?#2018-11-0710:57claudiu@U06ANT2JK in settings I have "editor tabs->select next tab" for me it's mapped to ALT+arrows#2018-11-0711:03sooheonI have that command bound as well, but it doesn’t work for cursive REPL. Works for other tool windows…#2018-11-0711:10claudiuremember it working 🙂 are you on the latest intellij beta ?#2018-11-0713:30sooheonAh turns out that’s the problem: 2018.3 EAP breaks this keybind. Thanks!#2018-11-0712:45gravAnyone using deps and cljs in Cursive? I have a repl up and running, but loading a ns to it (via load-file) throws a java-exception. Copy/pasting the code to the repl works#2018-11-0713:03claudiu@U052XLL3A Yep. I have it working with shadow-cljs. Node & browser repl. Seems to work well. I have a demo project public https://github.com/claudiu-apetrei/fulcro-nodejs-ssr-example#2018-11-0713:04claudiuconnecting to the shadow-cljs repl remotly.#2018-11-0722:02cfleming@U052XLL3A That’s definitely not expected. What is the exception?#2018-11-0722:08grav
cljs.user=> (load-file "/Users/grav/repo/jadak_test/src/em/server.cljs")
java.lang.IllegalArgumentException: /var/folders/qn/4rpthd8s2tzgzd0djlfjhzy40000gp/T/out4344704115653624840351339894246073/em/server.js is not a relative path
#2018-11-0722:09gravI can give you the whole stacktrace if you want?#2018-11-0716:55sparkofreasonI get this exception any time deps does an update. Doesn't block anything from working, just mildly irritating, wondering if there's something I need to configure to make it go away.#2018-11-0721:48robI'm trying to open an existing deps project on a different machine, the initial sync is failing because clojure itself can't be found: lava.lang.ClassNotFoundException: clojure.java.api.Clojure .. On the working machine, in Project Structure->Libraries, I see Deps:org.clojure/clojure:1.9.0, along with .. There's nothing in there on the broken machine. Clojure tools/cli is installed and I'm able to work with the clj tool as expected. I've tried both sharing the .idea dir creating new project from sources. New to both intellij/cursive and deps.. any pointers appreciated 😬#2018-11-0722:04robHave the same issue with a new project.. A difference is broken machine is MacOS Mojave.. both have same version of the cli tools installed via brew install clojure#2018-11-0722:07cfleming@U050T7CJQ So the issue is that the deps aren’t being synced correctly. Can you check Settings-&gt;Build, Execution, Deployment-&gt;Build Tools-&gt;Clojure Deps and ensure that your path to the cli executable is correct?#2018-11-0722:12robIt was missing a value. I set it and now everything is 👌#2018-11-0722:13robManaged to miss that in my clicking around 😅 .. Thanks a lot!#2018-11-0722:37cflemingOk, thanks. I’m going to have to repro that since there should be an error message in that case. But I’m glad it’s all working now!#2018-11-0721:56cfleming@mitchelkuijpers Hmm, I can’t think of an example which would support that off the top of my head, sorry.#2018-11-0808:47mitchelkuijpersI fixed it by making it from this:
(with-test-env env
    .... some body)
to this
(with-test-env [env]
    .... some body)
#2018-11-0808:48mitchelkuijpersAnd then resolve it as a fn ^^#2018-11-0721:57cfleming@frankie Sorry, all the JS interop stuff is still a bit of a mess. I’ve been meaning to fix it for the longest time but have not managed to yet.#2018-11-0721:59cfleming@carocad Same answer there, sorry - I’ve been meaning to fix that but have not yet.#2018-11-0721:59cfleming@tanzoniteblack No, there isn’t, but if you file an issue I’ll look at that.#2018-11-0722:01cfleming@andreas862 No, there isn’t right now, parameter info is the nearest substitute, but that’s View-&gt;Parameter Info rather than View-&gt;Quick documentation. You should get that as an auto-popup after a second, too.#2018-11-0722:04cfleming@dave.dixon Do you have the Maven plugin enabled?#2018-11-0723:37sparkofreasonNo. I take it I should? New install of Intellij.#2018-11-0723:45sparkofreasonThat fixed it.#2018-11-0800:43cflemingYeah, it’s actually a bug I have fixed in the next EAP where it tried to do some Maven-related things even though the plugin wasn’t installed. But you probably want it anyway if you want auto-complete of dependencies and the like.#2018-11-0800:36sooheonWhat should I do to debug when cursive is reluctant to resolve as a macro from cljs :refer-macros?#2018-11-0800:36sooheonwhatever I do, this won’t go away#2018-11-0804:30Ben GrabowAsked in #beginners, and sharing here at @seancorfield's suggestion. Is there a way I can prevent eval of my core.clj file when starting a REPL?#2018-11-0805:02csmYou can add :repl-options {:init-ns user} in your project.clj to load a different namespace (it’s ok if that ns doesn’t exist)#2018-11-0818:46Ben Grabow~Hmm, I get an error when I start the REPL with that option:~ Never mind, the error was coming from something wrong in my Run Configuration.#2018-11-0804:32Hadiim using [org.clojure/tools.logging "0.4.1"] on intellij cursive but log/info doesnt show the log. any idea?#2018-11-1215:20timgilbertI have a project that uses java logging and it doesn't output in the repl window either. What I generally do is start the app from the command-line in the IntelliJ terminal window (or an external terminal) and then connect to it with a remote nrepl connection. Console logging then appears in the terminal window.#2018-11-0804:56didibusIs there a way to have cursive use IntelliJ for the classpath, environment vars, and jvm args?
#2018-11-0807:53cfleming@ben.grabow Cursive doesn’t load anything like that. Depending on how you run your REPL, your build tool may do depending how how it’s configured.#2018-11-0815:06Ben GrabowI created my project from the command line with "lein new app <project-name>" then I "Open"ed the project.clj in Cursive and "open as project". Then I "Run 'REPL for <project>'" from the application Run menu. Here's my run config and project.clj.#2018-11-0821:01Ben GrabowI have been working in my <project>/core.clj file. I think lein is compiling my :main namespace, and in the process evals the code I'm working on (which is what I want to avoid). It looks like I can prevent this by setting the project.clj option :main nil.#2018-11-0821:12cfleming@ben.grabow Yes, that makes sense. In Clojure, compiling a namespace effectively evals it, so if it has side effects they will happen during compilation.#2018-11-0821:29Ben GrabowMakes sense. And I see now that if I run lein repl from a shell at my project directory I get the same behavior, so obviously not a Cursive-specific thing. Thanks so much for your responses, and all your work on Cursive of course!#2018-11-0821:30cflemingNo problem, I’m glad it’s working!#2018-11-0821:31cflemingOr at least, it’s clear why it’s not working 🙂#2018-11-0821:31Ben GrabowIs there a way to "load current namespace in repl" automatically when the repl starts? The hooks in the Run Configuration looked like they all apply prior to the repl starting.#2018-11-0821:32Ben Grabow"Switch REPL NS to current file" is what I mean, in the Tools > REPL menu#2018-11-0821:49cflemingThe problem is that it isn’t always clear what the current namespace or file is when you run a REPL. You can do this with a user.clj file at the Clojure level, rather than in Cursive. Since the default namespace in the REPL is user, if you have a user.clj file at the root of the classpath it will be eval’ed when you start your REPL, and you can do what you like in there.#2018-11-0821:58Ben GrabowRoot of the classpath is typically <project-dir>/src/ right? Probably depends on my :source-paths option in project.clj?#2018-11-0822:13cfleming@ben.grabow That’s right.#2018-11-0807:55cfleming@hadi.pranoto I’ve never used it, sorry, I don’t know where its output goes.#2018-11-0807:58cfleming@didibus Do you mean when running a REPL? Yes, the “Use nREPL in normal JVM process” option will do that, or in very recent EAP versions select the REPL type you need and “IntelliJ” under “How to run it”#2018-11-0808:00didibusHum, oh okay. So with that options, I do not need a deps.edn, or project.clj, or anything like that. I can just configure my IntelliJ project dependencies within itself and it will work?#2018-11-0808:16cflemingThat’s right.#2018-11-0808:17cfleming@didibus ^^#2018-11-0808:21cflemingOr you can use Maven or something like that if you prefer.#2018-11-0808:32didibusAwesome#2018-11-0808:32didibusThx#2018-11-0812:58roklenarcicI've have a problem using clj-pdf library in cursive. Any require sentence for clj-pdf.core namespace will show an error claiming circular dependencies. However if I require the same namespace in REPL with (require 'clj-pdf.core) it works fine.#2018-11-0812:59roklenarcicTHat's https://github.com/clj-pdf/clj-pdf#2018-11-0821:10cfleming@roklenarcic I’ll take a look at that#2018-11-0902:24cfleming@dnolen 1.8.0-eap9 is out now, hopefully fixing those two deps issues. https://dev.clojure.org/jira/browse/TDEPS-106 is tracking the deps part.#2018-11-0914:00dnolen@cfleming thanks!!!#2018-11-0915:52wilkerlucio@cfleming hello, you have an idea about can be happen that sometimes cursive doesn't offer to change how to resolve a form?#2018-11-0917:02wilkerlucioI'm having this with some spec things, the problems happens more often in cljs/cljc files#2018-11-0917:02wilkerlucioI press the alt+return but nothing happens, and I can confirm its a macro#2018-11-0917:02wilkerlucioand just to add more info, not sure if matters, but when I try to navigate to the macro it shows 2 places, and I think should be only one:#2018-11-0917:02wilkerlucio#2018-11-0919:57cfleming@U066U8JQJ Hmm, yeah, that can be a problem when a symbol resolves to two different places. That usually happens when you have two versions of the same lib attached (like Clojure 1.7 & 1.8). I don’t know why it would show it twice from the same lib. Is it defined once using declare or anything like that?#2018-11-0919:57cflemingIt is defined in cljc?#2018-11-0919:58wilkerlucioyes, defined in cljc, I tried to find if I had multiple versions of it, but I don't, its a single thing coming from just my project#2018-11-0920:00cflemingIs the usage in cljc as well?#2018-11-0920:00wilkerluciono, usage in cljs#2018-11-0920:00cflemingHmm, that’s very strange. Does invalidating caches fix it?#2018-11-0920:00wilkerluciodidn't tried, let me do it#2018-11-0920:00cfleming(sorry, I know that’s a pain in big projects)#2018-11-0920:02wilkerluciono worries, this case is aggravated to me because this lib is also using a custom way to define vars and functions (similar to Ghostwheel), so without the resolve feature it gets no completions#2018-11-0920:04wilkerluciook, invalidated and restarted#2018-11-0920:04wilkerlucioafter indexing it continues doing the same#2018-11-0920:05wilkerlucioanother weird thing, if I navigate to the source, and try to do it from there, I get the menu from alt+enter, but when I select the option to resolver as... it doesn't do anything#2018-11-0920:13wilkerlucio@cfleming I was able to reproduce on a small repo: https://github.com/wilkerlucio/repro-cursive-resolve-issue#2018-11-0920:17wilkerluciojust tried with deps.edn to see if matter, but got the same results#2018-11-0920:20cfleming@U066U8JQJ Thanks for the repro case! I’ve filed: https://github.com/cursive-ide/cursive/issues/2077#2018-11-0920:21wilkerlucioI'm not sure if happens for everyone, Tony Kay is using this same library and he told me it works fine for him, so please let me know in case you can't reproduce and need more info#2018-11-1000:12cflemingThanks, I will do#2018-11-1222:42cfleming@U066U8JQJ So I spent some time debugging this, it’s actually a problem in Fulcro.#2018-11-1222:43cflemingIf you look in the fulcro-incubator jar, it has two copies of the source code, one at the root and one under /main.#2018-11-1222:43cflemingCursive finds and indexes both of them, and that’s why you’re getting two results.#2018-11-1300:30wilkerluciothanks for digging it up and the clarifications, Tony just fixed it there in the response to it 🙂#2018-11-1007:39sooheon@cfleming maybe related to the above discussion, I’m seeing that “Resolve as…” popup doesn’t work for symbols defined in “External Libraries”. I need to git clone the relevant lib, open that as its own Cursive project, let it index, and do the symbol resolution intention action.#2018-11-1007:42sooheonI think this could be solved if I can manually edit/add to Languages &amp; Frameworks &gt; Clojure &gt; Symbol Resolution with the correct namespaces.#2018-11-1014:50tomasWhat is the syntax for REPL command substitutions? I’ve found closed issue https://github.com/cursive-ide/cursive/issues/1694 but don’t know how to use it. Thanks#2018-11-1018:51wilkes@tomas This may help: https://groups.google.com/forum/#!searchin/cursive/repl$20commands%7Csort:date/cursive/0GzV5h2C4ig/nTJYBV3yAAAJ#2018-11-1019:38tomasthanks, that worked :thumbsup:#2018-11-1206:07sooheonDon’t know if this was always there, but I just noticed that in let binding or keyval pairs in maps, “move from down” or “up” is smart about moving pairs together (if cursor is at very front of first symbol)! Nice attention to detail, much appreciated @cfleming#2018-11-1207:47cfleming@sooheon Right, glad you like it! It works for maps etc too.#2018-11-1207:48cflemingI didn’t reply to your previous message, sorry - I’m not sure what could be causing that, “Resolve as…” definitely works (or should do) for symbols from external libs. When you navigate to the symbol, does that work correctly?#2018-11-1213:30wilkerlucioI guess is the same issue we were debugging before, library been listed twice and then not allowing custom resolution override#2018-11-1217:45souenzzo@cfleming can I set *print-namespace-maps* to false in idea64.vmoptions to avoid namespaced maps on repl?#2018-11-1217:46souenzzoI will try -Dclojure.core._STAR_print_namespace_maps_STAR_=false#2018-11-1217:54Alex Miller (Clojure team)That’s not a thing#2018-11-1221:07cfleming@souenzzo No, I’ll try to get a better solution to that in the next build.#2018-11-1221:34shaun-mahoodIs there a way to set a default *print-length* as part of a REPL config?#2018-11-1222:48cfleming@sooheon When you found that “Resolve as…” wasn’t working in external libs, which symbol does that not work for?#2018-11-1300:15sooheonIt was macros defined in fulcro. Normally you’d see “Resolve ns/symbol as…“, but I was just seeing “Resolve /symbol as…“. Actually, I did a total reinstall of IDEA, and this has solved it for the most part. If I can get a repro case again, I will file an issue. Now the only slightly wonky thing is these action, remote symbols that the defmutation macro takes. Cursive asks to resolve /remote, and does some indexing, but won’t change indentation to be like defn, if I ask it to.#2018-11-1300:52cfleming@sooheon Ok, that’s actually a problem in Fulcro, see https://github.com/cursive-ide/cursive/issues/2077#2018-11-1222:48cflemingi.e. which symbol are you trying to customise the resolution of?#2018-11-1223:08mhuebertWould there be any way to specify how a non-standard reader conditional is interpreted? eg. I am using :node to differentiate between browser / node.js code, #?(:cljs "hello browser", :node "hello server") and ideally its code would be resolved the same as :cljs#2018-11-1223:44Alex Miller (Clojure team)No#2018-11-1303:31mhuebertI mean - this evaluation style is already supported/possible with shadow-cljs - but I don’t know that there’s a way to indicate to cursive’s static analysis that :node should be treated like :cljs#2018-11-1303:32cfleming@mhuebert There isn’t, no - if you could file an issue for that I’ll take a look to see how difficult it might be.#2018-11-1312:22mhuebert👍:skin-tone-2: - https://github.com/cursive-ide/cursive/issues/2082#2018-11-1322:06cflemingThanks!#2018-11-1309:24sooheon@cfleming How do I control what hotkey the Cursive REPL is bound to when I Ctrl-tab? I used to be able to ctrl-tab + r for REPL, but suddenly it’s moved to p#2018-11-1316:31tony.kay@cfleming The deps improvements are great! I just toggled between a local root and mvn version without incident. Thanks!#2018-11-1317:00tony.kayAnd yay! Autocomplete in deps.edn for dependency versions!!!#2018-11-1317:55cap10morganAnyone using Cursive with mount? I can't get it to resolve defstate as def nor fix the indentation.#2018-11-1317:58Ben GrabowAny suggestions for optimizing TDD workflow? Right now I have no default hotkeys assigned for "Run test in current NS in REPL" or "Re-run last test action in REPL". Is there a good hotkey to use for one of these, or a way to automatically re-run tests after, e.g. eval'ing a new form in the REPL?#2018-11-1318:08tony.kay@cap10morgan yep…mount latest does that#2018-11-1318:11cap10morganThanks. Is there a bug filed somewhere already I can track?#2018-11-1318:13tony.kaynot that I know of#2018-11-1318:14cap10morganOK, I can file one. Do you know if it is Cursive's bug or mount's?#2018-11-1318:17tony.kayit’s not technically a bug I would guess…it’s almost certainly macro magic mount is doing that is “hiding” it where cursive can’t see it#2018-11-1318:18tony.kayyou could look at the diff from 12 to 13 and probably figure that out#2018-11-1318:18cap10morganHmm, probably an interaction issue between macrovich/deftime in mount and Cursive's indexing. Ha, yeah, what you just said. 🙂#2018-11-1318:21tony.kayI’d encourage you to bug mount first, since Colin on cursive gets pretty swamped…I feel like lib writers should be a bit more careful with macro usage…but that’s just my opinion#2018-11-1318:23cap10morganYeah, agreed. I'll start there and see the mount folks think. Thanks for the pointer!#2018-11-1319:12cap10morganOne last question: With mount 0.1.12, do you have to tell Cursive how to treat defstate or did it already have mount handling preconfigured?#2018-11-1319:13tony.kayhad to tell it#2018-11-1319:13tony.kaytold it def#2018-11-1319:14cap10morgancool, thanks#2018-11-1319:14cap10morganCreated this issue: https://github.com/tolitius/mount/issues/102#2018-11-1322:09cflemingJust from reading the above, it sounds like Mount master has switched to macrovich, is that correct? There’s actually a Cursive issue to support that too, I’ll look into that.#2018-11-1322:10cfleminghttps://github.com/cursive-ide/cursive/issues/1847#2018-11-1322:10cflemingI’ll see if I can get that in the next EAP, several people have asked about it.#2018-11-1401:27cflemingI’ve fixed #1847 at last.#2018-11-1401:28tony.kaynice.#2018-11-1318:09tony.kayback off to v x.12#2018-11-1318:09tony.kay@ben.grabow I use CTRL-C (for clojure) CTRL-A (run all) and CTRL-C CTRL-T (run test under cursor)#2018-11-1318:11Ben GrabowDo you remap the "copy" and "select all" keybindings? I use those pretty frequently.#2018-11-1318:12tony.kayah, I’m on mac…so ctrl is diff that CMD#2018-11-1318:14tony.kayand those are “two keystroke” shortcuts#2018-11-1318:14tony.kayin IntelliJ key mappings use the “second key” thing#2018-11-1318:14Ben GrabowAh, I should mention I'm on gnome-linux.#2018-11-1318:18tony.kayYeah, just find something that isn’t already mapped…or that you don’t use…like ALT-T#2018-11-1318:18tony.kayThe two-keystrke thing is handy when you’re running low, but I recommend something you can hit easily, sicne you do it a lot#2018-11-1318:18Ben GrabowCtrl+Shift+T is available so I'll try that for a bit. Thanks!#2018-11-1318:10tony.kayand CTRL-c CTRL-R for re-run#2018-11-1321:07kanweistarted getting this while trying to "run all tests in ns" today#2018-11-1321:07kanwei
Loading test/doublethedonation/mp360_api_test.clj... 
Syntax error compiling at (mp360_api_test.clj:1:1).
Alias db already exists in namespace doublethedonation.mp360-api-test, aliasing doublethedonation.db
#2018-11-1321:08kanweinever happened before until recently, it's just a simple
(ns doublethedonation.mp360-api-test
  (:require [doublethedonation.db :as db]
#2018-11-1321:12kanweiok, only seems to do that when there's an uncaught exception in the tests#2018-11-1402:31idiomancyhas anyone successfully gotten a cljs repl running with a deps.edn project?#2018-11-1409:27grav@idiomancy No, tried and failed. I have gotten it to work with figwheel-main however, even though it is a bit more involving#2018-11-1417:47worlds-endlessI've been googling to no avail and can't figure out how to edit clojurescript in a full-stack clojure app with Cursive. I'm an emacs user and my normal process is to start a CLJ and CLJS repl, do mount.core/start in the CLJ repl, and visit the appropriate address in a browser; then the cljs figwheel repl connects. What's the workflow to do this on the same codebase in Cursive?#2018-11-1417:53manutter51Mostly the same, but with a bit of setup: https://github.com/bhauman/lein-figwheel/wiki/Running-figwheel-in-a-Cursive-Clojure-REPL#2018-11-1417:58worlds-endlessAh! Thanks!#2018-11-1509:12odinodin@grav how did you connect to figwheel-main? I’ve almost got it, but got the following nREPL connection found but unable to load piggieback#2018-11-1509:22odinodinI got it working, I just had to specify my figwheel.main alias in the autogenerated REPL-config#2018-11-1509:23odinodinSo connecting to a figwheel-main REPL in a deps.edn project works like a charm in Cursive ❤️#2018-11-1519:23kanweihey, updated to eap10 but mount/defstate still "cannot be resolved" - anything else I need to do?#2018-11-1519:31manutter51I updated to eap10 and mount/defstate is finally resolving for me. I didn’t do anything else besides update Cursive, but I believe I had previously used Resolve As on it in an earlier attempt to get it to resolve.#2018-11-1519:34kanweiso was the fix just to enable "resolving as"?#2018-11-1519:34kanweiwhich one does it make sense to resolve as?#2018-11-1519:41manutter51I think I did mine as defn, but I suppose it’s a matter of personal taste.#2018-11-1519:42manutter51No, looks like it was just def — you can see it in the preferences under Languages & Frameworks -> Clojure -> Symbol Resolution#2018-11-1520:28cfleming@kanwei You might need to do a File-&gt;Invalidate caches and restart… for that to work.#2018-11-1520:28cflemingThinking about it, this change probably won’t be picked up automatically.#2018-11-1520:29cflemingArg#2018-11-1520:29kanwei=\#2018-11-1520:29cflemingNo, that’s not the issue.#2018-11-1520:30cflemingThe issue is that mount uses a vendored version of macrovich.#2018-11-1520:31cflemingYes, that’s the issue. I tested the macrovich fix, but not mount directly.#2018-11-1520:31manutter51Huh, it worked for me right away.#2018-11-1520:32cflemingIf you open mount.tools.macrovich, you can resolve deftime there as net.cgrand.macrovich/deftime and things should work.#2018-11-1520:32cfleming@manutter51 I’m not sure how that could work.#2018-11-1520:33manutter51Figures it would be me that would find a way to screw up by getting it right. 😄#2018-11-1520:34manutter51That’s my personal project on my personal laptop, I’ll check it again after work.#2018-11-1520:50kanwei@cfleming so I'm in mount.tools.macrovich and "(defmacro deftime" is actually resolved#2018-11-1520:50kanweiwhen i click the lightbulb and try to resolve it as, there's no submenu#2018-11-1520:50kanweijust closes#2018-11-1520:51cflemingYeah, the submenu thing is a confusing UI for this - you need to press enter on the resolve as… menu item.#2018-11-1520:52kanwei#2018-11-1520:52cflemingThen select specify… and choose net.cgrand.macrovich/deftime#2018-11-1520:53cflemingYes, you don’t want the right submenu#2018-11-1520:53kanweipressing enter does nothing, just closes the window#2018-11-1520:53cflemingGet the first pop-up by alt-enter or clicking the lightbulb, then move onto Resolve mount.tools.macrovich/deftime as…, then press enter.#2018-11-1520:54kanweidoing that just closes window for me#2018-11-1520:54cflemingThat’s not good. Do you have any exceptions logged when you do that?#2018-11-1520:54kanweinada#2018-11-1520:54kanweialready invalidated caches too#2018-11-1520:55cflemingThat’s very annoying.#2018-11-1520:55cflemingHmm#2018-11-1520:56cflemingCan you open mount.core, and then find the (defmacro defstate line, line 169 in my version.#2018-11-1520:56kanweion it#2018-11-1520:57cflemingYou’ll see that the defmacro is inside a (deftime invocation - does trying to customise the resolution from the usage of deftime rather than the definition help?#2018-11-1520:58cflemingLike this:#2018-11-1521:00kanweiResolve as on that also just closes the window#2018-11-1521:00cflemingWell damn.#2018-11-1521:00kanweiwell, i think it might be because it's an external library?#2018-11-1521:00kanweiis your mount open as a primary project or external#2018-11-1521:00kanweii can "resolve as" on something in my own project#2018-11-1521:00cflemingI don’t think so, but I’ll try.#2018-11-1521:01cflemingOne sec.#2018-11-1521:01kanweii'm also using deps.edn if that could be a factor#2018-11-1521:10cflemingOk, when it’s used from a library I see what you’re seeing, yes - I’ll debug that now.#2018-11-1521:10cfleming@kanwei ^^#2018-11-1521:11kanweinice!#2018-11-1521:18manutter51Ok, I have mount/defstate resolving with no problems on my work computer too, eap10 and lein deps :tree shows
[re-frame "0.10.5"]
   [net.cgrand/macrovich "0.2.0"]
which may be relevant (?)
#2018-11-1521:24cfleming@manutter51 Which version of mount are you using?#2018-11-1521:26manutter51[mount "0.1.12"]#2018-11-1521:35cflemingThat explains it, I think it’s 0.1.13 on which has this problem?#2018-11-1521:35cflemingIt was converted to use macrovich (which is giving the problems) at that time.#2018-11-1521:36cflemingYeah, it was 0.1.13 which supported self-hosted CLJS.#2018-11-1521:37cfleming@manutter51 ^^#2018-11-1522:13cfleming@kanwei You were absolutely right, that was the problem. I’ve just fixed that in master - I’ll try to release a build with that shortly.#2018-11-1522:50kanweischweet!#2018-11-1601:51sashtonAm I remembering correctly that there is some way to execute custom clojure code attached to a keybinding? I can’t find mention of it anywhere, but I swear I remember seeing it once.#2018-11-1601:54sashtonFound it: REPL command#2018-11-1705:38kanwei@cfleming another thing I noticed the other day - i used to be able to edit clojure files in external modules#2018-11-1705:39kanweiwhich is great for monkey patching external libs#2018-11-1705:39kanweibut now it doesn't give me the prompt to let me edit anymore#2018-11-1801:16sahilmUnable to start local REPL. Cursive version: 1.8.0-eap10-2018.2. IntelliJ version: 2018.2.6. JDK: OpenJDK 11. Clojure version: 1.9#2018-11-1811:16sahilmOk this was my fault. I had a bad localhost config in my /etc/hosts. Removing the offending config fixed the problem.#2018-11-1822:26cflemingGreat, thanks for letting me know.#2018-11-1822:26cfleming@kanwei Actually I don’t think this has ever worked in Cursive, although I would like it to for the reasons you mention.#2018-11-1822:27cflemingI’m not sure how it could work in IntelliJ though.#2018-11-1822:33kanwei@cfleming funny, cause it was working for a bit, not sure how#2018-11-1822:33kanweiat one point i could start editing, and a prompt would appear, saying it was read only, but let me do it anyway#2018-11-1822:34kanweibest bug ever, maybe#2018-11-1915:55ro6is there a way to configure the printer Cursive uses in the REPL?#2018-11-1919:09ro6can I teach Cursive to understand special syntax (eg string interpolation like "your email: '~{email}'" (https://cemerick.com/2009/12/04/string-interpolation-in-clojure/) so that the local (`email`) is still refactored correctly etc..?#2018-11-1921:45cfleming@robert.mather.rmm No, you can’t configure the printer - what would you like to configure about it?#2018-11-1921:46ro6pretty printing by default#2018-11-1921:46cflemingThat should already happen, at least for nREPL type REPLs.#2018-11-1921:47cflemingAre you using nREPL or clojure.main?#2018-11-1921:48cflemingThere’s no way to teach Cursive about the string interpolation at the moment, unfortunately. I’ll think about how that might be done, but it’s tricky.#2018-11-1921:48ro6I'm sure. Thanks for thinking about it. Somehow WebStorm makes it work with ES6 ${}#2018-11-1921:49cflemingRight, they can do it there because it’s a language feature with a standard syntax.#2018-11-1921:49cflemingHere it’s a macro that changes how strings in the macro body are interpreted.#2018-11-1921:49cflemingI have an extension API for macros, but it doesn’t allow anything like that yet.#2018-11-1921:50ro6right, that makes sense#2018-11-1921:51ro6I'm on 'nREPL' btw. I think what happened is that a certain kinds of exceptions (compiler exceptions I guess?) didn't pretty print. Other things are though.#2018-11-1921:57cflemingOk, if you have examples of things that are not, I’ll look into why - they should be.#2018-11-1922:27ro6I think the repl history where I saw it is gone now. Are those kept in files somewhere?#2018-11-1922:57wilkerluciohello, I just tried to use some override-deps to point a dep to a git source, in the deps panel it shows the correct version (with the git sha), but in the External Libraries the version is still the one from maven, and when I navigate to the code it goes to the maven version, is this a bug?#2018-11-1922:57wilkerlucioI expected it to navigate to the git and look references from it, but seems like it still relying on the maven#2018-11-1923:38cflemingDoes refreshing the project in the deps toolwindow help?#2018-11-1923:39wilkerlucionope, I tried a couple times#2018-11-2000:56cflemingOk, so the repro case is: have a maven dep, then switch to a git dep using override-deps? I’ll try that.#2018-11-2012:14wilkerlucioyes, correct, in my case the maven dep is a second degree dep, that in my project I'm trying to override on a alias using an override dep#2018-11-2100:09cflemingOk, so you don’t explicitly depend on the one you’re overriding, it comes in transitively?#2018-11-2302:35cfleming@U066U8JQJ I can’t reproduce this.#2018-11-2302:36cflemingI have a project that looks like this:
{:deps {ring {:mvn/version "1.6.3"}}
 :aliases {:test {:override-deps 
                  {org.clojure/java.classpath 
                   {:git/url ""
                    :sha "bc8992ec34df03c4a33d8d17f7543d5711de6308"}}}}}
#2018-11-2302:38cflemingjava.classpath is pulled in transitively, but it’s correctly replaced with a “Deps: org.clojure/java.classpath:bc89922” lib.#2018-11-2302:39cflemingThere is one thing which is strange - the git library isn’t shown in the External Libraries section at all.#2018-11-2302:40cflemingCan you check File-&gt;Project structure, what I suspect is happening is that in your module with the override, it’s being overridden correctly but the git lib doesn’t show in External Libs. Then I suspect that the original Maven lib is still being pulled in from somewhere else in your project, which is why it does show up there.#2018-11-2417:27wilkerluciotrying again now and it works, maybe been some cache issue :man-shrugging:#2018-11-2010:59jimmyhi guys what is the function to populate current namespace using live template?#2018-11-2022:03mandersonIs the system.out from a lein plugin logged anywhere? I’m working on a plugin for lein and it runs fine from the command line, but when I try to load the project in cursive I get invalid LOC header (bad signature) errors and I’d like to see my debug output to figure out what’s going on.#2018-11-2100:55cfleming@nxqd When you create a new namespace (with e.g. Cmd-N in the project view on OSX) it will use the templates at Settings-&gt;Editor-&gt;File and Code Templates-&gt;Clojure/ClojureScript/etc Namespace#2018-11-2100:56cfleming@manderson So… I don’t know. Normally process stdout just comes out in the REPL window, but lein plugins are weird things.#2018-11-2100:58mandersonThanks @U0567Q30W. This is actually when Cursive tries to load my project (or if I click “refresh” in the Leiningen window). I can dig in some more, but it might just be swallowed (I checked the IntelliJ Logs already)#2018-11-2100:58cflemingOh I see, so it’s when the plugin is actually in use, not in a dev situation.#2018-11-2100:59cflemingHow is that error printed? Using *out* or some logging solution?#2018-11-2100:59mandersonRight. The plugin is actually resolving some dependencies (which is why the error, which seems to be maven/aether related)#2018-11-2100:59mandersonI’m just opting for the classic println 🙂#2018-11-2100:59cflemingHehe#2018-11-2101:00cflemingSo you’re receiving an exception and printing it out?#2018-11-2101:00mandersonYeah, I’ve got some debug statements interspersed in my code as I’m developing. They get printed to the console when run from the terminal (eg: lein run), but all I see in Cursive is the event log entry with the error.#2018-11-2101:01cflemingAnd this error happens on project refresh?#2018-11-2101:01mandersonyep, and on load#2018-11-2101:01cflemingWhat happens if you don’t catch the error? Does that get caught at some higher point that does something useful with it?#2018-11-2101:02mandersonhm, i can try that. let me check#2018-11-2101:03mandersonsame thing#2018-11-2101:03cflemingYeah, looking at it Cursive doesn’t do anything with stdout when reading the project file - it probably should.#2018-11-2101:04mandersonOk, thanks for checking. Just wanted to make sure I wasn’t missing something.#2018-11-2101:04mandersonI may just try logging to a file or something#2018-11-2101:04cflemingOk, sorry I don’t have a better answer. I’ll file an issue for this and add it to the pile.#2018-11-2101:05mandersonNo worries! I’m sure it’s something on my end since I’m mucking about in plugin land 🙂 Thanks for your time!#2018-11-2100:58cflemingLooking at the code again, in the lein plugin case Cursive will just start the process as usual but add lein itself to the classpath.#2018-11-2102:32danielcomptonIs there a way to break on exception with the Cursive debugger? I can't see anything, but I might be missing it#2018-11-2102:32cfleming@danielcompton Yes, there’s an exception breakpoint type.#2018-11-2102:34cflemingSo get the breakpoints window up, then +, then Java Exception Breakpoint, then configure from there.#2018-11-2102:36danielcomptonThanks!#2018-11-2102:36danielcomptonAlso, is it possible to set breakpoints inside libraries?#2018-11-2102:36danielcomptonI'm trying to set them but I keep getting the (/)#2018-11-2102:49danielcomptonSeems to happen inside defrecord definitions#2018-11-2106:37cfleming@danielcompton Yes, that’s a problem inside deftype-like things. It’s to do with how the classes are named, JDI is unfortunately pretty limited in how it allows searching for classes to apply breakpoints.#2018-11-2118:06lispycloudsHello, is it possible to get Cursive running with IntelliJ 2018.3? It seems its not supported.#2018-11-2118:58manutter51I just upgraded IntelliJ to 2018.3, and my Cursive plugin still works. I was on the EAP version of Cursive, though, and I had to upgrade after upgrading IDEA.#2018-11-2119:02manutter51@rahul080327 ^^#2018-11-2119:19roklenarcicHm, anyone using shadowcljs through Remote nREPL?#2018-11-2119:19roklenarcicwhen I try to run tests I get:
Loading src/main/challenge/scramble.cljc... done
Loading src/test/challenge/scramble_spec.cljc... done
Running tests in challenge.scramble-spec
Calls to `require` must appear at the top-level. at line 1 challenge/scramble.cljc
#2018-11-2120:36lispyclouds@manutter51 ah I have to use EAP. But I had the stable one and now its disabled and I cant get to the switch to EAP builds menu too 😞#2018-11-2120:37manutter51can you revert to 2018.2 temporarily? If not I think there’s a procedure to workaround that#2018-11-2120:37lispycloudsyeah will do that for now i guess#2018-11-2120:37lispycloudsThanks for the help!#2018-11-2120:38manutter51back up your settings first 😉#2018-11-2120:38manutter51Not sure if reverting to an earlier version would screw those up, but can’t hurt to have a backup#2018-11-2120:38lispycloudsyeah i generally export the jar backup. should work i hope#2018-11-2120:39manutter51:thumbsup:#2018-11-2121:46cfleming@rahul080327 There’s some doc about this on the troubleshooting page: https://cursive-ide.com/userguide/troubleshooting.html#2018-11-2201:34salam@cfleming now that 2018.3 is released, when can we expect a stable release of Cursive that is compatible with it? We have two adventurous, medium-sized teams using Cursive and it’s going to be a little bit tricky to ask them to do anything unusual (sticking to an old release of IntelliJ IDEA when there’s a new release, reverting to an old release if they’ve already upgraded to a new release, or installing anything EAP). Thanks. #2018-11-2201:34cfleming@abdusalam Yes, I’m hoping to release the 1.8.0 stable within a couple of days.#2018-11-2201:35salamI see. Thank you for the ETA. 🙂#2018-11-2203:58andrethehunterI noticed https://github.com/cursive-ide/cursive/issues/2087 was created re: IntelliJ 2018.3#2018-11-2204:04cfleming@andrethehunter Yes, I’m trying to upload the stable 1.8.0 release which will fix that but the plugin repository is having problems.#2018-11-2204:47lispycloudsWorks now. Thanks @cfleming!#2018-11-2209:51cflemingCursive 1.8.0 is finally out!#2018-11-2209:52cfleming@abdusalam your team can now upgrade with impunity 🙂. Sorry for the delay, I’ve been trying to upload it all day but JetBrains were having problems with the plugin repo.#2018-11-2308:40salamThanks a lot!#2018-11-2211:17dabrazheHi all, is there a way in Cursive to display doc strings hint for functions when i type a function name? I like this feature in Atom a lot. IDEA does suggest different spellings but I'd love to have docstrings next to them#2018-11-2213:16weavejesterDoes anyone know how Cursive resolves/handles dependencies? I haven't been able to find any information on this.#2018-11-2213:29weavejesterAh, nevermind. An updated version of Cursive makes it clearer.#2018-11-2215:07stijnIs there a way to create a command that does the same as 'Load file in REPL' but for a specific file that is not the active file in the editor?#2018-11-2215:08stijnWhat I want is to reload all changes as visible from this namespace#2018-11-2216:24Ivan FedorovHi all! Anyone met unmatched braces issue? When Idea indexes the project – Cursive fails to parse a few files
java.lang.Throwable: Exception parsing /Users/spacegangster/.m2/repository/org/clojure/clojurescript/1.9.908/clojurescript-1.9.908.jar!/cljs/module_deps.js
java.lang.IllegalArgumentException: Unmatched braces in the pattern.
#2018-11-2216:38Ivan Fedorovit renders Cursive unusable with clojurescript (at least 1.9.908 version) as cursive can’t parse it’s core Github issue : https://github.com/cursive-ide/cursive/issues/2083#2018-11-2220:53cfleming@dennisa Can you show a screenshot of what you mean in Atom?#2018-11-2220:54cfleming@weavejester If you have further questions let me know, I’m not sure what you mean by your original question.#2018-11-2220:56weavejester@cfleming On older versions of Cursive there's an option in the REPL configuration for "Use clojure.main in normal JVM process", but it doesn't make it clear what dependencies are being used for that. In the updated version, you get more options and can specify profiles and so forth.#2018-11-2220:56weavejesterSo the issue was fixed by an update.#2018-11-2220:56cflemingOh right, I see what you mean - yes, hopefully that should be clearer in the new build, the old terminology was far from clear.#2018-11-2220:58cfleming@stijn Hmm, I don’t think so, no, at least not without using tools.namespace or something similar and making a REPL command to execute it.#2018-11-2220:59cfleming@ognivo I haven’t had a chance to look at that yet, but I’ll try to today.#2018-11-2221:30raymcdermottseems like https://github.com/cursive-ide/cursive/issues/775 is open again#2018-11-2221:30raymcdermottI added some images to show the effect#2018-11-2221:31raymcdermott(issue with CLJS :refer-macros)#2018-11-2221:33raymcdermottFWIW it’s not a regressions as I updated explicitly to check if it was still broken#2018-11-2221:33cfleming@raymcdermott Does invalidating caches fix that?#2018-11-2221:33cflemingSometimes things get funky after a major version upgrade.#2018-11-2221:34raymcdermottI’ll check but I doubt it cos it wasn’t working before the upgrade#2018-11-2221:36cflemingAh, ok. Oh, I see the problem, looks like implicit referring of the macro ns isn’t working for :referred macros, right?#2018-11-2221:36cflemingI’ll see if I can reproduce that.#2018-11-2221:37cflemingHow is the go-catching macro defined? It looks like CLJC so is that inside a reader conditional?#2018-11-2221:48raymcdermott#2018-11-2303:28cfleming@raymcdermott I can’t reproduce this. I have a simple test project:
(ns cursive-775.core
  (:require [catching.stacks :refer [go-catching <?]]))

(go-catching (/ 1 0))

(go-catching (<? 'mid-fn 123))
#2018-11-2303:28cflemingAnd this:
(ns catching.stacks)

#?(:clj
   (do
     (defmacro <? [fn-name ch])

     (defmacro go-catching [& body])))
#2018-11-2303:29cflemingAre you able to share that project?#2018-11-2303:29cflemingFailing that, could you try to recreate a small test project that reproduces it for you?#2018-11-2310:44henryw374Hi @cfleming, I just got the latest release, hoping to try out deps.edn on windows. in the settings, no versions are showing and 'refresh/download' doesnt do anything. I am working in a corp. internet, but i do have intellij proxy settings set up to access the outside world. I had a similar issue with cursive and lein when i first installed, but i could manually install lein and cursive worked fine after that. can i manually install tools.deps jar somewhere so cursive will find it?#2018-11-2312:33dabrazhe@cfleming here’s what I mean by the doc string hint in Atom. You can cycle through hints and it will show the doc string below. It saves time I’d spent for looking it up or repl-ing it with (doc fun) https://goo.gl/images/68mwEp#2018-11-2312:35dabrazhe@cfleming #2018-11-2322:14cfleming@henryw374 I’ll check that code, it’s possible it doesn’t set the proxy correctly. Unfortunately I don’t think it’s possible to install manually, I’ll check that too.#2018-11-2407:50henryw374thanks#2019-01-0914:43henryw374did you have any luck investigating this?#2018-11-2322:16cfleming@dennisa I see - it’s possible in IntelliJ to press Ctrl-J (or whatever your documentation popup is bound to) when you’re in a completion list, like this:#2018-11-2719:38dabrazhe@cfleming This is great! What are the standard Mac Os key mappings? I see F12, but it seems to be too clumsy to be a standard..#2018-11-2322:16cfleming#2018-11-2322:17cflemingAs you move through the completion elements the doc will be updated.#2018-11-2417:55daniel.spanielanyone feel like giving me a hand setting up cursive. i am able to run a project, but i just can't seem to set up using the repl and i feel like a clod because i can't do much else#2018-11-2417:57daniel.spanielmmm .. i wish i could screen share on this because when you see what i have you will know why i am kinda stranded in no mans land#2018-11-2418:01daniel.spanieli am using the latest intellij ce edition and the latest cursive plugin#2018-11-2418:01Kari MarttilaOk. I'm running Cursive REPL all the time, it should be easy to configure, maybe you just miss some simple thing there...#2018-11-2418:01daniel.spanielgosh darn .. that is what is so frustrating .. i know it is possible .. i just can't figure it out#2018-11-2418:02Kari MarttilaOk. I have latest IDEA Ultimate and latest Cursive, I'm running REPL all the time, so let's compare...#2018-11-2418:02daniel.spanielok .. perfect#2018-11-2418:02daniel.spanieli don't even know what to say actually#2018-11-2418:02Kari MarttilaIf you click Run Configurations...#2018-11-2418:03Kari MarttilaYou have the Run/Debug Configurations dialog box...#2018-11-2418:03daniel.spanielyes#2018-11-2418:04daniel.spanielthey have this idea of run configurations, but i not sure what i am tying to configure .. i just randomly type stuff#2018-11-2418:04daniel.spanieltrying to follow the docs ... so not really random ( but docs are old )#2018-11-2418:05Kari MarttilaOk. You have clicked the "+" there...#2018-11-2418:05Kari MarttilaThen you choose "Clojure REPL"#2018-11-2418:05daniel.spanielfirst though there is this concept of templates#2018-11-2418:05daniel.spanieldo you see that ?#2018-11-2418:05Kari MarttilaThen "Local"#2018-11-2418:05daniel.spanielthere is Clojure application and then there are templates#2018-11-2418:06daniel.spanieli am in modal window for Run/Debug configuratoins#2018-11-2418:06Kari MarttilaOk. Don't create a new template, use a template.#2018-11-2418:06daniel.spanieli go to templates, then closure Repl , then local#2018-11-2418:06Kari MarttilaSo, click "+" then "Clojure REPL" -> "Local"#2018-11-2418:07daniel.spanieli am using run nREPL with Leiningen radio selected#2018-11-2418:07daniel.spanieli selected the module#2018-11-2418:07Kari MarttilaOk. You now have the Run Configurations window open...#2018-11-2418:08daniel.spanielyes,#2018-11-2418:08Kari MarttilaThere I usually choose: Which type of REPL to run: nREPL#2018-11-2418:08daniel.spanieli am on the step you said#2018-11-2418:08Kari MarttilaHow to run it: Run with Leiningen#2018-11-2418:08daniel.spanieli chose nREPL#2018-11-2418:08daniel.spanielwith Leingingen ( yes ) i am on that one#2018-11-2418:08Kari MarttilaModule: Choose your module.#2018-11-2418:08daniel.spanielyes#2018-11-2418:08daniel.spanieldone#2018-11-2418:09daniel.spanielwhat are those before launch tasks#2018-11-2418:09Kari MarttilaDon't worry about those. 🙂#2018-11-2418:09daniel.spanieli added Sychronize Leiningen projects and Build ?#2018-11-2418:09daniel.spanielbut i was just random picking#2018-11-2418:09Kari MarttilaNow click "OK"#2018-11-2418:09Kari MarttilaSorry...#2018-11-2418:09daniel.spanielshould i remove those things#2018-11-2418:10daniel.spanielthe synchronize task and build task#2018-11-2418:10Kari MarttilaBefore click "OK" give name to your Run configuration, e.g. "my-REPL"#2018-11-2418:10Kari MarttilaThen click "OK"#2018-11-2418:10daniel.spanielwhere would you put the name ?#2018-11-2418:10daniel.spanielprofile ? textbox#2018-11-2418:11Kari MarttilaThe "Name:" is on the up of the same window...#2018-11-2418:11Kari Marttila(where you had "Which type of REPL to run"..., just above it)#2018-11-2418:11daniel.spanieli don't see it .. very odd#2018-11-2418:12daniel.spanielthe name though it seems to extract from the module i selected ?? or something > i have no idea#2018-11-2418:13daniel.spanielooo ooo#2018-11-2418:13Kari MarttilaYou have a "Run/Debug Configurations" modal window open?#2018-11-2418:13daniel.spanieli see it now#2018-11-2418:13Kari MarttilaOk, good. 🙂#2018-11-2418:14daniel.spanieli did it again .. first time i saw that#2018-11-2418:14Kari MarttilaGive name and click OK.#2018-11-2418:14daniel.spanielshare or single instance ?#2018-11-2418:14daniel.spanieloo ..oo .. what now ?#2018-11-2418:14daniel.spanielwe are getting somewhere . i can feel it#2018-11-2418:15Kari MarttilaDon't choose those options, just click "OK" now.#2018-11-2418:15daniel.spanielok#2018-11-2418:16daniel.spanielooo oo ..#2018-11-2418:16daniel.spanieli ran that configuration#2018-11-2418:16Kari MarttilaNow in IDEA you should see the combo-box with your repl name (if you gave it e.g. name "my-REPL")#2018-11-2418:16daniel.spanieland it opened the REPL thing#2018-11-2418:16daniel.spanielthen#2018-11-2418:16daniel.spanielbelow it i saw a text area so i typed in there#2018-11-2418:16daniel.spanieland it put the code in the REPL thing#2018-11-2418:16daniel.spanielwow .. this is it .. WORKING#2018-11-2418:17Kari MarttilaOk. You should see the REPL window with two compartments, the upper part is the REPL output, the lower part is where you can interact with the REPL.#2018-11-2418:17Kari MarttilaIn the lower part try: (+ 1 1)#2018-11-2418:17daniel.spanielis it working ? is this the shangrila i have been waiting for ?#2018-11-2418:17daniel.spaniel2#2018-11-2418:17Kari MarttilaSo, you see: => 2 in the upper part#2018-11-2418:17daniel.spanielyes#2018-11-2418:17Kari MarttilaGood, you have a working REPL.#2018-11-2418:17daniel.spanielam i in business ?#2018-11-2418:17daniel.spanielfinally .. gosh that was torture man ..#2018-11-2418:18Kari MarttilaNext you can try to interact with your system using REPL. Lisp REPL is by far the most productive development tool I have ever used, so learn to use it.#2018-11-2418:18daniel.spanielyikes, how the heck do i do that ?#2018-11-2418:19Kari MarttilaE.g. I have the following hot keys in my IDEA/Cursive to make working with REPL fluent: ;; Kari's Cursive settings that makes integration with editor and REPL more fluent: ;; <shift><ctrl><N> => Switch REPL namespace to current file (which is in editor when command given) ;; <shift><ctrl><M> => Load current namespace to REPL ;; <shift><ctrl><Å> => Send S-expression to REPL input ;; <caps><alt><U> => Focus to Editor (choose dialog window) ;; <esc><esc> => Focus to Editor last edit. ;; <caps><alt><I> => Focus to REPL output ;; <caps><alt><O> => Focus to REPL input ;; <caps><ctrl><I/K> => (In REPL): Browser REPL history ;; <ctrl><enter> => (In REPL): Send REPL input to REPL. ;; <caps><alt><J/L> => (In editor) => Switch tabs in editor ;; <ctrl><X>-<ctrl><O> (In editor) => Switch to next editor window (as in Emacs)#2018-11-2418:20Kari MarttilaYou can configure those hot keys as you like in IDEA (see File -> Settings -> Keymap -> then search "REPL"...#2018-11-2418:20daniel.spanielgotcha#2018-11-2418:20daniel.spanielthe Switch REPL namespace to current file#2018-11-2418:20daniel.spanieldioes that mean#2018-11-2418:20Kari MarttilaE.g. Switch REPL NS to current file...#2018-11-2418:21daniel.spanieli don't have to type in that little window below the REPL and it will use current file instead#2018-11-2418:21daniel.spanielwow .. me want that !#2018-11-2418:21Kari MarttilaThen using that hotkey in the editor you can switch the REPL to use that namespace (file) and call directly the functions in that namespace in your REPL.#2018-11-2418:21Kari MarttilaSo, your REPL is working now and you are good?#2018-11-2418:22Kari MarttilaSince my wife is calling me downstairs ... it's Saturday evening and our traditional movie evening is about to begin... 🙂#2018-11-2418:22daniel.spanielsure thing man .. i am all set .. THANKS A TON 🙂#2018-11-2418:23Kari MarttilaNo problem. I was pretty sure it was just some minor detail that you missed. If you have any further questions about Cursive, ping here or in the beginners channel...#2018-11-2418:23daniel.spanielgotcha .. thanks again .. happy movie nights 🙂#2018-11-2512:32kwladykaProject based on deps.edn - so many things can’t be resolved. Why? It was working about 1 month ago on different computer.#2018-11-2512:33kwladykaI have this when import project form existing sources#2018-11-2513:01kwladykahere is repo https://github.com/kwladyka/form-validator-cljs/tree/doc#2018-11-2513:02kwladykaform-validator {:local/root "../form-validator-cljs"} is https://github.com/kwladyka/form-validator-cljs/tree/master#2018-11-2513:09kwladykaI have this on another computer 😕 The newest intellij, just updated#2018-11-2513:09kwladykafor some reason path is repeated#2018-11-2513:13kwladykaafter update intellij to new ver.#2018-11-2513:17kwladykaI have the same issue with #2018-11-2513:33kwladykaThere is no EAP builds available to check#2018-11-2513:43kwladyka#2018-11-2513:44kwladykaI give up. Even defn can’t be resolved.#2018-11-2513:50kwladykaIs there a way to see something more than Sync finish event has not been received?#2018-11-2522:28cfleming@kwladyka Is there an error event in your log?#2018-11-2522:30cflemingCould you check that Settings-&gt;Build, Execution, Deployment-&gt;Build Tools-&gt;Clojure Deps is correctly configured? On OSX you want “Use CLI tools” selected, and that should show you the correct version underneath, like this:#2018-11-2522:30cfleming#2018-11-2523:44kwladykaoh so the path is not set#2018-11-2523:48kwladykathanks, now it works!#2018-11-2523:49kwladykahint for you: it is fresh system after hard drive crash installed in last week or two. Before when I was trying beta I didn’t have this issue.#2018-11-2523:50kwladykaFrom my perspective it could be improve by auto detect path / not let click next with empty path during import / better error message#2018-11-2612:20Oliver GeorgeCan someone help me get a CLJS REPL setup. I'm doing something wrong.#2018-11-2612:21Oliver George#2018-11-2621:43Oliver GeorgeFollow up. Error doesn't occur if I use clojure.main#2018-11-2621:44Oliver George#2018-11-2612:23Oliver GeorgeBrowser opens up but REPL doesn't seem to work. For example
cljs.user=> (js/alert "Hello CLJS!")
Syntax error compiling at (form-init6253890421157033124.clj:1:1).
No such namespace: js
#2018-11-2612:44kwladykaYou are probably in clojure repl vs clojurescript#2018-11-2619:00wilkerlucio@olivergeorge if you are using shadow, try running this one the REPL: (shadow/nrepl-select :build-name)#2018-11-2621:22Oliver GeorgeThanks. If it gets fiddly I might switch over but hopefully I'm just missing something obvious.#2018-11-2619:21Jakub Holý (HolyJak)Perhaps a dumb question but when I run (.println System/out "hello") in the REPL in Cursive, where can I see the "hello"? Thank you!#2018-11-2619:24manutter51I just tried it in my local REPL, and it printed “hello” in the regular REPL output pane.#2018-11-2619:29Jakub Holý (HolyJak)thanks! perhaps the problem is I use a remote REPL.... And yes, it is printed in the temrinal where I started the remote repl. Thank you!#2018-11-2709:16danielcomptonNot sure if this is a Cursive bug, user error, or IntelliJ bug, so posting here for thoughts#2018-11-2709:17danielcomptonIn the Find window, if you turn on the File mask, then the namespaces on the right hand side of the window drop their last segment#2018-11-2709:17danielcomptonCompare these two windows for an example#2018-11-2709:17danielcomptonFind window without file mask#2018-11-2709:17danielcomptonFind window with file mask#2018-11-2719:43cfleming@danielcompton That’s probably showing the package by default.#2018-11-2719:44cflemingSince clojars.friend.registration lives in the clojars.friend package according to the Java semantics.#2018-11-2722:24tony.kay@cfleming Thanks so much for making deps.edn autocomplete on dependencies work…was missing that feature 🙂#2018-11-2722:24tony.kayso nice#2018-11-2723:42cfleming@tony.kay No problem! It is indeed very useful 🙂#2018-11-2723:42cflemingJust checking that you know, but you can also add deps from anywhere using Cmd-n, no need to open the deps file.#2018-11-2723:49tony.kayway cool…I don’t have it bound to that key, but I see it via CMD-SHIFT-A#2018-11-2800:26cfleming@tony.kay The action is Code-&gt;Generate…, you can check the key it’s bound to in the menu.#2018-11-2801:10polymerisIs there any way to enable language injections in cursive?#2018-11-2801:11cfleming@polymeris Only by me doing it, sadly. Is there one in particular you’re interested in?#2018-11-2801:11polymerisgraphql and glsl#2018-11-2801:11polymerisbut it's not urgent, just a nice to have#2018-11-2801:12cflemingAre there IntelliJ languages for those?#2018-11-2801:12polymerisplugins?#2018-11-2801:13polymerisI don't think they are official#2018-11-2801:13cflemingProbably, I have no idea if they exist.#2018-11-2801:13polymerisbut they exist, yes#2018-11-2801:13cflemingOk, cool.#2018-11-2801:14cflemingThe other issue is that presumably you want these replaced at certain points in function/macro calls - that part would have to be extensible too.#2018-11-2801:14cflemingI assume you have those inside strings?#2018-11-2801:14polymerisyes#2018-11-2801:15cflemingActually, are they functions or macros? That might be important.#2018-11-2801:15polymeriscurrently they are just stuff like
(def fragment-shader-source
  "
  void main() {
     gl_FragColor = vec4(1.0, 1.0, 1.0, 1.0);
  }")
#2018-11-2801:16polymerisI don't understand the question, tbh#2018-11-2801:16polymeristhey are just strings#2018-11-2801:16cflemingHmm, I see - that’s tricky because it’s hard to attach to anything, i.e. there’s no way for Cursive to know that that string is GLSL.#2018-11-2801:17cflemingA simple workaround would be to use something like (deffragment my-fragment "<GLSL code>")#2018-11-2801:17cflemingThen Cursive could be taught that deffragment calls always take GLSL as an arg.#2018-11-2801:18polymerisJava intellij shows you an intention for any string, is that not possible?#2018-11-2801:18polymerisOr you can tag strings with comments#2018-11-2801:18polymerisIt's a bit more work for the developer, but more flexible#2018-11-2801:18cflemingRight, something like that should be possible, I’m not sure how Java does it.#2018-11-2801:18polymeris
class Scratch {
    public static void main(String[] args) {
        //language=GLSL
        String foo = "void main() { gl_FragColor = vec4(1.0, 1.0, 1.0, 1.0); }";
    }
}
Like this
#2018-11-2801:19cflemingIf you use the intention, is that what it adds?#2018-11-2801:19polymerisIt allows you to choose to either just inject the language (I suppose it stores it in .idea somewhere) or to add the comment#2018-11-2801:20polymeris#2018-11-2801:20cflemingHmm, I wonder how that works. The problem is that I don’t know how it identifies an individual string in the source code without the comment.#2018-11-2801:21polymeris#2018-11-2801:21cflemingOh right, so it’s transient unless you annotate it - that makes sense.#2018-11-2801:24polymerisThe (deffragment .... idea would be cool as well (since it doesn't contaminate the code with cursive-specific comments), but the annotation might be more flexible#2018-11-2801:24cflemingSure, I think it should support both.#2018-11-2801:25polymerisIn fact I think idea comes with some predefined functions for some languages where it will guess the injected lang#2018-11-2801:25cflemingLanguage injection is pretty complicated, I’ve looked into it from time to time for regexes and other things, but never got as far as implementing it.#2018-11-2801:25polymeris#2018-11-2801:26polymeriswhat if I add defragment there :thinking_face: ?#2018-11-2801:27polymerisnvm, can't add clojure "names"#2018-11-2801:33cflemingYeah, I assume that view is pluggable.#2018-11-2916:20guillaumeIs there a way to have cursive respect the formatting rules of cljfmt?#2018-11-2916:23guillaumei’m having difficulty making it behave correctly on a clojure macro https://github.com/clojure/core.match indent is way off#2018-11-2916:51guillaumeok i managed to make it behave correctly by doing alt+enter on match, then enter, then select indent#2018-11-2916:52guillaumebut it would still be useful to hook on cljfmt rules instead of duplicating the logic across editor configs#2018-11-2920:40cfleming@guillaume.carbonneau There isn’t anything like that at the moment, no, but it’s something that a few people have asked about.#2018-11-2921:20Ben HammondI have a deps project, and i'm trying to hook up to a figwheel clojurescript REPL to it#2018-11-2921:20Ben Hammondlooking at https://github.com/nrepl/piggieback#installation#2018-11-2921:21Ben Hammondand wondering how I can stick --middleware "[cider.piggieback/wrap-cljs-repl]" into the nrepl spawned by cursive#2018-11-2921:22Ben Hammondnaive (cljs-repl) tells me
ExceptionInfo Failed to launch Figwheel CLJS REPL: nREPL connection found but unable to load piggieback.
This is commonly caused by
 A) not providing piggieback as a dependency and/or
 B) not adding piggieback middleware into your nrepl middleware chain.
Please see the documentation for piggieback here 

Note: Cider will inject this config into your project.clj.
This can cause confusion when your are not using Cider.  clojure.core/ex-info (core.clj:4739)
#2018-11-2921:23Ben Hammondis there a recommended way to do this?#2018-11-2921:25Ben HammondI do have piggieback in my classpath#2018-11-2921:28Ben Hammondits how to wrap the nrepl middleware when its a cursive nrepl#2018-11-2922:20Ben Hammondswitching over to clojure.main REPL seems to do the trick#2018-11-2921:42Ben Hammondthat I don't understand#2018-11-2921:59todoIt is possible to do IntelliJ -> Tools -> IDE Scripting Engine -> Clojure via instaling the Clojure JSR https://intellij-support.jetbrains.com/hc/en-us/articles/115000877044-DataGrip-FAQ [I have this working] Are there any plans to make it as easy to extend IntelliJ via Clojure as it is to extend Emacs via Elisp ?#2018-11-2922:20Ben Hammondswitching over to clojure.main REPL seems to do the trick#2018-11-2922:22cfleming@ben.hammond Yes, there’s no good way right now to install middleware into the Cursive nREPL stack for that first REPL option.#2018-11-2922:23cfleming@todo It’s possible to some extent, but I haven’t investigated in much. It’s fairly poorly documented, and you can’t extend everything about IntelliJ that way like you can with emacs.#2018-11-2922:30Ben HammondIs it anywhere on your roadmap?#2018-11-2922:31cflemingYes, the next major thing on my roadmap is making CLJS REPLs easier, hopefully as close as possible to how easy they are for Clojure#2018-11-2922:53todo@cfleming: agreed on the lack of documenation part -- I've been grepping through the IntelliJ community edition source to figure out how to do things What do you mean by you can't extend everything? In my limited understanding, anything you can do via a "real" Java/Kotlin plugin, you can do at the IDE Scripting Console#2018-11-2922:55cfleming@todo So some things can’t be created dynamically, I believe. Indexes would be one example, if you need a new index you pretty much have to write a plugin. You can install extensions for most extension points at runtime, but it can get pretty funky.#2018-11-2922:55cflemingBTW if you’re using Cursive you can get a REPL on your open IDE instance if you want.#2018-11-2922:56cflemingWhich is why I’ve never investigated the console much.#2018-11-2923:01todo@cfleming: I purchased a Cursive license a while back, but have not used it much since I shortly switchec to Kotlin aftertwards. What do you mean by "get a REPL on your OpeN IDE instance" ? Does Cursive alfready offer the full power of "ide scripting console"#2018-11-2923:02cfleming@todo Yes, I think so - it’s somewhat hidden since it’s mostly there for my use.#2018-11-2923:02cflemingAlso, if you’re just playing around with this then you can use a (free) non-commercial licence.#2018-11-2923:02todoI might reinstall cursive just for this. How do I fire it up#2018-11-2923:03todoI really did purchase a license a while back, I'm not sure if it was 1 year or if it was perpeutual though#2018-11-2923:03cflemingHelp-&gt;Edit Custom Properties, and in the file that opens, add idea.is.internal=true.#2018-11-2923:03cflemingAll Cursive licences are perpetual, but you’ll only get updates for a year.#2018-11-2923:04todofound my cursive license key, reinstalling#2018-11-2923:04cflemingOnce you’ve done that, restart and you’ll have a new menu item: Tools-&gt;Start IDE console#2018-11-2923:05cflemingThat will open a REPL on your IDE.#2018-11-2923:07todointeresting; thanks!#2018-11-3002:52caleb.macdonaldblackCan I commit my configuration for indentation and resolution as a file to my repo?#2018-11-3004:43tony.kayHm…I’m getting continual reports of cylcic requires when I use the require-macros trick in a cljc file:#2018-11-3004:43tony.kayI get this when I try to use nREPL reload current ns, and I also get it when trying to run tests that will reload nses#2018-11-3004:49tony.kaystrange that this doesn’t happen to me on other projects, which makes me think I’ve made a mistake somewhere, but this is not a particularly helpful error message#2018-11-3012:29todoIs there a way to dump the (ns ...) portion of every .cljs .cljc *.clj file ?#2018-11-3012:38potetm@todo tools.namespace has facilities for 1) finding clj(s/c) files, 2) reading the ns declaration#2018-11-3012:38potetmI would assume it could be used to dump them as well.#2018-11-3013:12todo@potetm: Good point. With regards to @tony.kay’s problem above, I'm surprised no one has written a tool that parses all *.ns , looks for loops, and offers sensible errors [ I have run into similarly annoying to debug cyclic dependency issues in the past ]#2018-11-3017:18tony.kay@cfleming What’s strange is all of the code compiles and runs just fine…it’s just in cursive that it is doing this.#2018-11-3017:22tony.kayso that makes me thing the IDE has a bug….perhaps you could try to reproduce locally: https://github.com/fulcrologic/fulcro-incubator The feature/routing-experiment branch. Using deps.edn. Trying to run tests in the IDE for https://github.com/fulcrologic/fulcro-incubator/blob/feature/routing-experiment/src/test/fulcro/incubator/dynamic_routing_test.cljc. (Using IDE action run tests in current NS in an nREPL set up with IntelliJ classpath with Clojure Deps aliases “dev, provided, test” enabled. (at commit 1e17373fca5e04a7f298789f263ff5f5f85f4beb, this has changed based on messages below) Ah, If I split the test out of a CLJC file into a CLJ and CLJS file, then I can run the tests fine.#2018-11-3018:40tony.kaybut then, of course, I have a ton of duplicate code (the files are otherwise identical)#2018-11-3018:42tony.kayAhah! I think I found it. I was using deftest from the workspaces library (which is supposed to emit a deftest)…when I switch back to normal deftest it is fine.#2018-11-3018:44tony.kaynot sure why the IDE gives that particular error, but dropping the use of the alternate deftest fixed it.#2018-11-3020:14cfleming@tony.kay Thanks for the repro case, I’ll try that later. I don’t see why that change would affect things though.#2018-12-0102:27cfleming@tony.kay https://github.com/cursive-ide/cursive/issues/2094 seems relevant too.#2018-12-0104:35tony.kayYes, that sounds like exactly it#2018-12-0104:36tony.kaywonder if that was cljc files as well? If I split things into clj/cljs files it seems ok, and it only seems to have a problem with the cljc macro syntax require sugar.#2018-12-0105:52cflemingOk, I’ll take a look - I haven’t had time to investigate either of them yet.#2018-12-0121:55tony.kayAh, I remember now when this was happening earlier: I think it had to do with when I had those files in the jar more than once.#2018-12-0121:56tony.kayI think perhaps Cursive is seeing them twice and perhaps thinking there is a loop from one to the other and back again.#2018-12-0121:57tony.kayperhaps deps is somehow causing the lib to pull itself in through a transitive dep?#2018-12-0121:58tony.kayInterestingly, when I look at the external deps, I DO see a diff version of the lib I’m working on#2018-12-0122:03tony.kay@U0567Q30W That was it!#2018-12-0122:06tony.kayUpdated the issue with my findings.#2018-12-0203:52cfleming@tony.kay Oh, interesting - thanks!#2018-12-0223:59kennyJust updated IntelliJ to 2018.3 and Cursive to v1.8.0-2018.3, tried opening a Deps project and got this in the Build window: Sync finish event has not been received. Looking at the IntelliJ logs, I see the exception:
2018-12-02 15:56:44,531 [ 466761]   WARN - nal.AbstractExternalSystemTask - clojure/java/api/Clojure 
java.lang.NoClassDefFoundError: clojure/java/api/Clojure
	at cursive.deps.ToolsDepsResolver.resolve(ToolsDepsResolver.kt:22)
	at cursive.deps.DepsProjectResolver.resolveProjectInfo(DepsSupport.kt:292)
	at cursive.deps.DepsProjectResolver.resolveProjectInfo(DepsSupport.kt:259)
	at com.intellij.openapi.externalSystem.service.remote.RemoteExternalSystemProjectResolverImpl.a(RemoteExternalSystemProjectResolverImpl.java:37)
	at com.intellij.openapi.externalSystem.service.remote.AbstractRemoteExternalSystemService.execute(AbstractRemoteExternalSystemService.java:58)
	at com.intellij.openapi.externalSystem.service.remote.RemoteExternalSystemProjectResolverImpl.resolveProjectInfo(RemoteExternalSystemProjectResolverImpl.java:37)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at com.intellij.openapi.externalSystem.service.RemoteExternalSystemFacadeImpl$1.invoke(RemoteExternalSystemFacadeImpl.java:115)
	at com.sun.proxy.$Proxy3.resolveProjectInfo(Unknown Source)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:346)
	at sun.rmi.transport.Transport$1.run(Transport.java:200)
	at sun.rmi.transport.Transport$1.run(Transport.java:197)
	at java.security.AccessController.doPrivileged(Native Method)
	at sun.rmi.transport.Transport.serviceCall(Transport.java:196)
	at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:568)
	at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:826)
	at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.lambda$run$0(TCPTransport.java:683)
	at java.security.AccessController.doPrivileged(Native Method)
	at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:682)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at java.lang.Thread.run(Thread.java:745)
Any idea how to fix this?
#2018-12-0300:03kennyAh, I needed to set “Path to ‘clojure’ command” in Clojure Deps settings. Would’ve expected it to pick that up automatically.#2018-12-0300:38cfleming@kenny Yes, I thought I had validation around that, but there have been a couple of bug reports stating that that doesn’t work correctly.#2018-12-0312:28mishagreetings! how do I turn off completion of map/reduce/etc.? (type reduce|, press tab, get (reduce function| seq), where | – is caret position)#2018-12-0316:25guillaumeHello, I’m trying to do a remote repl session with debugging. Found this thread https://groups.google.com/forum/#!topic/cursive/iTri7vvXViA/discussion which leads to this article https://cursive-ide.com/archive/842.html but it’s 404 not found. Anyone is able to retrieve the missing article from a mirror? I’m having trouble understanding how my lein repl is supposed to interact with the 5005 port of the JAVA_OPTS#2018-12-0318:05guillaumeok i ended up figuring it out. both configurations must be run separately. interacting with the remote repl process triggers the java debugger that was launched prior to it#2018-12-0318:06guillaumeit sure would be nice to have it explained on the cursive page because the broken links leaves you questionning#2018-12-0319:11simonHi, is there a good way to align imported namespaces such that the :refer or :as all line up?#2018-12-0319:12simonex.
(:require
    [test.lib.test :refer :all]
    [test.lib.test123 :refer :all])
would become
(:require
    [test.lib.test    :refer :all]
    [test.lib.test123 :refer :all])
#2018-12-0320:29danielcomptonIs there a way in Cursive to navigate to the test namespace without creating a test for it?#2018-12-0320:30danielcomptonNavigate to Test Subject wants to create a test if one doesn't exist. If I scroll to the top of the file and put my cursor on the ns form then it navigates to the test file, but not if it's on a function#2018-12-0322:08cfleming@misha Settings-&gt;Editor-&gt;Live Templates#2018-12-0322:09cfleming@guillaume.carbonneau Yes, I’m currently re-vamping my documentation, and I’ll add that to the to-do list.#2018-12-0322:09cfleming@simon.orlovsky Not at the moment, sorry.#2018-12-0322:10cfleming@danielcompton I don’t think so, no. Perhaps Navigate… should prompt before creating a new test?#2018-12-0322:13guillaumethx @cfleming#2018-12-0322:26danielcomptonIt prompts, but if I don't accept the prompt then I don't navigate#2018-12-0322:26cflemingOh, so if you say no to the test, then you’d like it to navigate to the file?#2018-12-0322:26danielcompton#2018-12-0322:27danielcomptonI think they probably need to be different commands#2018-12-0322:27danielcomptonOne says "Take me to the test namespace", the other says "Take me to the test for this function, or offer to create it if it doesn't exist"#2018-12-0322:28danielcomptonYou could make "Navigate to Test namespace" another option under the "Choose Test for ..." menu#2018-12-0322:28cflemingI’d definitely prefer that to a new command.#2018-12-0322:28cflemingI’ll look to see what IntelliJ does for e.g. Java#2018-12-0412:53tengstrandHi! I’m thinking about creating a Polylith plugin (https://github.com/tengstrand/lein-polylith) to IDEA/Cursive. I’m not sure about if it’s possible to integrate with Cursive because it’s not open source or if it will be enough to integrated against IDEA. Does anyone have an idea here…maybe @cfleming?#2018-12-0419:02tanzoniteblackis there a way that I can get defrecord+ from potemkin to resolve the same as defrecord. More explicitly: I want the indentation to be the same#2018-12-0419:08tanzoniteblackoh, nevermind. Putting the indentation at level 1 works just fine. It just hadn't saved when I hit enter#2018-12-0419:09tanzoniteblackor...not? It works in one namespace but not another#2018-12-0419:12tanzoniteblackgetting the protocols it implements would be nice as well#2018-12-0419:25tanzoniteblack(same story for defprotocol+ )#2018-12-0419:48kennyWas the set indentation for a form via alt+enter removed?#2018-12-0420:34lellisHi all! Anyone have success running REBL with cursive?#2018-12-0420:43shaun-mahood@lellis: Are you using deps.edn or leiningen?#2018-12-0420:48lellislein#2018-12-0420:50shaun-mahoodhttps://github.com/jayzawrotny/lein-rebl-example should get you working - I got it to load from a cursive REPL with it#2018-12-0420:52lellis@shaun-mahood The feature "Follow REPL" work for you?#2018-12-0421:00lellisWhen u enter code into your repl, appear on rebl too or only when enter in rebl console?#2018-12-0421:01lellisHere this not happen.#2018-12-0421:02lellisI will try your example, tks.#2018-12-0421:06shaun-mahood@lellis Was just testing - it's only working for me in the rebl console when I run it in either Cursive or from lein on my shell. Just investigating to see if I did something wrong since I thought I had it working on another machine over the weekend.#2018-12-0421:08lellisYeap here too, only fully work when run under clojure cli from terminal#2018-12-0421:37cfleming@teng That’s a lot of documentation 🙂. Can you give me an idea of what you’d like the plugin to do?#2018-12-0506:23tengstrandPolylith has its own directory structure for its building blocks and uses symbolic links to fake a monolithic development environment (and systems). My idea was to support adding/renaming/deleting components and bases directly in IDEA/Cursive and also have a Polylith project view. It would also be nice if git worked for the monolithic views (that use symbolic links). The Leiningen plugin documentation is probably a better place to start at! https://github.com/tengstrand/lein-polylith#2018-12-0506:35cflemingInteresting, so there probably wouldn’t be any Clojure-specific functionality, correct?#2019-02-1206:31tengstrandThat’s correct.#2018-12-0422:01cfleming@tanzoniteblack Note that if you adjust the indentation of a form it will reformat that one, but won’t automatically reformat all the others in your project. Are you seeing that after customising the indentation, even after reformatting in another namespace the indentation is incorrect?#2018-12-0422:02cfleming@kenny No, that should still be there.#2018-12-0422:02cfleming@lellis @shaun-mahood I haven’t tried REBL under Cursive yet, but I plan to soon.#2018-12-0422:02kennyI'm only getting Resolve as... with alt+enter.#2018-12-0422:03cfleming@kenny Are you getting any errors in your log?
#2018-12-0422:04kennyNo#2018-12-0422:05kennyWell.. maybe. But none that occur right after doing alt+enter.#2018-12-0422:12cfleming@kenny Are you seeing that for everything, or only certain symbols?#2018-12-0422:13kennyEverything#2018-12-0422:37cflemingCan you check whether the intention is disabled? Settings-&gt;Editor-&gt;Intentions-&gt;Clojure-&gt;Indentation#2018-12-0422:37cfleming@kenny ^^#2018-12-0422:38kennyIt was. How could it have gotten disabled?#2018-12-0422:40cflemingSo there’s something about the way that Cursive presents those intentions which makes it look like you have to press right rather than enter on them. If you do that, you can easily accidentally disable them.#2018-12-0422:41kennyUsing the right arrow on the keyboard disables the intention?#2018-12-0422:47cflemingWell, it opens a submenu which contains the option to disable it, among other options.#2018-12-0422:47cflemingIt’s happened to a few people and that’s the only explanation I can come up with.#2018-12-0422:48kennyOh I see. Gotcha.#2018-12-0514:13tap@lellis @shaun-mahood Use inspect in a meantime. (cognitect.rebl/inspect (your-expression)) https://github.com/jayzawrotny/lein-rebl-example/issues/1#issuecomment-444262410#2018-12-0515:20stijnI'm running into this error when syncing my deps.edn project#2018-12-0515:20stijnjava.lang.RuntimeException: No such var: deps/combine-aliases, compiling:(cursive/deps/deps_tree.clj:39:32) No such var: deps/combine-aliases#2018-12-0515:22stijnthis is with 'Use CLI tools' option#2018-12-0515:22stijnwhen 'Use tools.deps directly' is selected the error is Attempting to call unbound fn: #'cursive.deps.deps-tree/deps-tree#2018-12-0515:34stijninvalidating caches seems to resolve this#2018-12-0517:24Ben GrabowI'm getting started using cljc files quite often, and my favorite Quick Definition (Ctrl+Shift+I) hotkey doesn't seem to work there since the definition is ambiguous between the clj and cljs versions. Is there an alternative method of peeking the definition, perhaps with a "Choose Definition" pop-up dialog similar to what appears when using the "Declaration" (Ctrl+B) hotkey on an ambiguous symbol?#2018-12-0602:15caleb.macdonaldblackIs there any way to commit my function indentation and 'resolve as' settings to my repo?#2018-12-0602:18cfleming@caleb.macdonaldblack Yes, under Settings-&gt;Editor-&gt;Code Style and Settings-&gt;Languages &amp; Frameworks-&gt;Clojure-&gt;Symbol Resolution, set the Scheme to “Project”.#2018-12-0602:19cfleming@ben.grabow Ugh, yes, sorry - I’ve been meaning to fix this. I’m not aware of a good workaround, sorry.#2018-12-0603:19Ben GrabowWhen it doesn't work I use Ctrl+B to get the declaration popup, then Ctrl+Shift+I to get a peek at the declaration I want. It works but is extra keystrokes and requires a different workflow depending on which symbol I'm inspecting. Thanks for looking in to it!#2018-12-0602:21caleb.macdonaldblack@cfleming Thank you so much!#2018-12-0619:29kanweiSo I'm using a reloaded style workflow in my project. However, every time I run:
(require 'clojure.tools.namespace.repl) (clojure.tools.namespace.repl/refresh-all)
and then try to run Cursive's "run tests in namespace", I get
Syntax error (IllegalStateException) compiling at (billing_test.clj:1:1).
xxx already refers to: #'xxx in namespace: doublethedonation.billing-test
#2018-12-0619:30kanweiwhat's a good solution for this? is there a way to let cursive not reload namespaces again? (assuming that's the issue)#2018-12-0620:16kanweiseems like cursive is "stuck" in the old unloaded namespace and not going into the renewed one. not 100% sure but it's pretty easy to reproduce#2018-12-0623:20fingertoeI think my IntelliJ just updated — My syntax highlighting seems to have broken in Cursive.. Is there a quick fix for that?#2018-12-0623:27fingertoe
2018-12-06 15:25:14,280 [ 128403]   WARN - com.intellij.util.xmlb.Binding - no accessors for class org.jetbrains.kotlin.idea.highlighter.KotlinDefaultHighlightingSettingsProvider 
I think that is the error in the log that happen around the time it turns all my symbols ugly color….
#2018-12-0623:47fingertoeI nuked my project and re-imported it, and it seems to have straightened out.#2018-12-0714:17GeorgeI’m getting
… cannot be resolved
highlights throughout my project and can’t open a REPL. Also the .jar file doesn’t appear under Leiningen Projects. I get the following when I try and open a REPL:
Starting nREPL server...
/Library/Java/JavaVirtualMachines/jdk1.8.0_181.jdk/Contents/Home/bin/java -Dfile.encoding=UTF-8 -Dclojure.compile.path=null -D.version=null -Dclojure.debug=false "-javaagent:/Applications/IntelliJ  " clojure.main -i /private/var/folders/c6/2s6p0fbx3gn038k89brp0kr00000gn/T/form-init5012280428052204459.clj
Error: Could not find or load main class clojure.main

Process finished with exit code 1
Exception starting REPL: java.lang.InterruptedException
However, there is a main function in the project. I have everything working in a different project, just this one which has issues, and I’m not sure why. Any help would be much appreciated, thanks!
#2018-12-0714:19GeorgeAnd hi btw, I’ve recently started coding in Clojure - and attended the London Clojure eXchange conference earlier this week, which was great!#2018-12-0714:45GeorgeI’ve fixed the issue, looks like there was a dependency with certificates in the project.clj which was causing refreshing leiningen projects to fail#2018-12-0813:36CaseyI haven't used Cursive in a year or so.. just started a new clojure project and booted it up (updated cursive with latest intellij version), I seem to remember cursive suggesting functions from other modules and adding require statements automatically#2018-12-0813:36Caseybut now it isn't (even among my own project's code). is this a bug?#2018-12-0818:04manutter51Other modules? Or just other namespaces?#2018-12-0818:17manutter51It's working for me, at least.#2018-12-0823:17mishais there a way to align left and right columns in case/cond/let forms the same way as in maps?: select few lines, and reformat code. where do I need to look for this? send help#2018-12-0823:18mishalet gets aligned when you rename any of the bindings, but does not on "select lines and reformat code"#2018-12-0912:22Casey@manutter51 sorry, i meant namespaces#2018-12-0922:55cfleming@ramblurr Yes, this should work. It’s driven by completion, so if you type (str/tr|) where | is the caret and you autocomplete, you’ll be offered trim as a completion, and if you do that then clojure.string :as str will be added.#2018-12-0922:56cflemingIt works by example, so you do need one example of each alias in your project somewhere that Cursive can index.#2018-12-1007:32CaseyThis is probably why I didn't see it work. I added a function to a ns, then in a different ns tried to use it for the first ime, but it wasn't completed.#2018-12-0922:57cfleming@misha You can do this for let etc, Settings-&gt;Editor-&gt;Code Style-&gt;Clojure-&gt;General-&gt;Align let-binding values#2018-12-0922:57cflemingThere’s no support for case or cond yet.#2018-12-1007:32CaseyThis is probably why I didn't see it work. I added a function to a ns, then in a different ns tried to use it for the first ime, but it wasn't completed.#2018-12-1001:20mishaI already have it on opieop#2018-12-1006:28cfleming@misha and it doesn’t format your lets?#2018-12-1010:51mishanow it does, but I am 100% sure it did not 1 or 2 idea or cursive updates ago (few days ago for me).#2018-12-1010:55cflemingI bet you a beer it did 🙂#2018-12-1011:41mishaI'm glad to buy you one even if I'm right ♥️ opieop#2018-12-1014:08mishaI know why I am saying it did not work. With such selection (I do most of the time) map alignment works, and let one does not:#2018-12-1014:09misha#2018-12-1014:10misha#2018-12-1020:57cflemingI see, that’s possible - I can’t remember without looking at the code, but it’s possible that reformatting inside a map expands the reformat to the whole map.#2018-12-1023:07mishait does, this is why I use it: reformat entire map, but don't reformat context around map.#2018-12-1016:22shaun-mahoodI'm getting an error message Error:Error resolving ... : Coordinate type :mvn not loaded for library org.clojure/clojure in coordinate {:mvn/version "1.10.0-RC4"} when I try to import a project using dep. My deps.edn file is {:deps {org.clojure/clojure {:mvn/version "1.10.0-RC4"}} :paths ["src/clj"]}. If I try to add a REPL, I see the error Run Configuration Error: No modules containing clojure.main found. Running IntelliJ Community 2017.2.7 with Cursive 1-8-0 on Ubuntu, and in the same project I'm able to run clj and it runs with Clojure 1.10.0-RC4 so I assume that part of things is working fine.#2018-12-1016:38shaun-mahoodIt seems like the problem occurs with Use CLI Tools - the path is correct (I can run it directly from the terminal and it will start up a clojure repl), not sure how to troubleshoot it though.#2018-12-1100:08cfleming@shaun-mahood That’s a really weird error, and I can’t reproduce it. But I think I see how to fix it.#2018-12-1100:08cflemingDo you get a stacktrace in your logs?#2018-12-1100:11shaun-mahoodI don't think one came up in the log screen, all that is there from earlier is 10:39 AM Error running 'REPL': Error creating run parameters. - how do I find the cursive logs?#2018-12-1100:12cflemingHelp-&gt;Show log in…#2018-12-1100:12cflemingActually, I can’t see how to fix that, and I no longer have a theory why that wouldn’t work 😞#2018-12-1100:13shaun-mahoodI mean, it works fine as long as I use tools.deps directly - so I was able to get the work done that I wanted today.#2018-12-1100:14cflemingIn your original error, you pasted Error:Error resolving ... - did you redact something there or did it actually print ...?#2018-12-1100:14shaun-mahoodHeading home for the night, but if you have anything you want me to try I can do that tomorrow. The ... was just the path to the project on my machine#2018-12-1100:15cflemingOk, thanks - there is another mysterious problem where those paths are wrong, I thought it might be related.#2018-12-1100:16cflemingOk, I’ll investigate further.#2018-12-1022:57Joe R. SmithIs it possible to get Cursive to format other forms like it formats let? I.e., if I create a macro with a binding form like let.#2018-12-1022:58cfleming@solussd Yes, if you resolve your macro form as let, it should work, see: https://cursive-ide.com/userguide/macros.html#2018-12-1022:58Joe R. Smithalso, is it possible to apply let/map/etc alignment with a keystroke, but not automatically?#2018-12-1022:58cflemingNo, it’s not possible to do that at the moment.#2018-12-1022:58Joe R. Smith@cfleming I tried the "resolve-as" functionality, but it didn't work. 😕#2018-12-1022:58cflemingCould you file an issue for that? That should work.#2018-12-1022:59cfleming@shaun-mahood I’ll try to reproduce that.#2018-12-1023:00Joe R. Smith@cfleming will do#2018-12-1023:00Joe R. Smiththanks#2018-12-1023:01Joe R. Smith@cfleming false alarm– I had an arg before the binding vector, so it wasn't the same as let.#2018-12-1023:01Joe R. Smithit does work when it is shaped like a let.#2018-12-1023:16cfleming@solussd Oh great, phew#2018-12-1115:25jeremysHey guys I am trying to start a repl from a deps.edn file. Any pointer on how to do it?#2018-12-1115:37Alex Miller (Clojure team)Assuming you have the clojure tools installed, just clj#2018-12-1115:37Alex Miller (Clojure team)oh, sorry didn’t realize we are in #cursive :)#2018-12-1115:37Alex Miller (Clojure team)but you need the Cursive EAP with deps support#2018-12-1115:38jeremys@alexmiller np! and I have the 1.8 release of cursive.#2018-12-1115:39jeremysThe thing is the “run with deps” option remains unclickable when I try to make a run config.#2018-12-1115:39jeremysRight now i am thinking of trying this#2018-12-1115:39jeremysI can create an alias in my deps.edn that will start a headless nrepl server, start that in a terminal then connect cursive via a remote repl config.#2018-12-1115:42Alex Miller (Clojure team)not sure that’s going to help you with running with deps#2018-12-1115:42Alex Miller (Clojure team)I’m sure there’s some other reason why it’s not working, but not sure what to suggest#2018-12-1115:46jeremysIt’s ok I am gonna tinker a bit. Thx Alex#2018-12-1115:59shaun-mahood@jeremys: I had some issues using CLI tools, can you see if it works if you select "use tools.deps directly"? It fixed things for me when I had a similar problem.#2018-12-1116:12jeremys@shaun-mahood I don’t where I could select this. My project was started using lein, I don’t know if that would prevent cursive from loading the CLI tools parts. When I try to “add framework support” deps isn’t there. Now when I try to create a configuration, I can create a “Clojure App”, a”Clojure Deps” or a “CLojure REPL local/remote” one. The support seems to be in Clojure App and Clojure repl local. In these two templates there is a “run with deps” choice with a field to select aliases. However I can’t select that option, it’s greyed out.#2018-12-1116:16shaun-mahood@jeremys: As far as I understand it, you have to choose between lein and deps when importing your project - so you would need to change your project to use deps.edn and re-import it#2018-12-1116:17jeremys@shaun-mahood Ok I’ll try that !#2018-12-1116:42jeremysok I re-imported my project after removing the .idea and the .iml file. I choose the deps support and I have now the option of running the repl from deps available! however I have a “Sync finish event has not been received” in the build widget of intellij, and I have an exception thrown when try to start the repl “Could not create shim”... I’ll try again later, gotta go for now. Thanks for the help.#2018-12-1122:23cfleming@alexmiller Actually 1.8 is out and stable now with deps support.#2018-12-1122:37Alex Miller (Clojure team)my bad! Sorry…#2018-12-1122:53cflemingNo worries! Just so you know…#2018-12-1122:24cfleming@jeremys So, right, glad you figured it out - you have to set your project up as a deps project for that to work. When you try it again let me know and we can look at those problems.#2018-12-1213:31jeremys@cfleming Hey Colin, I removed the target directory, the .cp directory and the project.clj that I had previously renamed project.clj.back don’t ask why... It seems to work fine now. My guess would be that some artifacts generated previously using lein might have messed things up a bit. I don’t know if that make sense though. Still it works! Thanks.#2018-12-1216:36sashtonFeature request (or, is this already possible?): - click on a test assertion failure (yellow “!” icon) - assertion diff window pops up (now for the feature request) - if the same test is re-run, and a new diff is produced, update the existing diff viewer with the new results, so the user doesn’t have to navigate back to the file and click the icon again#2018-12-1221:39nikolahello there#2018-12-1221:42nikolamy non-commercial license expired, why can't I renew it, or am I missing something?#2018-12-1222:36cfleming@nikola.kasev For the non-commercial licence, just grab a new one.#2018-12-1222:40nikolaoke, thanks#2018-12-1222:52cflemingBTW @alexmiller, following on somewhat from the discussion in #clojure, I remember you have mentioned a couple of times that you don’t like how Cursive presents exceptions, but I can’t remember the details. What would you like to see there?#2018-12-1222:58Alex Miller (Clojure team)The number one thing is that Cursive shows only the top exception in the chain, whereas 100% of the time I want the root cause, so I find the default behavior to completely hide the useful info#2018-12-1222:59Alex Miller (Clojure team)Now with 1.10, I’d love to see all the work we did on messages and ex-data get used#2018-12-1223:00cflemingRight, at the moment it just uses printStackTrace on *e. I’ll look at fixing that, and I’ll look at what I can do in 1.10 too.#2018-12-1223:01Alex Miller (Clojure team) https://clojure.org/reference/repl_and_main now has a new section on error stuff#2018-12-1223:02cflemingOh nice, I hadn’t seen that - thank you!#2018-12-1223:12Alex Miller (Clojure team)It’s new! :)#2018-12-1223:27kennyI have a namespace compute.alerts.test-utils located in my test directory. I have a dev.play in my siderail directory. If the dev.play ns looks like this:
(ns dev.play
  (:require
    [compute.alerts.test-utils :as test]))

(test/|)
with my cursor where the | is, I do not get any auto complete -- it says "No suggestions". There are definitely public functions in compute.alerts.test-utils. I have tried File > Invalidate caches & restart, which does not help. Any ideas?
#2018-12-1223:29kennyAuto complete works for namespaces in my src directory.#2018-12-1223:29cfleming@kenny I can’t think of anything immediately, no. Both test and siderail are marked as source roots?#2018-12-1223:29kennyI also tried creating another namespace in the test directory and it doesn't auto complete either.#2018-12-1223:29kennyYes#2018-12-1223:30cflemingAre they marked as a source or test root? i.e. blue or green in the project view?#2018-12-1223:30kennytest is test root. siderail is source root.#2018-12-1223:31cflemingYou’re using deps, right?#2018-12-1223:31kennyYes#2018-12-1223:31cflemingOk, I’ll try to reproduce that.#2018-12-1223:31kennyI get auto complete from namespaces in the siderail directory too.#2018-12-1223:32cflemingActually, isn’t it expected that you can’t access test sources from source root files?#2018-12-1223:33kennyWhy? They are all on the classpath.#2018-12-1223:33cflemingi.e. it’s essentially production code depending on test code.#2018-12-1223:33kennyExcept siderail isn't.#2018-12-1223:33cflemingIsn’t it marked as a source root?#2018-12-1223:33kennyYes but it's under dev alias.#2018-12-1223:34cflemingHmm, it’s possible there’s some assumption about that baked into Cursive, I’ll take a look.#2018-12-1223:34cflemingActually, that may even be baked into IntelliJ, now that I think about it - it’s been a while.#2018-12-1223:36kennyHmm. That distinction seems confusing. In my mind things are either on the classpath or they aren't. If they're on the classpath, I'd expect auto complete to work.#2018-12-1223:37kennyI added test2 to my :test :extra-paths and I get auto complete from compute.alerts.test-utils. Sounds like your guess along the right lines.#2018-12-1223:43cflemingOk, I’ll take a look. Often these things are more fluid in Clojure than e.g. in Java.#2018-12-1223:44cflemingBut from Cursive’s point of view, once something is marked as a source root it has no way of knowing if it was marked as such in dev#2018-12-1223:45kennyThat seems ok. It sounds like the problem is you do not get auto complete from namespaces defined in a test root when working in a sources root.#2018-12-1223:46cflemingYes, I think that should be allowed, perhaps with an inspection to warn that you’re doing that (since it might be unexpected).#2018-12-1223:47kennyPerhaps. FWIW my use case is I have some test utilities defined in my tests root that I'd like to use in a namespace to experiment.#2018-12-1300:55caleb.macdonaldblackhttps://i.gyazo.com/c5053aaed55a9f49bda0cb0dfd2356b6.png#2018-12-1300:56caleb.macdonaldblackAny way to get vector destructuring to align in let bocks?#2018-12-1301:52cfleming@caleb.macdonaldblack No, there isn’t unfortunately. Those blocks can often be very long, and there’s no way to say to the IntelliJ formatter “align as long as the key is not longer than 20 chars”.#2018-12-1301:53caleb.macdonaldblackOkay thanks#2018-12-1303:18cfleming@alexmiller Cursive now (or will soon) just print a single line from the exceptions leading up to the root cause, and then the full trace from the root cause.#2018-12-1305:25Alex Miller (Clojure team)Yay!#2018-12-1306:59cfleming@alexmiller Looking at the new 1.10 error handling stuff, it looks like if I reuse the (-> ex Throwable->map clojure.main/ex-triage clojure.main/ex-str) then the actual stacktrace is never printed. Is that just designed for showing an error at the REPL, and then the user prints the stacktrace if required? i.e. should the print stacktrace action still do more or less like the above even on 1.10?#2018-12-1313:20Alex Miller (Clojure team)It’s always been the case that the main repl doesn’t print the stack trace. #2018-12-1313:20Alex Miller (Clojure team)So, this is the “normal” case from my perspective #2018-12-1323:02cflemingOk, thanks, just making sure I wasn’t missing something new.#2018-12-1307:06cflemingAfter some testing, I’m going to go for yes, since the new errors are automatically already printed, presumably by the new exception printing machinery, on 1.10.#2018-12-1311:45torbjornvatnHas anyone got any tips on how to get Cursive to resolve Javascript dependencies from NPM? I use shadow-cljs and deps.edn as described in this blog post https://andrearichiardi.com/blog/posts/clojurescript-cursive-shadow-setup.html#2018-12-1323:02cfleming@torbjornvatn Sadly no, but it’s something I’m planning to fix.#2018-12-1407:46torbjornvatn👌#2018-12-1413:18miikkaHmm. A tools.deps project of mine seems to have lost its tools.deps tab and Cursive can't resolve anything (it shows literally every function call with yellow background).#2018-12-1413:22miikkaAh well, I recreated the project.#2018-12-1413:30manutter51That sounds like the kind of thing you might be able to fix with File -> Invalidate Caches / Restart…#2018-12-1416:50scarytomis there a way to search repl history?#2018-12-1416:53shaun-mahood@t.denley: There's an shortcut you can set up in the keymap for that (named "Search REPL history)#2018-12-1416:54scarytom😮#2018-12-1416:54scarytomthanks, that's life-changing#2018-12-1416:54Rachel Westmacott:mind-blown:#2018-12-1419:14wilkerlucio@cfleming not sure if you already tracking this, it seems cursive does a much unnecessary lookup when I try to rename an alias usage, since the alias is local it should only look in the current file I think, but sometimes it takes a long time (15+ seconds) to run an alias rename, can you tell me why it might be doing that takes so long?#2018-12-1709:27alexpashkovHi everybody! I have such an issue (see the screenshot below). Previously it was caused by unindexed repositories. Now, it’s not the case. I restarted and invalidated caches with no result. Any ideas? UPD. The thing is defined via some kind of macro. Probably that is the cause. From the lib source code:
(defclone transform t/transform)
(defmacro defclone [here there]
  (if (contains? &env :locals)
    ;; cljs
    `(def ~here ~there)
    ;; clj
    `(do 
       (def ~here ~there)
       (alter-meta! (var ~here) assoc
                    :doc (:doc (meta (var ~there)))
                    :arglists (:arglists (meta (var ~there)))
                    :file (:file (meta (var ~there)))
                    :line (:line (meta (var ~there)))
                    :column (:column (meta (var ~there))))
       (var ~here))))
#2018-12-1709:33alexpashkov#2018-12-1713:22todois there an IntelliJ action for "close all buffers except currently open buffer" ?#2018-12-1714:08wilkerlucioright click on the tab and Close Others#2018-12-1713:22todo(referring to Editor buffers)#2018-12-1800:37sooheonWhat could cause synchronizing leiningen project to hang, and how would I reset it?#2018-12-1800:39sooheonWhoops got my answer immediately: was hanging because wasn’t able to connect to maven to resolve deps#2018-12-1810:48ingesolHi! Struggling to figure out how to enforce this rule in the cursive config. Is it possible? https://github.com/bbatsov/clojure-style-guide#one-space-indent#2018-12-1904:45sooheonDefault to Only indent - OFF, One space list indent - ON#2018-12-1904:45sooheonthat should do it :)#2018-12-2020:24ingesol@U06ANT2JK Perfect, that did the trick! 🙂 Thanks#2018-12-2020:26ingesolon a side note: I was not alerted about your response, saw it by accident just now. I would have expected a notification on a response in a thread I started. Maybe an @ is required?#2018-12-2100:46sooheon@U21QNFC5C there is a setting under notifications, notify me for responses to threads :)#2018-12-1814:03gravI just downloaded IDEA 2018.3.1 and it says Cursive isn't compatible. I'm also not able to enable EAP versions, since I never installed IDEA and Cursive on this machine before.#2018-12-1814:03gravIs there a repository url to the EAP builds somewhere that I can just add?#2018-12-1818:25dadairI’m having an issue setting up a new hire’s IntelliJ+Cursive environment with the new deps support. I’m perplexed because we have two other machines recently set up working perfectly. We keep getting a Build Sync failure when importing from deps.edn, and Cursive is throwing an exception.
java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
    at java.util.ArrayList.rangeCheck(ArrayList.java:653)
    at java.util.ArrayList.get(ArrayList.java:429)
    at com.intellij.ui.SortedListModel.getElementAt(SortedListModel.java:101)
    at javax.swing.JComboBox.getItemAt(JComboBox.java:1486)
    at cursive.repl.runner.LocalConfigurationEditor.resetEditorFrom(ReplRunConfigurations.kt:681)
    at cursive.repl.runner.LocalConfigurationEditor.resetEditorFrom(ReplRunConfigurations.kt:564)
   ...
#2018-12-1818:26dadairHas anyone run into this before? The project import steps are identical between the machines. The same setup is working across IntelliJ CE/Ultimate 2018.3, and Cursive v1.8.0-2018.3.#2018-12-1818:48dadairSeem to have fixed the issue. The path to the clojure command was not being set automatically for some reason.#2018-12-2003:34cfleming@U0E2EQFME Ugh, sorry about that - the next version will have better validation for that.#2018-12-1818:34salam@grav Have you tried uninstalling and then reinstalling Cursive? I'm using Cursive v1.8.0-2018.3 without any problem on IntelliJ IDEA 2018.3.2 (Ultimate Edition, JRE: 1.8.0_152-release-1343-b26 x86_64, JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o, macOS 10.14.2)#2018-12-1818:41grav@abdusalam I haven’t been able to install it yet, so nothing to uninstall...#2018-12-1818:45salamThat's weird, the latest release of Cursive should be compatible with IntelliJ IDEA 2018.3.*. Have you tried manually installing it from https://plugins.jetbrains.com/plugin/8090-cursive here?#2018-12-1916:10gravYes, that also doesn’t work. The computer is on Christmas vacation so I’ll investigate next year ;-)#2018-12-1916:16salam😁 good luck, merry Christmas, and happy New Year then!#2018-12-1919:19gravSame to you:-)#2018-12-1900:11hlshipI've been bitten by the dependency cycle in clj-pdf (https://github.com/cursive-ide/cursive/issues/2094) and now I'm trying to find a combination of IntelliJ and Cursive that doesn't have this problem.#2018-12-1901:28ro6I'm trying to get a new dev up to speed on Cursive and having trouble. We get a project sync issue when starting Intellij and Cursive doesn't seem to be recognizing the deps from deps.edn. We also aren't able to get a REPL running.#2018-12-1901:34ro6Sync finish event has not been received is the error text#2018-12-1901:38dadairI had some issues with syncing from deps as well, I did three things that fixed it (causality not guaranteed): 1) made sure when importing the project that we were setting the path for the Clojure command, 2) pre-downloading all dependencies from the command line before project import, 3) syncing .m2/maven/clojars repositories. After those I was able to properly sync#2018-12-1901:38dadair@robert.mather.rmm #2018-12-1901:43ro6How do you go about number (3)?#2018-12-1901:43ro6How do you go about number (3)?#2018-12-1902:23dadairAfter I did the first two I think I got a pop up notification that I had unindexed repositories, clicking that leads to a dialog #2018-12-1904:36sooheonStarting a brand new deps.edn project gives me "sync failed" Sync finish event has not been received#2018-12-1904:37sooheonSeems like issue exists for creating new projects as well as importing#2018-12-1904:56sooheonWow, hilariously enough, the “sync failed” was due to the same issue as with lein above: firewall blocking access to maven.#2018-12-1904:57sooheon@robert.mather.rmm double check that with your settings, just plain clj from command line in the project works#2018-12-1912:13koala punchhi, i’m having problems connecting to shadowcljs clojurescript repl from cursive#2018-12-1912:13koala punchkeeps connecting to a clojure repl instead#2018-12-1912:13koala punchanyone else have this problem?#2018-12-1912:30koala punchnever mind#2018-12-1913:16koala punchsorry, another question#2018-12-1913:16koala punchauto imports seem to work for external libraries but not namespaces that i’ve created myself#2018-12-1913:16koala punchhas anyone else had this problem?#2018-12-1913:16koala punchi end up having to type them in at the top of the file which is a bti of a pain#2018-12-2002:52ro6I'm still having trouble with Cursive not recognizing the tools.deps project (eg the 3rd party libraries aren't listed in the Project view). Is there a more detailed log file where I can dig into this?#2018-12-2003:30cfleming@alexpashkov123 You can fix that using “Resolve as…” on defclone and choosing to resolve it as def: see https://cursive-ide.com/userguide/macros.html#2018-12-2003:31cfleming@todo Window-&gt;Editor Tabs-&gt;Close Others#2018-12-2003:32cfleming@ingesol Settings-&gt;Editor-&gt;Code Style-&gt;Clojure-&gt;General-&gt;One space list indent#2018-12-2007:23ingesol@cfleming I do have that one checked. Still seeing 2 spaces inserted, like this:#2018-12-2020:09cflemingDo you also have “Default to Only Indent” selected?#2018-12-2020:24ingesolYes, I did. That fixed it, thanks 🙂#2018-12-2003:33cfleming@grav See https://cursive-ide.com/userguide/troubleshooting.html#2018-12-2003:35cfleming@hlship Sorry, I’m planning to fix that for the next build. Users have reported that previous Cursive versions didn’t have that problem - I can’t think of anything that would cause that to happen, and suspect that it was in fact an earlier version of clj-pdf, particularly since that issue has only come up recently.#2018-12-2003:37cfleming@christopher.paul That should work, but Cursive needs one example to work from. Once you’ve added one, then that namespace should work from then on.#2018-12-2003:38cfleming@robert.mather.rmm So not yet, for boring internal IntelliJ reasons logging is difficult from the deps.edn sync process. I’m going to fix that for the next build. In the meantime, have you confirmed that the path to the clojure command is correct under Settings-&gt;Build, Execution, Deployment-&gt;Build Tools-&gt;Clojure Deps? The validation for that is currently bad and that has caused a lot of confusion.#2018-12-2003:40ro6Ok. I went through all the steps people recommended, but ultimately it wasn't solved until we blew away the .idea directory and started over. We have some of the .idea files checked into Git, so I'm assuming something in there prevented the sync from working. It may be we just need to improve our .gitignore...#2018-12-2003:40ro6Ok. I went through all the steps people recommended, but ultimately it wasn't solved until we blew away the .idea directory and started over. We have some of the .idea files checked into Git, so I'm assuming something in there prevented the sync from working. It may be we just need to improve our .gitignore...#2018-12-2003:41cfleming@robert.mather.rmm Thanks for the report, that is really weird. I can’t think of anything that would cause that.#2018-12-2003:42ro6Once I merge in this new dev's changes maybe it will become apparent what differed.#2018-12-2003:42cflemingI’d love to know more if you do figure it out.#2018-12-2020:11cfleming@todo re: your question in #clojurescript, I’m not sure - I’d check the source code of Window-&gt;Editor Tabs-&gt;Close Others#2018-12-2022:17koala punch@cfleming it doesn’t every let me autoimport my own namespaces#2018-12-2022:17koala punchjust external ones#2018-12-2022:17koala punchit’s not a deal breaker, but it is a little frustrating#2018-12-2022:40cfleming@christopher.paul Can you describe in more detail what you’re doing that isn’t working, so I can check that what you think should happen is what should actually happen? If not, I can indicate how it should work.#2018-12-2023:25koala punchhi#2018-12-2023:25koala punchsure#2018-12-2023:25koala punchso i created some namespaces in my project#2018-12-2023:36koala punchhe’s fixed it for me 🙂#2018-12-2102:03todo@cfleming (re "wikndow -> editor tab -> close others"): 1. sorry, I meant to post in #cursive, not #cljs; 2. by "check the source code"; do you mean "grep the github intellij sources" -- or does IntelliJ have some type of "smart docs" where menu options can jump to relevant source ?#2018-12-2102:09cfleming@todo Normally it’s a matter of grepping the sources. My usual method is to grep for text visible in the UI, and then trace back from there to the code. I’m trying that now for that action, but it’s not proving very useful for some reason.#2018-12-2102:12cfleming@todo https://upsource.jetbrains.com/idea-ce/file/idea-ce-1968b1c7020e61560839fe0a353f38d1b52f16a9/platform/platform-impl/src/com/intellij/ide/actions/CloseAllEditorsButActiveAction.java#2018-12-2102:45todo@cfleming: thanks for the link & 'general technique' advice#2018-12-2217:56tbrookedoes anybody have a good step by step setup for Cursive and Rebl#2018-12-2309:27buzzdanhi there! does anyone know how do i set auto formating on save ?#2018-12-2310:06buzzdanok found a plugin: Save Actions#2018-12-2310:06buzzdanhttps://plugins.jetbrains.com/plugin/7642-save-actions#2018-12-2503:03peter-kehlHi. 1. Can you have CLJ modules depend on each other, please? 2. Does Cursive work in current IntelliJ Community 2018.3.2, or do I need an older/different IntelliJ? I'm new to both IntelliJ and Cursive. I created a project with several modules. I'd like some of them to be dependencies. In Project Structure I see all modules, but contrary to online docs no Dependencies tab.#2018-12-2506:45cfleming@peter.kehl Yes, you can. Can you send a screenshot of your Project Structure view?#2018-12-2517:35peter-kehlMerry Christmas.#2018-12-2623:05peter-kehlHi Colin @cfleming or anyone who used dependencies between modules, Here's my screen:#2018-12-2707:41cfleming@peter.kehl So what that looks like is that you have the wrong module type set up. How did you create this project?#2018-12-2707:51cfleming@peter.kehl Here’s how I imported core.typed (I just tried it now):#2018-12-2707:52cfleming1. Make sure you’re using Cursive 1.8.0, which has deps support.#2018-12-2707:52cfleming2. clone the core.typed repo.#2018-12-2707:53cfleming3. File-&gt;New-&gt;Project from Existing Sources…#2018-12-2707:53cfleming4. Select the core.typed directory from #2#2018-12-2707:54cfleming5. Select “Import project from external model”, then Deps.#2018-12-2707:55cfleming6. (probably) choose “Use auto-import” and then Finish, and you should have your project set up.#2018-12-2811:30Andreas LiljeqvistWhat is usually the problem when a :refer can't be resolved?#2018-12-2811:30Andreas LiljeqvistThe program works, but Cursive can't resolve it#2018-12-2811:38Andreas LiljeqvistSeems like it is because it is a macro.#2018-12-2811:38Andreas LiljeqvistShould that be a problem?#2018-12-2811:39Andreas Liljeqvistin standard clj#2018-12-2900:35cfleming@andreas862 How is the macro defined?#2018-12-2911:18Andreas Liljeqvist@cfleming nothing fancy from what I can see https://github.com/borkdude/respeced/blob/master/src/respeced/test.cljc#2018-12-2911:20Andreas Liljeqvistor... it is fancy impl/deftime wraps all the declarations... Of course Cursive can't parse that#2018-12-2911:28Andreas LiljeqvistI propose that when :refer is present: Missing refers get marked as not resolving in ns-form and not further marked in rest of buffer. As a positive side-effect it will indicate directly that the refer might be missing even when not used.#2018-12-2911:28Andreas LiljeqvistStaring at a file with 300 warnings isn't any fun#2018-12-2920:49cfleming@andreas862 You can fix that. Put your caret on impl/deftime in that file, and then use “Resolve as…” to resolve it as clojure.core/do.#2018-12-2920:50cflemingSee the doc here: https://cursive-ide.com/userguide/macros.html#2018-12-2920:50cflemingThe screenshots are a bit out of date, in the dropdown list there’s now a “Specify…” option which you can use to choose do#2019-12-3016:26Andreas Liljeqvist@cfleming Can't find do in specify list#2019-12-3016:27Andreas Liljeqvistor map for example#2019-12-3016:28Andreas Liljeqvisttyping m reveals five functions with only min and max from core#2019-12-3018:57cfleming@andreas862 Which Cursive version are you using? This was added recently in 1.8.0#2019-12-3111:26Andreas Liljeqvist@cfleming 1.8.0-2017.1#2019-12-3121:12cflemingSo you don’t see something like this when choosing Specify…?#2019-01-0210:49Andreas Liljeqvist@cfleming I have exactly the same dialogue but it seems to have wrong input or something. Typing d fills it things starting with de. Then typing o doesn't change the alternatives at all.#2019-01-0210:51Andreas LiljeqvistTyping only m fills it with six alternatives, where only min and max are from core#2019-01-0210:51Andreas LiljeqvistIf I type (m in the file I get a lot of completion alternatives#2019-01-0309:41cfleming@andreas862 Can you send a screenshot with do entered in the dialog like above?#2019-01-0311:38Andreas Liljeqvist@cfleming screenshot attached#2018-12-2907:40rdsrHas anyone worked on a mixed project with clojure and kotlin/java ? Is using gradle the best approach here? Or can I use gradle for kotlin/java module and lein/clj.deps for the clojure module? What I want is I can depend and use the kotlin/java project from clojure module#2018-12-2908:14cfleming@rdsr I use Gradle to build Cursive, which is basically exactly that. I developed this to do that: https://github.com/cursive-ide/gradle-clojure, but as the readme states you should use this instead: https://github.com/gradle-clojure#2018-12-2908:16cflemingYou could use lein for the Clojure part and then depend on a Gradle or Maven module for the Java/Kotlin part, but that will involve installing the Java/Kotlin part manually, which is a pain.#2018-12-2908:17cflemingi.e. installing into your ~/.m2/repository whenever you change something.#2018-12-2908:18cflemingYou could also possibly use lein for everything with https://github.com/reutermj/lein-kotlin, but I haven’t tried that so I can’t vouch for it.#2018-12-2908:18cflemingIt’s 3 years old which isn’t a great sign.#2018-12-2908:19cflemingPersonally, I’d use Gradle.#2018-12-2908:23cflemingBTW deps doesn’t help you, since it’s Clojure-only.#2018-12-2908:29cflemingActually, I lie, you could use deps instead of lein as I described above and depend on your Java/Kotlin as a Maven dep, but it has the same manual-install caveat.#2018-12-2916:25rdsrThanks @cfleming!#2018-12-2919:51rdsrI think I got a multi project working. When I start the clojureRepl task I think there must be a way to connect to it from clojure and have the same level of support as cursive provides from within an ide...#2018-12-2920:09rdsrI think I got it working with remoteRepl from intellij/cursive.#2018-12-2920:47cflemingYeah, I think the remote REPL is the way to go, but I haven’t used the new gradle-clojure so I’m not sure.#2019-12-3002:54rdsrThanks things are working out OK. I'm now figuring out how best to setup a debug remote repl. Also, what do u use instead of the gradle-clojure plugin?#2018-12-2919:51rdsr?#2018-12-2920:02hmaurerHi! Quick question: it seems like I can “break” structural editing by deleting a line with Cmd+Backspace (or select line + backspace), which makes the parentheses unbalanced. Then structural editing prevents me from typing a parentheses to rebalance them.#2018-12-2920:02hmaurerHow can I fix this?#2018-12-2920:09rdsrI think I got it working with remoteRepl from intellij/cursive.#2018-12-2921:49hmaurer(also, is there a way to disable formatting over a project? Cursive’s built-in formatting does undesirable things, like format maps far beyond the line limit, making them utterly unreadable)#2018-12-2921:51hmaureror if there is a way to make it respect line limits that would be even better#2018-12-2921:53hmaureri.e. this was my formatting before auto-format: https://puu.sh/CoUKu/a12df89ccb.png and after: https://puu.sh/CoULo/6176d1fa53.png#2018-12-2922:00Lennart Buit(Related: Is there a way to prevent Cursive from butchering my custom format, I like to align my let blocks, but if I refactor a name it breaks my formatting)#2018-12-2922:04Lennart Buit(aligned as in have my binding names right-padded to equal length)#2018-12-2923:01hmaurer@lennart.buit there is an option “Align let-binding values” in Editor -> Code Style -> Clojure. This might fix your issue; I haven’t found a fix for mine 😞
#2018-12-2923:02hmaurerI can disable “align map values”, which fixes my issue in the sense that it doesn’t attempt to format maps at all anymore, but…#2019-12-3002:54rdsrThanks things are working out OK. I'm now figuring out how best to setup a debug remote repl. Also, what do u use instead of the gradle-clojure plugin?#2019-12-3009:00cfleming@hmaurer re: your structural editing question, no, there isn’t a good fix for that right now. If you can file an issue I’ll look at it.#2019-12-3011:48hmaurerThank you! Will do. It’s a particularly annoying issue 😞#2019-01-0816:12daniel.spanielagree, it is kinda whacky, and i curious to see if fix is possible too#2019-12-3009:00cflemingThere are a couple of related line-oriented commands which suffer from this problem.#2019-12-3009:01cflemingre: your map question, am I correct that you want map value alignment, but not when the value is on the line following the key?#2019-12-3011:48hmaurerCorrect#2019-12-3009:02cfleming@lennart.buit I think the option that hmaurer pointed out is the one you want.#2019-12-3009:02cfleming@rdsr I still use my obsolete fork - it works for me, but is very specific to exactly what I want to do.#2019-12-3016:42Andreas Liljeqvist@cfleming Cursive is badly affected by this spec-bug: https://dev.clojure.org/jira/browse/CLJ-1966 Basically if assoc is specced and instrumented, this will trigger a spec error for assoc: (s/conform string? :not-a-string) Which is bad in itself, but it affects Cursive in further evals. Whatever next input in repl will repeat the same error. Repl can also become unstable and lockup, the project have to be restarted to fix the repl then. Check the last comment in the issue for code example.#2019-12-3016:44Andreas LiljeqvistHopefully will be fixed in spec itself, but perhaps of interest to you#2019-12-3021:40cfleming@andreas862 I don’t fully follow what the problem is there, after reading that issue. Is the problem that the return value of an evaluation is ::s/invalid, and then the REPL machinery internally assoc’ing that to :*1 etc causes that check to fail since the spec for assoc uses any? -> any?, and that check fails for ::s/invalid?#2019-12-3111:23Andreas LiljeqvistYes, just like that I have to check again, but I think Cursive is more affected than the standard clj-repl. Will get back on that#2019-12-3111:24Andreas Liljeqvist(s/valid? any? ::s/invalid) -> false#2019-12-3021:41cflemingIf so, it seems like that would fail for any REPL, nREPL or clojure.main, per the example at the end of the last comment. I don’t think there’s anything I can do about that within Cursive, and my advice would be “don’t do that” 🙂#2019-12-3021:42cflemingIt’s a general issue though, of modifications to the REPL environment affecting tooling.#2019-12-3113:08Kari MarttilaThis might not be a cursive specific related problem but a Clojure REPL related problem but let's ask it here at this cursive channel anyway. I had to create a couple of gen-classes for a Java API I'm using from Clojure. Previously if I wanted to refresh the Cursive REPL I just gave command: (do (require '[clojure.tools.namespace.repl :refer [refresh-all]]) (refresh-all)) ... and I got a refreshed REPL (newest changes regarding all namespaces). But after implementing the two gen-classes when giving that refresh-all command Cursive REPL complains: namespace 'simpleserver.util.azuregenclass.productgroup' not found after loading '/simpleserver/util/azuregenclass/productgroup' (productgroup being the gen-class) This is a bit of a nuisance since I need to manually load those two namespaces to Cursive REPL and continue experimenting code with REPL. I was wondering if there is some way I can automate this?#2019-12-3121:15cfleming@kari.marttila I’m not sure, sorry - I don’t use gen-class or tools.namespace. It sounds like a tools.namespace thing to me, perhaps #clojure can help?#2019-01-0113:35Kari Marttila@cfleming thanks for quick reply! I tried to ask this in the #beginners but got no reply. I'll try to google and experiment this a bit before asking it in #clojure not to bother the real gurus unless I cannot find the answer myself.#2019-01-0203:01caleb.macdonaldblackIs it possible to show a diagram of references/dependencies among functions and namespaces?#2019-01-0207:01AzzuriteI saw at one point that Cursive had generated a temporary file for a namespace which contained defs through complicated macros... but it did not do it for another which meant it displayed a bunch of undefined reference errors. How can I control for which namespace cursive does that?#2019-01-0212:24gravI get this, when trying to install Cursive:
2019-01-02 13:22:36,552 [  55902]   INFO - Settings.impl.PluginDownloader - Plugin com.cursiveclojure.cursive is incompatible with current installation (since:183.0 until:183.*) 
#2019-01-0212:25gravIDEA 2018.3.1 CE, build 183.4588.61#2019-01-0212:49gravI updated to 183.4886.37, and it solved the issue.#2019-01-0216:08manutter51@caleb.macdonaldblack you might be interested in this: https://github.com/hilverd/lein-ns-dep-graph#2019-01-0217:37dadairIs it possible to run a deps configuration with the new async profiling built into IntelliJ?#2019-01-0217:37dadairI get an error Deferred configurations cannot be run with standard runners#2019-01-0320:52ro6is there guidance on what files under .idea directory should be checked in vs ignored, specifically with regards to what Cursive adds?#2019-01-0321:19sashtonI’ve always ignored the entire .idea directory#2019-01-0321:50guillaumeI was wondering about this too. In our team, we’d like to share the formatting preferences in version control to standardize.#2019-01-0322:03ro6@UE0V21GG7 Same for me. #2019-01-0412:58wilkerluciosince editor is user based I suggest you set this in your .gitignore_global so you only set once for all the projects#2019-01-0413:02wilkerluciois there a way to use .nrepl_port for setting cursive nrepl port configuration?#2019-01-0414:20sgerguriI think it reads that file by default when you create a runtime configuration for a remote REPL.#2019-01-0414:20sgerguriAt least - last time I started a REPL in the terminal, then did the above it automatically hooked up to it from Cursive.#2019-01-0421:26cfleming@wilkerlucio: sgerguri is right, that file is read when the “Use Leiningen REPL port” option is selected for a remote REPL#2019-01-0423:08thosmosI'm curious about socket REPL / unrepl support? Anything in the pipeline? I'm currently using tubular, but it leaves much to be desired. Is this still best for the present?#2019-01-0500:56cfleming@thosmos Well, it’s the best in that it’s the only option, but I have plans to fix that as part of the next large feature change.#2019-01-0502:23wilkerlucio@cfleming @sgerguri, thanks that works! but I like suggest you change that title, having Leiningen there is misleading, in my project its just deps and shadow, I didn't tried because I though that was a lein specific thing#2019-01-0502:23wilkerluciomaybe it could be: Use port from .nrepl_port file#2019-01-0502:23cflemingYeah, good idea - historically only lein did that.#2019-01-0506:26thosmosnot sure what I did, but now my cursive lein repl is failing to run, and the lein project won't refresh, with this in the event log:
22:14	Error reading /Users/thomas/Develop/RiverDB/riverdb-graphql/project.clj
			Cannot run program "clojure" (in directory "/Users/thomas/Develop/RiverDB/riverdb-graphql"): error=2, No such file or directory
			error=2, No such file or directory
I'm wondering if it's because I'm using deps.edn and lein-tools-deps This has been working fine for a while, so I'm not sure what changed. However lein repl runs fine from the terminal, as does the clojure CLI repl.
#2019-01-0507:01thosmosI downgraded to [lein-tools-deps "0.4.1"] and it appears to be working again#2019-01-0507:51cfleming@thosmos That might be something that has changed in lein-tools-deps which interacts badly with the fact that Cursive doesn’t use the project dir as the CWD when invoking lein. I have a bunch of tricks which help, but if someone does something like (File. a b) instead of (jio/file a b) then I can’t hook that.#2019-01-0715:30msshey all, seeing a weird bug in a figwheel repl running in cursive. trying to eval (clojure.string/escape "hello guv'nuh" {\' "\'"}) and getting an error like: clojure.lang.ExceptionInfo: <NO_SOURCE_FILE> [line 1, col 6] Unsupported escape character: \'. {:type :reader-exception, :ex-kind :reader-error, :file "<NO_SOURCE_FILE>", :line 1, :col 6}#2019-01-0715:31msscan’t say whether that’s a figwheel issue or a cursive issue but per someone who was helping out in the beginners chat, he got that statement to eval just fine in cider/emacs#2019-01-0715:31mssany ideas how to further pinpoint my issue?#2019-01-0715:31manutter51I think you want this: (clojure.string/escape "hello guv'nuh" {\' "\\'"}) maybe?#2019-01-0715:34mssthat evals to "hello guv\\'nuh"#2019-01-0715:34msswhich works totally fine?#2019-01-0715:34manutter51:thinking_face:#2019-01-0715:34mssbut looking for a single slash as the string is read further down and that quote needs to be escaped#2019-01-0715:35manutter51Yeah, let me check something, spinning up a figwheel repl now#2019-01-0715:35mssactually wait you might be right#2019-01-0715:37mssyep you are most definitely right#2019-01-0715:37mssreally appreciate the help, glad it wasn’t a deeper issue#2019-01-0715:38manutter51:thumbsup:#2019-01-0718:01royalaid@cfleming Hey, wondering if there is a way to make the static checking happy about things like (.preventDefault e)#2019-01-0718:02royalaidI can wrap it but that is annoying and getting false flags about errors that are really errors makes it hard to trust what cursive is saying#2019-01-0722:04cfleming@royalaid Is that JS interop?#2019-01-0722:09royalaidyeah 😕#2019-01-0722:10cflemingYeah, that just doesn’t work well. I’ve been meaning to dial that warning down forever, sorry - I’ll try to do that for the next release.#2019-01-0722:10royalaidThanks!#2019-01-0722:11royalaidsee also (js/document.execCommand "copy")#2019-01-0807:25steveb8nQ: is there a way to make pprint in the repl output window use colors? Since Aviso supports this, it seems like it might be possible#2019-01-0807:27steveb8nsome background: I am a frequent user of the scope-capture lib which allows me to send forms to the REPL and there I get colors. Sometimes I want to just check a value using pprint and then I lose colors. It would be less keystrokes and easier on the eyes if pprint could do this too#2019-01-0818:53royalaid@steveb8n It's because you're not sending raw values#2019-01-0818:54royalaidinstead your asking the *out* buffer to dump a string#2019-01-0818:54royalaidNot sure if you can directly ship a value to the repl without returning it#2019-01-0822:18steveb8nThanks. I thought as much#2019-01-0821:35Lennart BuitI have a macro that vaguely resembles defrecord, can I somehow tell cursive that it does so that it stops throwing “cannot resolve” erorrs?#2019-01-0821:36Lennart BuitI tried changing it via the light bubble menu thing to defn, but no success and to defrecord but also not happening#2019-01-0821:40Lennart BuitIts “syntax” looks like (defmyrecordish [arg1 arg2 arg3] (fn [x] ... including refs to arg1 arg2 arg3 ...))#2019-01-0821:45Lennart Buitor .. otherwise, can I tell Cursive to give up on trying to find errors in particular codeblocks. Bit of a nuclear solution but eh.#2019-01-0822:24Lennart BuitIt seems that many of the Fulcro macros are correctly interpreted, is there custom code for those?#2019-01-0822:31peter-kehlThank you Colin @cfleming.#2019-01-0823:01cfleming@steveb8n Yes, the problem is that pprint works on the server, and Cursive just sees a bunch of output text. If rather than pprint’ing the result you just evaluate it, then Cursive will pretty-print and colour it for you.#2019-01-0823:02cflemingi.e. instead of (pprint x) you just do x, then the value of x will be the result of the evaluation, and Cursive will do its usual pprint and colorise.#2019-01-0823:18steveb8nunderstood. I didn’t explain clearly. My use-case is that I add a pprint into some fn in the code path and then invoke that path via a test or repl etc. it’s that pprint output that is tough to read#2019-01-0823:19steveb8nbut I understand the difficulty since those pprints are just strings into stdout, not in the result of the eval#2019-01-0823:20steveb8nI’m not wedded to pprint for this. if there was another util that would support colors, I would gladly use that#2019-01-0823:20steveb8nI suppose the question is: how many others would want this, if it was possible#2019-01-0900:59Gavin Sinclair@steveb8n I would want it. But here's how I work around it: I use a function tag> to "tag" a value to stdout. Of course, there's no colour there. But tag> also conjes the value to a global list atom, which means I can pick and choose at the REPL which values I want to inspect in more detail.#2019-01-0901:00steveb8nthat’s a cool workaround. I’ll try it#2019-01-0901:01steveb8nalthough my goal here is too minimise keystrokes and in this case you will have to eval one more form to send the data from the global to the repl right? (I know I’m being pedantic)#2019-01-0901:02steveb8n@UF277CJ5P I tend to use the “scope-capture” lib for this. you should check it out, it’s so good!#2019-01-0901:13Gavin SinclairThanks, I certainly will.#2019-01-0901:14Gavin SinclairRegarding your point above, I type (tv) at the REPL to see the most recent tagged value, rather than sending anything to the REPL.#2019-01-0901:14Gavin SinclairSee here for more: https://gist.github.com/gsinclair/2114f0f5155478e91f01bb155b8f808b#2019-01-0901:58steveb8nthat is pretty sweet. You could even record an IDE macro to invoke the (tv) I suppose. thanks for chiming in 🙂#2019-01-0908:46Gavin SinclairWelcome 🙂 I'm enjoying learning about scope-capture too.#2019-01-0823:05cfleming@lennart.buit There isn’t a good way to do this, no, unless the grammar of the form exactly matches some built-in one that Cursive already understands. Suppressing unresolved errors inside particular forms would work for local bindings but not for any global vars a form creates.#2019-01-0823:06cflemingFulcro has specific support in Cursive, because a lot of people use it, and also it was very easy to add because it looked like om-next, which Cursive already supported.#2019-01-0823:07Lennart BuitAnd its not possible to abuse Fulcro’s support? Because by sheer luck I can make my macro look like the ones from Fulcro :’).#2019-01-0823:08cflemingYes, in that case you can just use Resolve as… (see here: https://cursive-ide.com/userguide/macros.html) to do that. The doc is out of date there, there’s now a Specify… option which will allow you to select the Fulcro macro to resolve as.#2019-01-0823:10Lennart Buithaha, fantastic. Not sure whether (future) coworkers will appreciate that tho, I’ll stick with a less-fancy-more-traditional bunch-of-functions approach for now.#2019-01-0823:11cflemingWell, it’s only likely to be a problem for future coworkers using Cursive, and if you register that customisation with your project they will see that too.#2019-01-0823:13Lennart Buitoh are they stored somewhere in config? May be worth versioning that file then. My companies clojure developers mainly use cursive#2019-01-0823:15cfleming@lennart.buit Yes, go to Settings-&gt;Langs &amp; Frameworks-&gt;Clojure-&gt;Symbol Resolution and set the Scheme to “Project”. Then those customisations will be stored in project files that can be versioned.#2019-01-0823:18Lennart BuitCool, thanks! Given the - I can only assume - challenging Clojure language, you make a great tool.#2019-01-0823:18cflemingThanks for the kind words! Yes, Clojure is indeed challenging.#2019-01-0914:46henryw374@cfleming - I have a lein project depending on figwheel-main (currently 0.2.0 but same problem on earlier versions.) On importing the project, cursive gives an error No dispatch macro for: :: No dispatch macro for: : Cursive has been working with this library fine... I think the problem must have started on a cursive upgrade. I am on 1.8.0-2017.3 any info welcome. thanks#2019-01-0914:54henryw374Going back to 1.7.0 fixes#2019-01-0920:48cfleming@U051B9FU1 Do you get a stacktrace in your log for that?#2019-01-1011:01henryw374Just submitted via cursive#2019-01-0918:00wilkerlucio@cfleming sometimes I have an issue that I can't see the test error diff, when I try to click on the orange exclamation the editor keeps adding/removing break points on that line, but never opens the diff dialog#2019-01-0920:31olfalI had this bug a couple years ago and it turned out to be caused by a conflicting dependency in my profiles.clj#2019-01-0920:31olfalNot sure which one it was, though#2019-01-1012:16timovanderkampI run into this too#2019-01-1012:16timovanderkampDont know how to fix it#2019-01-0918:28pavlosmelissinosNot sure whether it's a bug or a feature but that only happens to me when there are runtime errors, not when tests fail. EDIT: doesn't seem to be the case here though 😕#2019-01-0918:40dmarjenburghI want to pretty format a large edn file that has everything on one line. If I do (Code->Reformat Code) it will put some spaces in, but it stays on one line. Is there a setting to make it reformat with newlines and indentations like IntelliJ does with JSON files? (My current workaround is to copy, paste and eval it in the REPL and then to copy it from the output into the edn file)#2019-01-0921:06grav@dmarjenburgh Not a cursive-specific solution, but you could do it easier from the repl like this:
(spit "myfile.edn" (with-out-str (clojure.pprint/pprint (read-string (slurp "myfile.edn")))))
#2019-01-0921:07manutter51That looks like the sort of thing that would make a good planck/lumo script.#2019-01-0921:09gravYes! Couple it together with specter, and you’ve got jq for edn 🙂#2019-01-0921:28cfleming@dmarjenburgh So there isn’t a solution for that yet, but it’s something a few people have asked for. Your workaround sounds like the best option in the meantime.#2019-01-0921:44kennyIs there a way to stop the REPL from printing without killing the session?#2019-01-0922:25cfleming@kenny No, sorry, although I do plan to add one.#2019-01-0922:26kennyOk. Is there a GH issue I can follow for this? A quick Google search didn't turn up anything.#2019-01-0922:27cflemingI’m actually not sure, one sec#2019-01-0922:29cflemingI just filed: https://github.com/cursive-ide/cursive/issues/2100#2019-01-1000:04caleb.macdonaldblackI'm creating a shebang clj boot script. Is there any way for cursive to at least pick up the clojure.core symbols?#2019-01-1000:07cfleming@caleb.macdonaldblack Is the file inside a source root?#2019-01-1000:08caleb.macdonaldblackno. The root of my project directory.#2019-01-1000:08caleb.macdonaldblackBut it's not a clojure project#2019-01-1000:08caleb.macdonaldblackI'm just using a clojure script in it#2019-01-1000:08cflemingOh, so it doesn’t have the Clojure jar attached?#2019-01-1000:08caleb.macdonaldblackyea no jar#2019-01-1000:08cflemingSorry, no symbols for you 😞#2019-01-1000:08caleb.macdonaldblackokay thanks 😛#2019-01-1020:03olfalIs there a possibility that the behaviour of the “Move Forward/Backward” actions changed recently? I’m referring to the Plug-ins > Cursive > Move Forward shortcut. When moving forward/backward inside a docstring or a comment, for example, I remember it used to move from one word to the other. Now it jumps to the end of the string.#2019-01-1020:05olfalI’m not able to post a GIF, unfortunately 😞#2019-01-1115:37thosmosI'm doing something like (ns my.ns (:require "firebase/auth" :as fb-auth)) using an NPM dep via shadow-cljs and Cursive is marking it as unresolved. Is there any way to provide Cursive with a stub or externs so that it will recognize the various fn names in the namespace?#2019-01-1115:40thosmosI suppose I'm looking for something similar to how it handles java imports.#2019-01-1115:43thosmosThe npm does include externs like
* @namespace
 * @param {!=} app
 *
 * @return {!firebase.auth.Auth}
 */
firebase.auth = function(app) {};

/**
 * Interface that represents the credentials returned by an auth provider.
 * Implementations specify the details about each auth provider's credential
 * requirements.
 *
 * @interface
 */
firebase.auth.AuthCredential = function() {};
It would be amazing if that externs could be analyzed to provide introspection. Is there anything I can do to convert this into some CLJ or CLJS thing that Cursive would understand?
#2019-01-1120:09cfleming@thosmos No, but I do have plans to re-vamp the CLJS support soon which will do this.#2019-01-1121:38mike_ananev@cfleming Hi. In our corporate network we can't install clojure deps cli tools on our windows machines. Is it possible to use clj deps cli tools via Cursive? May be Cursive can understand deps.edn files without installed clj cli tools? We use deps.edn to build project via various plugins. Or Cursive depends on clj deps cli tools?#2019-01-1121:41mike_ananevOur problem: corporate windows policies prohibits using WSL. so, half of our team, with BYOD devices, using clj cli tools, and another half with corporate PCs (Windows OS only) should use leiningen, which is available for Windows and allowed in our network . it is very inconvenient. we are still waiting for the windows version of Clj cli tools.#2019-01-1200:38kennyI have no idea what button I hit but now my project looks like this. Anyone have any idea how to get all the panels back?#2019-01-1200:41kennyRestarting IntelliJ fixed it. Phew 😅#2019-01-1200:45cfleming@mike1452 Yes, you can do this with Cursive. In Settings-&gt;Build, Execution, Deployment-&gt;Build Tools-&gt;Clojure Deps, select the “Use tools.deps directly” option. You’ll have to select the version of tools.deps.alpha to use, generally the most recent is best. You can also configure where Cursive should get the user deps.edn from.#2019-01-1200:50cflemingThe one caveat with doing this is that you’re tied to the system deps.edn bundled with Cursive, but it’s unlikely that will change much.#2019-01-1206:28mike_ananev@cfleming Thanks! Cool.#2019-01-1211:38gravSeems Cursive doesn’t know about this “one cool trick” wrt destructuring:
user=> (defn foo [{:keys [bar]}
                  {baz bar}]
         baz)
#'user/foo
user=> (foo {:bar 'buzz} {'buzz 42})
42
#2019-01-1211:38gravIt shows up in the editor like this:#2019-01-1211:39grav#2019-01-1211:44gravBtw, same with:
(defn foo2 [{:keys [bar baz]
             :or {baz bar}}])
#2019-01-1221:29idiomancyanyone here use an amazon linux workspace by chance? Trying to get the damn jdk installed on it and having a terrible time#2019-01-1221:48idiomancygot it! the answer is corretto#2019-01-1300:54sparkofreason#2019-01-1300:54sparkofreasonWhy? ^^^#2019-01-1301:03sparkofreasonAppears to be related to spec.#2019-01-1306:04cfleming@dave.dixon Which version of Cursive are you on? There’s a bug related to that fixed in the most recent version.#2019-01-1315:08sparkofreasonv1.8.1-eap1-2018.3#2019-01-1315:11sparkofreasonI got it to go away by removing the dependency on spec, and now adding that dep back I can't reproduce.#2019-01-1315:50sparkofreasonNow it's back again. Added a dependency on datascript.#2019-01-1310:38royalaid@cfleming any updates on https://github.com/cursive-ide/cursive/issues/1942 (string requires in CLJS)? Falls in line with my last message(https://clojurians.slack.com/archives/C0744GXCJ/p1546884119089000) of actually being able to leverage the static checking from cursive#2019-01-1323:20cfleming@royalaid Yes, I’ve been planning to fix this “soon” for a while now. It’s a pretty big change, but my current JS parsing is giving me a bunch of pain so I may just try to fix it “even sooner” along with the Node bit.#2019-01-1323:24royalaid👍#2019-01-1323:24royalaidThanks for all the hard work on Cursive regardless#2019-01-1516:48borisQuick question. I recently started a new project on one computer, and was surprised to see an action like "Create a REPL for blabla-project" which quickly set up a REPL run configuration. I just opened Cursive on my main computer and can't find that option. Any idea why that might be? I'm on the latest EAP build#2019-01-1517:03genekimSlightly random question: are people using the IntelliJ Settings Repository feature to sync up their configs across laptops/environments? I love the concept of it, but my keymaps keep getting blown away, about once per week. After 1+ years of tolerating it and/or trying to fix it, I’m about ready to disable it — somehow, when settings are merged, ./_mac/keymap.xml and ./keymaps/gk.xml (my keymap profile) get put into an undesired state, removing most of my keymap customizations. Thanks in advance!#2019-01-1521:51cfleming@boris834 You can get that by right-clicking in the project view on the project.clj or deps.edn (actually anywhere except in a source root)#2019-01-1601:49idiomancyHey, this might be a weird question, but did behavior change within the last couple months with "send form before caret to REPL"?#2019-01-1601:50idiomancybefore I was able to also use it as a kind of "send selection to REPL", where it would send whatever I had selected, or if I had nothing selected, it would send the form before the caret#2019-01-1601:50idiomancyI'm trying to figure out if that's something with my setup that changed or something with cursive#2019-01-1601:54cfleming@genekim I do use the Settings Repo but more for backup than anything - I only work on a single machine. That’s more of an IntelliJ question, but I don’t know the answer sorry. You could browse the issues here and see if anything seems similar, and file one if not: https://youtrack.jetbrains.com/issues?q=%23%7BSettings%20Repository%7D#2019-01-1601:54cfleming@idiomancy That should still work like that.#2019-01-1601:54idiomancyokay, thanks man!#2019-01-1601:55cflemingI just tested it, it seems to work for me.#2019-01-1618:53idiomancyfyi, i found the answer. its a piggieback limitation apparently: https://github.com/nrepl/piggieback/pull/98#2019-01-1615:57jsabeaudryWhat is the equivalent of cider-refresh in cursive? (reload all modified namespaces and namespaces that depend on them)#2019-01-1616:01Ben Hammondtry Tools->REPL->Sync Files In Repl#2019-01-1616:04jsabeaudryThat does not seem to reload other namespaces that depend on the one that was modified.#2019-01-1616:20jsabeaudryLooks like adding a binding to (clojure.tools.namespace.repl/refresh) does it.#2019-01-1616:18genekim@cfleming Thanks! I was wondering whether everyone was using Settings Repository — based on what you said, I’m assuming that people don’t actually want one more external dependency in their environment. 🙂 I’ll be figuring out how to disable it soon. 🙂#2019-01-1618:53idiomancyfyi, i found the answer. its a piggieback limitation apparently: https://github.com/nrepl/piggieback/pull/98#2019-01-1621:04kwladykaDo you know why Intellij constantly remove dev folder from source root? It makes issues all the time with REPL etc.#2019-01-1621:05kwladykaMaybe I should mark this folder in different way?#2019-01-1621:08manutter51Is it inside another marked folder?#2019-01-1621:44kwladykano#2019-01-1621:46manutter51Hrm, I had a similar issue like a year ago that “spontaneously resolved”. Might have been due to a plugin conflict, and I turned off the plugin?#2019-01-1621:46manutter51I have a similar setup to yours now, and it’s working fine.#2019-01-1700:20cfleming@kwladyka You have to configure that to be a source root in your deps.edn. Assuming that you have that as an :extra-paths entry in an alias, you need to tell Cursive to use that alias when syncing. You do that in the Deps toolwindow under “Aliases”#2019-01-1709:33kwladyka@cfleming thank you#2019-01-1713:00manutter51Ah, it’s a deps.edn issue, haven’t played with deps yet.#2019-01-1714:06kwladykait happen again today, but I have dev checked#2019-01-1714:08kwladykaoh today it removed even src#2019-01-1714:09kwladykaI did invalidate caches and I don’t have deps toolbar#2019-01-1714:09kwladykaMaybe I didn’t have it before restart#2019-01-1714:13kwladykaI removed .idea folder and open folder again, it works for now#2019-01-1811:14daniel.spanielI have a ring app which uses mount to refresh stateful components. How do I refresh the server from a running REPL in cursive?#2019-01-1811:37joelsanchez(mount/stop #'server) (mount/start #'server), or just clojure.tools.namespace.repl/refresh if you changed code and it affects the server, because the server will be restarted automatically#2019-01-1811:48daniel.spanielshould i run that command in a REPL running in cusrive/IntelliJ or ? command line ?#2019-01-1811:49daniel.spanieli am super newbie and you can picture a squid flailing in the ocean to describe me apptitude with clojre right now#2019-01-1811:53daniel.spanieli loaded dev.user.clj file into the repl and with that command (mount/start .. ) i got N-> o such namespace: mount, ...#2019-01-1811:54daniel.spanieleven though mount is required and declared in the require section of dev.user#2019-01-1811:57joelsanchezsure, alias it#2019-01-1811:58joelsanchez(require '[mount.core :as mount])#2019-01-1811:58joelsanchezyes, you should run it from the repl#2019-01-1811:58joelsanchezalso you should switch to the namespace where the server is, or refer to it#2019-01-1811:58joelsanchezassuming it is my.app.server, (in-ns 'my.app.server)#2019-01-1811:59joelsanchezand assuming you want to stay in the user ns, (require '[my.app.server :as server]) and then (mount/start #'server/server)#2019-01-1812:00daniel.spanieltrying#2019-01-1812:03daniel.spanielwhat do you mean by my.app.server ? i am aiming to run server locally for development#2019-01-1812:14daniel.spanielthanks for your help though .. i think what your telling me is correct, i am using datomic though so that is my sticking point. if it were not for that library ( not loading ) it would work fine#2019-01-1812:17joelsanchezok so you say you have a server as a stateful component. that component must be in a namespace#2019-01-1812:17joelsanchezthat namespace is what I mean by my.app.server, I don't know which name it has in your app#2019-01-1813:17daniel.spaniel@U5LPUJ7AP thanks again for your help/time .. i think i got it ( i set up a REPL and had to set the alias to -> dev <- so it would be able to find the datomic libraries and i was able to mount/start the server#2019-01-1811:35gphilippHi @cfleming We’ve been doing some work involving tools.depsand we sometimes depend on sub-modules (sub-directories really). I have noticed that Cursive (wrongly) highlights some valid occurrences of symbols. Is there any reason you would mark those as invalid ?#2019-01-1816:21boris@gphilipp while clojure will allow you to use a symbol with multiple slashes in it, those are considered invalid symbols according to the language spec https://clojure.org/reference/reader#_symbols. If you try the same symbol in clojurescript instead, you would get that "Invalid Symbol" exception.#2019-01-1816:25borisAnother place where I've run into issues with clj and cljs parity in the past (seems better now) is allowing keywords to start with a number. Technically the spec forbids it but it seems like both implementations are pretty permissive on that front.#2019-01-1817:47gphilippAh thanks @boris834 #2019-01-1819:30kennyEvery time I hit the refresh button in the Clojure Deps panel, I've noticed all of the tabs switch to show the file name. Then when I click on a tab, it switches to the namespace name (i.e. from foo.clj -> c.c.foo).#2019-01-2103:25WhoNeedszZzIs it a known issue that JS method calls such as (.getElementById js/document "app") reports that .getElementById cannot be resolved? Another one I've noticed is the use of underscores in destructuring.#2019-01-2111:17joelsanchez@cfleming is this known?#2019-01-2111:18joelsanchez(a record using a protocol, and cursive not knowing about the usage)#2019-01-2111:18joelsanchezI can resolve from the record to the protocol but not the inverse#2019-01-2118:29WhoNeedszZzAny Cursive devs around?#2019-01-2122:35cfleming@gphilipp Yes, I’m afraid the answer is “don’t do that” for the reasons that boris points out. It’s a tricky one though, since Clojure doesn’t really have a spec to speak of. The reader page is pretty clear on that issue though. Unfortunately the Clojure reader accepts all kinds of garbage 😞#2019-01-2122:35cfleming@kenny that’s weird - I’ll take a look but it’s unlikely to be something I can fix, that’s probably at the IntelliJ level I think.#2019-01-2122:36cfleming@whoneedszzz Yes, JS resolution doesn’t work very well, mostly because JS. I’m actually in the process of upgrading this somewhat so it’ll soon get better, but I’m also going to reduce the level of that warning since it’s basically impossible to do correctly.#2019-01-2123:37WhoNeedszZzOk that makes sense and not a big deal. I've just been ignoring the warnings, but it does unfortunately cause a ton of false warnings that when trying to eliminate those so I don't miss actual warnings and errors in my commits it is more difficult. So that explains that, but what about the underscores in destructuring?#2019-01-2200:03cflemingCan you give me an example of that?#2019-01-2220:05WhoNeedszZz
(re-frame/reg-event-db
 ::initialize-db
 (fn-traced [_ _]
   db/default-db))
#2019-01-2221:17WhoNeedszZzI tested and the issue is with fn-traced being a macro. If I change it to fn the warning goes away.#2019-01-2222:54cflemingYou can fix that using the Resolve as… functionality, see: https://cursive-ide.com/userguide/macros.html. The screenshots are out of date, there’s now a Specify… option where you can resolve fn-traced as fn.#2019-01-2304:23WhoNeedszZzOk that worked, thanks. Now just have the JS issues#2019-01-2122:37cfleming@joelsanchez Not known to me, no - an issue would be great, thanks.#2019-01-2210:50joelsanchez#2103 created, thanks#2019-01-2212:51Sy Borghi I have some source code examples with a deps.edn file in the root. IJ Idea can't import it. What do I need to do? Convert it to a Leiningen project somehow?#2019-01-2213:07roklenarcicI have a leinigen project that is CLJS, and I have a REPL running figwheel and cljs build#2019-01-2213:07roklenarcicWhen I try to load a cljs namespace in cursive it just says that it doesn't exist#2019-01-2222:51cfleming@sy_borg Which version of Cursive are you using? Deps support was added in the most recent 1.8.0.#2019-01-2222:52cfleming@roklenarcic Can you send a screenshot of the error?#2019-01-2304:37Joel GI’m using cursive to edit some .cljc files, but some of the documentation (press F1 when on symbol) isn’t working properly - I think because it can’t choose between the clojure and clojurescript versions of the function. Is there a recommended workaround for this?#2019-01-2308:45cfleming@joel834 Only nagging me to fix it, sorry 😞#2019-01-2308:57Joel GAha no worries, it’s not a big deal since I can look it up pretty fast in the repl just next to the code. #2019-01-2407:26cfleming@joel834 This looks like the issue, I’ve moved it to look at in the next release: https://github.com/cursive-ide/cursive/issues/1645#2019-01-2311:26Sy Borg@cfleming I'm using v1.8.0-2018.3#2019-01-2311:26Sy Borgit just keeps asking me to refresh tools version#2019-01-2320:12dadairIs it possible to change how cursive does [clojure.test :refer :all] when creating new test namespaces? I’d like to change to [clojure.test :as t]#2019-01-2320:41cfleming@dadair Yes, Settings-&gt;Editor-&gt;File &amp; Code templates-&gt;Clojure Test File#2019-01-2320:47dadairThank you!#2019-01-2412:37joelsanchezman I had no idea about this. amazing#2019-01-2412:38joelsanchezI feel personally attacked by the existence of :refer :all so this is good to know#2019-01-2422:05cflemingHehe - I’m actually in the process of revamping my documentation which will help with things like this (assuming that someone reads it, of course), but it’s slow going as I get distracted on a regular basis.#2019-01-2320:42cfleming@sy_borg Can you send a screenshot of that message? Also, are you on Windows?#2019-01-2320:44Sy Borg@cfleming yes, I'm on Windows#2019-01-2320:45cfleming@sy_borg If you hit OK on that dialog, can you then press Apply?#2019-01-2320:48Sy Borg@cfleming there's no "Apply" - "Previous", "Finish", "Cancel", "Help"#2019-01-2320:49cflemingOh, right, sorry - this is the import dialog, not the Settings one. Finish, in that case.#2019-01-2320:52cfleming@sy_borg ^^^#2019-01-2320:53Sy Borg@cfleming when I press "Finish" that window (Cannot save settings - refresh...) appears again#2019-01-2320:55cfleming@sy_borg Ok, let’s try something different. Instead of trying to import a project (so cancel out of that if you have an import open), then go to Settings-&gt;Build, Execution, Development-&gt;Build Tools-&gt;Clojure Deps. Select “Use tools.deps directly” there, hit Refresh, then Download, and then OK if all that works correctly.#2019-01-2320:57Sy Borgit worked, thanks#2019-01-2320:58cfleming@sy_borg And you can import now?#2019-01-2320:59Sy Borg@cfleming yes, it was imported ok#2019-01-2320:59cflemingGreat! I’ll see if I can reproduce that problem with the import dialog.#2019-01-2321:00Sy Borg@cfleming thanks again. it seems that in my case import dialog settings don't override global settings#2019-01-2321:01Sy Borgglobal settings' tools.deps parameter was set to "none"#2019-01-2321:01cflemingI think what it is is if the import dialog is the one that you open first (which it will be for most users), when the latest version is populated in the combo box it’s not written to the settings. I suspect that manually changing the combo box to a different version and then setting it back to the most recent one would also work, since the settings are updated when the combo box is changed.#2019-01-2321:02cfleming@sy_borg Right, that’s because the value from the combo box wasn’t persisted somehow.#2019-01-2321:02Sy BorgI tried changing versions, it didn't help#2019-01-2321:04cflemingOk.#2019-01-2321:04cflemingThat’s weird then - I’ll see if I can reproduce that.#2019-01-2414:14danmSo, I'm not sure if this is a Cursive issue, or an IntelliJ issue - I have an artifactory repo listed in my project.clj that requires SSL client certificate authentication. Do I need to configure something somewhere to make that work?#2019-01-2414:16danmI'm mostly using boot, so i'm using the plugin which auto-converts build.boot to project.clj, but neither mentions any certificates or similar. I have them specified in MAVEN_OPTSand BOOT_JVM_OPTS on the CLI#2019-01-2414:17danmI'm sure this used to work... but I did recently install leiningen on the CLI too, so I wonder if something there may be interacting badly?#2019-01-2415:21danmOK, getting there slowly. I think I need to set the same parameters as BOOT_JVM_OPTS has as LEIN_JVM_OPTS, but how do I set those so that they're visible to leiningen running from within IntelliJ/Cursive, rather than in my terminal?#2019-01-2416:41WhoNeedszZzIn trying to look for any options like that I couldn't find any, but I noticed you can set the Lein version, but it doesn't have the latest two versions. Why is this? We're up to 2.8.3 and the latest it has is 2.8.1#2019-01-2417:54danielcompton@carr0t you need to set the environment variables that IntelliJ boots with: https://emmanuelbernard.com/blog/2012/05/09/setting-global-variables-intellij/#2019-01-2417:54danielcomptonSee the launchctl example#2019-01-2417:55danielcomptonAssuming you’re on macOS #2019-01-2418:39pserranoMy cursive is bugging hard when using inline css#2019-01-2511:21danmAhha! Thank you @danielcompton#2019-01-2514:28danmBoo, doesn't seem to work. No idea why. Oh well#2019-01-2520:25cfleming@carr0t Which are the env vars you need to set?#2019-01-2520:54danm@cfleming Part of the problem is I’m not actually sure ;) With boot, outside IntelliJ, I have to set MAVEN_OPTS and BOOT_JVM_OPTS to configure my PCKS12 certificate as the keystone, the cert type, and my cert/keystone password#2019-01-2520:55danmI think to get lein working I need to set LEIN_JVM_OPTS with the same params#2019-01-2520:56danmProbably I should verify that works with lein in a bash terminal instead of jumping straight into IntelliJ#2019-01-2520:57danmThe reason I need to set it is the artifactory repo that we use for internal libs uses client certificate authentication for access, and it is mandated that our certs are password protected#2019-01-2521:12cfleming@carr0t Right, I ask because I may be able to set those directly in lein when I invoke it. The issue is that env vars like that are sometimes setup so that you can’t easily see them and the idea is they’re passed in - if I give you a couple of text fields to fill in I’m just wondering if you have the values you’d need to fill them in.#2019-01-2521:55youvereis there a way to list all unused global declaration in a project ?#2019-01-2521:55youvere#2019-01-2521:55youverein other words, unused functions#2019-01-2522:04Lennart BuitAnalyse > Inspect code?#2019-01-2522:05Lennart Buitnot sure whether that works for functions tho#2019-01-2523:46cfleming@youvere Unfortunately, no - the idea would be to use the general inspection, but it doesn’t work for Clojure for some reason and I haven’t got around to investigating why.#2019-01-2523:46cflemingSome will be shown in the editor, but not all.#2019-01-2616:05joshkhcursive is telling me that core clojure functions are not defined in my deps.edn based project. i found a related github project and the suggestion to reimport the project isn't working. 🙂#2019-01-2616:05joshkh#2019-01-2616:11joshkhalso, i can't load namespaces in the repl (command + shift + L):
Loading src/clj/myproject/core.clj... 
Syntax error (FileNotFoundException) compiling at (core.clj:1:1).
Could not locate amazonica/aws/ec2__init.class, amazonica/aws/ec2.clj or amazonica/aws/ec2.cljc on classpath.
#2019-01-2616:40joshkhah! upgrading to the latest stable release did the trick.#2019-01-2617:01joshkhwhoops, spoke too soon. still loads of unresolved functions.#2019-01-2700:26WhoNeedszZzdeps.edn support is still being worked out as it is itself relatively new. I can confirm it works correctly when using Leiningen so if you can use that I'd suggest doing that instead of fighting the tooling.#2019-01-2707:07joshkhthanks for the tip! i love deps.edn too much to avoid it though. 🙂#2019-01-2708:05cflemingdeps.edn support should be stable now.#2019-01-2708:05cflemingI’m not aware of any outstanding serious issues.
#2019-01-2708:06cflemingIt is new though, so there may well be bugs 🙂#2019-01-2720:45WhoNeedszZzOk well that's good to know. @U0GC1C09L What's so special about deps.edn that Leiningen doesn't do?#2019-01-2722:58joshkh@UAFT1B7Q8 i like the ability to point to a git sha as a dependency (say on github) rather than a package tagged with a version number. deps.edn also makes it easier to work on multiple projects at the same time. i don't have to lein install them over and over as i make updates. also, aliases are really powerful. for example, i can launch my project in different ways for testing, or automate my deployments.#2019-01-2723:00joshkhit's fast, lightweight, and with aliases i get the parts i need automate stuff. lein or boot can do that, of course, but in my experience it takes a little more effort.#2019-01-2723:26WhoNeedszZzInteresting. What exactly do you mean about multiple projects at the same time? From what I'm seeing aliases are the same as profiles in Leiningen.#2019-01-2704:09cfleming@joshkh Is that Clojure or CLJS? When you look at File-&gt;Project Structure-&gt;Modules-&gt;[your module] under the Dependencies tab, is Clojure (or CLJS if that’s what you’re using) there as a dependency?#2019-01-2704:09cflemingWhat is the error you get when reimporting?#2019-01-2706:50joshkhso clojure core functions started working again after another reimport, however third party clojurescript functions were still undefined. i think i figured it out though: the cljs libraries are :extra-deps in a clojure alias. moving them to the main :deps key makes intellij happy again.#2019-01-2707:02joshkhand indeed, deps in :extra-deps do not appear in File->Project Structure->Modules->[your module]->Dependencies#2019-01-2708:05cfleming@joshkh Go to the deps toolwindow and open the Aliases tree, check the aliases that those deps are under and then they’ll be used when syncing with Cursive.#2019-01-2708:08joshkhperfect. thanks so much for the help.#2019-01-2708:13joshkhi must have scanned over that toolbar a million times without even noticing it 🙂#2019-01-2708:24joshkhwhile i'm here, another (unrelated) question! sometimes i change my mind about a package name. when i right click say src/clj/package1, select Refactor > Rename, and do the refactor, none of the namespaces are updated -- only the package (folder) name. is that the expected behaviour?#2019-01-2720:02Lennart BuitCan cursive be configured to insert a newline after (:require in ns declarations? Makes sorting requires easier and diffs clearer ^^.#2019-01-2720:46WhoNeedszZzWhat's stopping you from doing this? If you put your first require like that then the rest will follow suit#2019-01-2720:48Lennart BuitTrue, I’d like it to be by default tho#2019-01-2720:07Lennart BuitSo I would prefer this:
(ns my-awesome-ns
  (:require
    [some-lesser-ns]
    [some-other-lesser-ns]))
#2019-01-2811:06leenaHi, IntellijIdea and Cursive users, how do you make Idea to recognise HugSQL functions?#2019-01-2820:46seriogaI declare them in corresponding namespace. #2019-01-2820:49seriogaAlso in latest projects I use custom macro to generate functions from multiple sql files (one file is one function) and resolve this macro as declare.#2019-01-2814:56scarytomI'm using "run tests in current NS in repl" to run my tests, but when I rename a test, it keeps re-running my old test unless I run a remove-ns. Is there a way to have "run tests in current NS in repl" automatically remove-ns before it runs? I think this is probably the least surprising behaviour.#2019-01-2820:46seriogaI declare them in corresponding namespace. #2019-01-2820:49seriogaAlso in latest projects I use custom macro to generate functions from multiple sql files (one file is one function) and resolve this macro as declare.#2019-01-2919:29joshkhcan i use cursive to save and then paste canned code into the repl? for instance, a stub of a datomic query: (d/q '{:find [] :in [$] :where [[]]} db)#2019-01-2919:43manutter51You can do that with Live Templates (in Preferences under the Editor). Not specific to Cursive but it does work in the REPL#2019-01-2919:44cfleming@joshkh To answer your earlier question, sadly the package renaming doesn’t work correctly at the moment.#2019-01-2919:45cfleming@lennart.buit I’d have to double check, but I don’t think Cursive’s current formatting allows that, no. It’s not hard to add though.#2019-01-2920:17Lennart BuitHey, its obviously not very critical, thanks for responding tho!#2019-01-2920:25Lennart BuitIts f.e. recommended here: https://stuartsierra.com/2016/clojure-how-to-ns.html ^^#2019-01-2919:45cfleming@joshkh manutter51 is right, that sounds like a job for live templates.#2019-01-2919:46cflemingYou’ll be able to set variables in the templates to tab between etc.#2019-01-2919:49joshkhthat's okay about the package renaming. one day. 🙂 and thanks @manutter51 for the tip.#2019-01-3001:55astrasheI’m trying to import a shadow-cljs project that uses deps.edn, but I’m getting a “sync failed” message. I’m not sure what’s wrong, or what to do next.#2019-01-3002:03cfleming@astrashe Can you send a screenshot of that error?#2019-01-3002:08astrashe@cfleming Here you go, thanks#2019-01-3002:08astrashe“sync failed” message#2019-01-3002:10astrasheCould you see the file? I got a message from slack that says the workspace doesn’t have any space left#2019-01-3002:10cfleming@astrashe Interesting, I wonder if it’s just taking a long time to sync all the deps. If you do e.g. clj -Spath on the command line and then try again in Cursive, does that help?#2019-01-3002:10cflemingYes, I can - Slack complains, but it does show the files.#2019-01-3002:14astrasheclj -Spath didn’t work. The error comes back immediately — I think I’ve probably got something big misconfigured.#2019-01-3002:16cfleming@astrashe Can you send a screenshot of Settings-&gt;Build, Execution, Deployment-&gt;Build Tools-&gt;Clojure Deps?#2019-01-3002:18astrasheI think I didn’t have a clojure command specified — I put in the path, and it seems to be working#2019-01-3002:18astrashethanks!#2019-01-3002:25cfleming@astrashe Great! Which version of Cursive are you using, BTW?#2019-01-3002:36astrashe@cfleming v1.8.0-2018.3#2019-01-3002:39cfleming@astrashe Ok, thanks - the latest EAP version should have better validation for that case.#2019-01-3002:45astrasheI’ll check it out. Thanks again, it’s incredible that you’re here to help at this time of the night!#2019-01-3003:42cflemingHehe, it’s 4pm here 🙂#2019-01-3007:33gravOn latest EAP I get "Please Refresh to see available tools.deps versions" when trying to import a Module from a deps.edn#2019-01-3007:33gravDoesn't matter if I select "Use CLI tools" or "Use tools.deps directly"#2019-01-3007:34gravI've also tried "Refresh", thereafter "Download", but doesn't seem to make a difference#2019-01-3007:34gravIDEA 2018.3.2#2019-01-3007:53cfleming@grav Can you try configuring that first at Settings-&gt;Build, Execution, Deployment-&gt;Build Tools-&gt;Clojure Deps, then retrying the import? Someone reported something similar the other day.#2019-01-3009:01flowthingIf I make some changes to a source file, then execute the clojure.tools.namespace.repl/refresh function, and then run the "Run tests in current NS in REPL" command, I get an error like this:
Alias handler already exists in namespace foo.handler-test, aliasing foo.handler
I have to do something like (ns-unalias *ns* 'handler) for every namespace required in the test namespace to fix the error. I understand why it happens, but I wonder whether there's an easier way to fix the issue?
#2022-05-3108:27jaimeSorry for necroposting 😅 @cfleming Any idea why this happens and how to resolve it? I'm also getting that issue. BTW, thanks for adding the show diff KB shortcut in tests 🔥#2022-05-3108:31flowthingI avoid tools.namespace.repl these days (and don't use Cursive any more), but a couple of ideas come to mind: • I wonder if adding your test dir into t.n.r. refresh dirs would fix the issue? • If all else fails, you can add a custom Cursive REPL command that does (run! #(ns-unalias *ns* (first %)) (ns-aliases *ns*)), then run the tests again.#2022-05-3109:01jaimeHi @flowthing, thanks a lot for the suggestion, seems like adding the test dir works. Let's see if I'll hit the issue again. 🙏#2019-01-3019:56scarytomSounds similar to the issue I asked about the other day @flowthing https://clojurians.slack.com/archives/C0744GXCJ/p1548687418285100#2019-01-3019:56scarytomAny suggestions @cfleming?#2019-01-3023:15Peter Wilkinsdoes anyone use Cursive with Arcadia? there is a socket and a basic nrepl: https://github.com/arcadia-unity/Arcadia/wiki/REPL#editor-integration I had a punt at connecting with remote repl but got TypeNotFoundException: Unable to find type: cursive.repl.runtime I'm happy to work on this if anyone has any pointers that can help me get started.#2019-01-3100:45tanzoniteblackIs it possible to ask cursive to align the args to condp?#2019-01-3108:25odinodinIs there a way to align map values in a selection without having to globally change the code style setting?#2019-01-3108:33cfleming@flowthing @t.denley Yes, I wonder if Cursive should behave more like tools.namespace and properly blow the namespaces away before reloading them.#2019-01-3110:12scarytomMaybe, although you might not want to blow away a namespace a user has been adding to in the repl. In my specific case, just blowing away all the deftests would be ideal.#2019-01-3110:18flowthingThe deftests and the namespaces required by the test namespace we're running "Run tests in current NS in REPL" in, I suppose. Although don't know whether that's possible.#2019-01-3108:34cfleming@poppetew Not that I’m aware of. Unfortunately it’s hard to support Unity since IntelliJ has no CLR knowledge, and Rider works in a totally different way to IntelliJ so it would be a large rewrite.#2019-01-3108:34cfleming@tanzoniteblack Not at the moment, sorry.#2019-01-3108:35cfleming@odinodin Also no, sorry, although that’s something that several people have asked for.#2019-01-3110:12scarytomMaybe, although you might not want to blow away a namespace a user has been adding to in the repl. In my specific case, just blowing away all the deftests would be ideal.#2019-01-3116:34nblumoeHey, is there any way to get output from a form sent to the REPL pasted to the editor other than manually copying it from the REPL. Ideally having a comment added after the form with the return value / output#2019-01-3117:59bherrmannI use this sometimes to copy from a REPL to the cut/paste buffer... saves 1 step. Useful if you build up a big wiki table and need to move it into the wiki via the browser ....#2019-01-3117:59bherrmann(defn to-clipboard [^String jj] (.setContents (.getSystemClipboard (java.awt.Toolkit/getDefaultToolkit)) (java.awt.datatransfer.StringSelection. jj) nil) )#2019-02-0116:05kennyI'm running into a pretty nasty IntelliJ/Cursive bug. I am editing a deftype when I get an IDE error (I submitted one to Cursive, I think). Then a couple seconds later I get a IDE and Plugin Updates message. A couple seconds after that, I can no longer edit my file or close IntelliJ. I have to log out and log back in to get IntelliJ to quit.#2019-02-0116:06kennyThe deftype looks like this:
(deftype PointTimestampExtractor []
  TimestampExtractor
  (^long extract [_ ^ConsumerRecord record ^long previousTimeStamp]
    (let [{:keys [point]} (.value record)]
      (long (first point)))))
#2019-02-0116:07manutter51Sounds nasty, have you tried File->Invalidate Caches & Restart...?#2019-02-0116:07kennyNo. Not sure how that would help here. It isn't a problem with resolving stuff. I guess I could try it though.#2019-02-0116:08manutter51I'm just thinking it sounds like something is majorly corrupted somewhere, cache clearing might help? 🤞#2019-02-0116:08kennyTrying now 🙂#2019-02-0116:08kennyI think I've had problems with editing deftypes in the past too. None that cause a full editor crash like this though.#2019-02-0116:10Alex Miller (Clojure team)that ^long return type looks wrong#2019-02-0116:11kennyWhere should it go?#2019-02-0116:11Alex Miller (Clojure team)nowhere#2019-02-0116:11Alex Miller (Clojure team)the signature of extract is defined in TimestampExtractor - that’s what you’re going to get#2019-02-0116:11kennyRight, makes sense. Maybe that's causing an issue.#2019-02-0116:12Alex Miller (Clojure team)the type hints in the signature won’t affect the method signature (again, you’ll get whatever extract is defined as) but do help the interop inside the method#2019-02-0116:13Alex Miller (Clojure team)although I guess previousTimeStamp isn’t being used, so not gaining anything there#2019-02-0116:13kennyTBH it's mostly helpful for documentation.#2019-02-0116:14Alex Miller (Clojure team)fair enough#2019-02-0116:17kennyIt just happened again - after Invalidate caches & fixing that type hint. The exception reported says it is #131. This time no IDE crash but editing in and around the deftypes acts very strangely. For example, if I put my cursor at the end of the deftype and hit enter, it will indent to the starting paren here (long.#2019-02-0116:18kennyBackspace doesn't work around the deftypes either.#2019-02-0116:19kennyOpening and closing the file doesn't help. Editing anything above the deftype form but below the form above the deftype and anything below the deftype form but above the form below it causes the strange indent & no backspace issue.#2019-02-0116:21kennyClosing and reopening the project doesn't help. Even restarting the IDE doesn't do it.#2019-02-0118:12joelsanchezis there any refactor for moving vars in cursive?#2019-02-0119:51cfleming@kenny That does sound nasty, sorry - I’ve looked at the error, it’s a StackOverflowError. I can’t immediately see the cause, sorry. The class definition code did change in the latest EAP, downgrading to the latest stable might help until I can look at it?#2019-02-0119:52cflemingSOEs are really nasty, they can cause the JVM to hold onto monitor objects forever and other seemingly impossible things.#2019-02-0119:55cfleming@joelsanchez No sorry, although there should be.#2019-02-0120:21joelsanchezany plans to add it? it could be like this: - move the def to the end of target ns - require the new ns in the namespaces that use the var (if needed), and allow the user to decide if Cursive should use a :refer or an :alias - (possibly) remove requires of the old ns if it's not used anymore#2019-02-0221:54salami've been getting the following exception while working on a simple deps project. this happens whenever i refresh the project in the clojure deps tool window:
2019-02-02 13:38:01,570 [  63736]   WARN - nal.AbstractExternalSystemTask - clojure/java/api/Clojure 
java.lang.NoClassDefFoundError: clojure/java/api/Clojure
	at cursive.deps.ToolsDepsResolver.resolve(ToolsDepsResolver.kt:22)
	at cursive.deps.DepsProjectResolver.resolveProjectInfo(DepsSupport.kt:292)
	at cursive.deps.DepsProjectResolver.resolveProjectInfo(DepsSupport.kt:259)
	at com.intellij.openapi.externalSystem.service.remote.RemoteExternalSystemProjectResolverImpl.lambda$resolveProjectInfo$0(RemoteExternalSystemProjectResolverImpl.java:37)
	at com.intellij.openapi.externalSystem.service.remote.AbstractRemoteExternalSystemService.execute(AbstractRemoteExternalSystemService.java:58)
	at com.intellij.openapi.externalSystem.service.remote.RemoteExternalSystemProjectResolverImpl.resolveProjectInfo(RemoteExternalSystemProjectResolverImpl.java:37)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at com.intellij.openapi.externalSystem.service.RemoteExternalSystemFacadeImpl$1.invoke(RemoteExternalSystemFacadeImpl.java:115)
	at com.sun.proxy.$Proxy3.resolveProjectInfo(Unknown Source)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:357)
	at sun.rmi.transport.Transport$1.run(Transport.java:200)
	at sun.rmi.transport.Transport$1.run(Transport.java:197)
	at java.security.AccessController.doPrivileged(Native Method)
	at sun.rmi.transport.Transport.serviceCall(Transport.java:196)
	at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:573)
	at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:834)
	at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.lambda$run$0(TCPTransport.java:688)
	at java.security.AccessController.doPrivileged(Native Method)
	at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:687)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:748)
a direct consequence, i suspect, of this is that java class imports are reported as unused and related symbols are not being properly resolved. starting repl (via clojure.main option in the run configuration) just hangs intellij idea. any thought?
#2019-02-0306:40cfleming@abdusalam That’s usually because your clojure install isn’t configured correctly. Check that it all looks ok at Settings-&gt;Build, Execution and Deployment-&gt;Build Tools-&gt;Clojure Deps. When it’s properly configured there, try refreshing the project in the Deps toolwindow, hopefully that will fix the issue.#2019-02-0306:40cflemingThere’s better validation for all this in the latest EAP.#2019-02-0316:44salamhmm... the latest eap didn't make any change to the clojure dpes settings page (i took before/after screenshots and there's no difference). NoClassDefFoundError seems to be gone though. starting a repl with options "clojure.main" and "run with deps" still hangs the ide with the following log entry in idea.log:
2019-02-03 08:22:45,416 [ 342079]   INFO -             #cursive.shim.Shim - Bootstrap loader cannot load RT
#2019-02-0316:48salamstarting a repl with options "clojure.main" and "run with intellij classpath" hangs the ide with the following in idea.log:
2019-02-03 08:19:31,785 [ 148448]   WARN - n.process.BaseOSProcessHandler - Process hasn't generated any output for a long time.
If it's a long-running mostly idle daemon process, consider overriding OSProcessHandler#readerOptions with 'BaseOutputReader.Options.forMostlySilentProcess()' to reduce CPU usage.
Command line: /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.191.b13-0.fc29.x86_64/jre/bin/java -Djava.awt.headless=true -Dsun.rmi.transport.connectionTimeout=3600000 -Dexternal.system.id=CLOJURE_DEPS -Dfile.encoding=UTF-8 -classpath /home/finalfantasia/apps/idea-IC-183.3975.18/lib/resources_en.jar:/home/finalfantasia/apps/idea-IC-183.3975.18/lib/java_resources_en.jar:/home/finalfantasia/apps/idea-IC-183.3975.18/lib/trove4j.jar:/home/finalfantasia/apps/idea-IC-183.3975.18/lib/annotations.jar:/home/finalfantasia/apps/idea-IC-183.3975.18/lib/oro-2.0.8.jar:/home/finalfantasia/apps/idea-IC-183.3975.18/lib/jna.jar:/home/finalfantasia/apps/idea-IC-183.3975.18/lib/log4j.jar:/home/finalfantasia/apps/idea-IC-183.3975.18/lib/lz4-1.3.0.jar:/home/finalfantasia/apps/idea-IC-183.3975.18/lib/jdom.jar:/home/finalfantasia/apps/idea-IC-183.3975.18/lib/jna-platform.jar:/home/finalfantasia/apps/idea-IC-183.3975.18/lib/util.jar:/home/finalfantasia/apps/idea-IC-183.3975.18/lib/platform-api.jar:/home/finalfantasia/apps/idea-IC-183.3975.18 ...
 
java.lang.Throwable: Process creation:
	at com.intellij.execution.process.BaseOSProcessHandler.<init>(BaseOSProcessHandler.java:34)
	at com.intellij.execution.process.OSProcessHandler.<init>(OSProcessHandler.java:89)
	at com.intellij.execution.process.OSProcessHandler.<init>(OSProcessHandler.java:44)
	at com.intellij.openapi.externalSystem.service.RemoteExternalSystemCommunicationManager$2.startProcess(RemoteExternalSystemCommunicationManager.java:195)
	at com.intellij.openapi.externalSystem.service.RemoteExternalSystemCommunicationManager$2.execute(RemoteExternalSystemCommunicationManager.java:186)
	at com.intellij.execution.rmi.RemoteProcessSupport.startProcess(RemoteProcessSupport.java:212)
	at com.intellij.execution.rmi.RemoteProcessSupport.acquire(RemoteProcessSupport.java:139)
	at com.intellij.openapi.externalSystem.service.RemoteExternalSystemCommunicationManager.acquire(RemoteExternalSystemCommunicationManager.java:210)
	at com.intellij.openapi.externalSystem.service.ExternalSystemFacadeManager.doCreateFacade(ExternalSystemFacadeManager.java:187)
	at com.intellij.openapi.externalSystem.service.ExternalSystemFacadeManager.doGetFacade(ExternalSystemFacadeManager.java:176)
	at com.intellij.openapi.externalSystem.service.ExternalSystemFacadeManager.doInvoke(ExternalSystemFacadeManager.java:132)
	at com.intellij.openapi.externalSystem.service.ExternalSystemFacadeManager$MyHandler.invoke(ExternalSystemFacadeManager.java:268)
	at com.sun.proxy.$Proxy79.getResolver(Unknown Source)
	at com.intellij.openapi.externalSystem.service.internal.ExternalSystemResolveProjectTask.doExecute(ExternalSystemResolveProjectTask.java:84)
	at com.intellij.openapi.externalSystem.service.internal.AbstractExternalSystemTask.execute(AbstractExternalSystemTask.java:166)
	at com.intellij.openapi.externalSystem.service.internal.AbstractExternalSystemTask.execute(AbstractExternalSystemTask.java:152)
	at com.intellij.openapi.externalSystem.util.ExternalSystemUtil$3.execute(ExternalSystemUtil.java:554)
	at com.intellij.openapi.externalSystem.util.ExternalSystemUtil$4.run(ExternalSystemUtil.java:650)
	at com.intellij.openapi.progress.impl.CoreProgressManager$TaskRunnable.run(CoreProgressManager.java:727)
(log truncated due to character count limit)
#2019-02-0316:49salamthe same with starting a repl with nrepl, with only the following log entry:
2019-02-03 08:38:00,313 [  25371]   INFO -            #cursive.repl.nrepl - Shutting down REPL executor 
#2019-02-0316:50salamvery strange...#2019-02-0316:52salamon the other hand, clj works just fine.#2019-02-0418:00gravIs there some kind of linting that will make sure Parinfer works? Currently, the indentation of team-mates both using Vim and Emacs results in Parinfer getting confused when I load up the code#2019-02-0420:41mseddon@cfleming Does cursive for Windows install a version of clj cli? Trying to isolate a report from #clj-on-windows and it sounds like they think they have an .exe installed, possibly https://github.com/frericksm/clj-windows? It is of course equally possible they installed something else on their path and forgot. #2019-02-0422:18cfleming@mseddon No, it doesn’t. If you want to use deps on Windows with Cursive right now, you use the “Use tools.deps directly” config option which uses tools.deps.alpha as a library and doesn’t use the CLI stuff at all.#2019-02-0422:19cflemingAre they using the “Use CLI tools” option pointing at the .exe?#2019-02-0509:17mseddonNo, the issue they are having is invoking the cli they (mistakenly) believed was installed by cursive from windows 🙂 Thanks#2019-02-0500:17pvillegas12For some reason, when the intellij light bulb icon appears on >defn from [ghostwheel.core :as gw :refer [>defn]]) it does not resolve it to the ghostwheel definition#2019-02-0500:17pvillegas12Does anybody know how cursive / intellj auto detect new libraries in the classpath for this?#2019-02-0500:24cfleming@pvillegas12 What do you mean by “does not resolve it to the ghostwheel definition”? What are you seeing?#2019-02-0500:25pvillegas12#2019-02-0500:25pvillegas12having required [ghostwheel.core :as gw :refer [>defn]])#2019-02-0500:26cflemingHow is >defn defined in ghostwheel.core?#2019-02-0500:26pvillegas12it is a macro which is similar to defn#2019-02-0500:26pvillegas12I want intellij to basically treat it as a defn#2019-02-0500:27cflemingYes, but how is it actually defined - is it defined using defmacro or some other macro?#2019-02-0500:27pvillegas12defmacro yes#2019-02-0500:28pvillegas12I might be lost on how to make intellij load dependencies#2019-02-0500:28pvillegas12(so that it knows how to resolve these with the lightbulb I was referring to)#2019-02-0500:28cflemingOk, one sec, I’ll try to reproduce that.#2019-02-0500:30pvillegas12yes, looks like intellij knows about ghostwheel but cannot recognize the macro >defn (even when requiring it)#2019-02-0500:33cfleming@pvillegas12 Which version of ghostwheel are you using?#2019-02-0500:33pvillegas12gnl/ghostwheel {:mvn/version "0.3.5"}#2019-02-0500:33pvillegas12using deps.edn, how do I trigger cursive to load that into the classpath?#2019-02-0500:36cflemingYou can do that from the deps toolwindow, View-&gt;Tool Windows-&gt;Clojure Deps, then press the refresh button.#2019-02-0500:37pvillegas12hmmm, that does not help with my problem#2019-02-0500:38pvillegas12I’m not seeing https://cursive-ide.com/userguide/macros.html behavior is what I’m guessing#2019-02-0500:38pvillegas12hmm, also getting weird behavior with spec, getting s/cat can be required#2019-02-0500:39cfleming#2019-02-0500:40cflemingCursive can definitely see that macro, so there must be something else going on.#2019-02-0500:41cflemingIf you open File-&gt;Project Structure, then select Modules and select your module, under Dependencies do you see gnl/ghostwheel there?#2019-02-0500:41cfleming@pvillegas12 ^^#2019-02-0500:42pvillegas12got it working @cfleming#2019-02-0500:42pvillegas12thanks for pointing me in the right direction, I forgot the (:require form… facepalm#2019-02-0500:42cflemingOoops 🙂#2019-02-0500:42cflemingThat will do it.#2019-02-0500:43pvillegas12😄#2019-02-0604:53caleb.macdonaldblackCan I eval all files in repl even if some haven't changed?#2019-02-0608:22pedrorgirardiHi @cfleming . I’m starting the REPL using the CLJ tool, but for some reason it’s not setting the clojure.libfile system property. I’m using the JUXT Kick tool and it uses that property to exclude itself from the classpath. (Running clj from the terminal sets the property.)#2019-02-0617:17Lennart BuitDoes connecting visual vm to a (cursive) repl break it? I appear to be unable to load/execute code I sent there#2019-02-0700:41cfleming@caleb.macdonaldblack I assume you mean send them to the REPL, right? Which files would you want to do that for? All open editors, all in the project, or something else?#2019-02-0700:41cfleming@pedrorgirardi I’m not familiar with Kick - how does it set that property?#2019-02-0700:41cflemingIs it set via an alias?#2019-02-0700:42cfleming@lennart.buit I haven’t used VisualVM in a while, but nothing I know of should cause that.#2019-02-0700:42caleb.macdonaldblackall in project. Cascading down based on dependency#2019-02-0700:42caleb.macdonaldblacka -> b -> c : reloading c reloads a & b also#2019-02-0700:43caleb.macdonaldblackIt's not a big deal if this isn't supported. My issue is with using 'def' anyway so it's probably poor design around that#2019-02-0700:43cflemingIn that diagram, a depends on b which depends on c, right? So you’re talking about reloading namespaces that depend on the one you’re loading?#2019-02-0700:43caleb.macdonaldblackyea#2019-02-0700:44cflemingCursive currently doesn’t do that, no, but it would be very useful in some circumstances (things like multimethods, protocol implementations etc).#2019-02-0700:44caleb.macdonaldblackI'm actually using protocols here which is contributing to this issues#2019-02-0700:45caleb.macdonaldblackand pedestal routes need to be reloaded each time#2019-02-0700:46caleb.macdonaldblackSo if i change my protocol, i need to reload the protocol ns, any ns that used that protocol, the routes ns, and finally reload start and stop component to get new instances. That final one is necessary for how protocols work, but it's quite a few steps to go through#2019-02-0700:51cflemingDoes the routes ns depend on the protocol one?#2019-02-0700:52caleb.macdonaldblackyes#2019-02-0700:53cflemingOk, so if reloading a ns also reloaded its dependent ones, then you could create a REPL command for the start/stop component, with sync files as the prior step, and I think you should be able to do the whole thing with a single key.#2019-02-0700:54caleb.macdonaldblackOh wow, I didn't know that existed#2019-02-0700:55cfleminghttps://cursive-ide.com/userguide/repl.html#repl-commands#2019-02-0700:55cflemingThat doc is slightly out of date, but you get the idea.#2019-02-0700:56cflemingThe only thing with that is that it doesn’t currently do the dependent namespace part - that would have to be a more general enhancement to the sync files functionality.#2019-02-0701:02caleb.macdonaldblackWow that repl command functionality is incredibly useful#2019-02-0701:02caleb.macdonaldblackthanks#2019-02-0701:03cflemingNo worries, I hope it helps! If you could file an issue for the dependent namespace loading, I’ll try to take a look at that soon.#2019-02-0701:03caleb.macdonaldblackAlright sounds good#2019-02-0701:40pedrorgirardiHi @cfleming. I think it’s the clj tool that sets that property. I found this http://insideclojure.org/2018/05/04/add-lib/ >System property clojure.libfile - referring to an edn file holding the lib map. clj will set this automatically for you and point to the cached lib map it’s using.#2019-02-0701:43pedrorgirardiIf I run from the terminal: (System/getProperty "clojure.libfile") => ".cpcache/3399073160.libs"#2019-02-0701:44cfleming@pedrorgirardi How is your REPL configured - are you using the “Run with Deps” option?#2019-02-0701:45pedrorgirardiYes, using Run with Deps option.#2019-02-0701:47pedrorgirardihttps://d.pr/free/i/PMhxT4#2019-02-0701:47cflemingOk, one sec - let me check what that’s doing.#2019-02-0701:47pedrorgirardiSure. Thank you!#2019-02-0701:58cfleming@pedrorgirardi Right, so the problem is that Cursive doesn’t use the clojure command to create the classpath when running tasks, and it’s the script itself which sets that system property. However it looks like I can support that by doing the same thing that the script does, more or less.#2019-02-0702:00pedrorgirardiAh, got you.#2019-02-0702:00cflemingIf you could file an issue for that, I’ll try to fix that shortly.#2019-02-0702:00pedrorgirardiYep, will do. Thank you very much @cfleming.#2019-02-0718:29kennyI set a breakpoint in one of my dependencies and I am getting a message that says "No executable code found. " I'm running v1.8.1-eap2-2018.3. The project is a Clojure Deps project and the dep is a git dep.#2019-02-0720:03stijnHi, is it possible to use the REBL interface from a cursive REPL? I can't seem to get it to work with a clojure.main repl#2019-02-0720:26stijnoh, ok, it's explained here https://github.com/cognitect-labs/REBL-distro/wiki/REBL-in-IntelliJ-Cursive#2019-02-0720:26stijnworks! 🙂#2019-02-0720:33stijnhmm, but you cannot send code from a file to the REPL#2019-02-0720:43cfleming@stijn Thanks, I didn’t even know they had that documented!#2019-02-0720:45cfleming@kenny Hmm, that can be flakey sometimes. Can you paste a screenshot of the line the breakpoint is on with the code from that line?#2019-02-0720:46cflemingFeel free to DM me if the code is sensitive#2019-02-0721:04Bo ChenHi, Has anyone had luck launching repls (using leiningen) with lein-shell prep-tasks, and getting the working directory set properly? E.g. This project.clj
(defproject ...
:plugins [[lein-shell "0.5.0"]]
:prep-tasks ^:replace [["shell" "./script/run_some_checks.sh"]
                                          "javac"
                                          "compile"]
ends up trying and failing to launch the shell script from intelliJ's working directory /Applications/IntelliJ IDEA , rather than the project home directory. The rest of the REPL is using the the project home directory correctly. (I'm using OSX)
#2019-02-0721:06Bo ChenI confirmed that (System/getProperty "user.dir") is passed through as /Applications/IntelliJ IDEA to lein-shell. While in a repl launched without that prep-task, (System/getProperty "user.dir") is the project home directory.#2019-02-0722:45kenny@cfleming Here's a screenshot.#2019-02-0722:48kennyWhat is the Local REPL + Run with Deps option suppose to do? If I add an alias in that text box, it doesn't seem to get used in the REPL's CP.#2019-02-0722:54cfleming@kenny Has that namespace been loaded into the REPL?#2019-02-0722:55cflemingOften breakpoints appear like that before the namespace is actually loaded.#2019-02-0722:55cflemingThe aliases in that textbox should definitely affect the classpath, if not that’s a bug for sure.#2019-02-0723:05kennyThis dep had never been downloaded before so that could be related.#2019-02-0723:07kennyEven after downloading the dep via the CLI, it still doesn't appear in the CP. This is the alias {:oz {:extra-deps {metasoarous/oz {:mvn/version "1.5.6"}}}}. I have REPL type nREPL and Run with Deps selected. I pass oz to the Aliases text box. After clicking the Play button, the REPL opens and metasoarous/oz is not on the classpath.#2019-02-0723:09kennyIf I do clj -A:oz then (require '[oz.core]), it works.#2019-02-0723:09cflemingOk, let me try that.#2019-02-0723:10kennyFWIW, this works too clj -Aoz#2019-02-0723:16cflemingWow, that’s a lot of deps#2019-02-0723:16cflemingThat Oz pulls in.#2019-02-0723:16kennyYeah... That's actually why I wanted a separate REPL for Oz 🙂#2019-02-0723:23cflemingThat works for me.#2019-02-0723:23cfleming#2019-02-0723:24kennyOh, shoot - I had the wrong module selected. Is there a way Cursive could have told me the alias I tried using didn't exist?#2019-02-0723:24kennySimilar to the CLI#2019-02-0723:25kenny
clj -A:idontexist
Error building classpath. Specified aliases are undeclared: [:idontexist]
#2019-02-0723:25cflemingSo Cursive actually filters them internally, and I’m trying to remember why.#2019-02-0723:25cflemingI think it was to do with propagation for :local/root deps.#2019-02-0723:25cflemingBut it should warn if the aliases don’t exist in the root project, yes.#2019-02-0723:02kennyYes - it has been loaded.#2019-02-0723:02kenny... through a :require. It's not the ns I am loading.#2019-02-0723:04cflemingStill, that should be enough to make it work. Do any of the previous or subsequent lines work?#2019-02-0723:04kennyEvery line in that namespace does that.#2019-02-0723:27kennyAnother item that has been a bit annoying with the Deps integration is is I have a git dep with a valid sha and then change it to an invalid sha, the auto import won't pop up and tell me that the sha is invalid.#2019-02-0723:28cflemingHmm, I wonder if that’s actually possible to determine. Doesn’t deps itself warn about that?#2019-02-0723:28kennyYes#2019-02-0723:28cflemingBut you don’t see that in Cursive?#2019-02-0723:28kennyI see it if I actually go down to the Build tab and open it.#2019-02-0723:28cflemingOh, I see.#2019-02-0723:28kennyI would've expected it to pop open with an error.#2019-02-0723:28cflemingI’ll try to fix that too.#2019-02-0723:30cfleminghttps://github.com/cursive-ide/cursive/issues/2111#2019-02-0723:31cfleminghttps://github.com/cursive-ide/cursive/issues/2112#2019-02-0801:22cfleming@kenny#2019-02-0801:23kennyNice!#2019-02-0814:10WhoNeedszZz@cfleming Are there changelogs for EAP builds? I saw one just dropped, but can't find a changelog for it#2019-02-0814:13flowthingHere, I think: https://groups.google.com/forum/#!forum/cursive-announce#2019-02-0814:30WhoNeedszZzAh, thanks. Would be nice to link it here when they drop. And apparently the latest one hasn't been added yet.#2019-02-0821:40cflemingYes, 1.8.1-eap2 is the latest#2019-02-0908:19WhoNeedszZzHuh, then why did I only just get the prompt to download it in the past 24 hours?#2019-02-0922:30kwladyka
java.lang.RuntimeException: Could not create shim
	at cursive.shim.ShimProvider.getShim(Shim.kt:131)
	at cursive.shim.ShimProvider.withShim(Shim.kt:98)
	at cursive.repl.runner.LocalConfiguration.createDepsParameters(ReplRunConfigurations.kt:380)
	at cursive.repl.runner.LocalConfiguration$getRunProfileState$2.createDeferredParameters(ReplRunConfigurations.kt:294)
	at cursive.runner.DeferredCommandLineState.cacheDeferredParameters(Deferred.kt:50)
	at cursive.runner.DeferredRunner$execute$1.run(Deferred.kt:86)
	at com.intellij.openapi.progress.impl.CoreProgressManager$TaskRunnable.run(CoreProgressManager.java:727)
	at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$2(CoreProgressManager.java:164)
	at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:582)
	at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:532)
	at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:87)
	at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:151)
	at com.intellij.openapi.progress.impl.CoreProgressManager$4.run(CoreProgressManager.java:403)
	at com.intellij.openapi.application.impl.ApplicationImpl$1.run(ApplicationImpl.java:314)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.NullPointerException
	at org.projectodd.shimdandy.impl.ClojureRuntimeShimImpl.postInvoke(ClojureRuntimeShimImpl.java:49)
	at org.projectodd.shimdandy.impl.ClojureRuntimeShimImpl.init(ClojureRuntimeShimImpl.java:31)
	at org.projectodd.shimdandy.ClojureRuntimeShim.newRuntime(ClojureRuntimeShim.java:26)
	at cursive.shim.ShimBootstrap.invoke(ShimBootstrap.java:26)
	at cursive.shim.Shim$createShimProvider$1.invoke(Shim.kt:63)
	at cursive.shim.Shim$createShimProvider$1.invoke(Shim.kt:22)
	at cursive.shim.ShimProvider$createShim$1.invoke(Shim.kt:138)
	at cursive.shim.ShimProvider$createShim$1.invoke(Shim.kt:80)
	at cursive.application.ApplicationKt$sam$java_lang_Runnable$0.run(Application.kt)
	... 6 more
It start to happen for all my deps.edn project about last week. How to fix it?
#2019-02-0922:44kwladykaoh it looks like restart Intellij solve the issue#2019-02-1008:00Vincent CantinIs there any plan to have a REBL-like view in the IDE to which send some datafiable stuffs?#2019-02-1101:10cfleming@vincent.cantin There is a plan to investigate it, yes. There are some interesting implications, because REBL has the GUI in the actual REPL process, whereas with Cursive the GUI is in an external process (IntelliJ itself). I still don’t know what the full implications of that are, so no promises.#2019-02-1103:22cfleming@kenny I’m testing the git lib missing SHA fix. However I can’t reproduce what you’re seeing - for me, if the SHA is invalid, then when I refresh the project the Build toolwindow pops up with a pretty clear message. Is there some other circumstance when that’s less visible?#2019-02-1115:59kennyYes. When using auto-import, it does not pop open the Build window.#2019-02-1300:56cfleming@kenny I’ve investigated this, and I can’t see a way to fix it. Errors are deliberately suppressed for auto-import refreshes, presumably because errors are common while you’re editing build files. I can’t see a way to modify that behaviour.#2019-02-1300:56cflemingThe best workaround I can suggest is to manually refresh after changing SHAs, which does show the error.#2019-02-1300:58cflemingOr just manually check the Build tab, I guess.#2019-02-1300:59kennyOh right, you wouldn't want to message the user while they are editing it. I hit this case all the time though -- I accidentally copy a SHA from the wrong repo or forgot to push a SHA -- and the results are confusing. Perhaps a better solution would be if you try and start a REPL after the refresh and the build failed, alert the user.#2019-02-1301:06cflemingDoesn’t that already happen when the build fails?#2019-02-1301:06cflemingI guess for most people, starting the REPL doesn’t actually build anything…#2019-02-1301:06kennyNot sure. Lemme check.#2019-02-1301:08kennyNo it does not tell me. This is what I do: 1. Start with a valid git SHA 2. Change the SHA to an invalid one 3. Hit save & wait for the auto import to finish 4. Hit REPL play button 5. No error#2019-02-1301:08cflemingRight. I’m not sure at which point there Cursive could realistically detect and show an error.#2019-02-1301:09kennyEven printing a message in the actual REPL that the classpath is "stale" or does not match the classpath in deps.edn#2019-02-1301:10cflemingBut hold on - when you start the REPL in step 4, do you still get the previous classpath?#2019-02-1301:10kennyYes#2019-02-1301:11cflemingOk, so that is a bug I can definitely fix.#2019-02-1301:11kennyWhat should happen?#2019-02-1301:11cflemingOne sec…#2019-02-1301:11cflemingOnce you’ve updated deps.edn, if you run a REPL from a Run Config that uses that deps.edn it should definitely use the new one.#2019-02-1301:12kennyAnd what should happen if the deps.edn is not valid?#2019-02-1301:13cflemingThat will depend on what deps does, but I think it should show an error.#2019-02-1301:13cflemingOne sec, let me try this with my test project.#2019-02-1301:37cfleming@kenny I can’t reproduce that. Here’s what I’m doing: 1. Create a deps project with a git dep with a valid SHA. Then sync it etc. 2. Running a REPL with this works fine. 3. Modify SHA to be invalid, press save, check in Build toolwindow that message appears. 4. Run REPL again, and I get an error Error creating Run Parameters, and a message in the Run toolwindow about the SHA.#2019-02-1301:37cflemingI just fixed a bug where the message about the SHA in step 4 occasionally wouldn’t be shown, but under normal circumstances it would.#2019-02-1301:39cfleming#2019-02-1301:39kennyI've never seen that message.#2019-02-1301:41cflemingLet me try this with the current published version, in case the version I’m running has something fixed that’s affecting this.#2019-02-1103:27artrmrnoHi, I'm trying to create a deps.edn project and got the error 'Cannot execute: Clojure command not configured'. I installed Clojure using brew on mac and the clojure command is in my PATH. Is there another PATH I have to set up in IntelliJ?#2019-02-1104:59artrmrnoNevermind, I went to the 'Clojure Deps' settings, made a change to use 'toolds.deps' and then back to 'CLI' tools and I didn't get the error anymore.#2019-02-1104:59artrmrnoNevermind, I went to the 'Clojure Deps' settings, made a change to use 'toolds.deps' and then back to 'CLI' tools and I didn't get the error anymore.#2019-02-1119:00Yehonathan SharvitHi there#2019-02-1119:49buttergunsHi - I sent something to the mailing list, but I wonder if this would be a better place for it: is it possible the Organize Imports function will ever work. I would love Cursive to clean up my :requires and :imports#2019-02-1120:19vemvI'm gonna extract the clean-ns op from https://github.com/clojure-emacs/refactor-nrepl for easy, editor-agnostic usage pretty soon. Keep an eye on #announcements ... maybe in a couple weeks?#2019-02-1120:28buttergunsI always wondered why "refactors" were tied to a specific editor, rather than being a framework that any editor could plug into#2019-02-1120:30vemvluckily refactor-nrepl is agnostic. but IIRC it still needs to talk over the nrepl protocol. I want to make it easier - just one fn call away from your repl#2019-02-1121:27rodsenraHi, I wonder if anybody had any trouble with Cursive v1.8.1-eap2-2018.3, tools.deps and Clojure 1.10.0.?#2019-02-1121:27Alex Miller (Clojure team)perhaps you could explain what trouble you’re seeing?#2019-02-1121:28rodsenraSure. Let’me grab the details here#2019-02-1121:33rodsenra
clj -A:main
runs just fine from the shell. (using clojure 1.9.0 in deps) However from Cursive, I do get: Exception in thread “main” java.io.FileNotFoundException: -m red-robin.main (No such file or directory) when using from within Cursive
#2019-02-1121:35rodsenraI do have clojure 1.10 installed via brew#2019-02-1122:06Alex Miller (Clojure team)does your deps.edn :paths match the root of your source?#2019-02-1122:08rodsenraThis is my deps.edn
:main
  {:extra-paths ["src"]
   :main-opts ["-m red-robin.main"]}
#2019-02-1122:09rodsenraSame structure on Cursive#2019-02-1122:10rodsenraCursive debug config#2019-02-1122:11rodsenraI wonder if this is related to have clojure 1.9.0 in tools.deps, but also having clojure 1.10 installed by brew :thinking_face: I even tried to downgrade clojure to 1.9.0 but could not using brew.#2019-02-1122:11Alex Miller (Clojure team)that shouldn’t matter at all#2019-02-1122:12Alex Miller (Clojure team)any brew installation should work with any Clojure version#2019-02-1122:13rodsenraUsing brew, I can only install 1.10. Could not figure out how to install 1.9 after 1.10 was released.#2019-02-1122:14rodsenraMy project currently does not run on 1.10
Call to clojure.core/ns did not conform to spec.
But I will investigate that later.
#2019-02-1122:15rodsenraAfter upgrading to 1.10, Cursive stopped working, that is why I suspected a relation. But I think Cursive also upgraded, so now I am not sure what was the cause.#2019-02-1122:16Alex Miller (Clojure team)you can use something like brew switch clojure 1.9.0.397 to switch to a different (older or newer) version#2019-02-1122:17rodsenraI have tried that, but got
Error: clojure does not have a version "1.9.0.397" in the Cellar.
#2019-02-1122:18rodsenraThe only 1.9.0 that I have was installed by Cursive through maven#2019-02-1122:18Alex Miller (Clojure team)well, it has to be a version you’ve installed in the past - brew info clojure#2019-02-1122:18Alex Miller (Clojure team)I don’t think Cursive does anything with brew. you may be confusing two different things here#2019-02-1122:19Alex Miller (Clojure team)Maven is used to download versions of the clojure jar (the language itself) - those versions are usually like 1.9.0 or 1.10.0#2019-02-1122:19rodsenraI know. What I am saying is that on brew I can only get clojure 1.10
$ brew info clojure
clojure: stable 1.10.0.411
The Clojure Programming Language

/usr/local/Cellar/clojure/1.10.0.411 (9 files, 21.1MB) *
  Built from source on 2019-02-11 at 10:58:02
From: 
==> Dependencies
Required: rlwrap ✔
==> Requirements
Required: java >= 1.8 ✔
==> Analytics
install: 2,988 (30 days), 12,022 (90 days), 41,661 (365 days)
install_on_request: 2,949 (30 days), 11,821 (90 days), 40,716 (365 days)
build_error: 0 (30 days)
#2019-02-1122:19Alex Miller (Clojure team)brew is used to install a version of the clojure and clj tools which have versions like 1.9.0.397 or 1.10.0.411#2019-02-1122:19rodsenraBut in my deps.edn I have org.clojure/clojure {:mvn/version “1.9.0”}#2019-02-1122:20Alex Miller (Clojure team)the tools are the things that let you run clojure or clj at the terminal#2019-02-1122:20rodsenraGot it. I saw the source for the bash scripts.#2019-02-1122:21Alex Miller (Clojure team)many tools (clj, lein, boot, Cursive, etc) may cause the Clojure jar to get downloaded and cached in the Maven repository#2019-02-1122:21Alex Miller (Clojure team)that error you posted before (Call to clojure.core/ns did not conform to spec.) will prevent a namespace from loading, so is likely to be a problem for you#2019-02-1122:22rodsenraThat only happens when I change deps.edn from 1.9.0 to 1.10#2019-02-1122:23rodsenraI will try to go deeper into what Cursive is trying to run, to check out why 1.9.0 is failing.#2019-02-1122:25rodsenraThanks @alexmiller 🙇#2019-02-1122:37rodsenraInteresting. From the shell, both versions below do work
clj -m red-robin.main
clj -A:main
From Intellij, it breaks on:
Clojure 1.9.0
nREPL server started on port 64956 on host 127.0.0.1
Exception in thread "main" java.io.FileNotFoundException: -m red-robin.main (No such file or directory)
	at java.io.FileInputStream.open0(Native Method)
       ...
	at clojure.main.main(main.java:37)
Because it is passing “-m red-robin.main”from deps.edn straight to:
public static void main(String[] args) {
        REQUIRE.invoke(CLOJURE_MAIN);
        MAIN.applyTo(RT.seq(args));
    }
#2019-02-1122:56rodsenraFound a clue. The difference between Intellij and tools.deps from cmd line is:
-javaagent:/Applications/IntelliJ IDEA  IDEA 
Without it, it just works.
#2019-02-1122:59rodsenraThat only means that Cursive is assembling the classpath just right, and invoking
clojure.main -m red-robin.main
as expected
#2019-02-1200:31rodsenraI think a found a workaround.#2019-02-1200:32rodsenraInstead of giving the debug config the alias for the runner (with -m app.main), I just give it the aliases that load all deps, and in the repl inside Cursive I trigger mount by hand with a (start). That works.#2019-02-1203:12cfleming@mattmorten Yes, I definitely want to make that work, and hopefully soon. I’ve been put off implementing it by the fearsome complexity of rewriting CLJC ns forms with reader conditionals.#2019-02-1203:12cflemingAFAIK the existing solutions only work for CLJ, not CLJS or even less CLJC.#2019-02-1203:15cfleming@alexmiller @rodsenra Correct, Cursive doesn’t do anything with brew, except look for clojure where brew installs it by default.#2019-02-1203:21cflemingI’m trying to reproduce this problem now.#2019-02-1203:30cfleming@rodsenra This is a bug - Cursive has a problem in the way it assembles the classpath, it’s actually coming out as <big Java invocation> <flags, classpath etc> clojure.main -i <REPL init file> "-m red-robin.main"#2019-02-1203:31cflemingNote the quotes around the last two args - they’re not being split correctly and are being added as a single string, so IntelliJ duly quotes it when it builds the classpath. So Clojure is trying to look for a file called -m red-robin.main, which it obviously can’t find.#2019-02-1203:31cflemingI’ll fix that for the next release.#2019-02-1204:16cfleming@rodsenra Actually, my apologies, I was incorrect - Cursive is fine 🙂#2019-02-1204:17cflemingThe problem is in your deps file: :main-opts ["-m red-robin.main"] should be :main-opts ["-m" "red-robin.main"]#2019-02-1204:18cflemingI guess it works in the command line because of some accident of how the escaping works when the command line is assembled. IntelliJ is strict about quoting, but I guess clj is not.#2019-02-1205:34Alex Miller (Clojure team)it’s due to how the opts get stored into a file and read back by bash#2019-02-1205:34Alex Miller (Clojure team)which is actually a problem and the thing that causes options with spaces in them to NOT work the way they should#2019-02-1205:35Alex Miller (Clojure team)so working accidentally (and likely to be broken by future changes)#2019-02-1213:07souenzzoFeature idea: intellij-repl-api A lib that you require on REPL, then you can access intellij API's from REPL Example (idea/refactor-rename {:src-token :my/keyword :dest-token}) ;; will open the popup and i will click in "Ro Refactor"#2019-02-1219:27rodsenra@cfleming and @alexmiller thanks a lot for the help. Splitting main-opts did the trick 👏 Sorry for the noise.#2019-02-1220:00cfleming@souenzzo I’m actually planning something like this - I hadn’t considered refactoring, but I was planning things like invoking diff on two data structures etc.#2019-02-1220:04souenzzoI lost some hours today doing refactor in a ton of keywords#2019-02-1315:30grzmIs there a way to connect to a socket repl (`clojure.server.repl`) via Cursive? From what I can tell, Cursive expects remote repls to be nREPL connections. When I start a clojure.server.repl via the clj command line tool, I can connect to it via inf-clojure in Emacs, but I can't via Cursive using the same host/port config. The longer version of the story is I'm trying to help a colleague running Windows to get started with Clojure with Cursive and we need to be able to use tooling around clj (which we're currently doing in WSL).#2019-02-1317:12grzmLooks like one solution might be using https://github.com/mfikes/tubular#2019-02-2220:27jffryYes! What I've done: 1. Add a new profile to ~/.lein/profiles.clj like this {:tubular {:dependencies [[tubular "1.3.0"]]}} 2. In IntelliJ, Run > Edit Configurations 3. [+] button on left > Clojure > Local REPL, and give it a useful name 4. For Which type of REPL pick clojure.main 5. For How to run it pick Leiningen 6. Set Profiles to tubular 7. Set Parameters to -m tubular.core -p 12345 8. OK to save, then fire it up#2019-02-1318:08kennytiltonDummies question here. I am using Cursive to interact with a server app that kicks off a voluminous query every few seconds. My work keeps scrolling away! 🙂 Yesterday (my first time trying) I did some accidentally and the output ceased, but it's back. Is there some way to just open a second repl? Or can anyone guess what I did yesterday? 🙂 Thx!#2019-02-1318:17grzmA couple of things come to mind: sounds like if you're seeing output in the repl due to some async process, what you're seeing is logging output, correct? You could set up separate logging options for your local setup, I believe. There's also a button in the REPL window with a couple of lines with a down arrow which toggles auto scroll. In my window it's between the trash can button and the red "stop" square. You might want to toggle auto scroll off while you're inspecting a particular part of the REPL. I'm a Cursive newbie, too, so there may be more effective ways to handle this, but those are the two that immediately come to this still-ignorant mind.#2019-02-1318:24kennytiltonThx! Yeah, I had some luck with the scroll toggle. Anyway, not sure what I did, but after kicking off the server I saw I had a second REPL tab that was nice and quiet. Hopefully that is how it always works! Thx again.#2019-02-1318:25grzmOh, and yeah, you can just add a new REPL as you already figured out. 😉 I personally sometimes get which repl is which in those situations, but that's a different issue.#2019-02-1318:40jsabeaudryAnyone could figure out why tpope/lein-dotenv does not work in cursive?#2019-02-1318:50gfrederickshas anything big happened with cursive and custom macros over the last year or so? like support for breakpoints or formatting or other things like that#2019-02-1320:02hmaurerOops, wrong channel :face_with_rolling_eyes: I deleted the above#2019-02-1322:02cfleming@grzm Yes, tubular is the best workaround for now, but I’m planning to add native support soon.#2019-02-1323:40grzmThanks for the confirmation!#2019-02-1322:04cfleming@jsabeaudry781 I haven’t tried it - what is the problem?#2019-02-1322:05cfleming@gfredericks One thing that has happened in recent versions is that you can now use breakpoints inside methods of deftype-alikes, which didn’t work previously.#2019-02-1322:05cflemingDo you have something specific you’d like fixed?#2019-02-1322:05cflemingMacro support is getting incrementally better over time, but is still not totally general.#2019-02-1322:06jsabeaudryThe plugin is loaded but that plugins sets environment variables but they aren’t in the process afterwards#2019-02-1322:07jsabeaudryIf we do lein repl it is fine#2019-02-1322:08cflemingHmm, that might be because Cursive uses a different method of starting the final process. Could you file an issue for that and I’ll look at it?#2019-02-1322:08jsabeaudryA colleague of mine will file it in a few minutes#2019-02-1322:08jsabeaudryThanks a lot!#2019-02-1322:57gfredericks@cfleming the most recent thing was a coworker observing that breakpoints don't work inside schema.core/defn but later somebody pointed out it's not hard to downgrade it to clojure.core/defn while debugging#2019-02-1401:50cfleming@gfredericks So I haven’t tried it, but I’m not aware of any reason that shouldn’t work.#2019-02-1401:50gfredericksI suspect it's just a regular ole' defn-wrapping-macro#2019-02-1401:50cflemingDebugging Clojure is weird sometimes though, and occasionally fails for unknown reasons.#2019-02-1401:50cflemingRight, that shouldn’t cause any problems.#2019-02-1401:50gfredericksokay, well maybe I'll get more info on the morrow#2019-02-1401:51cflemingDefinitely. If they’re sure that doesn’t work properly I can test it too.#2019-02-1419:47gfredericks@cfleming on closer inspection it was a false alarm; works as expected#2019-02-1420:44cflemingPhew!#2019-02-1421:49grzmNext Cursive + deps + WSL hurdle: how do we open a Clojure deps project in IntelliJ without a path to clj? Or rather, how do we let Cursive know clj is in the WSL environment?#2019-02-1421:50cfleming@grzm You can’t. IntelliJ operates in Windows-land, which can’t access WSL in a useful way.#2019-02-1421:51grzmSo, are we stuck? I'm really hoping there's some way to get around this.#2019-02-1421:51cflemingThe best way to set deps and Cursive up on Windows is to use the “Use tools.deps directly” option, which doesn’t require the command line tools.#2019-02-1421:51cfleming(in Settings-&gt;Build, Execution, Development-&gt;Build Tools-&gt;Clojure Deps)#2019-02-1421:52grzmCheers. Giving that a shot right now.#2019-02-1421:53cflemingYou will have to specify the version of tools.deps.alpha you want to use, usually the latest version.#2019-02-1421:54cfleming@grzm There’s a bit of doc about how to use this here: https://groups.google.com/d/topic/cursive/V7BEEUuGLxM/discussion#2019-02-1421:55cfleming> On systems which support the CLI tools (e.g. Mac & Linux) Cursive will use those by default. On Windows, which doesn’t have CLI tools as of the time of this writing, you can choose instead to use the tools.deps library directly. This has some caveats, in particular the system deps.edn is bundled with Cursive, so it will always use the current version as of the time of this writing. There is some consideration being given to bundling that into the tools.deps jar rather than installing it via the CLI tools, if that happens this limitation will go away. > The configuration of this is currently a little clunky. You can configure it either at Settings->Build, Execution, Deployment->Build Tools->Clojure Deps or in the global settings section when setting up a new project. Select “Use tools.deps directly”, then press the “Refresh” button to get the list of available versions. Select the version you want to use (by default the latest is selected) and then press “Download” to fetch the artifacts from Maven. If required, you can also customise the path to your user deps.edn file if you want to do so. > Note that this doesn’t require or use WSL at all, and in fact it can’t - IntelliJ lives entirely in Windows land and can only read files from WSL. If you’ve been using deps under WSL you’ll probably have to copy your user deps.edn somewhere accessible, or point Cursive to it as described above. Any feedback about how well all this works is very welcome.#2019-02-1421:56cflemingI think the best option is to have your user deps.edn in Windows so you can point Cursive to it, and then tell the WSL install to use that one using (IIRC) CLJ_CONFIG.#2019-02-1421:56cflemingThat way you can use the command line tools in WSL, and Cursive will work too.#2019-02-1421:56grzmCool. Thanks. We clicked "Refresh" and see the latest tools.deps version is 0.6.488, and we're still seeing "Press Refresh to see available tools.deps versions" when we click "OK"#2019-02-1421:57cflemingHmm#2019-02-1421:57cflemingIf you change the value in the combo box and then change it back, does that help?#2019-02-1421:58Alex Miller (Clojure team)that version came out yesterday btw#2019-02-1421:58cflemingYeah, Cursive reads the versions from Maven#2019-02-1421:59grzmChanging the value in the combo box to any value (including back to the 0.6.448) gives the same "Press Refresh" response.#2019-02-1422:00cflemingCan you send a screenshot of that?#2019-02-1422:01grzmWhere would you like it? In the channel or elsewhere?#2019-02-1422:01cflemingIn the channel is fine#2019-02-1422:01cflemingUnless it has sensitive stuff in the background, in which case by DM or email is fine too.#2019-02-1422:02Ryan ScottI'm the one @grzm is trying to help with this. Here is a screen shot.#2019-02-1422:04cflemingThat’s very strange. Does pressing Refresh again help with that?#2019-02-1422:04Ryan ScottIt doesn't#2019-02-1422:06cflemingSeriously, who would have a stateful UI?#2019-02-1422:06cflemingOne sec…#2019-02-1422:16cflemingSorry, I can’t see why that isn’t working. I’ll keep investigating.#2019-02-1422:20grzmCheers. We're kind of stuck here. @ryan.t.scott73 is new to Clojure and I don't have access to a Windows machine. If I were more familiar with Windows and had access to a machine, I'd be all over the #clj-on-windows channel helping that effort move forward.#2019-02-1422:21cflemingOohhh#2019-02-1422:21cflemingWait a minute#2019-02-1422:21cflemingThat dialog is when you’re importing a project, not from the preference page.#2019-02-1422:21grzmYup.#2019-02-1422:22cfleming@ryan.t.scott73 Can you go to Settings-&gt;Build, Execution, Deployment-&gt;Build Tools-&gt;Clojure Deps and try it there?#2019-02-1422:22cflemingThen if you can set it up there, once that’s done the import will work.#2019-02-1422:23cflemingI’ve just seen that IntelliJ calls the validation step at extra points when importing.#2019-02-1422:23Ryan ScottThat worked. Thanks!#2019-02-1422:24cflemingGreat, I’ll fix that for the next drop.#2019-02-1422:24grzm👍 Thanks, @cfleming!#2019-02-1422:24cflemingNo worries!#2019-02-1422:39grzm@ryan.t.scott73 and I now have a REPL in Cursive on Windows! 🙂#2019-02-1500:32cflemingNice 🙂#2019-02-1507:43cfleming@grzm @ryan.t.scott73 https://github.com/cursive-ide/cursive/issues/2117#2019-02-1513:07helioshey guys, quick question. I have a mlet macro that behaves like let but i cannot find a way to force the symbol resolution as let. How do i do it?#2019-02-1514:47hmaurercan you show the code of the macro?#2019-02-1514:47hmaurer(and did you write it?)#2019-02-1517:12Lennart Buitif you stand on where you are using it with your cursor, a light bulp should pop up#2019-02-1517:12Lennart Buityou can use that to resolve it as let#2019-02-1517:13Lennart Buithttps://cursive-ide.com/userguide/macros.html#2019-02-1518:51heliosI did not write it. The code is from promenade: https://github.com/kumarshantanu/promenade/blob/master/src/promenade/core.cljc#L274#2019-02-1518:51heliosand the lightbulb does not show up, or it only does about indentation...#2019-02-1518:58hmaurer@U0AD3JSHL are you on Cursive?#2019-02-1519:07hmaurerif so, press Alt+Enter and go in the “resolve as…” submenu#2019-02-1612:00helios@U5ZAJ15P0 yeah on cursive. And it won't open the resolve as submenu: https://puu.sh/CN3dC/7337c553c2.png#2019-02-1612:00heliosthis is after pressing Alt+Enter#2019-02-1614:21hmaurer@U0AD3JSHL hum, weird… I am not sure then, sorry 😞#2019-02-1618:07wilkerlucio@U0AD3JSHL sometimes I see that bugged when trying to define from cljc files, your test case is a cljc file?#2019-02-1621:04helios@U066U8JQJ nope, clj file#2019-02-1802:42cfleming@U0AD3JSHL Sorry for the delay, that’s very strange. I’ll try to look at that tomorrow.#2019-02-1807:55heliosthanks @U0567Q30W 🙂#2019-02-1910:04heliosAfter talking with cfleming, it turned out i had disabled intentions for Clojure, found in: Settings->Editor->Intentions->Clojure->Resolution#2019-02-1619:54hmaurerHigh! Quick question: how do you configure indentation on Cursive to get something like:
(div :.some-class
  "content")
and not
(div :.some-class
     "content")
?
#2019-02-1620:07Lennart BuitI think configuring it as having the same indentation as a def will do#2019-02-1620:08Lennart BuitI remember doing that for s/fdef#2019-02-1620:14hmaurer@lennart.buit how do you do that though? I could mark it as “resolve as def” but that would imply additional behaviour, not just indent#2019-02-1620:15hmaurerI want just the indentation#2019-02-1620:15Lennart BuitSame pop up, but I think configure indentation instead#2019-02-1620:15hmaurerhmm I looked at that; it lets me enter a number#2019-02-1620:15hmaurerbut there doesn’t seem to be anything about “don’t align stuff on new lines with parameters on same line as form”#2019-02-1620:16Lennart BuitOh right, hmm. Maybe I am mistaken #2019-02-1620:16Lennart BuitAh, here: https://cursive-ide.com/userguide/formatting.html#2019-02-1620:17Lennart BuitExactly what we are looking for ^^#2019-02-1620:48hmaurer@lennart.buit aaah fantastic; thank you! 🙂#2019-02-1700:14Joshua JolleyNoob question for y'all. I recently got figwheel working on a chromex project in Cursive cheer It taught me a fair bit about how the project.clj works. But now I've got a new issue. Does anyone know how to get the output to the repl colorized? When I eval a defn, it shows up in full color in the repl, but when I look at my state object, the text is all grey. fn: https://imgur.com/a/ybvRNce state: https://imgur.com/a/qE8sLPR Any advice would be greatly appreciated. Bonus points if we can get it to pretty print!#2019-02-1700:35rdsrI'm unable to setup remote REPL with cursive . This is what I'm doing... I'm making an ssh tunnel from my local machine to a remote server. The server has the nrepl server running. I'm able to connect to the local port using clj --
clj -Sdeps '{:deps {nrepl {:mvn/version "0.6.0"}}}' -m nrepl.cmdline --connect --host localhost --port 63999
but not using cursive remote REPL. I'm getting connection refused exception.
#2019-02-1719:35joshkhcursive's repl works like a charm when i fire up a clojure project using a deps.edn alias. i can load namespaces without a problem using command + shift + L. however, it seems to choke when working in a clojurescript / figwheel repl. any clues what i'm doing wrong? i often get errors like:#2019-02-1719:35joshkh#2019-02-1719:37joshkhconfiguration is as follows:#2019-02-1719:38joshkh#2019-02-1802:43cfleming@hmaurer When configuring the indentation, there’s an “Only Indent” option.#2019-02-1803:20cfleming@josh200 Are you using a clojure.main REPL for that? If so, colourisation and pretty printing unfortunately doesn’t work there, due to the way streaming REPLs work. I’m hoping to fix that soon as part of some REPL upgrades though.#2019-02-1803:20Joshua Jolley@cfleming I am! Thank you for the info 🙂#2019-02-1803:20cfleming@rdsr I can’t think of anything that should cause that to happen.#2019-02-1821:43rdsrHmm that's weird. I'm getting a connection refused exception. Is there a way I can see the log/stacktraces before the REPL is up?#2019-02-1803:21cfleming@joshkh Any idea what the trace.cljc file might be? Is that one of yours?#2019-02-1816:56joshkhhi @cfleming. trace.cljc is in re-frame, a dependency of the project. https://github.com/Day8/re-frame/blob/master/src/re_frame/trace.cljc#L5 sure enough it's requiring itself (i think to pull in cljs macros?).#2019-02-1819:28cfleming@joshkh I’ll check that, but lots of people use re-frame, I’d be surprised if that didn’t work.#2019-02-1803:30potetm@cfleming wait you’re supporting streaming repls soon? does that mean socket server support?#2019-02-1803:30potetm*built-in socket server#2019-02-1807:38cfleming@potetm Yes! The issue is how to make them a bit more full-featured - pure streaming REPLs are hard to do some useful things with, such as the pretty-printing and colorisation that Joshua wanted#2019-02-1807:38cflemingSo I’m planning to do a simple prepl/unrepl-type thing.#2019-02-1814:43potetmYeah, that makes sense.#2019-02-1817:44p-himikI'm trying to create a "Clojure Application" run configuration but whenever I specify some alias under "Run with Deps", it gives me the "java.lang.Character cannot be cast to java.lang.String" error. Cursive v1.8.1-eap2-2018.3#2019-02-2219:31scottsI get that same error when running a Clojure Application with Deps. Did you find any workaround?#2019-02-2219:32p-himikWell, to some degree. I just use the Terminal tab and connect to the process using remote debugger.#2019-02-2219:38scottsyeah figured that was the backup plan. thanks#2019-02-1817:44p-himikIs there any way to circumvent this?#2019-02-1900:13cfleming@p-himik Can you send a screenshot of that error, and your run config?#2019-02-1906:34Yehonathan SharvitIn one of my projects I am using a custom macro for defining functions, it’s called deftry. How can I let cursive know about this way of defining functions?#2019-02-1907:30p-himik#2019-02-1907:31p-himik@cfleming#2019-02-1907:32p-himikSlack keeps telling me "your workspace doesn’t have any storage space left". Let me know if you can see the images. If not, I'll create a GitHub issue.#2019-02-1909:19cfleming@p-himik Yes, I can see them, thanks - Slack moans, but it does show them.#2019-02-1909:19cflemingThanks for that, I’ll try to repro tomorrow.#2019-02-1910:48Yehonathan Sharvit@cfleming In one of my projects I am using a custom macro for defining functions, it’s called deftry. How can I let cursive know about this way of defining functions?#2019-02-1912:58heliosDoes it complain now that it cannot find the symbol?#2019-02-1912:59heliosIn any case, if you hover over a deftry you should see a lightbulb, if you click on it you should see Resolve xxx as and if you click on it you can make it resolve as defn so it will expect the same pattern you find on defn#2019-02-1913:02Yehonathan SharvitAwesome!#2019-02-1913:02Yehonathan SharvitThat works#2019-02-1915:00heliosbananadance#2019-02-1915:26Yehonathan Sharvitaw_yeah#2019-02-1915:21Rachel WestmacottWe’ve just had our REPLs unable to start because we updated to the latest cider/piggieback - which appears to be incompatible with Leiningen 2.8.1. Alas that’s the latest Leiningen version available to me in Cursive…#2019-02-1921:47scarytomFrom https://github.com/nrepl/piggieback/releases/tag/0.4.0 > (Breaking) Dropped support for clojure.tools.nrepl. [nrepl "0.4.0"] is now the minimum required version. Is there any way to configure our way around this in the IDE settings @cfleming or do we have to wait for a cursive update that supports newer lein versions?#2019-02-1923:08cflemingUgh, sorry guys, I’ll try to get that out this afternoon.#2019-02-1923:08cflemingI don’t think there’s a workaround, sorry.#2019-02-2000:17cfleming@U0FR9C8RZ @UCQV87CN7 https://github.com/cursive-ide/cursive/issues/2120#2019-02-2008:36scarytomThat's great. Thanks#2019-02-2008:45cflemingThis was released today as 1.8.1-eap3#2019-02-2008:46cflemingIt hasn’t had the degree of testing I would like (the lein integration has resisted my efforts to have automated acceptance tests) so bug reports are very welcome.#2019-02-2009:07scarytomok, noted. Presumably I have to download and install this update manually as it is an eap?#2019-02-2502:17cfleming@UCQV87CN7 Sorry, I missed this - yes, instructions are at https://cursive-ide.com/userguide/index.html#eap#2019-02-2512:51scarytomIt's ok thanks, I worked it out. I've been using it for a week, and no probs yet.#2019-02-1915:33souenzzoTrying to open a deps.edn project: Error resolving /home/souenzzo/src/eu-quero: null#2019-02-1915:35souenzzohttps://gist.github.com/souenzzo/154729ce127bd544c7fbfee4874b29e8#2019-02-1918:30mishadoes cursive have a support for clojurescript node-deps :require?#2019-02-1923:35cfleming@misha No, sadly 😞#2019-02-1923:35cflemingBut it should do.#2019-02-2115:22kennytiltonSo on my Mac OS X it seems Java got lost overnight so I have had a number of issues, including having to do a lein clean for no discernible reason to get a project to lein repl. Now in IntelliJ the Tools menu is not showing the Cursive tools (forget the label!). I tried Invalidate caches/restart with no luck. I tried a different Clojure project and it is not there either. Is there some other trick (IntelliJ setting) I can use to get Cursive to get involved again? Thx!#2019-02-2115:23p-himikWhat happens if you reinstall the plugin?#2019-02-2115:24kennytiltonhaha, that was on my mind. I'll give it a shot. Thx!#2019-02-2115:32kennytiltonNo luck. 😞#2019-02-2115:34p-himikHmm. What kind of tools did you have there in the first place? I don't see anything Clojure-related in my Tools menu.#2019-02-2115:36kennytiltonAha. The Cursive REPL menu item does not appear until I start a REPL in the IDE.#2019-02-2115:37p-himikI guess the mystery is solved then. 🙂#2019-02-2115:49kennytiltonYeah, it's a classic. The crap all morning had me off my stride so I was trying to run a test before starting the REPL. The real problem being that the Mac figured out HIG in 1984 (dim the menu item, do not pretend it does not exist) and we have been losing ground ever since. 🙂 Thx for jumping in!#2019-02-2117:29kennySometimes when opening the REPL history, I get an item that looks like this. It causes the history to be laggy when opening. The item that appears to cause the issue is a fairly large map.#2019-02-2118:57tony.kayAre other ppl having trouble with Maven Remote Repos disappearing in settings? It happens periodically but I don’t know why. I’ll go to deps.edn to fix a version, and command completion will tell me it can’t find any versions, then I go to maven remote repos and nothing. Sometimes restarting intellij fixes it, but even that is erratic.#2019-02-2118:57tony.kayNOTE: I do have custom repos (e.g. my.datomic) which won’t resolve (resolve with an error due to creds in intellij)…that normally is ok, it just doesn’t index them, but perhaps that is the issue#2019-02-2217:35mdhaneyThe latest EAP build seems to have broken something with piggyback on my project. How do I roll back to the previous version?#2019-02-2217:40mdhaneyNevermind - found the instructions in the userguide#2019-02-2221:40cfleming@mdhaney The latest version allows later versions of lein, and if you haven’t selected one manually it will usually default to the latest lein version. Recent lein versions have upgraded to the new nrepl, that was probably the issue. Could you try using the latest Cursive and manually selecting lein 2.8.1 under Preferences | Build, Execution, Deployment | Build Tools | Leiningen | Project Settings?#2019-02-2221:41cfleming2.8.1 was the latest version used by the previous version of Cursive.#2019-02-2309:14cfleming@kenny Is that form something you entered in the REPL editor?#2019-02-2517:36kennyYes - via copy & paste.#2019-02-2309:18cflemingThe next time that happens (or if you have one in your history currently) can you send me your .idea/workspace.xml file to <mailto:/cdn-cgi/l/email-protection|/cdn-cgi/l/email-protection>?#2019-02-2517:36kennyWill do.#2019-02-2309:20cfleming@tony.kay No-one else has reported that. That’s actually at the IntelliJ level, you could try searching the IntelliJ forums?#2019-02-2320:30mdhaney@cfleming That fixed it and it's working again with the latest version of Cursive. Thanks!#2019-02-2407:56cfleming@mdhaney Great! When you upgrade Piggieback, you’ll need to set the lein version again - allowing more recent lein versions was actually provoked by that, since new Piggieback versions need the new nrepl which is in (IIRC) lein 2.8.3+.#2019-02-2517:12p-himikIs there any way to have preloads in Cursive REPL? E.g. I would like to always have (require 'dev) (in-ns 'dev) being executed when a particular REPL starts.#2019-02-2616:55Rachel WestmacottIIRC REPLs usually start in the user namespace, but there’s an option to specify which namespace you want loaded#2019-02-2616:57p-himikYeah, I think that maybe I'm using that feature wrong because it says that dev ns does not exist. I'll try to just load dev in user, thanks.#2019-02-2616:57Rachel Westmacottthe default namespace file must be on the path#2019-02-2616:58Rachel Westmacott(java classpath)#2019-02-2616:58p-himikWell, if I'm able to require it, it is on the classpath, isn't it?#2019-02-2616:58Rachel Westmacotter, yes#2019-02-2616:59Rachel Westmacottare you using lein?#2019-02-2617:00p-himikNope, deps.edn with profiles.#2019-02-2518:13daniel.spanielhas anyone figured out how to rename a file.clj to file.cljc with intellij rename ?? intellij does not show file extension when renaming so I have been stumped on this one for a while. Rubymine does show the file extension, so maybe with java based lang they don't bother to show it?#2019-02-2518:14p-himikFile -> Convert to#2019-02-2518:14p-himikWith the current file being either clj or cljs.#2019-02-2518:15daniel.spanieloh .. trying#2019-02-2518:16daniel.spanielman, that was easy .. thanks 🙂#2019-02-2518:17p-himikNo problem.#2019-02-2518:44gravdaym! 😄#2019-02-2518:28daniel.spanielfun question #2 >> lets say i am running shadow-cljs server on the command line, the i go to cursive and start a remote repl on port 9000 and i start that sucker. then i go to the repl, load a file that i want to tests ( blah.cljs ) and that kinda works. but how can I run the tests in that file ( like i can with clojure repl ) if i try and run the test ( cursive command to run all tests in file ) i get >>> No application has connected to the REPL server. Make sure your JS environment has loaded your compiled ClojureScript code. <<<#2019-02-2620:33genekimNewbie question: when you’re doing “REPL-driven development”, typing forms into a .clj file, sending them to the REPL, where do you store all these scratch / demo .clj files? On the one hand, I don’t want them to be under ./src, because all the def forms I often use are evaluated when I do lein run. I’d like to keep all the demo / scratch code separated from the “real code.” (Code that I knows works.) On the other hand, I think Cursive needs them to be under ./src in order to be sent to REPL. (Is this true?) Where do y’all store these types of scratch files? (I heard that people use the “user” namespace? But can you store these under ./src, too?) Thank you for indulging my basic question!#2019-02-2620:36manutter51You can create IntelliJ scratch files (Ctrl-Shift-N on a Mac) and cursive will send them to the repl correctly#2019-02-2620:36Alex Miller (Clojure team)some people use a "siderail" directory for stuff like that#2019-02-2620:36Alex Miller (Clojure team)I don't honestly know the origin of that as a word for this use#2019-02-2620:37manutter51At the bottom of your Projects sidebar, there’s a section called Scratches and Consoles, containing a folder called Scratches, where all the scratch files live.#2019-02-2620:37manutter51(which I didn’t know for a long time, and I had a ton of files there when I figured it out--apparently they’re IntelliJ-specific, not project specific, so I had them from every project I ever worked on.)#2019-02-2620:38genekimWhoa @alexmiller @manutter51. 🤯🤯🤯🤯 Wow. THANK YOU!!! Can’t wait to try it out!!!#2019-02-2620:41manutter51Our group also has a convention of adding a personal directory to a project, and each dev creates their own personal scratch file in there. The personal dir shows up in the :source-paths under the :project/dev profile, but not under the :prod profile, so we have access to them in dev but they don’t get included in the final build.#2019-02-2620:43manutter51The personal files all get checked in to source control, which I think is a net benefit, and sometimes leads to inadvertently sharing tribal knowledge.#2019-02-2621:03p-himikThat's actually a great idea, thanks!#2019-02-2621:14genekim@manutter51 "personal" directory. Fabulous idea. I just investigated the Scratches feature — all these files are stored in the IntelliJ config directory. I'll have to think about how I use this... I love the idea of putting these files into source control, along with the rest of the project. (I'll let you know what direction I end up going in. But I'll definitely be incorporating one of these approaches!) Thanks, all!#2019-02-2621:14manutter51:thumbsup:#2019-02-2621:04kanweiyou've probably seen this already but the 2019.1 EAP with runtime jdk11 triggers this error on startup:#2019-02-2621:04kanwei
java.lang.ExceptionInInitializerError Caused by: java.lang.ClassNotFoundException: javax.xml.ws.Provider PluginClassLoader[com.cursiveclojure.cursive, 1.8.1-eap3-2019.1] 
#2019-02-2621:05kanweifrom deprecated EE modules#2019-02-2621:14genekim@manutter51 "personal" directory. Fabulous idea. I just investigated the Scratches feature — all these files are stored in the IntelliJ config directory. I'll have to think about how I use this... I love the idea of putting these files into source control, along with the rest of the project. (I'll let you know what direction I end up going in. But I'll definitely be incorporating one of these approaches!) Thanks, all!#2019-02-2701:29cfleming@kanwei Yes, there’s an issue about that, thanks.#2019-02-2701:38cfleming@genekim I’’d be interested to know what you find works - scratch files can be weird, I have an outstanding issue to test them properly. I like manutter51's idea, I think.#2019-02-2701:53genekim@cfleming Scratchfiles work, with surprisingly little effort — was able to make a new Scratchfile, go into it, and do some forms — (+ 1 1), 1. No problems there. What was a little surprising was that it kept me in the same namespace as before, which was great. I thought I would have to make a new (ns xxx) or something... (That's actually a pleasant surprise. So easy!)#2019-02-2701:56genekim@cfleming @manutter51 — to be specific, what appeals to me about the "personal" directory is that I can work on different machines. Already, there have been times when I went home w/o checking everything into the repo, and couldn't work on something. The idea that there would be another bunch of work I could do that I might forget to check in somewhere seems... dangerous. 🙂#2019-02-2702:05potetm@genekim re: your initial comment: I often work inside of a comment block when I have scratch work.#2019-02-2702:06potetmI did the scratch file thing for a while, but I didn’t find it worth the effort.#2019-02-2702:07potetmI do use a dev dir where people can be much more loosie goosie.#2019-02-2702:08potetmBut comment forms are super for exploring things in-place.#2019-02-2703:43genekimOh! I read about using comment, but for whatever reason, I was using the #_ form instead. Holy cow, comment is so much nicer! I think I was using #_ because there is a keyboard accelerator for it: Command-/. 🙂 Is there a Cursive keyboard command to comment out multiple S expressions? (Like wrapping them up in a big ol' comment?) Thx all!#2019-02-2702:14potetm(Perhaps not directly answering your question, but thought you mind find my “there and back again” story useful 🙂)#2019-02-2703:43genekimOh! I read about using comment, but for whatever reason, I was using the #_ form instead. Holy cow, comment is so much nicer! I think I was using #_ because there is a keyboard accelerator for it: Command-/. 🙂 Is there a Cursive keyboard command to comment out multiple S expressions? (Like wrapping them up in a big ol' comment?) Thx all!#2019-02-2704:01potetmI didn’t even know cmd-/ did form comments 😛#2019-02-2704:01potetmI use slurp/barf — I don’t think there’s a special command#2019-02-2704:05potetmbear in mind: #_ and comment are _slightly_ different. comment returns nil, #_ ignores at the reader.#2019-02-2704:05potetmthis has gotten me before#2019-02-2704:05genekim@potetm — what a game changer! Working in a comment form is magical! I'm loving it. Thanks!!!#2019-02-2704:06potetmmy pleasure 🙂#2019-02-2708:10cfleming@genekim No, the IntelliJ “Comment with Block Comment” command should do that, but doesn’t (yet)#2019-02-2708:11cflemingAlso, one of the nice things about using comment is that you can use “Send top form to REPL” from within a comment block and it will send the top-level form within the comment block, not the comment itself.#2019-02-2708:12cflemingSo if you’re here:
(comment
  (+ 1 2|))
(where | is the caret), then “Send top form” will eval (+ 1 2).
#2019-02-2713:52potetm^^ that’s how I use it#2019-02-2713:53potetmit worked so naturally, I didn’t even notice it’s sending not-quite-the-top form#2019-02-2715:52heliosis there a way to automatically reorder alphabetically ns in :require ?#2019-02-2719:18Lennart BuitI use a IntelliJ plugin for that#2019-02-2719:18Lennart Buithttps://plugins.jetbrains.com/plugin/5919-lines-sorter#2019-02-2719:19Lennart BuitBut it works better when you require like this:
(ns my-ns
  (:require
    [abc]
    [def]))
#2019-02-2721:09heliosYeah i do it like that, thanks#2019-02-2723:58salamhttps://plugins.jetbrains.com/plugin/2162-string-manipulation seems to have a similar but more sophisticated sorting feature along with other additional handy-dandy string manipulation features. #2019-02-2716:29genekim@cfleming @potetm Yes, I noticed that right away. For a couple of marvenlous hours last night, I worked within a source file comment block, sending forms to the REPL, and then copying code outside the comment block when done. Describing what was so different and awesome defies easy explanation, but I felt so much more productive vs. not working within a comment block. I'll try to write something up in the next week or two — it's not an understatement to say that it's one of my biggest aha moments of Clojure. Thank you!!!#2019-02-2716:30genekimPS: I think it has to do with the way it encourages documentation and the evolution of the code, as well as how it keeps codes around that actually calls the function — as opposed to burying the function inside of another function, inside a let block. Makes it much easier to change and test it later.#2019-02-2720:30potetmI have some videos of how I tend to work here: https://potetm.com/videos.html#2019-02-2819:32genekimThank you @potetm — I'll check it out over the day or two!!!!#2019-02-2720:31potetmI made those because I totes agree w/ @genekim, and I wanted to show other people what it’s like.#2019-02-2720:34potetmAnd I don’t really have words for it, so I hope you find some 🙂#2019-02-2721:24p-himikI've created a REPL configuration and I'm trying to set -e "(require 'dev) (in-ns 'dev)" as its Parameters. However, when I start it, it turns into -e \"(require 'dev) (in-ns 'dev)\" and leads to Exception in thread "main" clojure.lang.LispReader$ReaderException: java.lang.RuntimeException: EOF while reading string Is there any way to prevent that seemingly unnecessary escaping of the double quotes?#2019-02-2721:26p-himikHmm, if I provide -e '(require (quote dev)) (in-ns (quote dev))' it's not changed, but leads to EOF while reading, starting at line 1 for some reason. At the same time, works just fine in the console.#2019-02-2721:31p-himikIt doesn't like spaces and single quotes don't fix that.#2019-02-2721:39manutter51Try commas instead of spaces?#2019-02-2721:42p-himikGreat idea! I completely forgot about the commas. In the meantime, I managed to do the same by using :main-opts in deps.edn. In any case, it doesn't work as I wanted it to - the ns within the nREPL session is not changed.#2019-02-2721:48p-himikOK, I just spoiled my user ns as was suggested earlier. That works.#2019-02-2721:37carocad@cfleming since a month or so everytime that I am in the debugger and try to realize a lazy sequence (with a watch expression), the debugger gets stuck in “Collecting data …“. If I afterwards remove the watch, and click the play button, the repl then gets stuck as well. Is there some kind of hidden setting that I screwed or is it a bug ?#2019-02-2721:50cfleming@carocad I don’t think there’s a setting for that, it sounds like a bug. Do you have some repro steps, and I can try to reproduce it?#2019-02-2721:55carocadmmmm besides what I mentioned above … nothing really. It happens all the time when trying to get info on lazy sequences#2019-02-2721:55carocadif there is a way to give you a log I am happy to help#2019-02-2721:55cflemingBut you have a watch on the sequence itself too?#2019-02-2721:57carocadyes. For example, lets say that I have a function that returns a lazy seq like (map str something-else). Then in the debugger I add a watch + containing (vec my-lazy-result). I can see the watch in the debugger but it is stuck collecting data#2019-02-2721:59carocad@cfleming see attached image#2019-02-2722:04cflemingOk, thanks - I’ll try to reproduce that.#2019-02-2809:46heliosHm. I just upgraded to 1.8.1-eap3 and it broke. I reverted back to lein 2.8.1 and still doesn't work anymore. I am able to run lein repl from command line and then connect as a 'local' remote repl. This is the output of cursive trying to start a repl: https://pastebin.com/95Dt5Hiz#2019-02-2810:39heliosdowngrading cursive fixed the problem, i'm now to eap2#2019-02-2814:10Joe R. Smithhow do I remove a "resolve <thing> as" ?#2019-02-2815:26heliosPreferences > Languages > Clojure > Symbol resolution#2019-02-2816:00Joe R. Smiththx!#2019-02-2816:02dnolenit would be really great if jumping to a spec was a thing#2019-02-2816:44buttergunsCould cursive theoretically do some checking on type hints?
(defn take-number [^Number a] (inc a))
(defn foo []
  (let [^String s "hi"]
    (take-number s))) <--- Nice if I got a red / yellow squiggly
#2019-02-2818:51Yehonathan SharvitI have an issue in Cursive with my source root: In my project.clj, I have :source-paths ["clojurescript-src/src/cljs" "script"] When I open a file under clojurescript-src/src/cljs/audyx/app/init defining a namespace audyx.app.init, I see an error#2019-02-2818:51Yehonathan SharvitI don’t know what to do#2019-02-2820:31Yehonathan SharvitPlease help#2019-02-2820:34buttergunsFrom your screenshot, it looks like your audyx folder is also a source path?#2019-02-2820:34buttergunsFile -> Project Structure -> Modules -> (your module) -> sources#2019-02-2820:35buttergunsShould match what is in the :source-paths above#2019-02-2820:35Yehonathan SharvitI don’t know how it happened#2019-02-2820:35buttergunsDid that fix it?#2019-02-2820:36Yehonathan SharvitI don’t know how to tell cursive to recalculate its source paths#2019-02-2820:37buttergunsIn the short term, you can manually remove the content root from that dialog#2019-02-2820:38buttergunsWhen you created your module, did you import from your project.clj file specifically?#2019-02-2820:38buttergunsIf you do that, my sources + dependencies are normally re-read from project.clj on every IDEA startup#2019-02-2820:39Yehonathan SharvitI don’t remember
#2019-02-2820:39Yehonathan SharvitHow can I recreate my module?#2019-02-2820:40Yehonathan SharvitI don’t really know what a module is by the way#2019-02-2820:42manutter51You should be able to fix that by right-clicking on your audix folder and selecting “Unmark as Sources root” from the “Mark Directory As…” submenu#2019-02-2820:43Yehonathan SharvitThe problem with this approach is that every time I change the project.clj, Cursive overwrites my choices#2019-02-2820:43manutter51Hmm, I had a similar problem a while ago, something about a stray line in my project.clj file#2019-02-2820:44buttergunsThe Content Roots in cursive should match your project.clj. Cursive shouldn't be adding additional roots#2019-02-2820:45manutter51Do you have more than one :source-paths entry in project.clj anywhere?#2019-02-2820:47Yehonathan SharvitIt’s a cljs project, it has one :source-paths entry per cljsbuild entry#2019-02-2820:49Yehonathan SharvitAnyway, is there a way to reset the project from a Cursive perspective?#2019-02-2821:00buttergunsA restart of IDEA usually triggers a read from project.clj#2019-02-2821:03manutter51There’s also File -> Invalidate Caches / Restart#2019-02-2821:15Yehonathan SharvitTrying it…#2019-02-2821:15Yehonathan SharvitCrossing fingers#2019-02-2821:16Yehonathan SharvitSame same…#2019-02-2821:17Yehonathan Sharvit😢#2019-02-2821:19buttergunsWould you post your project.clj?#2019-02-2821:21Yehonathan Sharvit#2019-02-2821:22Yehonathan SharvitYeah#2019-02-2821:22Yehonathan SharvitI found the issue in my project.clj#2019-02-2821:22butterguns
:dbg {
        :source-paths [
          "clojurescript-src/src/cljs/audyx"]
#2019-02-2821:22Yehonathan SharvitIt had some bad source-paths in cljsbuild#2019-02-2821:22Yehonathan Sharvitexactly @mattmorten#2019-02-2821:23butterguns:thumbsup:#2019-02-2821:23Yehonathan SharvitAnother thing: How do we trigger a global search that search also in name of namespaces?#2019-02-2821:24buttergunsI'm guessing, btw, cursive uses the dev profile#2019-02-2821:27Yehonathan SharvitI remember that Shift-Shift used to do a global search#2019-02-2821:27Yehonathan SharvitNow when I type a namespace that has a dash character in it , it doesn’t find it#2019-02-2821:27Yehonathan Sharvitfor instance om-extensions finds nothing while om_extensions does#2019-02-2821:41Lennart Buitthats probably because of Java convensions#2019-02-2821:41Lennart BuitI think thats IntelliJ searching, and IntelliJ only understand valid java package names, so thats snake_case#2019-02-2821:48Yehonathan Sharvitno way!#2019-02-2821:48Yehonathan Sharvitclojure namespaces are always with dashes#2019-02-2821:48Yehonathan SharvitThat would be very disappointing#2019-02-2821:28Yehonathan Sharvit#2019-02-2821:28Yehonathan Sharvit#2019-02-2821:28Yehonathan Sharvit#2019-02-2823:01mdhaneyIs there a way to tell Cursive to not index certain directories? It regularly crashes when it tries to index node_modules, and since it doesn’t seem to understand shadow-cljs imports anyway, I don’t get code completion for JavaScript. So I would rather skip the indexing of JS modules and avoid the crashes.#2019-03-0107:25dmarjenburghYou can try right-clicking the node_modules and selecting 'Mark Directory As Excluded'. #2019-03-0105:33genekimStrange issue, not urgent, but wanted to let you know: I was walking Mike Nygard through a problem I was having with an oddly terse error message — it turns out that it was because I was using expound, which ghostwheel pulled in (a fantastic runtime static-type checker, which I love using.) But he noticed that I was getting different errors, based on whether I was sending form using "Send Top Form to REPL" via keyboard accelerator, or manually typing it in.
(compare-foundation-with-rest "" rows :mttr)
Syntax error (NullPointerException) compiling at (twodots_foundation.clj:245:10).
null

; ^^^ error from "Send Top Form to REPL"
; this line number is the form that was sent, so not very helpful -- a very long
; distance from where the exception was thrown

(compare-foundation-with-rest "" rows :mttr)
Execution error (NullPointerException) at analyze.twodots-foundation/ttest-lower? (twodots_foundation.clj:117).
null

; ^^^ manually typed in REPL window
; this is the actual line number where the exception was thrown

#2019-03-0113:11Alex Miller (Clojure team)Not sure exactly what the cause is but I’m sure you’ve ended up with different levels of nested exceptions. Looking at *e would probably be helpful to compare the chains#2019-03-0113:13Alex Miller (Clojure team)As of 1.10 we unpeel the top layers of the exception stack for a runtime exception till we find something outside core, which is probably why the repl error is better#2019-03-0302:59genekimThanks @U064X3EF3 !!! I think you're right on — I do recall seeing multiple exception messages! (The lesson for me: *e is your friend. I never actually used it until last week!)#2019-03-0107:28Yehonathan SharvitIs Cursive able to find a namespace that has a dash character in it? With Shift-Shift, it doesn’t work for me#2019-03-0109:19dmarjenburghNavigate -> Namespace can find it#2019-03-0114:04borisOh wow why isn’t namespace lookup part of the shift-shift menu? Would be neat if that was possible. Anyway because I don’t see namespaces in shift-shift, I usually omit the dashes.#2019-03-0119:20seriogaIf you enter search term like my namespace with dashes using space as separator then IDEA will find corresponding file name.#2019-03-0119:23cflemingIf someone could file an issue for that, I’ll look at it - that should definitely work and there’s clearly something wrong with it.#2019-03-0119:17cfleming@helios The main change in recent Cursive versions is that it now allows recent versions of lein. If you haven’t explicitly selected the lein version you want you’ll get the latest one. There’s some churn going on with lein and nREPL at the moment as everyone switches over to the new nREPL, what you’re seeing is a result of that. When you upgrade Cursive, you can either specify an older version of lein at Preferences | Build, Execution, Deployment | Build Tools | Leiningen | Project Settings, or you can figure out what needs upgrading in your project to use the new nREPL with lein 2.9.0.#2019-03-0408:13heliosthanks! 🙂#2019-03-0119:18cfleming@dnolen That should be a thing - you should be able to ctrl-click on a keyword defining a spec and it will take you there. Or did you mean something more like “Go to file/namespace/class” etc?#2019-03-0119:19cfleming@mattmorten Re: JS type hints, yes, I’d like to do more with that. In fact, that case you’re showing is pretty simple to support.#2019-03-0119:20cfleming@mattmorten Cursive uses the profiles that you define in the lein toolwindow under the Profiles subtree - you can select them.#2019-03-0119:21cfleming@viebel re: the namespace searching, I think the problem is that namespaces don’t show up in the Shift-shift seach. Packages do, which is why you’re seeing the wrong name there.#2019-03-0216:38Yehonathan SharvitIs there a way to search a function through its fully qualified name?#2019-03-0120:08buttergunsThanks for your response. JS type hints? So, CLJS only?#2019-03-0120:08buttergunsNo Java hints?#2019-03-0120:17dnolen@cfleming hrm that doesn't work for me? what do I use in the context menu?#2019-03-0202:40cfleming@mattmorten Oops, sorry, I initially thought that was what you were talking about, then realised it was probably JVM but didn’t go back to edit my message. Yes, I mean JVM.#2019-03-0202:40cfleming@dnolen Standard navigation should work, Cmd-Click sorry, not Ctrl-Click.#2019-03-0202:51cfleming@dnolen e.g. if I have the following:
(s/def ::date inst?)

(s/valid? ::date (java.util.Date.))

(doc ::date)
#2019-03-0202:51cflemingThen from the usages of ::date in the second and third lines I can Cmd-Click to go to the definition on the first line, and find usages etc works too.#2019-03-0202:51cflemingIf that’s not what you mean, let me know.#2019-03-0203:53dnolenSo it doesn’t work for ClojureScript specs?#2019-03-0208:12p-himikI already had an opened Clojure project when I decided to open another one in another window. I was immediately greeted by the cheery "Indexing..." but not only in the second window - also in the first one! I can see this in IDEA logs:
INFO - il.indexing.FileBasedIndexImpl - Rebuild requested for index ClojureSymbolMeta 
java.lang.Throwable
        at com.intellij.util.indexing.FileBasedIndex.requestRebuild(FileBasedIndex.java:70)
        at cursive.intentions.resolve$rebuild_all_indexes_BANG_.invoke(resolve.clj:142)
        at clojure.lang.Var.invoke(Var.java:383)
        at cursive.api.DelayedFn.invoke(DelayedFn.java:36)
        at cursive.settings.ClojureProjectResolveSettings$loadState$1.run(ClojureResolveSettings.kt:95)
        at com.intellij.openapi.application.impl.ApplicationImpl$1.run(ApplicationImpl.java:314)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
        at java.lang.Thread.run(Thread.java:745)
Why though? Why does Cursive have to rebuild-all-indexes! (my guess is that's the culprit) when I open a project and rebuild the indexes of the already opened project?
#2019-03-0208:13p-himikAnd if I open 5 projects? I won't even try - my laptop doesn't have enough RAM.#2019-03-0208:22cfleming@dnolen It does work with CLJS, I just tested that exact code in a CLJS ns and it worked. Are you seeing something different?#2019-03-0208:24cfleming@p-himik I’ll take a look at that, but I think that is because indexes are a curious mix of global and project-specific in IntelliJ. Clojure is an unusual case in that the contents of the index require configuration (in this case, you configuring which forms def global things) in order to index correctly. Almost no other language is like that. When that configuration is changed (in this case, by loading a project which customises resolution) I have no choice but to invalidate the index and reindex, which I think is a global operation.#2019-03-0208:24cflemingNote that it will only reindex Clojure indexes though, not e.g. Java ones.#2019-03-0208:25cflemingBut I will check when I have the code in front of me to check my understanding.#2019-03-0208:26p-himikThanks! > configuring which forms def global things But how can a project influence another, completely unrelated, project in such way?#2019-03-0208:27cflemingIt can’t really, but when that config is changed I have to force IntelliJ to reindex, and it’s not designed to do that in a project-specific way.#2019-03-0208:27cfleming(again, I think)#2019-03-0208:29p-himikI see, thank you. Yeah, it's been my pet peeve (and not mine only) when it comes to reindexing in IDEA - you can't make it reindex a single project via UI. And not being able to do that even in code explains that.#2019-03-0208:31cflemingYes, it’s because the indexes are actually global, but when you retrieve values for them you restrict the set of files it searches to a particular project.#2019-03-0208:32cflemingIt’s possible I could force it to just reindex a particular set of files, but I’d have to look at whether that’s possible.#2019-03-0212:40dnolen@cfleming and it works when the spec is in a different file?#2019-03-0216:38Yehonathan SharvitIs there a way in Cursive to search a function through its fully qualified name?#2019-03-0218:08potetm@viebel in what context? Like, find usages?#2019-03-0218:08potetmor go to declaration#2019-03-0218:08potetm?#2019-03-0218:11potetmI’ll just spew out what I know 🙂#2019-03-0218:12potetm1) If you’re looking at a usage, and you want to jump to declaration: Navigate -> Declaration#2019-03-0218:13potetm2) If you have a declaration, and you want to find usages: Edit -> Find -> Find Usages#2019-03-0218:14potetm3) If you only have a fully qualified name (i.e. you’re not looking at a usage) and you want to go to declaration, the easiest thing is probably: Navigate -> Symbol#2019-03-0218:15potetmnote that this doesn’t support fully-qualified symbols like you asked, but it tends to narrow it down pretty well for me#2019-03-0218:15potetm4) If you really wanna search by fully qualified symbol, you can type it into a clj file and: Navigate -> Declaration#2019-03-0218:18potetmI know 4) is directly closest to what you asked, but I thought you might find it useful for me to give an answer in order of what I actually use most.#2019-03-0218:23potetm@dnolen The following appears to work for me: keyword :a/foo (kw ns is from ns A), spec in ns B, at a usage in ns C: Navigate -> Declaration goes to spec in ns B#2019-03-0219:31dnolenI see what's going on - this doesn't work for deps.edn git libs#2019-03-0220:47Yehonathan Sharvit@potetm Thanks for the detailed answer. Navigate -> Symbol is the closest to what I need. But it is a bit annoying that it doesn’t support fully qualified name. My use case is that I look for the a function named audyx.body.patients-autocomplete/init and when I type init in the Navigate -> Symbol, I get lots of suggestions: I am wondering why fully qualified name search is not supported/#2019-03-0221:19potetmyeah, a “nav to symbol” that works like the “nav to namespace” would be bananadance#2019-03-0221:20potetmalso, wtf, I just learned about “nav to keyword”#2019-03-0221:21potetmI assume if “nav to keyword” is possible, “nav to symbol” should be as well#2019-03-0221:46Yehonathan SharvitIt should even be simpler. What do you thing @cfleming?#2019-03-0308:40cfleming@dnolen thanks, I’ll try to repro that.#2019-03-0308:41cfleming@potetm Nav to keyword is (relatively) new, first in 1.8.1 IIRC#2019-03-0308:42cfleming@viebel @potetm What I don’t want is to have a separate Clojure-specific symbol search which works differently to the built-in IntelliJ one. I’ll see if I can get that to recognise FQNs too.#2019-03-0308:44cflemingI did the symbol one a long time ago when I didn’t know what I was doing, and the keyword one more recently, but I can’t remember the details.#2019-03-0406:14Yehonathan Sharvit@cfleming that would be great!#2019-03-0406:15Yehonathan SharvitWhat is really nav to keyword? Does it take me to the first time the keyword is used?#2019-03-0408:30Daniel SchlaugI'm trying to get my REPL to run tests in a re-natal (React Native) context. I can do (start-figwheel "ios") in both the nREPL and Clojure.main REPL but in the nREPL Cursive or IntelliJ starts taking input through a dialog ("Enter string for standard input") instead of through the REPL input field. Any ideas on how to rectify this? (I cannot use the otherwise functional Clojure.main REPL since that does not support running all tests in a namespace.)#2019-03-0409:23cfleming@daniel975 Right now the test-running functionality in Cursive only works for Clojure, not for CLJS.#2019-03-0409:23cflemingThat dialog means that the figwheel REPL is reading from stdin, which means it’s designed to be used with a clojure.main REPL.#2019-03-0409:24cflemingSince the test-running doesn’t yet work for CLJS you’re better off using whatever makes your REPL more functional.#2019-03-0409:29cfleming@viebel No, you select the keyword and then it opens a Find Usages popup showing all the usages, and you can pick one to navigate to.#2019-03-0505:27Yehonathan SharvitAwesome!#2019-03-0411:42chrispsI am having a problem using :import in a project. Any :import fails with a ClassNotFoundException. I am using deps/cli. How can I approach this?#2019-03-0411:43chrisps
(ns sample.project
  (:import [org.apache.commons.lang3 StringEscapeUtils]))
#2019-03-0411:44chrisps
{:deps {org.apache.commons/commons-lang3 {:mvn/version "3.5"}}
#2019-03-0411:45chrispsI’ve invalidated caches etc#2019-03-0411:46chrispsI’ve also clojure -Spom and imported the pom.xml in the maven-tab#2019-03-0415:23conanHi, I'm having trouble importing a project that uses deps.edn on Windows. I can't get past this dialogue box - any ideas? Thanks#2019-03-0415:24conanI've pressed "Download" and it seemed to download some stuff#2019-03-0415:29conanI'm running Cursive v1.8.1-eap3-2018.3#2019-03-0415:56Ben Hammondhi @U053032QC#2019-03-0415:57Ben HammondI am running edge projects in Cursive and I don't 'use tools.deps directly`#2019-03-0415:57Ben Hammondcan you click on the other radio button#2019-03-0415:57conanhi, let me try#2019-03-0415:58conansame error#2019-03-0415:59Ben HammondFWIW mine looks like#2019-03-0416:00Ben Hammondyou do need to tell it where to find the clojure command line tools#2019-03-0416:01conanthere are no clojure command-line tools for windows, sadly#2019-03-0416:14conanah looks like there's an open issue https://github.com/cursive-ide/cursive/issues/2126#2019-03-0416:15conansolution there seems to solve the problem. thanks for your help Ben!#2019-03-0415:28heliosdoes anybody have a tip on how to resolve as enlive deftemplates?#2019-03-0416:17borisHaven’t used enlive before, but it seems like resolving as defn would work pretty well in that it would provide symbol resolution of the template and show parameters in the suggestions popup. Have you tried that?#2019-03-0508:16heliosenlive deftemplate has a slightly different pattern, as it's (deftemplate template-name "page.html" [& args] ... )#2019-03-0508:16heliosI tried it, and it does look better than i had thought. I'll give it a try, thanks#2019-03-0418:38joelsanchezI think I found a bug!#2019-03-0418:38joelsanchezit complains about nested function literals, but it's just a string with a "#"#2019-03-0418:38joelsanchezCursive got fooled#2019-03-0423:33cfleming@joelsanchez I bet you a beer it didn’t 🙂. It’s complaining that the outer form (the one which is basically the whole screenshot you sent) is inside another #( ... )#2019-03-0423:38cfleming@chris.schreiner If you open File-&gt;Project Structure, select Modules, <your module>, Dependencies do you see the lib there?#2019-03-0500:31joelsanchezit is possible. I will check the code tomorrow. #2019-03-0500:33kingmobHi @cfleming, I think defaulting to the latest Lein broke my setup. Can anything be done about it? (Maybe check the existing command-line version and/or default to it?) For anyone else, if you’re googling for weird piggieback compilation errors like I did, this is for you. We set our version of piggieback at 0.3.10, which brought in nrepl/nrepl 0.4.4. However, this results in multiple versions of nrepl/nrepl on the classpath, since Lein 2.9.0 injected nrepl 0.6.0. This resulted in piggieback compilation errors because the nrepl versions didn’t match.#2019-03-0501:21Daniel Schlaug@cfleming Thanks! Though one can always keep tests in CLJC-files as far as possible I'm a bit sad to hear that the test-running not working with CLJS but I guess you can't have everything right away.#2019-03-0504:30cfleming@kingmob You can set the version of lein you want Cursive to use at Preferences | Build, Execution, Deployment | Build Tools | Leiningen | Project Settings#2019-03-0514:23kingmobThanks, @cfleming. What I meant to say was, “defaulting on upgrade” broke it. Once I changed my Lein version, everything worked. What threw me was I upgraded IntelliJ, and didn’t realize that Cursive had upgraded at the same time, too.#2019-03-0515:40p-himikSomewhat recently IDEA has gained new feature - multiline TODO statements. It's something that Cursive has to enable explicitly, right? Because right now it doesn't work for CLJ[S].#2019-03-0519:56Kaden TaylorHey guys! Cursive formatting question - I'm having difficulty finding the cursive equivalent of the blank line setting that controls the number of newlines between forms. Ideally I'd like to be able to just crtl+alt+L and have it correct blank lines as well. Any tips?#2019-03-0521:48cfleming@p-himik I’m not sure, actually - I’ll check that.#2019-03-0521:48cfleming@kadenjtaylor Currently Cursive doesn’t have a setting for that, sorry.#2019-03-0521:57Kaden Taylor@cfleming okay, cool - any alternatives you might recommend? Not alternatives to cursive, just other methods of getting that behavior.#2019-03-0522:11cfleming@kadenjtaylor I’m not sure, sorry - either cljfmt or zprint should be able to do that.#2019-03-0522:11cflemingCursive should be able to too, of course 🙂#2019-03-2617:25danielcomptonThe EAP6 changes seem to be working well for deps.edn#2019-03-2617:29kwladykahmm probably the issue is about reload ns, which depend on ns which chagned#2019-03-2617:30kwladykaIs there any solution for it in Cursive?#2019-03-2617:31kwladykalike if NS depend on each other A->B->C and I change C reload ns in order C,B,A#2019-03-2617:47danielcompton@kwladyka if you require A, then B and C will be reloaded#2019-03-2617:47danielcomptonI spoke too soon, there still seem to be issues resolving symbols with deps.edn#2019-03-2617:47kwladykadoesn’t work for me#2019-03-2617:49kwladykaok so it is an issue about Cursive. Am I right?#2019-03-2618:09calebpDoes anyone have tips on how to deal with “cannot be resolved” messages for the com.datomic/ion-dev dependency? I would like to be able to see params and quick doc and get rid of the warnings. I suspect this is related to these deps being loaded from an s3 repo that requires creds, but I don’t know how to go about figuring that out.#2019-03-2618:16danielcomptonIf I try and add the phonebook-api example project in juxt/edge, I get this error:
Error resolving <my directories>/edge/examples/phonebook-api: Manifest type not detected when finding deps for juxt.edge/app.logging in coordinate {:local/root "../edge.app.logging"}
#2019-03-2620:49cfleming@danielcompton That’s with eap6?#2019-03-2620:58dominicm@danielcompton I'm not experiencing that in eap6, what version is clj -Sdescribe giving you?#2019-03-2621:07cflemingI can’t repro that with eap6 either.#2019-03-2621:10danielcomptonTrying now#2019-03-2621:20danielcompton
{:version "1.10.0.442"
 :config-files ["/usr/local/Cellar/clojure/1.10.0.442/deps.edn" "/Users/danielcompton/.clojure/deps.edn" "deps.edn" ]
 :install-dir "/usr/local/Cellar/clojure/1.10.0.442"
 :config-dir "/Users/danielcompton/.clojure"
 :cache-dir ".cpcache"
 :force false
 :repro false
 :resolve-aliases ""
 :classpath-aliases ""
 :jvm-aliases ""
 :main-aliases ""
 :all-aliases ""}
#2019-03-2621:21dominicmand just to check, are you using the command line, or the api interface from cursive?#2019-03-2621:21danielcomptonThat Sdescribe is from the CLI#2019-03-2621:21cfleming@danielcompton How do you have deps configured in Preferences | Build, Execution, Deployment | Build Tools | Clojure Deps?#2019-03-2621:21danielcomptonBut the error I'm getting is when I add the module with Cursive#2019-03-2621:22cflemingAnd does that show the right version there?#2019-03-2621:22danielcompton#2019-03-2621:23cflemingHow are you adding that module?#2019-03-2621:23danielcomptonProject Structure > + > Import Module#2019-03-2621:23danielcomptonThen clicking on the deps.edn file#2019-03-2621:23danielcomptonIt has kind of added it#2019-03-2621:24danielcomptonbut nothing is resolved in the Clojure source files#2019-03-2621:24danielcompton#2019-03-2621:24cflemingSo you’re trying to add that to an existing project?#2019-03-2621:25cflemingIs that something that you’d want to do? I had assumed that the edge examples were standalone projects, but I don’t know much about edge.#2019-03-2621:26dominicm"it depends" - what's a project in the context of cursive/intellij?#2019-03-2621:27dominicmif it's defined as a single server, then no, you wouldn't usually do that. But if it's two things under the same company that may have runtime dependencies (e.g. an api which is called by a frontend), then yes.#2019-03-2621:27dominicmYou wouldn't run them in the same JVM maybe that's a better way to think about it 🙂#2019-03-2621:29cfleming@danielcompton re: your issue about importing multiple deps.edn files, sadly the deps integration is based on an API in IntelliJ which doesn’t support that. I’m starting to think that using that API was a mistake for several reasons (including this one), but rewriting it to work more like e.g. leiningen is a pretty big job.#2019-03-2621:31cfleming@dominicm In IntelliJ a project is generally a whole thing you might want to work on at once. It’s composed of one or more modules, which generally correspond to e.g. a lein or deps project (i.e. a module is roughly equivalent to project.clj/`deps.edn`/`pom.xml`)#2019-03-2621:32dominicmI guess there's some room for ambiguity there then :thinking_face:. You very well may work on the api & frontend simultaneously making them one project.#2019-03-2621:33cflemingYes, I’d expect that. For example, my Cursive fulfilment is done via an SPA which talks to AWS lambda. I have that in one project, which contains one front-end module and one back-end Node module which runs on lambda.#2019-03-2621:33dominicmDoes cursive start 2 repls for that case?#2019-03-2621:33danielcomptonEdge has several example apps, as well as libraries in the same repo#2019-03-2621:33danielcomptonI would expect each one to be a module#2019-03-2621:34danielcomptonIn the same way you could have a project.clj for each#2019-03-2621:34cflemingWell, REPLing is difficult there since a) it’s CLJS and b) I can’t test the whole thing since it relies on AWS. I do more test-driven development for that project (not in the strict sense, I just use tests more than REPLs). But generally with a frontend/backend split, yes, you’d expect two REPLs.#2019-03-2621:35cfleming@danielcompton What are you actually trying to achieve with this? You have a large project and you’re trying to import the various modules of it, right?#2019-03-2621:35danielcomptonYeah#2019-03-2621:35cflemingWhat does the structure of that look like?#2019-03-2621:36cflemingDo you have one root dir, then apps + libs under that?#2019-03-2621:36danielcomptonYeah, the edge project is basically what we're doing#2019-03-2621:36danielcomptonSo there is examples/, and then lib/#2019-03-2621:36cflemingWhen importing using deps, the dependent libs will be discovered automatically, but the top-level apps generally have to be imported individually.#2019-03-2621:37cflemingOk, let me see if I can repro by creating a single project with a couple of the edge example apps in it.#2019-03-2621:37danielcomptonJust clone the whole repo?#2019-03-2621:37danielcomptonOpen it with idea .#2019-03-2622:39danielcomptonPEBCAK, I thought I'd updated Cursive plugin, but I hadn't facepalm#2019-03-2622:39cflemingOk, false alarm, eap6 looks good.#2019-03-2709:07maxtWhen (or if) are stack traces clickable? I found an old issue saying it's solved, but mine aren't clickable. https://github.com/cursive-ide/cursive/issues/204#2019-03-2709:11cfleming@maxt Are none of them clickable?#2019-03-2709:11maxtNo.#2019-03-2709:11maxtSimplest example
(/ 1 0)
gives me
Syntax error (ArithmeticException) compiling at (notification.clj:58:1).
Divide by zero
And it's not clickable
#2019-03-2709:13maxtI guess that's not technically a stack trace, I'll make a better example#2019-03-2709:13cflemingIf you click the “Print last exception” button in the REPL toolwindow, do you get clickable links there?#2019-03-2709:14cflemingYou’re running Clojure 1.10, right? I guess I’ll need to add more patterns for the new error messages there to make those clickable too.#2019-03-2709:14maxtI do!#2019-03-2709:14maxtYep, 1.10#2019-03-2709:14cflemingRight, the issue is that the new messages don’t look like stacktrace elements, so Cursive misses them.#2019-03-2709:16cfleming@maxt https://github.com/cursive-ide/cursive/issues/2142#2019-03-2709:25maxtSeems I can work around it by catching and using clojure.stacktrace to print the exceptions, then everything is clickable#2019-03-2709:28cflemingYes, that will work, or aviso/pretty if you prefer that (or just .printStackTrace)#2019-03-2712:28Alex Miller (Clojure team)All 1.10 messages should have a location in the first line of the form (source:line:col) although source may be REPL and col may be omitted. Although perhaps more usefully, in general any read/compile/macroexpand error is now an ex-data and carries those values as fields#2019-03-2719:09dnolenanybody else having trouble with latest Cursive + IntelliJ and starting a deps REPL?#2019-03-2719:14cfleming@dnolen What’s happening?#2019-03-2719:20dnolennothing?#2019-03-2719:20dnolenno REPL#2019-03-2719:22dnolen#2019-03-2719:22dnolen@cfleming ^ I see this exception#2019-03-2719:23dnolenthis is Cursive 1.8.1-2019.1 and IDEA 2019.1#2019-03-2719:28cfleming@dnolen That is really weird - it’s in the guts of ShimDandy. Let me upgrade to 2019.1 final and try to reproduce that.#2019-03-2719:41salamjust as another data point, Cursive 1.8.1-2019.1 seems to be working just fine with a simple Deps project (pure Clojure, no ClojureScript) in IntelliJ IDEA 2019.1 (JBR 11) and Java 12. clojure.main REPL works as well. #2019-03-2719:42cfleming@dnolen I can’t reproduce that, sorry, and I can’t imagine what might provoke that problem either. I’ll ask tcrawley (author of ShimDandy) if he’s ever seen that.#2019-03-2719:52dnolenI'm also getting Dep sync failure#2019-03-2719:53dnolenI think that's the root problem#2019-03-2719:53cflemingDo you get an exception for that?#2019-03-2719:54dnolenno information#2019-03-2719:54dnolenjust "sync failed"#2019-03-2719:56dnolentried the ClojureScript project - same problem#2019-03-2719:56dnolenI think the issue might be that I was using tools.deps directly?#2019-03-2719:56dnolenunder Preferences#2019-03-2719:58cflemingI’m not sure why that would cause a problem.#2019-03-2719:59cflemingOne thing you could try, go to Help | Debug Log Settings…, then enter #cursive.deps.DepsProjectResolver in the box there.#2019-03-2719:59dnolenI switched back to the standard way and Invalidated Caches / Restart#2019-03-2719:59dnolenREPL is working again#2019-03-2719:59cflemingThat is bizarre.#2019-03-2719:59cflemingHmm…#2019-03-2720:00dnolenthough that's because Deps sync#2019-03-2720:00cflemingIs your project sync working now?#2019-03-2720:00dnolenyes#2019-03-2720:00dnolenI think REPL thing was red herring#2019-03-2720:00dnolenDeps not syncing prevented me from doing anything#2019-03-2720:00cflemingI’m not sure, it is still a really weird error, I can’t see how it could occur.#2019-03-2720:22cfleming@dnolen That seems to be a really obscure ShimDandy bug, which is fixed in the latest release. I’ll upgrade for the next Cursive drop.#2019-03-2820:55mbjarlandHi all, I have a quick cursive question which might be trivial but has been disturbing me for a bit#2019-03-2820:56mbjarlandso I’m editing some clojure code, launch a repl and can move between the repl input window and the editor window using escape and a key bound to the repl tool window#2019-03-2821:01mbjarlandthat’s fine, the problem arises when I want to say copy/paste some text from the output window or make the output font smaller, I then click in the output window giving it focus, after this I can hit tab to get back to the repl input window. Here is where my issue starts. After giving the repl output window focus once, it is now the repl output window receiving focus every time I hit the repl tool window button when focus is on the editor window#2019-03-2821:02mbjarlandso I want to move between edit and repl input, instead I now move between edit and repl output#2019-03-2821:04mbjarlandi.e. giving the repl output window focus once seems to make the repl output window the default focus recipient in the repl#2019-03-2821:04mbjarlandthis happens even if I tab back to the repl input window before hitting escape to get back to the editor window#2019-03-2821:09mbjarlandok, turns out if you just keep typing in the repl output window, it will auto-switch to the repl input window…i guess that makes it less painful#2019-03-2902:44salamCommand + \ (macOS) or Ctrl + \ (GNU/Linux or Windows) moves caret directly to the editor pane of a running REPL.#2019-03-2909:15mbjarlandah : ) many thanks for that! Yes that does indeed solve the problem.#2019-03-2821:15mbjarlandhttps://photos.app.goo.gl/qBnFjhqSXRoMi32S8#2019-03-2909:17mbjarlandsolved, I can use the ctrl-\ (or cmd-\ on osx) key instead. Thank you @abdusalam - should also be noted that the above only happens on osx and not on linux.#2019-03-2910:20henryw374anybody had problems with leiningen projects on windows 10?#2019-03-2910:21henryw374
java.lang.IllegalStateException: facade.login must not be null

                at cursive.leiningen.LeiningenUtil.standardArgs(LeiningenUtil.kt:115)

                at cursive.leiningen.project.LeiningenModuleBuilder$setupRootModel$1$1.run(CreateProject.kt:64)

                at com.intellij.openapi.progress.impl.CoreProgressManager$TaskRunnable.run(CoreProgressManager.java:731)

                at com.intellij.openapi.progress.impl.CoreProgressManager$5.run(CoreProgressManager.java:442)

                at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$2(CoreProgressManager.java:164)

                at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:586)

                at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:532)

                at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:86)

                at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:151)

                at com.intellij.openapi.application.impl.ApplicationImpl.lambda$null$10(ApplicationImpl.java:594)

                at com.intellij.openapi.application.impl.ApplicationImpl$1.run(ApplicationImpl.java:311)

                at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)

                at java.base/java.util.concurrent.FutureTask.run(Unknown Source)

                at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)

                at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)

                at java.base/java.lang.Thread.run(Unknown Source)
#2019-03-2911:52henryw374raised this as https://github.com/cursive-ide/cursive/issues/2144#2019-03-2912:25dmarjenburghWe are using cursive with windows 10 in a corporate environment too and it works, so it's not a generic windows 10 issue. #2019-03-2912:28manutter51@henryw374 have you tried File -> Invalidate Caches/Restart… ?#2019-03-2913:03henryw374@manutter51 thanks, yes tried that, to no avail unfortunately. but fyi the box is entirely new, so everything is freshly installed and checked out#2019-03-2913:09Jacob HaagHas anyone had the issue of opening a clojure project and it wont show the content of the src folder? If so is there any easy fix? PS. I have cursive installed and I opened the project from the project.clj#2019-03-2914:42jonathanI had that problem randomly with a non-clojure project. In my scenario my project was a multi-module project so I removed and re-added the module to fix it#2019-03-2914:43jonathanit happened to me 1 or 2 days ago, maybe an intellij bug ?#2019-03-2914:45jonathanI just updated IntelliJ to 2019.1 and now I can no longer start the repl on a project which uses jdk7#2019-03-2914:45jonathan
objc[53168]: Class JavaLaunchHelper is implemented in both /Library/Java/JavaVirtualMachines/jdk1.7.0_80.jdk/Contents/Home/bin/java (0x1060094c0) and /Library/Java/JavaVirtualMachines/jdk1.7.0_80.jdk/Contents/Home/jre/lib/libinstrument.dylib (0x1060834e0). One of the two will be used. Which one is undefined.
Error loading nrepl.server: java.lang.UnsupportedClassVersionError: nrepl/QuotaExceeded : Unsupported major.minor version 52.0, compiling:(nrepl/middleware/print.clj:1:1)
Exception in thread "main" java.lang.ClassNotFoundException: nrepl.server, compiling:(/private/var/folders/6w/qtcg9z3s3qz32gj2w8lwpxbm0000gn/T/form-init3313011468797238013.clj:1:1426)
	at clojure.lang.Compiler.analyzeSeq(Compiler.java:7010)
	at clojure.lang.Compiler.analyze(Compiler.java:6773)
	at clojure.lang.Compiler.access$300(Compiler.java:38)
	at clojure.lang.Compiler$LetExpr$Parser.parse(Compiler.java:6368)
	at clojure.lang.Compiler.analyzeSeq(Compiler.java:7003)
	at clojure.lang.Compiler.analyze(Compiler.java:6773)
	at clojure.lang.Compiler.analyze(Compiler.java:6729)
	at clojure.lang.Compiler$BodyExpr$Parser.parse(Compiler.java:6100)
	at clojure.lang.Compiler$FnMethod.parse(Compiler.java:5460)
	at clojure.lang.Compiler$FnExpr.parse(Compiler.java:4022)
	at clojure.lang.Compiler.analyzeSeq(Compiler.java:7001)
	at clojure.lang.Compiler.analyze(Compiler.java:6773)
	at clojure.lang.Compiler.eval(Compiler.java:7059)
	at clojure.lang.Compiler.eval(Compiler.java:7052)
	at clojure.lang.Compiler.eval(Compiler.java:7052)
	at clojure.lang.Compiler.load(Compiler.java:7514)
	at clojure.lang.Compiler.loadFile(Compiler.java:7452)
	at clojure.main$load_script.invokeStatic(main.clj:278)
	at clojure.main$init_opt.invokeStatic(main.clj:280)
	at clojure.main$init_opt.invoke(main.clj:280)
	at clojure.main$initialize.invokeStatic(main.clj:311)
	at clojure.main$null_opt.invokeStatic(main.clj:345)
	at clojure.main$null_opt.invoke(main.clj:342)
	at clojure.main$main.invokeStatic(main.clj:424)
	at clojure.main$main.doInvoke(main.clj:387)
	at clojure.lang.RestFn.applyTo(RestFn.java:137)
	at clojure.lang.Var.applyTo(Var.java:702)
	at clojure.main.main(main.java:37)
Caused by: java.lang.ClassNotFoundException: nrepl.server
	at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
	at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
	at clojure.lang.DynamicClassLoader.findClass(DynamicClassLoader.java:69)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
	at clojure.lang.DynamicClassLoader.loadClass(DynamicClassLoader.java:77)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
	at java.lang.Class.forName0(Native Method)
	at java.lang.Class.forName(Class.java:278)
	at clojure.lang.RT.classForName(RT.java:2204)
	at clojure.lang.RT.classForNameNonLoading(RT.java:2217)
	at clojure.lang.Compiler$HostExpr.maybeClass(Compiler.java:1041)
	at clojure.lang.Compiler.macroexpand1(Compiler.java:6942)
	at clojure.lang.Compiler.analyzeSeq(Compiler.java:6989)
	... 27 more
#2019-03-2914:46jonathanany ideas? thinking of downgrading back to 2018.x#2019-03-2915:19Alex Miller (Clojure team)this: Error loading nrepl.server: java.lang.UnsupportedClassVersionError: nrepl/QuotaExceeded : Unsupported major.minor version 52.0, compiling:(nrepl/middleware/print.clj:1:1) sounds like nrepl compiled with Java 8 (and thus not supported with java 7)#2019-03-2915:25jonathanyeah I suppose the newer version of the cursive plugin is using an nrepl version which requires jdk8#2019-03-2915:26jonathanI changed the project to use jdk8 but kept the source and target at jdk7#2019-03-2915:26jonathanseems to have worked. thanks#2019-03-2921:01cfleming@jonjanisch Hmm, that’s unfortunate, sorry about that. Yes, it appears that the new nREPL requires Java 8: https://nrepl.org/nrepl/0.6.0/installation.html#2019-03-3013:45potetmYesterday I was screen sharing in a codebase that heavily uses component protocols. Unfortunately, because of the lack of protocol navigation, it didn’t demo super well for the emacs folks (though to be honest I have no idea what their protocol navigation story is).#2019-03-3107:21flowthingI also work on a codebase that makes really heavy use of protocols, so I’d really love protocol navigation as well. It’s #1 on my wishlist, actually. #2019-03-3013:46potetmJust wanted to bring it up, since it was resurfaced in my awareness 🙂#2019-03-3013:46potetmI upvoted the appropriate issue: https://github.com/cursive-ide/cursive/issues/437#2019-03-3120:09mbjarlandIs there a way to get cursive to grok custom macros or is this just a known limitation?#2019-03-3120:16potetm@mbjarland The answer to your question is, “yes”: https://cursive-ide.com/userguide/macros.html#2019-03-3120:16potetmsee: “Customising symbol resolution”#2019-03-3120:16potetmBut I’m going to also take a second and encourage you to consider the worth of that macro as well 🙂#2019-03-3120:19potetmIf I understand correctly, the following is equivalent:
(str/join "\n"
          (for [w ["alice" "writing" "desk"]
                fmt ["%20s" "%-20s"]]
            (format fmt w)))
#2019-03-3120:21potetmAs a reader, I would honestly prefer to just see that^ in the code. Offhand, it seems like a pretty unique case.#2019-03-3120:24potetmBut if it’s a pattern that keeps arising, I would suggest making a regular fn:
(defn format-each-and-join [inputs formats]
  (str/join "\n"
            (for [w inputs
                  fmt formats]
              (format fmt w))))

(format-each-and-join ["alice" "writing" "desk"]
                      ["%20s" "%-20s"])
#2019-03-3120:33mbjarland@potetm thank you, point taken, an yes, I would much prefer a function as well. This is however a recurring pattern in the code I’m in and the for comprehensions are somewhat complex…need to mull on whether I can get away with a function.#2019-03-3120:34potetmHowever, if you do in fact require permutations of inputs and complex formatting, then this seems reasonable. E.g.:
(sfor [a ["alice" "writing" "desk"]
        b ["bob" "flying" "plane"]]
       (format "%20s %20s" a b)
       (format "%-20s" b))
#2019-03-3120:34mbjarlandthe example use above was contrived and does not reflect the complexity of the actual for comprehensions#2019-03-3120:34potetm@mbjarland Yeah. Simplistic examples lead to simpleton reasoning 🙂#2019-03-3120:35potetmAnyways, back to your original question: Feel free to holler if you have trouble getting resolution working.#2019-03-3120:35mbjarlandA more realistic example#2019-03-3120:37potetmYeah okay — that makes a lot more sense 🙂#2019-03-3120:37potetmDefinitely preferable to use a macro like that^ instead of creating your own mini formatting lang.#2019-03-3120:38mbjarlandso in a case like the above you think it would be warranted to go the macro way?#2019-03-3120:40potetmdefinitely#2019-03-3120:42mbjarlandok - sanity restored, thanks for the feedback…will take a look at the cursive macro support#2019-04-0120:04p-himikA very peculiar behavior after, I think, upgrade of IDEA to 2019.1 and of Cursive to v1.8.1-2019.1. Now, if I open another project in a separate window, the index seems to be broken as some symbols are not resolved. So, the process after I invalidate the index and open project A is: 1. See all symbols in yellow (not resolved) with indexing in progress 2. Wait for the indexing to stop 3. Open project B 4. Indexing of project B is in progress 5. After it's indexed, half of the symbols in project A become yellow again. A simple restart seems to fix the issue, even after I open both of the projects.#2019-04-0121:46cfleming@p-himik Well, that’s unfortunate. Sadly I don’t think there’s much I could do about that on the Cursive side, that sounds like something that’s changed at the IntelliJ level. Hopefully they’ll fix that soon in a 2019.1 point release.#2019-04-0205:02p-himikHmm, we'll see. But the interesting thing is that it doesn't happen for e.g. Python projects.#2019-04-0302:31cflemingOk, let me know if anything new comes up or if it keeps happening. It’s entirely possible that it’s a Cursive bug that’s been exposed by changes in an underlying API, or something similar. The actual indexing code in Cursive hasn’t changed in ages.#2019-04-0200:41salam@cfleming is it an expected behavior for Cursive to index JavaScript files (or any files) in non-Clojure(Script) projects? I’m asking because I keep getting the error reporting pop-up window due to a NPE caused by Cursive failing to parse a React source file in a non-Clojure(Script) project.#2019-04-0201:10cfleming@abdusalam Unfortunately yes - the indexing isn’t tied to a particular project. I’m not sure why the JS parsing has suddenly started failing, but I’m going to investigate it soon.#2019-04-0201:35salamI see, thanks for looking into it.
#2019-04-0314:55henryw374Anyone have experience of clj+cursive on windows? I am unable to get cursive to download and use clj directly (guess a proxy issue), but now I have clj available as a powershell module (see #clj-on-windows) but am so far not able to get cursive to use it I configured Cursive to point to a .bat script, which just does CALL powershell clj %* - ie launches powershell and passes on any args. this appears to work when I run it on its own. on syncing a cursive project, cursive outputs: 'cannot execute: invalid token'.#2019-04-0318:20bocaj@henryw374 Haven't gotten that to work, but have used for a while, using the not command line option.#2019-04-0321:02pezJust listened to the latest episode of The REPL, @cfleming . Very enlightening. And my anarchist soul liked to hear how you get such a relaxed licencing enforcement working for your business. Most people are trustworthy. Peace!#2019-04-0321:04cfleming@henryw374 I haven’t tried that, sorry - is the powershell version officially released yet?#2019-04-0321:05cflemingYou can use the “Use tools.deps directly” option at Preferences | Build, Execution, Deployment | Build Tools | Clojure Deps, that was added so that Windows users can use deps.#2019-04-0321:13cfleming@pez Thanks! Yes, the nicest side effect of having the non-commercial licence is that then I just don’t worry about enforcement of anything since it’s trivial to rip me off if someone wants to. Fortunately users are willing to pay to support me and companies worry about things like breaching EULAs, so it works well without annoying anyone.#2019-04-0400:48cflemingIf anyone is annoyed by the change in brace handling behaviour in IntelliJ 2019.1, please go and vote for https://youtrack.jetbrains.com/issue/IDEA-210104 (see https://github.com/cursive-ide/cursive/issues/2143 for Cursive specific details).#2019-04-0401:56gmercerHi (mac/linux user here), trying to show Clojure using Cursive on Windows, the Refresh/Download open is not intuitive ... what do I need in the users home directory deps.edn ...#2019-04-0402:02gmercer.. in order to use tools.dep directly - see Settings/Build, Execution, Deployment/Build Tools/Clojure Deps#2019-04-0402:06cfleming@gmercer Sorry, I’m not understanding your question.#2019-04-0402:07cflemingThe user’s home directory deps.edn is just the file that you want to use as the user deps - on mac/linux that’s in a standard location, on Windows it isn’t (yet) so I allow you to choose where you want to put it.#2019-04-0402:08gmercerWhat are the contents of that file in order for the version drop down list to become populated ?#2019-04-0402:09cflemingThe version drop down list isn’t populated based on that file, that’s queried from the Maven repository.#2019-04-0402:10cflemingWhen you press “Refresh”, that list will be populated. Then you choose a version and press “Download” to fetch it.#2019-04-0402:10gmercerExcellent ... and our local repo does not contain a tools.dep.alpha hence the issue .. I will get it loaded and we will be on our way#2019-04-0402:10cflemingOk, great.#2019-04-0402:11gmercerThanks heaps Colin ..#2019-04-0402:12cfleming@gmercer No worries! One thing is that if you’re going to fetch that from a local repo, artifactory or something, then it will need Maven indexes built for the version querying to work.#2019-04-0402:13gmercerThanks - note taken#2019-04-0402:15gmercerActually during one wrestle we got it installed locally but that would alos need the indexing#2019-04-0402:30kdhowardI installed IntelliJ Community 2019.1 and Cursive. I am using Leiningen. I created a project and then imported it into IntelliJ. I then tried to run nRepl but I am getting the following exceptions. Any help on what I'm doing wrong would be greatly appreciated.#2019-04-0402:31kdhoward#2019-04-0402:35cfleming@kdhoward You don’t need the cider middleware to work with Cursive, so you should remove that.#2019-04-0402:35cflemingHopefully that will fix your problem.#2019-04-0402:44kdhoward@cfleming I removed all plugins that I had downloaded except for Cursive and I'm still seeing the problem. How would I go about removing cider? I don't believe I installed it (at least not knowingly)#2019-04-0405:40henryw374@cfleming Re: You can use the “Use tools.deps directly” option at Preferences | Build, Execution, Deployment | Build Tools | Clojure Deps, that was added so that Windows users can use deps. Thanks, but unfortunately that doesnt work for me, even though Intellij has a proxy set up. Similarly Cursive cannot download lein itself, but if I have lein installed already, cursive will work. Is there somewhere I can unzip the clojure.tools jar that Cursive will be able to use it?#2019-04-0406:20cfleming@kdhoward You probably have it in ~/.lein/profiles.clj#2019-04-0409:16cfleming@henryw374 There’s some info here on how to get deps to use a proxy, see https://clojure.org/reference/deps_and_cli under “Maven proxies”. Unfortunately it doesn’t look like I can automatically use the IntelliJ one when calling deps.#2019-04-0409:21henryw374@cfleming - What I mean is that I cannot get intellij to download tool.deps in the first place. when I click 'refresh' it just sits there with a spinner. I guess my intellij cannot access github (firewall... although I can access github from my browser), even though I have the intellij proxy set up. Since I can download tools.deps from a browser, if I could unzip it somewhere that Cursive would recognise, that would be fine as a workaround#2019-04-0409:31cfleming@henryw374 Yes, I just had a shower moment and was coming to say that of course deps doesn’t download itself. I’ll look tomorrow at how to make that code use the IntelliJ proxy. I can’t think of a good workaround unfortunately, since getting the version list depends on repo access.#2019-04-0409:32henryw374👍 that'd be great, cheers#2019-04-0422:30kdhowardThanks @cfleming That did the trick!#2019-04-0500:32j0nidoes cursive collide with the clojure-kit plugin that jetbrains is offering me in the plugins menu?#2019-04-0500:58cfleming@j0ni Yes, it’s a bad idea to have two language plugins for the same language installed.#2019-04-0500:58j0nithumbsup_all cheers#2019-04-0511:19KamuelaAny reason why on a mac the keyboard shortcuts might not be working after a fresh install?#2019-04-0512:57flowthingI think IDEA lets you choose between two keyboard layouts in the wizard that runs after installation. Is it possible you chose the one where the shortcut for “Load file in REPL” is Ctrl + Alt + L? (I think.)#2019-04-0513:21KamuelaI've tried every combination I can think of, but nothing seems to work 😕#2019-04-0513:21flowthingDoes it have a key binding assigned in Settings > Keymap?#2019-04-0513:23KamuelaYeah, just checked, it's command shift L#2019-04-0511:19KamuelaCmd + shift + L I'm looking at specifically#2019-04-0512:16manutter51It works for me, provided that I have the cursor inside the editor window, and I have a matching REPL open. By “matching,” I mean I’m editing a .clj file and the active REPL is a Clojure REPL, or I’m editing a .cljs file and the active REPL is a CLJS REPL. It does not work if you have the cursor inside the REPL; you have to click in the file you want to load first.#2019-04-0513:22Kamuela@manutter51 how would I have a matching REPL open? If I click REPL, it's just an empty window/pane#2019-04-0513:22manutter51Ok, you probably haven’t started one yet.#2019-04-0513:24manutter51At the top right of the window you should see a button to configure a build configuration, which is where you set up the REPL to run. If you don’t have any build configurations, it will look like this.#2019-04-0513:27manutter51Click the “Add Configuration…” button to open up the Run/Debug Configurations window, then click the plus sign at the top left corner and select Clojure REPL -> Local from the menu#2019-04-0513:30manutter51Change the Name from “Unnamed” to “CLJ REPL,” and the default values should be good for the rest of the stuff. Click OK to add it as a new build config. Now at the top right, where it used to say “Add Configuration,” you should see “CLJ REPL”. It’s a menu, so if you don’t see “CLJ REPL”, you can drop it down and it should be one of the menu options.#2019-04-0513:32manutter51This is a once-per-project setup step, so you’ll do this every time you create a new project. Once you have it set up, you’ll see a green arrow to the right of where it says “CLJ REPL”, and you can click that to start your REPL.#2019-04-0513:38Kamuela@manutter51 absolute bingo. Thank you very much for that. Everything working as intended, incl. key combos#2019-04-0513:39manutter51:thumbsup:#2019-04-0513:43manutter51One caveat for future reference (because I kept making this mistake) — in the Edit Configurations window at the top left, there’s a “Templates” line right underneath the plus sign, with a disclosure triangle next to it. If you pop that open, you’ll see a list just like when you click on the plus sign, but those do not create REPL configurations for you. You have to click the plus sign.#2019-04-0705:16Ivan KozIs there a way to extract form into a defn?#2019-04-0708:13cfleming@nxtk No sorry, there isn’t, but there really should be.#2019-04-0711:22Jakub Holý (HolyJak)Problem #1: Hello, how to solve "Clojure command not configured"? Thank you! (Trying to start REPL in a deps.edn project, latest IntelliJ. clj works from the terminal and seems correctly configured at ... Build Tools - Clojure Deps. I have just switched from IntelliJ CE 2018.? where it worked to 2019.1)#2019-04-0711:35Jakub Holý (HolyJak)Restarting IntelliJ and/or switching to using tools.deps directly and back to CLI fixed it.#2019-04-0711:29Jakub Holý (HolyJak)Problem #2: The page https://cursive-ide.com/userguide/support.html mentions the url https://cursive-ide.com/datomic-stubs-0.9.5153.jar but it returns 404 @cfleming#2019-04-0711:40Jakub Holý (HolyJak)Problem #3: I have followed https://github.com/danielcompton/defn-spec/blob/master/doc/cursive.md but (ds/defn myfn .. still complains that "myfn cannot be resolved". How can I troubleshoot? Thank you! (IntelliJ 2019.1, Cursive 1.8.1)#2019-04-0801:27souenzzo@U0522TWDA you can let your cursor over the ds/defn then will appear a yellow lamp https://www.jetbrains.com/help/idea/intention-actions.html Then you set Resolve ds/defn ... to resolve as clojure.core/defn#2019-04-0805:05Jakub Holý (HolyJak)I see the problem - the highlight is on the name of the function and thus symbol resolution is added but for the name of the function - myfn - and not for the macro ds/defn as needed. So I need to take care to click at the ds/defn itself and wait for the lightbulb, even though it is not highlighted.#2019-04-0805:05Jakub Holý (HolyJak)I see the problem - the highlight is on the name of the function and thus symbol resolution is added but for the name of the function - myfn - and not for the macro ds/defn as needed. So I need to take care to click at the ds/defn itself and wait for the lightbulb, even though it is not highlighted.#2019-04-0814:47sparkofreasonCross-posting from #rebl: Trying to run REBL from within Cursive. It works fine from the command line, so I think my deps.edn is correct, but when using the setup for cursive from the REBL wiki I'm getting java.lang.ClassNotFoundException: javafx.fxml.FXMLLoader#2019-04-0819:49thumbnailI noticed the console doesn’t do \r correctly; but it seems like a IntelliJ issue (https://youtrack.jetbrains.com/issue/IDEA-147282). are there known workarounds?#2019-04-0819:49joshkhi have a clojurescript nrepl running via shadow cljs. i've followed the guide [1] and can connect just fine, but cursive complains when i try to load a cljs name space: Cannot load ClojureScript file into Clojure REPL. is there a way around this? 🙂 [1] https://github.com/thheller/shadow-cljs/wiki/Cursive#2019-04-0819:59manutter51@joshkh there’s a little dropdown menu in the toolbar at the top of the REPL window that you can change from CLJ to CLJS to let cursive know what’s on the other end of your nrepl.#2019-04-0820:04joshkhnice! okay, that got me a little farther, but now there's another error: No reader function for tag js:
(ns server.main)

(defn handler [_ _ cb]
  (cb nil
      #js {:statusCode 200
           :body       (js/JSON.stringify "Hello!")}))
Loading src/server/main.cljs... 
Syntax error reading source at (main.cljs:6:53).
No reader function for tag js
#2019-04-0821:34cfleming@holyjak re: your question about the datomic stubs jar, that is no longer required in recent Cursive versions. Instead, you’ll be prompted to build the stubs automatically when using datomic and other similar libraries.#2019-04-0821:35cfleming@dave.dixon I’ll try to reproduce that today.#2019-04-0821:42sparkofreasonFYI, seems to work with Java 8. Unfortunately, REBL doesn't render correctly in Java 8 on a HiDPI display.#2019-04-0821:46cfleming@dave.dixon When you run your REPL, you can look at the classpath used by un-folding the second line in the console. Are the JavaFX jars there?#2019-04-0821:50sparkofreasonYes.#2019-04-0821:57cflemingI can’t see why it wouldn’t be able to find that class then - that’s very strange.#2019-04-0822:00sparkofreasonIs this maybe the issue of a long classpath getting truncated on windows?#2019-04-0822:00sparkofreasonBut it works from the command line, so maybe not.#2019-04-0822:14cflemingThere’s an option to control that in the run configuration - if you think that might be the problem, try “classpath file” under “Shorten command line”.#2019-04-0822:21sparkofreasonNo luck.#2019-04-0822:22sparkofreasonMaybe a classloader issue? Here's part of the info that is shown with the exception: Caused by: java.lang.ClassNotFoundException: javafx.fxml.FXMLLoader at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:583) at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178) at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521) at java.base/java.lang.Class.forName0(Native Method) at java.base/java.lang.Class.forName(Class.java:398) at clojure.lang.RT.classForName(RT.java:2207) at clojure.lang.RT.classForNameNonLoading(RT.java:2220) at cognitect.rebl.renderers$loading__6706__auto____12012.invoke(renderers.clj:3) at cognitect.rebl.renderers__init.load(Unknown Source) at cognitect.rebl.renderers__init.<clinit>(Unknown Source) ... 71 more#2019-04-0821:36cfleming@jeroen.dejong I don’t think so, unfortunately.#2019-04-0821:46sparkofreasonI have a local REPL that insists on running clojure 1.9. Running at the command line using clj runs 1.10. Double-checked the various deps.edn files, where else would I look?#2019-04-0821:49cfleming@dave.dixon Oh, you’re using the “Use t.d.a directly” REPL option on Windows, right? I just realised that I haven’t updated the bundled system deps.edn, so that will be pulling in Clojure 1.9. I’ll fix that, and also make it overridable so that you can choose another file if required.#2019-04-0821:49cflemingIn the meantime, one workaround is to specify the Clojure version in either your user deps.edn or your project one.#2019-04-1004:37sooheonQuick Q: how do I turn off jumping to repl once it’s ready? I see how this could be helpful, but sometimes I’m in a completely different project in another window and it’ll be pretty jarring#2019-04-1009:03cfleming@sooheon.k There isn’t a good way to do this, but there’s an open issue about focus stealing with some discussion: https://github.com/cursive-ide/cursive/issues/1579#2019-04-1009:04cflemingI promised to add an option there but never did, sorry - I’ll try to do that shortly.#2019-04-1009:05sooheonThanks, and no worries!#2019-04-1011:26maximtopIs this issue the same as above? https://github.com/cursive-ide/cursive/issues/2146#2019-04-1011:29maximtop#2019-04-1011:29maximtopI try to type something but nothing is visible although I know that text is typed there Only cursor is visible and errors)#2019-04-1011:31manutter51No, that’s a gotcha that’s particularly vexing in dark mode — the actual REPL is collapsed at the bottom of the panel, and you’re only seeing the REPL output panel.#2019-04-1011:31manutter51If you look closely, there’s a bar at the bottom that you can drag up to reveal the REPL itself, but in dark mode it looks like just part of the frame#2019-04-1011:33manutter51At least I think that’s what you’re seeing — I got bit by that one a while back and it took me quite a while to realize what was going on.#2019-04-1011:54maximtopyes you are right#2019-04-1011:54maximtopThank you, @manutter51#2019-04-1011:54maximtopActually it looks weird)#2019-04-1023:57cfleming@manutter51 @maximtop Yes, that problem is very strange. I can’t figure out how it ends up happening to so many people.#2019-04-1108:43jamescroftIn cursive I want to start two REPLs, one for clj and one for cljs. To do this I have defined two run configurations and then a compound configuration that starts both of them. Sometimes this works, but sometimes it tries to start both REPL in the same REPL tab. This is what it looks like when it goes wrong:#2019-04-1108:43jamescroft#2019-04-1108:44jamescroftAnd when it works correctly I have two REPL tabs:#2019-04-1108:45jamescroft#2019-04-1108:45jamescroftMy compound configuration:#2019-04-1108:45jamescroft#2019-04-1108:46jamescroftAny idea why the two REPLs sometimes end up in the same tab, and sometimes in different tabs? Any ideas on how I can prevent them opening in the same tab?#2019-04-1121:33cfleming@jamescroft Hmm, that might be because the run config tries to re-use some things internally (like the Build toolwindow pane for a particular config) and starting two is racey#2019-04-1121:35borkdude(responding from thread in clojure-dev:) no problems, it’s probably a bug in IntelliJ and I’ll let them handle it for now#2019-04-1208:23jamescroft@cfleming is there any workaround that you can think of to prevent it doing that?#2019-04-1212:50Chris LaneIs it possible to set custom auto-completions in cursive intellij? e.g. pprint -> clojure.pprint/pprint#2019-04-1212:54manutter51Yes, check in the Preferences under Editor -> Live Templates.#2019-04-1212:55manutter51https://www.jetbrains.com/help/idea/using-live-templates.html#2019-04-1212:56Chris LaneAh yes thanks, I was looking under the completions sections#2019-04-1514:42Ivan KozWhy breakpoint does nothing? https://gyazo.com/3f532946050fb9528b6aa2a6d7240790.png#2019-04-1515:15turkkamI think my-vector is bound before the breakpoint is attached. Try (defn my-vector [] ...) and (println (my-vector))#2019-04-1515:42Ivan Kozgood point, is there a way to change that somehow?#2019-04-1518:44Kari MarttilaHow mature is deps.edn with the latest Cursive version? I have IntelliJ IDEA Ultimate 2019.1 and Cursive 1.8.1-2019.1? Do you recommend using deps.edn with Cursive instead of Leiningen?#2019-04-1520:36wilkerluciototally, I use deps in every project I can, works great on latest Cursive versions#2019-04-1607:07Kari MarttilaOk. Thanks for the info. Maybe I also start using deps.edn instead of Leiningen.#2019-04-1519:01shaun-mahood@kari.marttila I'm on an older version of intellij community, and I've been using deps.edn for a while and loving it.#2019-04-1607:17Kari MarttilaI'm trying to configure Cursive with deps.edn. Cursive says in build window: "sync failed" and ""Cannot execute: Clojure command not configured". Any idea how to configure this in Cursive?#2019-04-1607:46Kari MarttilaI found how to fix this. I had created the project manually in Cursive. I removed the project in Cursive, deleted the .idea directory, and imported the project as deps.edn external project - works now.#2019-04-1622:48cfleminghttps://twitter.com/CursiveIDE/status/1118280781141438465#2019-04-1705:32Lennart BuitI like how it says that it “looks like HTML”, computer aint sure about that#2019-04-1722:20cflemingThat’s when the clipboard contains text from outside IntelliJ. If you cut from an HTML file within IntelliJ then it knows what it is and says “The clipboard content was copied from an HTML file” instead.#2019-04-1622:48cfleminghttps://twitter.com/CursiveIDE/status/1118281836856143872#2019-04-1716:01conani just updated intellij and cursive. am i going crazy, or is it now highlighting the brace after my cursor instead of before? i'm sure it used to be the other way round#2019-04-1722:12polymerisJust joined the channel just to see if somebody had a fix for this#2019-04-2319:20timgilbertI noticed that too recently#2019-04-1716:02conani've spent all day writing values outside of maps, i hope it's not just me 😂#2019-04-1716:17manutter51It’s definitely highlighting after the cursor now, been driving me nuts. Never noticed it before.#2019-04-1716:30conanbut did it do the one before previously? that's the question!#2019-04-1717:11manutter51I’m assuming it did — it was intuitive so I never paid attention to it.#2019-04-1900:49elena.pootIt did. If you go to the http://cursive-ide.com/userguide/paredit.html, you can even see it in action in the second animation#2019-04-1716:23Ivan Koz@cfleming is there any possibility to see a dedicated highlighting style for docstrings in near future? It's a pain. https://gyazo.com/0a4910a1c4b51210fcd96dba9aaf1472.png#2019-04-1722:52cflemingUnfortunately that’s actually surprisingly tricky. I’ll see if I can do something there.#2019-04-1716:26Ivan Kozmaybe proper docstring folding also?#2019-04-1716:30Ivan Kozhttps://gyazo.com/5ea3b08f4bf1a520d307103c9d8046d3.png#2019-04-1716:33Ivan Koz🙏#2019-04-1716:45scottsI see Cursive can start a local repl with clojure.main. Can it connect to a remote Socket Server repl? or only nRepl?#2019-04-1717:50Chrishey @cfleming - did something change recently with the way paren matching highlights? When I have two closing parens together it seems now to highlight the one to the right - which makes it a little misleading when we combine it with evaluate statement which evaluates the form to the left of the cursor (and now is not the highlighted one)#2019-04-1717:51ChrisAh, I see that @conan and @manutter51 have just posted on this too.#2019-04-1717:51ChrisAh, I see that @conan and @manutter51 have just posted on this too.#2019-04-1718:17conanPhew! I’m not losing my mind#2019-04-1718:26ChrisYeah, I can't figure out how to enable/disable it in the settings - it's been like this for like a week or so#2019-04-1722:12cfleming@conan @manutter51 Yes, that is super annoying. It’s slated to be fixed in 2019.1.2: https://youtrack.jetbrains.com/issue/IDEA-210104#2019-04-1813:09ChrisAh, thanks @cfleming - good to see it's an issue with IDEA and will be fixed soon!#2019-04-2520:12polymerisThis is "fixed" in 2019.1.2, but it's still highlighting the wrong parens#2019-04-2523:29cfleming@polymeris Yeah, I’ve posted https://youtrack.jetbrains.com/issue/IDEA-210104#focus=streamItem-27-3448073.0-0.#2019-04-1722:12polymerisJust joined the channel just to see if somebody had a fix for this#2019-04-1722:13cflemingOh, and @chris547 @polymeris ^^^#2019-04-2520:12polymerisThis is "fixed" in 2019.1.2, but it's still highlighting the wrong parens#2019-04-1805:44claudiuhi, just curious. Is there something I need to enable to have cursive let me know when I'm not using something I imported ? Seems to work for :as hiccups but not for the values in :refer [x y z]#2019-04-1806:05flowthinghttps://github.com/cursive-ide/cursive/issues/75#2019-04-1808:04heliosConsider that sometimes you want to include a namespace just because you want it to be loaded when evaluating the current namespace. I actually remove the :as on purpose so Cursive won't throw me a warning 😕#2019-04-1808:10claudiuyep. I also do that for namespaces with multimethods or stuff like mount. But it would be nice if cursive would check for unused stuff in :refer I usually end up with a few of those when refactoring 😄 Asked because it seems like "low hanging fruit", it's probably not given the age of the issue#2019-04-1808:14heliosYeah mount is my primary use case. Unused refer sounds like a lovely feature 🙂#2019-04-1817:38dadairI’m sure this has been asked before, but the clojurians log search result throws an exception, so I can’t read the prior answer, but does Cursive have any support for HugSQL ghost definitions, something like https://github.com/rkaercher/hugsql-ghosts?#2019-04-1818:00dmarjenburghThe com.datomic/ion lib comes aot-compiled (no clojure source) so Cursive can’t resolve the names. Is there a way to handle this (via some extern file or something?)#2019-04-1820:27vemv> Cursive does type inference (or propagation, really) in the editor https://news.ycombinator.com/item?id=13918567 Just curious, is this implemented in such a way that it can be ever open-sourced as a general-purpose lib? Having some heuristics for determining the return value of defn foo could have quite some applications I know there's typed-clojure and spectrum but I'm looking for something relatively lightweight and unassuming (no core.typed, no spec, etc)#2019-04-1821:52cfleming@claudiu No, that doesn’t work right now, but I’m actually planning to add that soon as part of some namespace refactoring improvements.#2019-04-1821:53cfleming@dadair No, it doesn’t - I’ve never seen that before. It looks interesting, thanks!#2019-04-1821:53cfleming@dmarjenburgh I’ll have to add it to the list of things that stubs are generated for, thanks.#2019-04-1821:56cfleming@dmarjenburgh https://github.com/cursive-ide/cursive/issues/2156#2019-04-1821:56cfleming@vemv No, it’s not, sorry - it relies on a fair number of IntelliJ/Cursive internals.#2019-04-1822:46vemvthanks for letting me know!#2019-04-1916:12kleopatraI'm getting an error starting a REPL on cursive:
[WARNING] No nREPL middleware descriptor in metadata of #'cider.piggieback/wrap-cljs-repl, see clojure.tools.middleware/set-descriptor!
Connecting to local nREPL server...
Unhandled REPL handler exception processing message {:id 5f9fb0ec-25e0-40da-8031-b3ad9f3aeeda, :op clone}
java.lang.NullPointerException
	at clojure.core$deref_future.invokeStatic(core.clj:2300)
	at clojure.core$deref.invokeStatic(core.clj:2320)
	at clojure.core$deref.invoke(core.clj:2306)
	at cider.piggieback$wrap_cljs_repl$fn__34830.invoke(piggieback.clj:302)
	at nrepl.middleware$wrap_conj_descriptor$fn__34424.invoke(middleware.clj:16)
	at clojure.tools.nrepl.server$handle_STAR_.invokeStatic(server.clj:19)
	at clojure.tools.nrepl.server$handle_STAR_.invoke(server.clj:16)
	at clojure.tools.nrepl.server$handle$fn__33656.invoke(server.clj:28)
	at clojure.core$binding_conveyor_fn$fn__5739.invoke(core.clj:2030)
	at clojure.lang.AFn.call(AFn.java:18)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:748)
nREPL server started on port 58578 on host 127.0.0.1 - 
The weird thing is that lein repl works fine. I have lein version 2.9.1 on MacOS and this particular project has, in its dev dependencies, nrepl 0.6.0 and the latest cider.piggieback
#2019-04-1922:01currentoorOn most macros I’m able to put my cursor on them, click the lightbulb and select resolve as but on some macros the resolve as option doesn’t show up, any ideas?#2019-04-2704:07tony.kayUsually that happens with nested macros like in specter..you have to go to the library and find the macro that is declaring the macro, resolve-as that, and then you can go up a level and get it to work at the next layer, etc.#2019-04-1923:12Drew Verleei started a a remote repl and my output looks like this:
Connecting to remote nREPL server...
Clojure 1.10.0
I would have expected a place to send forms to the repl or an exception.
#2019-04-1923:12Drew Verleei'm not sure what the output is telling me#2019-04-1923:20Drew Verleegods, the UI for this is so confusing, its there but its at the bottom and you have to manual enlarge the spece to send the forms and there is no prompt#2019-04-1923:21Drew Verleethe repl is hidden, can you find it 🙂#2019-04-2000:57Drew VerleeHow would i pass -J-Dtrace to intellji? i assume this is a jvm argument, but if i pass it then it says its an unregonized option. But clj 'A:dev -j-Dtrace works, and i assume -j-Dtrace is getting passed as a jvm argument there as well.#2019-04-2003:36cfleming@drewverlee Yeah, I’m sorry about that - for some reason for some people the REPL input pane gets completely collapsed, and in particular in dark mode it’s really hard to see. I’m going to have to show a warning when that happens, I have no idea how it happens to so many people.#2019-04-2004:31Drew Verleeno worries. it might be because of something in my setup...#2019-04-2003:36cflemingI think what you want to put in the JVM argument field is just -Dtrace - the -j bit is just to tell deps “what comes after the -j is a JVM arg”#2019-04-2003:37cflemingThat’s IIRC, I don’t have my computer in front of me.#2019-04-2003:48Drew Verleedamn, yea thats a good guess. i thought it might be something like that, but i ran out of guess energy and googling jvm related stuff always lands me in trouble.#2019-04-2011:04kwladykaHow do you use environment variables for project in Curisve for deps.edn (no lein / boot)? Is any way to use .envrc instead of adding it manually in UI#2019-04-2014:38kennyI haven't found a way to do this and would be interested in if anyone has a solution as well. I suspect this is an IntelliJ issue rather than Cursive.#2019-04-2111:25cfleming@U0WL6FA77 @U083D6HK9 Have you tried this? https://plugins.jetbrains.com/plugin/7861-envfile#2019-04-2111:26cfleming(I haven’t, just googled quickly)#2019-04-2111:27cflemingSome tips on a working setup: https://intellij-support.jetbrains.com/hc/en-us/community/posts/206059469--Best-mechanism-to-share-environment-between-command-line-and-RubyMine?page=1#community_comment_360000269860#2019-04-2111:28cflemingOr here: https://medium.com/@tmaslen/keeping-environment-variables-local-to-a-project-directory-on-the-terminal-and-with-intellij-c928c2016599#2019-04-2111:36kwladykaI tired it but there is no EnvFile tab for Cursive REPL configuration#2019-04-2111:37kwladykaIt let use .env instead of UI, but still it wouldn’t work if run repl from the shell. There are tips and tricks, but if I have to use them, then it is easier to use UI.#2019-04-2111:38kwladykaAt least I couldn’t tests if further, because I don’t have EnvFile tab#2019-04-2123:30cflemingOk, I’ll take a look to see if I can fix that.#2019-04-2123:32cflemingActually, I remember now, there was already some discussion on how to make this work - I think we both think we’re waiting on the other for feedback. I’ll ping him again: https://github.com/ashald/EnvFile/issues/20#2019-04-2204:06cflemingI think I have fixed this as part of https://github.com/cursive-ide/cursive/issues/2160, it’ll be in the next drop. This is surprisingly tricky and it’s completely undocumented so I hope I’m doing the right thing, but it seems to work for simple cases. Any problem reports very welcome.#2019-04-2208:11kwladykathanks for interested in the topic 🍻#2019-04-2011:04kwladyka#2019-04-2111:33cfleming@drewverlee https://github.com/cursive-ide/cursive/issues/2159#2019-04-2205:05cjmurphyDoes a recent version of Cursive support mount's defstate macro, at least so that it can be interpreted as def?#2019-04-2205:07cfleming@cjmurphy You can teach it yourself: https://cursive-ide.com/userguide/macros.html#2019-04-2205:09cfleming(Cursive should probably support that one natively, since Mount is pretty popular these days, but it looks like it doesn’t out of the box)#2019-04-2205:10cjmurphyI know about that trick from Fulco, get the yellow lightbulb up and it is one of the options, but the only option I'm getting is "Create function 'defstate'".#2019-04-2205:12cflemingThat can sometimes happen if the intention gets disabled, check under Preferences | Editor | Intentions | Clojure | Resolution that it’s enabled.#2019-04-2205:14cjmurphy'Preferences' is a Mac thing I believe, searching for same on Linux machine...#2019-04-2205:15cjmurphyGot it#2019-04-2205:16cjmurphyResolution is ticked. Start from File/Settings for non-Mac machines.#2019-04-2205:19cjmurphyMy Cursive is version 1.7.0-2017.3. But I think s/be recent enough to have the 'redefine as' stuff.#2019-04-2205:19cflemingYes, definitely.#2019-04-2205:19cflemingThat’s strange, then.#2019-04-2205:19cflemingCan you send a screenshot of what you’re seeing when you alt-enter on the lightbulb?#2019-04-2205:20cflemingBy DM if it’s sensitive is fine.#2019-04-2205:20cjmurphyI'm going to Invalidate Caches and Restart. That often fixes strange IDEA things.#2019-04-2205:30cjmurphyInvalidate caches did not help. Nothing sensitive.#2019-04-2209:52cfleming@cjmurphy Oh, so in that case it looks like it can’t actually resolve defstate itself. Is that dep definitely added to your project? You can see that in the dependencies tree in the lein toolwindow on the right.#2019-04-2209:54cjmurphymount:0.1.6 is indeed there in the dependencies tree on the right. Also, well, mount is doing its thing, so I'm sure that mount is there.#2019-04-2209:55cflemingI suspect that defstate itself is defined using a macro, and I dimly remember something about this. One sec.#2019-04-2209:56cjmurphyThe very simple lein project.clj has [mount "0.1.16"] in it as a :dependency.#2019-04-2209:56cjmurphyYes it is a macro.#2019-04-2209:57cflemingRight, I remember now, see: https://github.com/cursive-ide/cursive/issues/1847#2019-04-2209:57cflemingAnd then https://github.com/cursive-ide/cursive/issues/2086#2019-04-2209:57cflemingThat bugfix actually might be later than the version you’re using, one sec#2019-04-2209:58cflemingYes, that fix went into Cursive 1.8.0#2019-04-2209:58cflemingThat’s why you’re not seeing it.#2019-04-2209:59cjmurphyOkay thanks, I'll upgrade to 1.8.0.#2019-04-2210:36Adrian SmithI've clicked file -> new -> project -> deps in cursive and its generated a file with
{:deps {}}
inside but cursive shows me this error:
#2019-04-2210:36Adrian SmithI have clojure up to date with
brew upgrade clojure
#2019-04-2210:37Adrian Smithboth clj and clojure work on the terminal they start a repl with the latest version#2019-04-2210:39Adrian SmithI can see there is something called Commands that are empty#2019-04-2210:39Adrian Smith#2019-04-2210:44Adrian Smithreinstalling cursive yields the same result, the commands menu isn't there if cursive is uninstalled#2019-04-2211:14cjmurphy@sfyire What is the project SDK?#2019-04-2211:14Adrian SmithI think I solved it by ticking:#2019-04-2211:14Adrian Smithopenjdk 8#2019-04-2222:43cfleming@sfyire You need to configure deps at Preferences | Build, Execution, Deployment | Build Tools | Clojure Deps. In your case you should select “Use CLI tools”.#2019-04-2222:43cflemingYou can also configure that in the project creation/import wizard, but it’s not obvious sometimes.#2019-04-2223:00norbertI already have Use CLI tools selected but when I create a Clojure Application in Run configuration, I get The Clojure jar is not attached to this module. Any idea what I'm doing wrong?#2019-04-2223:03cfleming@norbertpy That means that Clojure isn’t added as a dependency to that module. How did you create the project?#2019-04-2223:04norbertFile > New Project > Clojure > Deps.#2019-04-2223:07cflemingIf you open the Clojure Deps toolwindow (View | Tool Windows | Clojure Deps), is your project registered there?#2019-04-2223:07cflemingIf so, if you open up its dependencies tree, is Clojure in there?#2019-04-2223:09norbertThe window opens but there is nothing in there but then if I try to add it, it says It's already registered. I added clojure as a dependency from Alex Miller's hint but I get Sync Failed messages.#2019-04-2223:09norbertI think I have screwed some parts and this is not related to cursive.#2019-04-2223:10norbertBut I have hard time figuring it out. Newbie Clojurist, sorry.#2019-04-2223:10cflemingThere’s definitely something wonky there.#2019-04-2223:10cflemingLet’s go through creating a new project from scratch.#2019-04-2223:11cflemingHopefully that will work better.#2019-04-2223:11norbertLet's do it. Should I check auto-import?#2019-04-2223:11cflemingSo, File | New | Project…, then Clojure | Deps#2019-04-2223:12cflemingYeah, that’s generally a good idea.#2019-04-2223:12norbertexplicit module or qualified?#2019-04-2223:12cflemingUmm#2019-04-2223:12cflemingI’m not seeing that - can you send a screenshot?#2019-04-2223:13norbert#2019-04-2223:13cflemingCan you send that whole wizard screen?#2019-04-2223:13cflemingWhich version of Cursive are you running?#2019-04-2223:14norbertThat the entire of it.#2019-04-2223:14cflemingOk.#2019-04-2223:14norbert#2019-04-2223:14cflemingI can’t remember if that changed recently.#2019-04-2223:14cflemingOk, stick with explicit.#2019-04-2223:15norbertversion 1.8.1-2018.1#2019-04-2223:15cflemingHmm#2019-04-2223:15cflemingOk, I’m going to ignore that for now, but I’m not sure what’s going on there.#2019-04-2223:16cflemingAnyway, next page, give the project a name and press Finish.#2019-04-2223:16norbertAlright, I have an empty project and an empty deps.#2019-04-2223:16norbertBanner says, Project SDK is not defined.#2019-04-2223:16cflemingIf you open the Build toolwindow, does the Sync complete ok?#2019-04-2223:17cflemingOk, we’ll fix that - File | Project Structure…#2019-04-2223:17norbertNo:
java.lang.ExceptionInInitializerError
	at com.intellij.externalSystem.JavaProjectData.<clinit>(JavaProjectData.java:44)
	at cursive.deps.DepsProjectResolver.resolveProjectInfo(DepsSupport.kt:313)
	at cursive.deps.DepsProjectResolver.resolveProjectInfo(DepsSupport.kt:291)
	at com.intellij.openapi.externalSystem.service.remote.RemoteExternalSystemProjectResolverImpl.lambda$resolveProjectInfo$0(RemoteExternalSystemProjectResolverImpl.java:37)
	at com.intellij.openapi.externalSystem.service.remote.AbstractRemoteExternalSystemService.execute(AbstractRemoteExternalSystemService.java:58)
	at com.intellij.openapi.externalSystem.service.remote.RemoteExternalSystemProjectResolverImpl.resolveProjectInfo(RemoteExternalSystemProjectResolverImpl.java:37)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at com.intellij.openapi.externalSystem.service.RemoteExternalSystemFacadeImpl$1.invoke(RemoteExternalSystemFacadeImpl.java:115)
	at com.sun.proxy.$Proxy3.resolveProjectInfo(Unknown Source)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:346)
	at sun.rmi.transport.Transport$1.run(Transport.java:200)
	at sun.rmi.transport.Transport$1.run(Transport.java:197)
	at java.security.AccessController.doPrivileged(Native Method)
	at sun.rmi.transport.Transport.serviceCall(Transport.java:196)
	at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:568)
	at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:826)
	at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.lambda$run$0(TCPTransport.java:683)
	at java.security.AccessController.doPrivileged(Native Method)
	at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:682)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at java.lang.Thread.run(Thread.java:745)
Caused by: java.util.MissingResourceException: Can't find bundle for base name messages.JavaCoreBundle, locale en_US
	at java.util.ResourceBundle.throwMissingResourceException(ResourceBundle.java:1564)
	at java.util.ResourceBundle.getBundleImpl(ResourceBundle.java:1387)
	at java.util.ResourceBundle.getBundle(ResourceBundle.java:773)
	at com.intellij.core.JavaCoreBundle.getBundle(JavaCoreBundle.java:45)
	at com.intellij.core.JavaCoreBundle.message(JavaCoreBundle.java:33)
	at com.intellij.pom.java.LanguageLevel.<clinit>(LanguageLevel.java:24)
#2019-04-2223:17norbertJust one thing before I waste your time, my intellij is a little old.#2019-04-2223:17cflemingHmm, how old?#2019-04-2223:18norbert2018.1#2019-04-2223:18norbertNot that old but I haven't updated for a while.#2019-04-2223:18cflemingHmm, yeah, it’s not that old but the deps support is built on an API that changes pretty frequently.#2019-04-2223:19cflemingI’m not sure what that exception is telling us. One sec…#2019-04-2223:19norbertThe build is from March 2018. I can upgrade and then report back.#2019-04-2223:20cfleming@norbertpy This looks like your problem: https://github.com/cursive-ide/cursive/issues/2011#2019-04-2223:21cflemingSeems like upgrading IntelliJ might be the fix.#2019-04-2223:21norbertOh, yeah. Let me upgrade and I'll get back to you if it persists.#2019-04-2223:21norbertThanks for the help. I appreciate it.#2019-04-2223:21cflemingNo worries, let me know if you still can’t get it working.#2019-04-2223:22norbertSure 🙏#2019-04-2223:24norbertFixed 🙏 Thank you 🎉#2019-04-2223:28cflemingGreat! Thanks for letting me know.#2019-04-2317:12Jacob HaagIs there a way to format and align a form w/ Cursive?
;; without format
{:fooooooo "barrrr"
 :buzz "bar"}

;; with format
{:fooooooo "barrrr"
 :buzz     "bar"}
#2019-04-2317:28Björn EbbinghausCode > Reformat Code You do not have to set up anything. I recomend to use something like "Save Actions" to format automatically on save. The commit dialog allows you to format before commiting.#2019-04-2317:42Jacob HaagInteresting, when I would use "Reformat Code" it wouldn't format the maps keys and values, I'll give it a go again#2019-04-2321:10cfleming@U994BRXMF For that you need Preferences | Editor | Code Style | Clojure | General | Align map values#2019-04-2317:36kennyIs there a reason I can no longer run more than one REPL? I remember I used to be able to open multiple REPL panes using a single nREPL session.#2019-04-2321:09cfleming@kenny You used to be able to run multiple REPL processes. Someone mentioned the other day that there’s an option “Allow parallel run” which you need to check to allow that - I’m not sure if that’s new or not, I don’t remember seeing it previously. Unfortunately Cursive doesn’t seem to persist that flag, so I assume there’s something I need to fix to make that happen.#2019-04-2321:09cflemingIf you’re talking about spawning new sessions on an existing REPL process, Cursive has never allowed that although I do have a plan to do that soon.#2019-04-2321:20kenny@cfleming I meant the former though I think I described the latter. Where is this "Allow parallel run" option?#2019-04-2321:20kennyFound it - way at the top.#2019-04-2321:24cflemingI’m planning to investigate what I need to do to make that persist.#2019-04-2402:58cfleming@kenny https://github.com/cursive-ide/cursive/issues/2162, fixed in the next build.#2019-04-2403:02wilkerluciohello, I was using Cursive, but out of the blue it just stopped recognising the things from Clojure core, I tried refreshing the deps project, but seems like Cursive got lost#2019-04-2403:03wilkerlucioeverything looking like this#2019-04-2413:13polymerisI saw the same issue a while ago, when the clojure version was changed from 1.9 to 1.10 in the git repo. Invalidate and restart did not solve it for me. Had to change the clojure version manually back and forth for cursive to pick it up. (Using lein, in this case)#2019-04-2413:14polymeris@cfleming ☝️ in case it helps debug#2019-04-2422:42cfleming@wilkerlucio @U0FTV149X @U2FRKM4TW If you have your IntelliJ log and you have a good idea of when this happened, please send the log file indicating roughly when the issue occurred.#2019-04-2422:42cflemingHelp | Show log in Finder/Explorer#2019-04-2422:44cflemingAlso, please let me know if you can reproduce this reliably.#2019-04-2422:46wilkerlucio@cfleming today I did upgrade intellij again, didnt happened since, but if it does I’ll get the logs#2019-04-2507:36p-himikSame, haven't seen it on the new version yet.#2019-04-2520:00polymerisSeeing the issue, again. Traces like these show up in the logs
2019-04-25 15:51:20,782 [  19866]   INFO - il.indexing.FileBasedIndexImpl - Rebuild requested for index ClojureKeywordDefinition 
java.lang.Throwable
	at com.intellij.util.indexing.FileBasedIndex.requestRebuild(FileBasedIndex.java:70)
	at cursive.intentions.resolve$rebuild_all_indexes_BANG_.invoke(resolve.clj:142)
	at clojure.lang.Var.invoke(Var.java:383)
	at cursive.api.DelayedFn.invoke(DelayedFn.java:36)
	at cursive.settings.ClojureProjectResolveSettings$loadState$1.run(ClojureResolveSettings.kt:95)
	at com.intellij.openapi.application.impl.ApplicationImpl$1.run(ApplicationImpl.java:311)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:748)
#2019-04-2520:00polymerisWill update to 2019.1.2 now, see if that helps#2019-04-2620:41mandersonI’ve been experiencing this issue as well. It started today when I upgraded to Cursive v1.8.2-eap1-2019.1 (I’m running IntelliJ 2019.1.1). I was able to resolve one project by fiddling with the JDK settings, but I have another I was not able to get working. (tried “invalidate and restart”) I see similar stacktraces as above:
2019-04-26 16:36:37,912 [  15014]   INFO - il.indexing.FileBasedIndexImpl - Rebuild requested for index ClojureClasses 
java.lang.Throwable
	at com.intellij.util.indexing.FileBasedIndex.requestRebuild(FileBasedIndex.java:70)
	at cursive.intentions.resolve$rebuild_all_indexes_BANG_.invoke(resolve.clj:142)
	at clojure.lang.Var.invoke(Var.java:383)
	at cursive.api.DelayedFn.invoke(DelayedFn.java:36)
	at cursive.settings.ClojureProjectResolveSettings$loadState$1.run(ClojureResolveSettings.kt:95)
	at com.intellij.openapi.application.impl.ApplicationImpl$1.run(ApplicationImpl.java:311)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:748)
#2019-04-2700:07wilkerlucio~{:tag :span, :attrs {:class "username"}, :content ({:tag :a, :attrs {:href "/_/_/users/U0DEB9H5W"}, :content ("@U0DEB9H5W")})}~ nevermind, I'm on 2019.1.1, confused the version#2019-04-2403:03wilkerluciothe clojure setup is correct, my deps.edn is this for this project:
{:deps {org.clojure/clojure       {:mvn/version "1.10.0"}
        org.apache.jena/jena-core {:mvn/version "3.10.0"}
        org.apache.jena/jena-arq  {:mvn/version "3.10.0"}
        org.apache.jena/jena-iri  {:mvn/version "3.10.0"}
        org.apache.jena/jena-tdb  {:mvn/version "3.10.0"}}}
#2019-04-2403:04wilkerlucioit got back working after restarting IntelliJ entirely#2019-04-2403:06cfleming@wilkerlucio Which IntelliJ version are you on? Did you just upgrade?#2019-04-2403:06wilkerlucio
IntelliJ IDEA 2019.1 (Ultimate Edition)
Build #IU-191.6183.87, built on March 27, 2019
JRE: 1.8.0_202-release-1483-b39 x86_64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
macOS 10.14.1
#2019-04-2403:06wilkerlucioits been some time since I did the update#2019-04-2403:14currentoor@wilkerlucio that happened to too, invalidate cache and restart fixed it#2019-04-2403:14currentoorin the File menu#2019-04-2403:15wilkerluciothanks, in my case just a regular restart (without invalidating caches) did the trick#2019-04-2413:23wilkerlucio@cfleming the same issue just happened again, I had just that project open (lets call it A), then I opened project B, just after that project A resolution got broken again#2019-04-2413:25wilkerlucioand at work I had reports from other coworkers that this is happening with some frequency, not totally sure but seems to started to happen more often after upgrading to IntelliJ 2019#2019-04-2414:36borisDoes anyone know what action is run when a user hits the escape key in the repl? It shifts focus away from the repl editor and back to the last file edited. I’m asking because I’d like to rebind this behavior so that cmd+\ toggles between focusing and hiding the repl editor and so far it only does the former#2019-04-2415:01manutter51Looks like it does the Editor -> Escape action, as far as I can see.#2019-04-2422:33cfleming@wilkerlucio Someone else mentioned that too, exactly the same symptoms. I think it must be an IntelliJ bug.#2019-04-2422:34cflemingDoes it always happen with a particular project, or does it seem to be random?#2019-04-2514:02jffryI've had the same issue since upgrading to IDEA 2019.1.1 and Cursive 1.8.1. I used the cursive 1.8.1-eap in IDEA 2018.3 without issue. It seems to be nondeterministic - repeatedly loading the same project sometimes fails and sometimes succeeds. I dumped some logs at https://gist.github.com/jffry/228c51978b1f351866a3be98bad5db6d and am happy to help troubleshoot further#2019-04-2514:05jffryI should add that I've experienced this with a variety of projects, some leiningen and some deps, and I have experienced it with both freshly-checked-out repos and projects that have been on my machine for years#2019-04-2422:37cfleming@boris834 Unfortunately ESC jumping back to the editor from toolwindows is hard-coded in IntelliJ. There are various IdeaVim issues about this, and various hacks in recent IntelliJ versions, but it’s not very customisable.#2019-04-2620:41mandersonI’ve been experiencing this issue as well. It started today when I upgraded to Cursive v1.8.2-eap1-2019.1 (I’m running IntelliJ 2019.1.1). I was able to resolve one project by fiddling with the JDK settings, but I have another I was not able to get working. (tried “invalidate and restart”) I see similar stacktraces as above:
2019-04-26 16:36:37,912 [  15014]   INFO - il.indexing.FileBasedIndexImpl - Rebuild requested for index ClojureClasses 
java.lang.Throwable
	at com.intellij.util.indexing.FileBasedIndex.requestRebuild(FileBasedIndex.java:70)
	at cursive.intentions.resolve$rebuild_all_indexes_BANG_.invoke(resolve.clj:142)
	at clojure.lang.Var.invoke(Var.java:383)
	at cursive.api.DelayedFn.invoke(DelayedFn.java:36)
	at cursive.settings.ClojureProjectResolveSettings$loadState$1.run(ClojureResolveSettings.kt:95)
	at com.intellij.openapi.application.impl.ApplicationImpl$1.run(ApplicationImpl.java:311)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:748)
#2019-04-2505:35ikitommiSeen also that non-resolving thing, have been invalidating, restarting and deleting the idea-related files & dirs from the project. Will send logs when it happens next. Annoyingly random.#2019-04-2513:31claudiuhi 🙂 just updated to the latest cursive 1.8.2-eap1 and intellij 2019.1.2 Preivew. I updated clojuredocs from languages and frameworks, but just the usual stuff when I type something like juxt or view docs on it. Is there anything else I have to do ?#2019-04-2616:29timgilbertTry hitting F1?#2019-04-2514:57gklijsI just updated the plugin and got an error. It seems not able to get the clojuredocs.#2019-04-2514:58gklijsjava.io.IOException: Cannot download 'https://clojuredocs.org/clojuredocs-export.json': http://clojuredocs.org at com.intellij.util.io.HttpRequests$RequestImpl.saveToFile(HttpRequests.java:473) at cursive.documentation.ClojureDocsStartupActivity$notify$listener$1$1$file$1.invoke(ClojureDocs.kt:53) at cursive.documentation.ClojureDocsStartupActivity$notify$listener$1$1$file$1.process(ClojureDocs.kt:23) at com.intellij.util.io.HttpRequests.doProcess(HttpRequests.java:528) at com.intellij.util.io.HttpRequests.process(HttpRequests.java:504) at com.intellij.util.io.HttpRequests.access$100(HttpRequests.java:59) at com.intellij.util.io.HttpRequests$RequestBuilderImpl.connect(HttpRequests.java:357) at cursive.documentation.ClojureDocsStartupActivity$notify$listener$1$1.invoke(ClojureDocs.kt:51) at cursive.documentation.ClojureDocsStartupActivity$notify$listener$1$1.invoke(ClojureDocs.kt:23) at cursive.tasks.TasksKt$inBackground$1.run(Tasks.kt:18) at com.intellij.openapi.progress.impl.CoreProgressManager$TaskRunnable.run(CoreProgressManager.java:731) at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$2(CoreProgressManager.java:164) at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:586) at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:532) at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:86) at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:151) at com.intellij.openapi.progress.impl.CoreProgressManager$4.run(CoreProgressManager.java:403) at com.intellij.openapi.application.impl.ApplicationImpl$1.run(ApplicationImpl.java:311) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748) Caused by: java.net.UnknownHostException: http://clojuredocs.org at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:184) at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392) at java.net.Socket.connect(Socket.java:589) at sun.security.ssl.SSLSocketImpl.connect(SSLSocketImpl.java:666) at sun.net.NetworkClient.doConnect(NetworkClient.java:175) at sun.net.www.http.HttpClient.openServer(HttpClient.java:463) at sun.net.www.http.HttpClient.openServer(HttpClient.java:558) at sun.net.www.protocol.https.HttpsClient.<init>(HttpsClient.java:264) at sun.net.www.protocol.https.HttpsClient.New(HttpsClient.java:367) at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.getNewHttpClient(AbstractDelegateHttpsURLConnection.java:191) at sun.net.www.protocol.http.HttpURLConnection.plainConnect0(HttpURLConnection.java:1199) at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:1050) at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:177) at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1564) at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1492) at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:480) at sun.net.www.protocol.https.HttpsURLConnectionImpl.getResponseCode(HttpsURLConnectionImpl.java:347) at com.intellij.util.io.HttpRequests.openConnection(HttpRequests.java:615) at com.intellij.util.io.HttpRequests.access$300(HttpRequests.java:59) at com.intellij.util.io.HttpRequests$RequestImpl.getConnection(HttpRequests.java:383) at com.intellij.util.io.HttpRequests$RequestImpl.getInputStream(HttpRequests.java:392) #2019-04-2514:58gklijs at com.intellij.util.io.HttpRequests$RequestImpl.saveToFile(HttpRequests.java:469) ... 22 more#2019-04-2515:04gklijsGot them on a second try#2019-04-2518:34shaun-mahood@claudiu If you figure it out let me know - mine isn't doing anything either.#2019-04-2616:29timgilbertTry hitting F1?#2019-04-2616:43manutter51I just tried that, but it just takes me to the online help for the IntelliJ Editor, it doesn’t bring up the downloaded clojuredocs at all.#2019-04-2617:45kennyHow does Cursive set the Clojure version for a REPL?#2019-04-2617:49joshkhwhat might i be doing wrong here? i'm firing up a repl with src and test dirs in my dep.edn's :paths key. one of my test namespaces has a dependency on one of my src namespaces, but cursive says it can't find the src namespace:
; src/cljc/schema/spec.cljc
(ns schema.spec
  (:require [clojure.spec-alpha2 :as s]))
; test/schema/format.clj
(ns schema.format
  (:require [clojure.test :as t :refer [deftest is testing]]
            [schema.spec :as ss]
            [clojure.spec-alpha2 :as s]))
; attempting to load schema.format:
Loading test/schema/format.clj... 
Syntax error (FileNotFoundException) compiling at (format.clj:1:1).
Could not locate schema/spec__init.class, schema/spec.clj or schema/spec.cljc on classpath.
thanks!
#2019-04-2618:31Alex Miller (Clojure team)based on what you have, seems like src/cljc should be in paths#2019-04-2709:40joshkhah, of course. thanks alex.#2019-04-2618:31Alex Miller (Clojure team)basically whatever directory is containing the root of the namespaces#2019-04-2618:32Alex Miller (Clojure team)to use spec-alpha2, you will also need a git dep on clojure.spec-alpha2 repo#2019-04-2622:35hlshipIs there a cheatsheet somewhere about which version of Cursive are compatible with which versions of IntelliJ. I'm thinking of upgrading to 2019.1.1 and don't know if that will break Cursive.#2019-04-2623:53cfleming@hlship You’re fine to upgrade, basically any given version of Cursive supports the previous two years’ versions of IntelliJ, so currently it’s back to 2017.1. There is a problem with the indexing which I suspect is a 2019.1 bug in IntelliJ (discussed above) and an annoying issue with brace matching, so if you don’t have a compelling reason to upgrade you may wish to wait.#2019-04-2623:54cfleming@joshkh What Alex said, seems like src/cljc should be in your path, not src.#2019-04-2623:54cfleming@kenny It doesn’t really, it’s just taken from the classpath, so whichever version of Clojure your module has as a dependency.#2019-04-2623:55cfleming@manutter51 It’s just shown in the standard doc popup, so whatever you have View | Quick Documentation bound to.#2019-04-2700:39okworiHey guys, Do this functionality work? or rather how can I use it appropriately to say run ClojureScript command on the REPL#2019-04-2701:52cflemingTo everyone experiencing the indexing issue with multiple projects (@wilkerlucio @manderson @ikitommi @jffry @polymeris @p-himik and others), I’ve filed this: https://youtrack.jetbrains.com/issue/IDEA-211736#2019-05-0117:47polymerisSeeing this issue again (this time running 2019.1.2 Preview) It doesn't seem to have anything to do with having multiple projects open#2019-05-0117:47polymeris(IDEA projects, I mean, I have multiple lein projects in that single IDEA project)#2019-05-0200:04cfleming@polymeris Could you attach your log file to that YouTrack issue, please?#2019-04-2701:53cflemingIt’s unfortunately fairly vague, but hopefully they can investigate there. If anyone downgrades from 2019.1 and that fixes the problem that would be useful to know too.#2019-04-2701:55cfleming@simon That doesn’t actually change the type of the REPL, i.e. what the REPL server is doing, it’s just a way of telling Cursive what sort of REPL is actually running. Usually with CLJS you’ll start a Clojure REPL and then start the CLJS REPL inside it, if Cursive doesn’t automatically detect that you’ve switched to a CLJS REPL you can use that dropdown to tell it.#2019-04-2714:22okworiInside of the same REPL?! I would love to know how to do that. Usually I connect the CLJS REPL via remote, i.e. two instances of REPL, one local for CLJ and the other remote for CLJS.#2019-04-2703:19p-himikIs there any way to inspect a complicated data structure in REPL? E.g. an XML zipper.#2019-04-2704:46cfleming@p-himik Not out of the box now, no. There are things like data.inspect which pop up a swing browser, I have a plan to have something similar which opens a data structure in the IntelliJ UI, but there’s nothing there yet.#2019-04-2704:48p-himikI see. Thanks!#2019-04-2710:52Adrian SmithI have some source code in src/<my project name> I can right click it and press -> new, and it lists a lot of different files I could create in that directory but I can't create a new sub directory?#2019-04-2710:53Adrian Smithwhat's the recommended way to create new directories in cursive?#2019-04-2710:59Adrian SmithSeems like new -> package creates a new dir#2019-04-2711:05cfleming@sfyire Yes, that’s a Java hangover#2019-04-2711:06Adrian Smithah thank you for the context#2019-04-2711:09cflemingYou can also create my.full.namespace from your src folder, and Cursive will create my/full/namespace for you.#2019-04-2711:10cfleming@sfyire ^^#2019-04-2907:37souenzzoAnyone else with
java.lang.NoClassDefFoundError: org/jetbrains/idea/maven/dom/MavenVersionComparable
	at cursive.deps.DepsManager$Companion.configFiles(DepsSupport.kt:253)
When trying to open a deps project?
#2019-04-2908:32p-himikNot on IDEA 2019.1.1 + Cursive v1.8.2-eap1-2019.1.#2019-04-2908:33souenzzoI'm on this version too#2019-04-2908:34p-himikIDEA as well?#2019-04-2921:30cfleming@U2J4FRT2T Do you have the Maven plugin installed and enabled?#2019-04-2921:30cflemingIt looks like I might have some code relying on it which doesn’t test correctly whether it’s there or not.#2019-04-2911:07vinaiI just upgraded to Cursive v1.8.1-2019.1 and IntelliJ 2019.1.1 CE and now I get
Error loading nrepl.server: Could not locate nrepl/server__init.class, nrepl/server.clj or nrepl/server.cljc on classpath
...
No nREPL ack received
In my project.clj I've got [nrepl "0.3.1"] and I tried with [org.clojure/tools.nrepl "0.2.13"] before that. lein repl starts the nrepl server without an issue. Any idea why is wrong?
#2019-04-2911:12p-himikI think it's a common issue with nrepl - some of the API has been changed in an incompatible way. Try looking it up on the Internet, there are different fixes depending on your particular situation.#2019-04-2911:12vinaiThanks, doing that#2019-04-2911:13vinaiIt was working with the previous version of cursive and intellij (whatever those where...)#2019-04-2911:15p-himikFor what it's worth, I have org.clojure/tools.nrepl {:mvn/version "0.2.13"} in my deps.edn. I don't use Leiningen at all.#2019-04-2911:16vinaiThis is an old project that is lein based. The newer ones use deps.edn, too#2019-04-2911:17p-himikIf you can't find anything related, I'd try to recreate the error with the smallest example possible. That should give at least some idea of what's wrong.#2019-04-2911:18vinaiGood idea, thanks#2019-04-2911:19vinaiTrying the new namespace nrepl 0.6.0 now#2019-04-2911:27vinaiAfter updating nrepl to 0.6.0, removing the jackson-core exclusion from buddy-auth, adding an explicit dependency on cheshire5.8.1 and updating cider/piggieback to 0.4.0 I've got a repl again 🙂#2019-04-2911:28vinaiAll these changes where triggered by changing exceptions during startup, i.e. change one thing, get a different exception, fix that, repeat.#2019-04-2911:30p-himikYep, sounds about right. 🙂#2019-04-2911:42vinaiOh boy, another interesting new behavior. I'll start a new thread for that though.#2019-04-2911:45vinaiWhen starting figwheel in my cljs repl IntelliJ starts asking "Enter string for standard input" in a popup. Whatever I enter seems to be sent to the cljs repl, evaluated, and printed. The repl output window just echos the value and shows the prompt app:cljs.user=> again. So somehow the read doesn't happen in Cursives repl input window but through IntelliJs prompt. I'm starting figwheel with
(use 'figwheel-sidecar.repl-api)
(start-figwheel!)
(cljs-repl))
Has someone encountered this, too?
#2019-04-2911:45vinai#2019-04-2912:02vinaiThis seems to be the same issue in a different setting: https://github.com/cursive-ide/cursive/issues/835#issuecomment-353577243#2019-04-2912:12vinaiDang, seems like I have to work without hot reloading today.#2019-04-2912:14vinaiOh wait, after :cljs/quit autobuilding still is running in figwheel. So I'm only missing the cljs repl.#2019-04-2912:15vinaiI can open one with lein in a terminal though - that's good enough#2019-04-2912:17vinaiWould be great to get a real solution, but until then I can get stuff done.#2019-04-2912:36okworihttps://clojurians.slack.com/archives/C0744GXCJ/p1556374926032300?thread_ts=1556330135.025400&amp;cid=C0744GXCJ#2019-04-2912:50vinaiThat's been my setup so far. But after today's upgrade things started breaking @U2TLBUVRS.#2019-04-3021:43cfleming@U3WJG25EV I’ve replied over on the GH issue.#2019-04-3021:44vinaiThanks @U0567Q30W !#2019-04-2913:33ChrisDoes anyone know how to navigate to the REPL Output screen without the mouse? I can get to the input window with the Switcher, but I can't get up to the Output screen to scroll history without clicking in with the mouse?#2019-04-2913:38p-himikThere's "Jump to REPL output pane" in the Keyboard settings.#2019-04-2913:43ChrisOMG I never saw that before and when I did search for action with REPL I didn't look far enough down! Thanks so much!#2019-04-2920:29arnohaJust installed Cursive, REPL is working but the text editor window isn’t eval’ing the code unless I explicitly Load file in REPL. Went through the online docs and don’t think I’ve missed any of the setup, any ideas?#2019-04-2920:36manutter51I think I had to go in to Preferences -> Keymap -> Plug-ins -> Cursive and set up my preferred key bindings for “Load file in REPL,” “Send form before caret to REPL,” and “Send top form to REPL”.#2019-04-3011:15joelsanchez@cfleming would it be possible to make "toggle auto scroll" automatic? (when I scroll up, disable it, and when I scroll to the bottom, enable it). this is how the Chrome Devtools console works, and other applications too#2019-04-3011:15joelsanchezor is it an Intellij IDEA shortcoming?#2019-04-3018:32p-himikIt's Cursive that adds all the libraries to the modules that I add via the standard IDEA interface in "Project Structure" dialog, right? The issue is that upon reindexing (or maybe not - I closed IDEA, changed the branch in terminal, made some changes, switched the branch back, opened IDEA again), the order of <orderEntry> tags in most of the .idea/modules/*.iml files was changed for no reason.#2019-04-3021:45cfleming@joelsanchez Which window would you like this in? The main editors? Sorry, I’m not familiar with the auto scroll.#2019-04-3021:46joelsanchezthe REPL#2019-04-3021:47cflemingOh, I see. So when you scroll up, you’d like it to stay where you left it, and then when you scroll back down to the bottom you want auto scroll to enable again?#2019-04-3021:47joelsanchezmany apps log to stdout, and sometimes I want to briefly look at something in the logs but then keep on working with the REPL and of course I need autoscroll on#2019-04-3021:47joelsanchezyep#2019-04-3021:48cflemingOk, that makes sense.#2019-04-3021:48cflemingIn fact, that’s https://github.com/cursive-ide/cursive/issues/1000#2019-04-3021:49joelsanchezyes, yes it is :)#2019-04-3021:49joelsanchezDaniel is always one step ahead of us mere mortals#2019-04-3021:49cflemingI believe he’s filed more Cursive issues than I have 🙂#2019-04-3021:51cflemingActually no I still have him beaten - 259 to 209.#2019-04-3022:46caleb.macdonaldblackIn the cljs repl I keep getting the intellij "<fn> can be required" recommendation for every function I use that isn't a core function even if it's required. Is there any way to fix that?#2019-04-3023:54cfleming@p-himik It is, but I can’t control that order, sorry - that’s IntelliJ doing that.#2019-05-0100:00cfleming@caleb.macdonaldblack I don’t think there is, sorry - is that in the actual REPL editor?#2019-05-0100:00cflemingI’ll see if I can reproduce that and fix it.#2019-05-0100:02caleb.macdonaldblack@cfleming https://i.gyazo.com/811e53a2adf6138688eca3c751e95eb1.png#2019-05-0100:03caleb.macdonaldblackI'm not sure exactly what the REPL editor is but I think that is it#2019-05-0100:03cflemingThanks, I’ll try to reproduce that and fix it.#2019-05-0100:03cflemingYes, I mean you’re working in the little REPL input pane editor.#2019-05-0100:04cflemingi.e. not sending forms from a normal editor.#2019-05-0100:04caleb.macdonaldblackYea pretty much. It's probably a bad habit I should break out of though#2019-05-0100:05cflemingCertainly it would fix this problem 🙂#2019-05-0100:06cflemingOr at least work around it.#2019-05-0100:06caleb.macdonaldblackYep. I probably would worry too much about looking into then unless you want to. I'll try to send to the repl. It's better to do it that way anyway#2019-05-0107:03p-himikIs it possible to make Cursive resolve dependencies in the editor while taking some specific aliases into account?#2019-05-0111:13cfleming@p-himik I don’t understand, can you explain?#2019-05-0111:14p-himikI have deps.edn with multiple aliases many of which specify :extra-deps. And it seems that they're not taken into account at all.#2019-05-0111:16cflemingYes, you can do that by selecting those aliases in the Clojure Deps toolwindow under Aliases. Select the ones you want and then refresh your project.#2019-05-0111:17cflemingThere was a problem reported today if you have :extra-deps with :local/root dependencies in it - I’m hoping to look at that tomorrow.#2019-05-0111:21p-himikAhh, I see. Thanks! I have a lot of :local/root. 🙂 Here's a decent example of a complicated deps.edn if you need one: https://github.com/juxt/edge/tree/master/examples/main#2019-05-0111:22cflemingYeah, the issue was this one: https://github.com/cursive-ide/cursive/issues/2164, which is based on a project using Edge.#2019-05-0111:22cflemingIt’s odd because I was sure I’d tested the edge examples, it’s possible something has broken.#2019-05-0203:20cflemingOk, this is fixed for the next build.#2019-05-0116:01Lukasz HallAnyone else get an Error executing Leiningen task: '1.8' is bad configured when starting a local nRepl? (I've switched the project dep from clj 1.10 to 1.8 and reimported the project and still see the error)#2019-05-0200:01cfleming@hall That error is referring to your JDK configured for the project - could you check that that is properly configured?#2019-05-0214:19Lukasz Hallyup... that was it. Can't believe I didn't check that.... looks like some pathing issues on my machine. Thanks!#2019-05-0213:55p-himikSomething strange is happening. I've just restructured my project a bit and now Cursive says "Manifest type not detected when finding deps" during deps.edn project syncing. I tried running clj -Stree - same error. Updated the clj CLI tools so that now they use tools.deps 0.6.496 which fixes TDEPS-74, now clj -Stree running smoothly. But Cursive still gives the same error even though in setting it says that it uses the latest tools. I also tried selecting "Use tools.deps directly" but "Refresh" never completes, it just spins forever.#2019-05-0214:08p-himikNot sure how it all works. But when I removed everything within ~/.m2/repository/org/clojure/tools.deps.alpha, nothing has changed but also no new files appeared there. As if both clj and Cursive use a bundled version of tools.deps.#2019-05-0222:21cflemingclj uses a bundled version of tools.deps, yes. In Cursive, if you select to use the CLI tools then that version will be used, or if you select to use tools.deps directly, it’ll be downloaded using Maven and should appear in your local repo.#2019-05-0307:02p-himikBut clj works and Cursive doesn't, although it says it uses the correct version of clj.#2019-05-0307:05p-himikOf course, maybe clj started working after upgrade only when I start it with -Stree, and maybe it still doesn't work with regards to something else that Cursive uses. Is there any way I could check it?#2019-05-0307:07p-himikAlso the point about not being able to specify custom tools.deps is still valid - the spinner just spins forever.#2019-05-0307:48p-himikWithout me doing anything, the error switched to "Sync finish event has not been received". I removed .idea from the project, imported the project again - all is fine! However, the error about the manifest time is back when I select one particular alias. And the same alias works perfectly with clj, so there is still some sort of a problem.#2019-05-0322:01cfleming@U2FRKM4TW That’s very strange. Is this a project I could look at, or is it internal?#2019-05-0322:16cflemingWhat does the problematic alias have in its definition? Perhaps I can reproduce something similar.#2019-05-0407:06p-himikAlas, can't share anything. And lo and behold - today all is fine, even with that alias! Again, without me changing anything. Maybe an additional restart of IDEA has somehow helped. I'm clueless.#2019-05-0414:45mhuebertI am also having the problem of the infinite spinner#2019-05-0414:47mhuebertpreviously, I was using “Use tools.deps directly” but I had to switch to “Use CLI tools” because of the spinner / not being able to select a recent version#2019-05-0414:48mhuebertnow I have a problem with clj(s) forms not being defined even though I have Clojure/ClojureScript on the classpath#2019-05-0500:15cfleming@U050RLRRQ @U2FRKM4TW Do either of you have a proxy enabled? That’s the only thing I can think of that has changed recently (https://github.com/cursive-ide/cursive/issues/2150, oh and also https://github.com/cursive-ide/cursive/issues/2149 but that shouldn’t affect if you don’t specify a repo).#2019-05-0504:42cflemingUgh, actually, this is just a stupid UI bug introduced as part of those changes. I’ll fix for the next build.#2019-05-0313:09Jacob HaagWith intelij, for certain languages you can use an "intention" to generate the outline of a test for a desired function. Does this capability exist for Clojure and if not is it something that's been considered to add to Cursive? https://www.jetbrains.com/help/idea/create-tests.html#2019-05-0313:14manutter51If you right-click on a function and select Go To -> Test, it will give you the option of creating the test if it does not already exist.#2019-05-0313:27Jacob HaagAh neat, it's pretty minimal but is nice none the less#2019-05-0313:50mhuebertI just updated to the latest cursive and notice that bracket highlighting has changed, so that “outer brackets” are preferred to “inner brackets”. Was this an intentional change?#2019-05-0313:51mhueberti believe the previous behavour was aligned with what “Extend selection” would select#2019-05-0315:27conanthis is a good way of describing it#2019-05-0313:56manutter51Yes, that happened with a recent version and it’s a known issue. I think the underlying issue is something that changed in IntelliJ, and we’re waiting for JetBrains to fix it?#2019-05-0315:22mhuebertok, thanks#2019-05-0315:49Jacob HaagHow would I go about finding unused re-frame subscriptions w/ intelij and cursive? I tried using Analyze | Inspect Code but it doesn't pick up subscriptions lie
(re-frame/reg-sub
   ::foo
   ____)
#2019-05-0318:10p-himikI don't think you can do anything apart from the full-text search or usages search (which can be slower than just full-text search).#2019-05-0322:09cflemingYes, there isn’t a very good solution for this right now, unfortunately. The global “Unused declaration” inspection doesn’t work for Clojure code, and I haven’t investigated why yet.#2019-05-0316:49kennyCursive doesn't seem to always persist the REPL history. I'm on Ubuntu. When I restart my computer, only some very old REPL history is shown. If I close IntelliJ before shutting down, however, it will persist correctly.#2019-05-0322:10cflemingUnfortunately I don’t think there’s much I can do about this, it’s just IntelliJ’s persistence mechanism. Do you find that other settings are also lost when shutting down like this?#2019-05-0322:57kennyI don't change other settings often enough. I'd expect settings to not be affected by this because in order to change those, I need to explicitly hit the Save button. The REPL history seems like it'd be saved in the same way regular files are saved. I do not have the problem of lost data when changing files.#2019-05-0322:05cfleming@mhuebert Yes, this is an unfortunate IntelliJ regression. The original issue was here: https://youtrack.jetbrains.com/issue/IDEA-210104, when that wasn’t fixed completely, https://youtrack.jetbrains.com/issue/IDEA-211720 was the follow-up.#2019-05-0322:21mhuebert@cfleming thanks for the links, happy to know it is being worked on by IntelliJ. I find the current behaviour confusing.#2019-05-0322:43cflemingYes, it’s definitely super confusing. I suspect it’s not as bad for non-Lisp languages which don’t have tons of close parens stacked up, but for Clojure it’s very hard to figure out what’s going on.#2019-05-0416:42Kari MarttilaI have a "dev-src" alias in my deps.edn in which I keep development time sources and dependencies: :dev-src {:extra-paths ["dev-src"] :extra-deps {org.clojure/tools.namespace {:mvn/version "0.2.11"}}} If I open a file in that "dev-src" IntelliJ IDEA complains that the file "is not under a source root". I can use clojure namespaces defined in that "dev-src", everything works just fine in REPL but there is just that "is not under a source root" IntelliJ IDEA warning in the beginning of the editor window. I can live with that but I was wondering if there is an easy way to disable it?#2019-05-0416:51Kari MarttilaThe warning disappears if I add the "dev-src" to paths: :paths ["src", "dev-src"] , of course. But I understood that with deps.edn paths defines the "production code" and you can define other "extra-paths" using aliases, as creating an alias for development time code (used with REPL) as I did.#2019-05-0422:09cjmurphyYou can right click a directory in the project pane, then Mark directory as Sources Root.#2019-05-0423:44cfleming@U76D9RZRR In the Clojure Deps toolwindow, open the Aliases tree, select the dev-src alias there and then refresh your project.#2019-05-0506:59Kari MarttilaThanks @U0567Q30W! That solved my problem. I'm also trying to learn how to use Cursive effectively with deps.edn.#2019-05-0417:49polymerisI am experimenting with shadow-cljs, and to resolve cljs deps, I am using shadow-cljs pom, then having intellij import that pom. Not sure how to get cursive to resolve the npm deps, though. I.e, things like (:require ["foo" :as bar]). Is it possible?#2019-05-0507:50p-himikI don't think the pom is required. At least, I don't use it - all my dependencies are in deps.edn, and Cursive knows how to handle it, as well as Shadow CLJS.#2019-05-0507:51p-himikBy "resolve NPM deps" you mean correct highlighting and declaration following when requiring NPM deps from CLJS files? If so, it's not yet implemented AFAIK.#2019-05-0513:40polymerisI am not using deps.edn (only shadow-cljs.edn for clj/s deps and package.json for npm deps)#2019-05-0513:40polymerisYeah, I meant correctly highlighting the symbols imported from npm deps#2019-05-0513:42polymerisI notice Cursive does highlight some js stuff it seems to magically know about#2019-05-0513:42polymerisE.g. it knows about js/console#2019-05-0513:44polymerisAnd it knows about e.g. goog.async (but I guess those are defined in the maven deps somewhere, not in the npm deps)#2019-05-0513:50p-himikAFAIK js/console comes from the built-in externs and goog.async is probably a dependency of CLJS itself. Just in case - if you don't want to regenerate the pom each time you change the dependencies, you can just switch to deps.edn + shadow-cljs.edn: https://shadow-cljs.github.io/docs/UsersGuide.html#deps-edn#2019-05-0514:01polymeris:thank-you:#2019-05-0522:31cflemingThis is correct, Cursive knows about some built-ins (using the ones from Tern: http://ternjs.net/) and also indexes JS code attached via Maven (e.g. Closure itself).#2019-05-0522:32cflemingIt doesn’t yet index JS from node_modules or understand the node require syntax, but I’m actually re-vamping the JS parsing right now and hopefully that will make it in as part of this change.#2019-05-0522:32cflemingSince a lot more projects are using it these days.#2019-05-0522:33cflemingI’m currently switching over the JS parsing to use the Google Closure JS parser rather than the Rhino one, which has been giving a lot of problems recently.#2019-05-0613:24polymerisThat's great to hear, cfleming. Thanks!#2019-05-0417:50polymeris(where "foo" is in node_modules)#2019-05-0417:53polymerisAdding node_modules as src folder doesn't seem to help#2019-05-0507:53p-himikIs there any way to debug compiled classes created by compile function from a CLJ source? I see some magic - a function calls another function with a not-nil argument, and the callee still receives nil. I see that the call stack includes 2 levels for each function call, so there must be something fishy going on in there.#2019-05-0509:26p-himikHere's a piece of code of interest:
(defn write
  "Writes a value to a transit writer."
  [^Writer writer o]
  (.write ^com.cognitect.transit.Writer (.w writer) o))
When the current line is the very first one, writer is not null. But as soon as I step into , it becomes null for no apparent reason.
#2019-05-0509:38p-himikAhh, the value there is not actually null - the NPE is in the .write function, a step further. But why does the debugger report null here? I'm in the debug mode, so locals should not be cleared. Let alone locals in the current frame.#2019-05-0513:34vemvMaybe you got bit by https://clojure.org/reference/compilation#_locals_clearing ?#2019-05-0514:12p-himikI have -Dclojure.compiler.disable-locals-clearing=true in my :jvm-opts, and the corresponding button in the debug REPL is pushed in, so that shouldn't be it.#2019-05-0522:35cfleming@U2FRKM4TW That definitely sounds like locals clearing. Note that locals clearing is a compile flag, it has to be set when you compile your code. If you’re loading from source then having it set in your runtime is sufficient since your code will be compiled when it’s loaded, but if you’re AOT compiling you’ll have to either set the flag before compiling or re-evaluate your code (i.e. re-send the file to the REPL) to have it be recompiled taking the flag into account.#2019-05-0522:46p-himikHmm, there's a change it was indeed AOT. Thanks!#2019-05-0601:47steveb8n@cfleming loving the new html->hiccup translation feature. saves lots of time when experimenting with UI ideas#2019-05-0602:25cfleming@steveb8n Great, thanks! Glad it’s helping.#2019-05-0611:28mhuebertwhen I am working with local libs, I find that I need to put a clojurescript dep in each deps.edn (eg. {org.clojure/clojurescript {:mvn/version "1.10.520"}}), otherwise that library’s source files will be filled with undefined vars like defn, defprotocol etc. Is this just the normal/expected behaviour?#2019-05-0702:24cfleming@mhuebert I think so, yes. I wouldn’t expect deps itself to work otherwise.#2019-05-0702:29cflemingActually, thinking about it, I’m not sure that’s true. If you have a deps project app which uses another one called lib via :local/root, and the contents of lib are only ever required from app (i.e. you never run a REPL or anything directly from lib), then I guess that might work. I can’t think of a good way to handle that in Cursive though.#2019-05-0702:30cflemingOne way to do that would be to have the extra deps in a :cursive alias or something? Still a bit icky though.#2019-05-0707:12mhuebertFair enough#2019-05-0810:04p-himikAnother alternative is to override user deps.edn with another one that contains the required dependency. According to settings, it's a per-project parameter. But it still may be considered ever more ickier than the alias way.#2019-05-0810:16Jakub Holý (HolyJak)Does Cursive have support for test.check? Out of the box it has wrong indentation on prop/for-all, does not understand that it creates bindings (and thus complains about "... cannot be resolved"), bad indentation for defspec & doesn't understand it defines a new thing, thus complaining about its name "... cannot be resolved"). I googled out https://cursive-ide.com/userguide/testing.html but it does not mention test.check. Thank you!#2019-05-0810:31p-himikI know that it doesn't really answer the question, but you can Alt+Enter on any symbol in question and play around with "Configure indentation for [...]" and "Resolve [...] as..." I find that most of the time, it helps with such cases.#2019-05-0815:20Jakub Holý (HolyJak)Thanks, will try!#2019-05-0822:59cflemingYes, you should be able to fix those problems using the customisation, but test.check is popular enough that I should fix that.#2019-05-0823:00cflemingUnfortunately defspec works quite differently to existing test integrations and is hard to support well.#2019-05-0823:02cfleminghttps://github.com/cursive-ide/cursive/issues/2170#2019-05-0900:39wilkerluciohello, for some reason seems like my maven repositories just disappeared from the list in the maven options (so no dependency completion), does someone knows how can I get then back?#2019-05-0900:39wilkerlucionevermind, after doing a refresh on the deps project they went back 🙂#2019-05-0910:46dirklectischIs there a guide somewhere on how to setup a new project with Cursive using Clojure’s CLI tools and Clojure Deps?#2019-05-0911:17claudiuthink just opening the deps.edn trigger cursive to ask if it's a project and do the right things#2019-05-1000:16cfleming@U0520QSJJ This is the closest thing until I get the doc up to date: https://groups.google.com/d/msg/cursive/NQIJzhGjfEY/hdNXUco8CgAJ#2019-05-0921:04misha@cfleming hi! Colin, did you think about leveraging IDEA's javascript plugin to resolve (do not show as unresolved, etc,) js/dom related methods? this is the file I am talking about: /Applications/IntelliJ however, I think it might not be available in community edition of IDEA.#2019-05-1000:18cfleming@U051HUZLD Not exactly, but I’m currently working on migrating the JS parsing to the Google Closure parser, and as part of that I’m going to use their equivalent: https://github.com/google/closure-compiler/tree/master/externs#2019-05-1006:09mishaNice! Thanks!#2019-05-0921:06misha(17307 lines)#2019-05-0921:22henryw374trying to use cursive with a deps project to run an nrepl repl with middleware.... and failing . I have an alias with : :main-opts ["-m" "nrepl.cmdline" "--middleware" "[cider.piggieback/wrap-cljs-repl]" "-i"] which works ok running clj from the command line, but running with cursive the middleware is not getting picked up. I have tried various repl options, including nrepl with the the alias that includes the line above. anyone knows how to make this work?#2019-05-1000:20cfleming@U051B9FU1 Do you have the alias specified in your run configuration? You need to have “Run with Deps” selected there and the alias in the Aliases box.#2019-05-1008:32henryw374Hi, yes I just have the one alias in the run config, using 'run with deps' and 'nrepl' opt selected. the main-opts is being read, which I know because if i put some rubbish in there i get an error. for a minimal repo:
:dev  {
                  :main-opts ["-m" "nrepl.cmdline" "--middleware" "[cider.piggieback/wrap-cljs-repl]" "-i"]
                  :extra-deps  {
                                com.bhauman/figwheel-main {:mvn/version "0.2.0"}
                                nrepl/nrepl      {:mvn/version "0.6.0"}
                                cider/piggieback {:mvn/version "0.4.0"}
                                }}
then in the repl: (require 'figwheel.main) (figwheel.main/bound-var? 'cider.piggieback/cljs-repl-env) => false but when starting a repl from`clj -Adev`, the above evaluates to true
#2019-05-1008:32henryw374I tried taking out nrepl as a dependency, but that makes no difference from cursive#2019-05-1021:44cflemingThanks, I’ll try to reproduce that#2019-05-1412:39henryw374thanks. If we can get that going then moving our projects to deps becomes a possibility. The other way would be to run a headless repl and remote to it from cursive I guess, but then you'd miss out on the cursive repl goodies afaik#2019-05-1413:28flowthingI don't think you miss out on anything by using a remote REPL. I can't think of anything, at least.#2019-05-1415:02henryw374I was thinking test integration, macro expansion... but true you don't really need those in a process that's mostly there just to compile cljs#2019-05-1417:09flowthingI think test integration works, at least.#2019-05-1423:31cfleming@U051B9FU1 All of that will work fine with a remote REPL. Really the only difference is it’s mildly more annoying to start (i.e. you have to start the server and then run the REPL within Cursive).#2019-05-1508:01henryw374ok thanks#2019-05-0923:40nwjsmithIn clojure.test there are thrown? and thrown-with-msg? “special assertions”. Is there any way to convince Cursive to resolve these?#2019-05-1000:29kennyI don't think so: https://github.com/cursive-ide/cursive/issues/238#2019-05-1001:20nwjsmithThanks!#2019-05-1003:16cflemingUnfortunately not, these use some funky multi-method black magic that’s hard to resolve accurately.#2019-05-1412:39henryw374thanks. If we can get that going then moving our projects to deps becomes a possibility. The other way would be to run a headless repl and remote to it from cursive I guess, but then you'd miss out on the cursive repl goodies afaik#2019-05-1011:29roklenarcicI am looking at Code Style -> Clojure settings and Form Parameters tab#2019-05-1011:30roklenarcicthere I have a dropdown for each form, I can pick Indent or a number#2019-05-1011:30roklenarcicwhat does that do?#2019-05-1011:31roklenarcicIf I break (form x) into having x in new line, then I always get 2 character indentation#2019-05-1011:31thumbnaili think it uses your global ident-setting or a fixed indentation amount#2019-05-1011:32roklenarcicNo I mean why when I set this to 0, I still get same indentation than when I set this to 8#2019-05-1011:34roklenarcicLike I set assoc value to 8 and when I linebreak I get this:
(assoc
  :a
  1
  2)
#2019-05-1011:35ikitommi@cfleming about the error when after switching project, nothing gets resolved. Got it again and in the logs:
2019-05-10 14:29:42,175 [26173294]   INFO - pl.projectlevelman.NewMappings - VCS Root: [] - [<Project>] 
2019-05-10 14:29:42,175 [26173294]   INFO - pl.projectlevelman.NewMappings - VCS Root: [Git] - [/Users/tommi/projects/metosin/spec-tools] 
2019-05-10 14:29:42,213 [26173332]   INFO - ellij.project.impl.ProjectImpl - 209 project components initialized in 70 ms 
2019-05-10 14:29:42,235 [26173354]   INFO - le.impl.ModuleManagerComponent - 1 module(s) loaded in 21 ms 
2019-05-10 14:29:42,265 [26173384]   INFO - rojectCodeStyleSettingsManager - Initialized from default code style settings. 
2019-05-10 14:29:42,329 [26173448]   INFO -              PerformancePlugin - Performance Plugin is in silent mode 
2019-05-10 14:29:42,387 [26173506]   INFO - .diagnostic.PerformanceWatcher - Pushing properties took 18ms; general responsiveness: ok; EDT responsiveness: ok 
2019-05-10 14:29:42,511 [26173630]   INFO - il.indexing.FileBasedIndexImpl - Rebuild requested for index ClojureSymbolMeta 
java.lang.Throwable
	at com.intellij.util.indexing.FileBasedIndex.requestRebuild(FileBasedIndex.java:70)
	at cursive.intentions.resolve$rebuild_all_indexes_BANG_.invoke(resolve.clj:142)
	at clojure.lang.Var.invoke(Var.java:383)
	at cursive.api.DelayedFn.invoke(DelayedFn.java:36)
	at cursive.settings.ClojureProjectResolveSettings$loadState$1.run(ClojureResolveSettings.kt:95)
	at com.intellij.openapi.application.impl.ApplicationImpl$1.run(ApplicationImpl.java:311)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:748)
#2019-05-1011:37ikitommi2019.1.2, cursive v1.8.2-eap2-2019.1#2019-05-1013:41Ben HammondCode Formatting seems to have changed. I'd like to align parameters thus
(defn bar
  [a b c]
  (* a 
     b 
     c))
#2019-05-1013:42Ben Hammondin cljs#2019-05-1013:47Ben Hammondhmmm; the new tool looks alot more powerfull#2019-05-1013:48Ben Hammondif only I knew how to use it. whata is the differeence between 'Indent' and 'Function'?#2019-05-1014:57sashton
;; function
(some-var
 1
 2)
(some-var 1
          2)

;; indent
(some-var
  1
  2)
(some-var 1
  2)
#2019-05-1015:01sashtonI understand indent to be used for def-like things. Where you’d like the second line to always be indented, regardless how many arguments are on the first line. Whereas function is typical for regular function-type vars, and will line up arguments vertically if you leave any on the first line.#2019-05-1013:53Ben Hammondhttps://cursive-ide.com/userguide/formatting.html just says Coming Soon: A much better way to do this.#2019-05-1014:57mbjarlandI have a question, I quite often find myself in a situation where I need to write an ad-hoc clojure snippet to be run from the command line to do someting like analyze a large xml file, search through a directory structure for patterns, analyze an apache log etc. In this situation I do want the intellij repl experience, the intellisense, goto declaration etc, but I do not want to spend five minutes setting up a project...and also, it seems that projects like their source to be in a separate directory from the project root which is not great in this scenario either. So open question, do other people do these kinds of ad-hoc scripts and if so, do you use intellij/cursive for it and in that case how? Sometimes the scripts need a deps.edn as well, so supporting that would be a bonus. Right now I'm thinking I will create one project called lets say ad-hoc and use it for all scenerios like this, but perhaps there is a better way?#2019-05-1015:25Alex Miller (Clojure team)I spend 5 minutes and make a project#2019-05-1015:26Alex Miller (Clojure team)Half the time I end up enabling git or doing more later on, so just seems easier to bite the bullet#2019-05-1015:26Alex Miller (Clojure team)With a deps.edn project, there’s almost nothing to set up#2019-05-1015:32mbjarlandok. Thanks for the input @alexmiller...and thanks for all the great articles and your general contribution to the community. Much appreciated. I end up doing a lot of small scripts like this in my day job, often driven by a hate for bash for anything more complex. So say I just create an empty dir with a deps.edn and my script, I know I've previously caved in and ended up creating a src dir just to have cursive understand my source. Is this necessary or can you leave the script in the root and still make cursive grok it? I ask also because I would like to have the deps.edn and the script in the same dir as it makes it more trivial to run them directly via clj. I can hear myself being nit picky here but it has been bothering me for a while.#2019-05-1022:00cflemingTo those above asking about indentation (@ben.hammond, @saskia, @roklenarcic and others), my apologies for not having this better documented. Here’s how this works:#2019-05-1022:05cflemingMacro forms will often have some number of parameters, followed by any number of body forms. Consider condp:
(condp pred expr
  test result
  ...)
condp can be considered to have two arguments, and then its body. This means that its indent value is 2 - it has two parameters that should be indented differently to the rest.
#2019-05-1022:06cflemingGenerally, the parameters are aligned, which means that you’ll get e.g. this:
(condp pred
       expr
  test result
  ...)
#2019-05-1022:07cflemingSo if there’s a line break between the parameters, they will be aligned. All the “body” elements (i.e. elements after the parameter count) are just indented two spaces.#2019-05-1022:08cflemingThe default indent is two spaces, so if you have a line break before the first parameter, you’ll get this:
(condp
  pred
  expr
  test result
  ...)
#2019-05-1022:12cfleming“Only Indent” is for people who don’t want to think about any of this, and just always want two-space indent after a line break. This is also often useful for forms like proxy, defrecord, extend-protocol and the like. There’s also a setting Preferences | Editor | Code Style | Clojure | General | Default to Only Indent which sets that for all forms which don’t have an explicit setting. See Nikita’s great article on why you might want that: https://tonsky.me/blog/clojurefmt/#2019-05-1022:13cfleming“Function” is usually the default, and treats all form elements after the head as parameters and aligns them, i.e. functions have no body. This is why you’ll get:
(my-fn a
       b
       c)
#2019-05-1022:14cflemingAgain, with a line break before the first param, params will be indented 2:
(my-fn
  a
  b
  c)
#2019-05-1022:16cflemingCursive’s “Only Indent” setting also implements the improvement for parinfer compatibility that tonsky discusses in recent Cursive versions.#2019-05-1022:31nwjsmithOooooh cool. I’ve been meaning to give Nikita’s suggestion a try, this will make it really easy. Is there a way to do this per-project?#2019-05-1022:31nwjsmithMy coworkers will have choice words for me if I use this, but on my personal projects I’m freeee#2019-05-1102:39cfleming@nwjsmith Yes, in Preferences | Editor | Code Style | Clojure set Scheme to Project.#2019-05-1107:18Kari MarttilaI found something weird and I'm not sure if I just don't understand how to use REPL or is this a Cursive issue or what. A short explanation. I have mydev.clj in which I keep all kind of development time stuff like:
(defn reset []
  "Resets REPL and starts server."
  (log/debug "ENTER reset")
  (mount/stop)
  (ns-repl/refresh :after 'mydev/start))
I.e. to be able to stop mount states and then refresh everything and start mount states again. I have e.g. my configuration in mount: simpleserver.util.config/config-state (basically reads the configuration from file). Then the weird part. I have a scratch file in IDEA in which I send expressions to REPL with Cursive hot key (Send form before caret to REPL), e.g.:
(mydev/reset)
simpleserver.util.config/config-state
I.e. I first refresh everything and then check the config that my new configuration changes are there. But they are not. BUT: If I go into the actual REPL input window and write those lines there and send them to REPL I can see my configuration changes. This really puzzles me - have I understood something wrong since I thought that the result should be same with both scenarios (send the expressions to REPL using hot key and writing the same expressions in REPL window and sending them to REPL for evaluation there).
#2019-05-1107:27Kari MarttilaI think I got it now but I still don't understand the behaviour. The REPL output window says in the first screnario (when I'm sending the expressions with hot key from scratch file):
2019-05-11 10:23:06 DE [nRepl-session-a9d217fb-3d2c-4016-aae3-7e37ca090cc5] DEBUG mydev - ENTER reset
2019-05-11 10:23:06 DE [nRepl-session-a9d217fb-3d2c-4016-aae3-7e37ca090cc5] DEBUG mydev - ENTER stop
2019-05-11 10:23:06 DE [nRepl-session-a9d217fb-3d2c-4016-aae3-7e37ca090cc5] DEBUG mydev - ENTER start
2019-05-11 10:23:06 DE [nRepl-session-a9d217fb-3d2c-4016-aae3-7e37ca090cc5] DEBUG simpleserver.util.config - ENTER create-config
:reloading ()
=> Mount starts and only after that the reloading is happening. In the second scenario (I write the expressions in the REPL input window):
2019-05-11 10:23:16 DE [nRepl-session-a9d217fb-3d2c-4016-aae3-7e37ca090cc5] DEBUG mydev - ENTER reset
2019-05-11 10:23:16 DE [nRepl-session-a9d217fb-3d2c-4016-aae3-7e37ca090cc5] DEBUG mydev - ENTER stop
:reloading ()
=> {:started ["#'simpleserver.util.config/config-state"]}
2019-05-11 10:23:16 DE [nRepl-session-a9d217fb-3d2c-4016-aae3-7e37ca090cc5] DEBUG mydev - ENTER start
2019-05-11 10:23:16 DE [nRepl-session-a9d217fb-3d2c-4016-aae3-7e37ca090cc5] DEBUG simpleserver.util.config - ENTER create-config
=> First REPL is reloading and after that mount starts (and gets the new configuration since we reloaded the namespaces...)
#2019-05-1107:29Kari MarttilaWhat really puzzles me is that I thought these two scenarios should be exactly the same: either sending the exact same expressions from scratch file to repl using hot key, or actually writing the expressions in repl input window and sending the expressions there.#2019-05-1107:49Kari MarttilaThe server code is here if you are interested: https://github.com/karimarttila/clojure/tree/master/webstore-demo/simple-server (commit: 88631bb54069c25e80fc0fa9e4cc1670fe6a7f47 ) => in dev-src/myscratch.clj is the scratch file I was talking about. You can demonstrate this by changing e.g. the port number in resources/config/dev/config.edn and then doing the reset and checking the config-state first sending those expressions from the scratch file to repl and then writing the same expressions in the repl input window.#2019-05-1107:51Kari MarttilaWell, I'm glad I figured out that I can use this "reset" workflow in the REPL input window, but I'm not really content regarding this "workaround" since I understood e.g. from one REPL presentation that the best practice is not write stuff in REPL but write stuff in some scratch file and send the stuff for evaluation to REPL.#2019-05-1107:55Kari Marttila... and BTW. I really love Cursive and I have the commercial Cursive version bought to me by my corporation (I can provide the License ID privately if needed).#2019-05-1109:34joshkhare there tools to provide performance details of all functions called from a parent function at runtime? i have a function that kicks off loads of queries, calculations etc. i could time each function but wasn't sure if there's a way to time them automatically.#2019-05-1109:46joshkhwhoops, wrong channel 😇#2019-05-1117:12maximtopI can't setup repl in cursive for this project https://github.com/lispcast/understanding-re-frame by this description https://github.com/bhauman/lein-figwheel/wiki/Running-figwheel-in-a-Cursive-Clojure-REPL What may I be missing?#2019-05-1117:15maximtopI get this error#2019-05-1117:16maximtopand here is the configuration window#2019-05-1118:22ericnormand@maximtop does it work if you run it at the command line?#2019-05-1118:22maximtopYes#2019-05-1118:23maximtopHm, I am not sure You mean if I run at the command line lein repl after setup described in the instruction?#2019-05-1118:32maximtopIf I run lein repl from the command line than there is an error#2019-05-1119:01maximtop@ericnormand#2019-05-1119:56flowthingTry changing the cemerick/piggieback dependency to [cider/piggieback "0.4.0"]. #2019-05-1119:58flowthingMight also need to use [nrepl "0.6.0"].#2019-05-1120:00maximtopThere is no nrepl or cemerick/piggieback dependency in the https://github.com/lispcast/understanding-re-frame #2019-05-1120:01flowthingAnd cemerick.piggieback/wrap-cljs-repl -> cider.piggieback/wrap-cljs-repl.#2019-05-1120:01flowthingPiggieback is under dev dependencies.#2019-05-1120:01flowthing nREPL might be a transitive dep.#2019-05-1120:10maximtopI've added dependencies
[cider/piggieback "0.4.1-SNAPSHOT"]
[figwheel-sidecar "0.5.19-SNAPSHOT"]
and changed
:repl-options {:nrepl-middleware [cider.piggieback/wrap-cljs-repl]}
now lein repl starts fine from the command line but I still can't start repl from cursive with the same error I've pasted above
#2019-05-1120:27flowthingYeah, that looks like something unrelated, haven’t seen that before.#2019-05-1120:40maximtopthank you for trying to help me#2019-05-1207:40maximtopSeems that Emacs for clojure/clojurescript development is inevitable#2019-05-1210:04flowthing@maximtop You could try selecting nREPL instead of clojure.main in the config dialog and removing script/repl.clj from the parameters (I don’t know why that’s there, though).#2019-05-1210:33maximtop@flowthing Yes, I've managed to launch cljs repl from the Cursive via nREPL I've started nREPL from command line lein repl and connected to the nREPL via Cursive remote repl after that I have run in REPL these commands
(use 'figwheel-sidecar.repl-api)
(start-figwheel!)
(cljs-repl)
It would be perfect if there be some possibilities to not type them every time
#2019-05-1215:10flowthingThe typical way would be to add dev/user.clj, add a function that calls those things, and add ”dev” into project.clj :source-paths. Then just call that function when you open a REPL.#2019-05-1215:11flowthinghttp://thinkrelevance.com/blog/2013/06/04/clojure-workflow-reloaded#2019-05-1215:11maximtop👍 Ok, I'll try this. Thank you#2019-05-1219:13Lennart BuitI created a new cljs project with a deps.edn, but cursive can’t resolve defn and println, can I fix that somehow?#2019-05-1219:24Lennart Buitah nevermind, I needed to add clojurescripts to the deps key in deps.edn, instead of extra-deps#2019-05-1222:19Jakub Holý (HolyJak)Any tips regarding Cursive, deps.edn and extra-paths from additional aliases, ignored by cursive? I have an alias "specifications" with the extra path "specifications/code", containing the namespace "specifications.invoice". I have configured IntelliJ - Preferences - clojure Deps - Aliases to enable by default by changing it to specifications,test. Even after a restart, when I open the namespace, IntelliJ doesn't show the code directory as a source/test directory and complains "File invoice.clj is not under a source root." Is it so that only the "test" alias is fully supported regarding extra paths? Any tips? Thank you!#2019-05-1222:20cfleming@holyjak That should be fixed in the latest EAP build, 1.8.2-eap2#2019-05-1222:22Jakub Holý (HolyJak)You are incredibly quick 🙂#2019-05-1222:23cflemingI just happened to be here and haven’t started clearing out the channel backlog yet 🙂
#2019-05-1222:23Jakub Holý (HolyJak)(I was joking, implying quick in releasing a fix :)) Hm, I actually run this version...#2019-05-1222:24cflemingAh, reading your comment, I think you might be setting the alias in the wrong place.#2019-05-1222:24cflemingOpen the Clojure Deps toolwindow View | Tool Windows | Clojure Deps, open up the Aliases tree and select your alias there. Then refresh your project.#2019-05-1222:26Jakub Holý (HolyJak)Ah, thanks, I would have never figured that out!#2019-05-1222:26Jakub Holý (HolyJak)... and fixed. Thank you!!!#2019-05-1222:26cflemingNo problem!#2019-05-1312:30Kari MarttilaThanks @cfleming for Cursive and great documentation and support. I had one issue and I emailed my observation to @cfleming - he replied to my email the first thing on Monday morning - and resolved my issue. My issue actually turned out to be that I had not read the Cursive manual properly - I would have found the answer to my problem there if I only had read it more thoroughly. So, I decided to read the Cursive user documentation from beginning till the end. And I found other great stuff also! E.g. I didn't know that you can create new commands in IntelliJ IDEA / Cursive and assign hot keys to them. I immediately created new command "Reset" and in the "Execute command" I gave the Clojure expression:
(do (require 'mydev) (mydev/reset))
... and then assigned hot key <shift>-<ctrl>-L to it. => Now I can stop all states of my application, refresh all namespaces and start all states again anywhere in any editor windows without leaving my fingers from the default keyboard positions. Cursive is so great!
#2019-05-1312:46Kari MarttilaExtend / Shrink selection => I assigned hot keys: <shift>-<ctrl>-I / <shift>-<ctrl>-O ...and my Clojure editing suddenly became even quicker. Damn, I should have read this documentation sooner. 🙂#2019-05-1323:47cfleming@kari.marttila It’s not even very up to date - I’m working on an update to get it into shape 🙂#2019-05-1408:48Kari Marttila@cfleming - Great! I believe you let us know here when you have updated the documentation - I'm definitely going to read it again from begin to end! I learned so many new Clojure coding productivity boosters yesterday. And you have good style of writing documentation, it's very fluent and also good light humor showing between lines. 🙂#2019-05-1408:56cfleming@kari.marttila Thanks! That’s encouraging to hear. It’s always a slog updating documentation and I often wonder if the ROI is very great, but of course I don’t often hear from the people who struggle because it’s out of date or incomplete (or people that it helps a lot).#2019-05-1409:03Kari Marttila@cfleming The documentation style is really good. The text is clear and informal and especially those short video clips showing e.g. how to do structural editing are great. I remember that when starting to use Cursive I watched those clips especially regarding barfing and slurping and immediately assigned good hot keys for them. I have configured in my Linux workstation a keymap in which "Caps lock" is "Alt Gr", and "Alt Gr" (i.e. Caps Lock) + j,k,l,i are arrow keys, So I have in my finger muscular memory already those keys. I just assigned certain AltGr/shift/ctrl/alt + i/j/k/l/i combinations for barfing and slurping and using barfing and slurping that way in Cursive has been really fast (I don't have to move my fingers from the standard positions in keyboard (using 10 finger style) when barfing/slurping - and those hot keys are in my finger muscular memory so that I don't even think about how to do them - it comes just naturally as part of writing code).#2019-05-1608:54conanI second this, I've learned loads from the cursive documentation, and not just about cursive. It's much appreciated!#2019-05-1608:55cflemingThanks @U053032QC!#2019-05-1409:05Kari MarttilaThe only downside with IntelliJ idea is that for some reason it doesn't "honor" the Linux keymaps (I have found this in a short selection of editors - most editors honor it). But luckily I could just "recreate" the same hot keys in the IntelliJ Keymap so, my look-and-feel of editing using IntelliJ IDEA is the same as e.g. in Emacs.#2019-05-1413:19vinai@cfleming Regarding your comment on the REPL stdin input popup box https://github.com/cursive-ide/cursive/issues/835#issuecomment-488126046 > The issue with the standard input popup is caused by using an nREPL type REPL with something that's expecting a clojure.main style one. If you create your REPL as a clojure.main one, this should work. I'm wondering, how can I start the REPL as a clojure.main one in cursive?#2019-05-1413:21flowthingI actually happened to bump into the exact same problem just now. It's quite bizarre.#2019-05-1413:54vinaiOh, I just noticed I can select clojure.main in the run config dialoge when configuring the repl. Trying it now.#2019-05-1414:07vinaiHm, no luck. Any info on starting a cljs browser repl would be cool.#2019-05-1415:25vinaiI can start a local REPL and switch to cljs using the clojure.main setting.#2019-05-1507:05flowthingIn my case, the issue was that I was using a version of Figwheel (and Figwheel Sidecar) that only supported cemerick/piggieback, but my project depended on the newer cider/piggieback. Updating lein-figwheel and figwheel-sidecar to 0.5.18 fixed the issue.#2019-05-1507:34flowthingI'm now getting clojure.lang.ExceptionInfo: my.awesome.ns does not exist {:cljs.repl/error :invalid-ns} when I try loading a namespace into the CLJS REPL, though. confusedparrot#2019-05-1415:28vinaiI've moved a project to a new mac. Fresh IntelliJ and Cursive installation. When I configure a local nREPL with leiningen I get
Starting nREPL server...
/Applications/GraalVM-19.0.0/Contents/Home/bin/java... [...]
2019-05-14 17:24:55.633:INFO::main: Logging initialized @41817ms
No nREPL ack received

Process finished with exit code 137 (interrupted by signal 9: SIGKILL)
#2019-05-1415:29vinaiREPL configuration#2019-05-1415:30vinaiThe same settings work on the previous mac... Any idea what I might be missing?#2019-05-1415:53flowthingWhat happens if you run lein repl?#2019-05-1416:03vinaiThat works fine#2019-05-1416:04vinaiI can run the repl using the clojure.main setting btw. However, I miss the test integration.#2019-05-1416:58flowthingI think I’ve gotten that same error when the project depended on an older nREPL version. Could try updating it, and possibly the piggieback dependency as well.#2019-05-1504:11cfleming@U3WJG25EV The way that this works is that Cursive will listen on its own nREPL port, then start the nREPL server in a new process. That will start to listen on an arbitrary port, then ping the Cursive nREPL process to tell it which port the new server is listening on, and that it has started. That message means that that ping back was not received within the specified timeout.#2019-05-1504:13cflemingThat can mean one of various things: the process didn’t start correctly or took a long time to start, nREPL didn’t initialise correctly, the nREPL process can’t open a network socket to the Cursive process, etc etc.#2019-05-1504:13cflemingIt’s hard to know unfortunately. One thing is that I see you’re using graalvm which is unusual - if you use a standard JDK does that work?#2019-05-1507:32vinaiThanks for your reply, @cfleming! Interesting to hear the way it works. This is a new machine I'm setting up, and since there will be a bit of native binary building in the near future I thought I'd go ahead and just install GraalVM as the default. I'll try OpenJDK instead now.#2019-05-1507:36vinai@U4ZDX466T Thanks for your reply, too. I'm on the latest versions of nrepl and piggieback already, so nothing I can do there.#2019-05-1508:19vinai@cfleming No luck. Basically the same with an additional warning.
Starting nREPL server...
/Library/Java/JavaVirtualMachines/jdk-12.0.1.jdk/Contents/Home/bin/java ...
2019-05-15 10:17:12.853:INFO::main: Logging initialized @41167ms
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.bouncycastle.jcajce.provider.drbg.DRBG (file:/Users/vinai/.m2/repository/org/bouncycastle/bcprov-jdk15on/1.58/bcprov-jdk15on-1.58.jar) to constructor sun.security.provider.Sun()
WARNING: Please consider reporting this to the maintainers of org.bouncycastle.jcajce.provider.drbg.DRBG
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
No nREPL ack received

Process finished with exit code 137 (interrupted by signal 9: SIGKILL)
#2019-05-1508:22vinaiThe same warning occurs when I start a clojure.main repl, which works (just like when using GraalVM)#2019-05-1508:22flowthingYeah, that's related to Java 12. You wouldn't see that with Java 8, I think.#2019-05-1508:23flowthingIt's unrelated, though, I believe.#2019-05-1508:23vinaiThink so, too.#2019-05-1508:26flowthingYou could work around the issue by running lein repl :headless on the command line and then connecting to it from Cursive with a remote REPL (https://cursive-ide.com/userguide/repl.html#remote-repls).#2019-05-1508:26vinaiOh, interesting idea! Thanks, I'll try that.#2019-05-1508:27flowthingShort of trying OpenJDK 8 and trying enabling/disabling dependencies one by one, I can't think of what else to try.#2019-05-1508:28flowthingCould try generating a new, minimal Leiningen project with lein new app foo and see whether the same thing happens there, too.#2019-05-1508:28vinaiIt would be interesting to figure out why the other nRepl started by Cursive doesn't ping back. Especially since the same project with identical dependencies on my old machine worked with a lein repl.#2019-05-1521:03cflemingI wonder if that error might be related. Which JDK were you using on your previous machine?#2019-05-1610:36vinaiI was using openjdk 1.8.0#2019-05-1610:48cflemingIt would probably be worth testing with that on your new machine too.#2019-05-1614:04vinaiWill do!#2019-05-1415:33manutter51There’s a setting in preferences for how long the timeout is, maybe it got set to an unreasonably low value somehow?#2019-05-1416:05vinaiI don't think that is the problem... The repl starts faster than the timeout.#2019-05-1505:30ikitommiHmm.. for some reason, when loading reitit.core ns into Cursive, it shows a weird dependency error. I don’t see any error and it compiles ok.#2019-05-1505:31ikitommi#2019-05-1505:34ikitommioh, there is a checkouts in one of the example projects which seems to be found in the classpath. hmm.#2019-05-1604:07ikitommi@cfleming it seems than all checkouts are handled as part of a classpath even if they are not. in reitit, there are /examples, which have checkouts for the main modules, which causes the weird dependency error. Something has changed? Using the latests version of both idea & cursive.#2019-05-1604:14cfleming@U055NJ5CC I don’t think anything has changed with that, but I’ll check it out. Should I be able to repro this just checking out reitit, starting a REPL and loading the reitit.core ns into it?#2019-05-1604:16ikitommiI believe so. Removing all the checkouts removes the problem.#2019-05-1604:17ikitommiand thanks for checking!#2019-05-2000:09cfleming@U055NJ5CC I just tried to reproduce this, and I couldn’t. I tried running a REPL from the parent project, and also from some of the example projects with checkouts (e.g. frontend). Is that in a CLJ or CLJS REPL?#2019-05-2000:09cflemingCan you give me some more specific repro instructions?#2019-05-2000:10cflemingIn both REPLs, I could load impl.cljc and reitit.core with no problem.#2019-05-2007:04ikitommithanks for investigating. Could you test adding one of the examples into source? e.g. https://github.com/metosin/reitit/tree/master/examples/frontend-auth. I have done that for all examples, but after change of dependencies, they drop out of source path, but could be that the checkouts still remain.#2019-05-2009:38cflemingDo you mean adding that leiningen project? Yes, I did that, and ran the REPL both from the frontend project and the root project, and it all worked fine.#2019-05-2009:39cflemingI didn’t go as far as getting a CLJS REPL going though, are you receiving this error in CLJ or CLJS?#2019-05-2010:10ikitommiin clj. I’ll reinstall the project to see if that goes away.#2019-05-2010:41cflemingOk, if not I’ve also put some debug log in that we can enable to get a better idea of what’s going on (shows the full paths, not just the filename).#2019-05-1515:42Rachel WestmacottI've done an 'invalidate caches & restart' and now none of my (or clojure core's) symbols can be resolved!#2019-05-1521:06cfleming@U0FR9C8RZ That sounds like https://youtrack.jetbrains.com/issue/IDEA-211736#2019-05-1608:41Rachel WestmacottI had shut all the other projects, and restarted with a single project.#2019-05-1608:42Rachel Westmacottbut it seems to have resolved itself with a restart, so not a huge issue for me right now#2019-05-1515:46Rachel WestmacottI'm sure I've forgotten something silly. I just have no idea what.#2019-05-1515:48Rachel Westmacottoh, another (manual) restart seems to have cleared it#2019-05-1515:59p-himikWhat symbol should I use this this context? this doesn't work.#2019-05-1521:07cfleming@p-himik Yes, Clojure doesn’t define a this keyword. You could switch the expression from Clojure to Java which would allow that. Otherwise, what’s the actual expression you’d like to use?#2019-05-1521:13p-himikFor example, (str "<" (:tag this) ">"). If a user can't refer to the object being rendered, is there even any point in having Clojure in the selector near the input field?#2019-05-1521:25cflemingI see what you mean in the case of things like records - perhaps Cursive should wrap the renderer expression in something defining a local variable this that can be used in those expressions.#2019-05-1521:35cflemingUnfortunately, thinking about it, those expressions are fundamentally designed to be used in an OO way, i.e. to have an implicit receiver. They’re not very useful for Clojure as they stand, I’ve filed https://github.com/cursive-ide/cursive/issues/2175#2019-05-1606:52p-himikThanks! Just to add a bit - it's not only about records, the Element on the image is deftype. Also the Clojure selector is missing entirely for java.lang.*, clojure.lang.*, primitives, Clojure functions. Could you extend a bit on "fundamentally designed to be used in an OO way"? Is this a limitation of IDEA? If so, maybe a feature request should be filed to JetBrains?#2019-05-1608:14cflemingIt’s more that that expression is designed to be called on an explicit receiver (OO style) rather than be a function receiving a this object or something similar.#2019-05-1608:15cflemingWhich makes sense since these are usually used in the context of printing a particular object.#2019-05-1604:07ikitommi@cfleming it seems than all checkouts are handled as part of a classpath even if they are not. in reitit, there are /examples, which have checkouts for the main modules, which causes the weird dependency error. Something has changed? Using the latests version of both idea & cursive.#2019-05-1605:50Ivan Kozwhy :repl-options :message doesnt work for cursive repl? https://gyazo.com/c5af7c9f4b5b6c3e1a5a9d9b7fb62755.png#2019-05-1605:51Ivan Kozalso any ideas how to set *print-namespace-maps* to false via lein#2019-05-1605:52cfleming@nxtk You mean the :welcome thing?#2019-05-1605:52Ivan Kozyeah#2019-05-1605:52cflemingI’m not sure about that, AFAIK it should work.#2019-05-1605:52cflemingCursive does some magic starting the REPL though, so there may be a problem there.#2019-05-1605:53Ivan Kozcheck also if you can set print-namespace-maps to false, maybe related#2019-05-1605:53Ivan Kozi tried repl init and set globals in project.clj no success#2019-05-1605:53cflemingThat one is https://github.com/cursive-ide/cursive/issues/1541, it wasn’t possible previously but may be in the recent versions of nREPL.#2019-05-1605:54Ivan Kozyeah it works in nrepl 6.0 if i bind or set! manually from running repl#2019-05-1605:54cflemingI don’t see any movement on the old JIRA issue: https://dev.clojure.org/jira/browse/NREPL-55, but there may be a new issue on the new github repo.#2019-05-1605:54Ivan Kozbut i can't configure it to apply automatically for some reason#2019-05-1605:56cfleminghttps://github.com/nrepl/nrepl/issues/33#2019-05-1605:57Ivan Koz@cfleming but they fixed it already aren't they?#2019-05-1606:00Ivan Kozhttps://gyazo.com/def2dc3c230c643cba781bec1fdffd08.png#2019-05-1606:00Ivan Kozsee repl :init and :global-vars, i'm new to clojure maybe i'm doing it wrong?#2019-05-1608:13cfleming@nxtk I don’t know sorry, I haven’t had time to read through all that yet.#2019-05-1610:24p-himikIs it possible to load scratch files in REPL?#2019-05-1610:24p-himikOr rather, is it possible to make it possible?#2019-05-1610:25p-himikAlso, it would be nice if Cursive resolved symbols within scratch files.#2019-05-1617:20flowthingI think they do, you might need to (in-ns ‘my.ns) or use fully qualified symbols, though. #2019-05-1617:21flowthingAnother option is to add scratch.clj in your global .gitignore file and add a file by that name for each project.#2019-05-1617:25p-himikNope, in-ns didn't work. And adding a single file somewhat defeats the purpose since when I use regular scratch files, I can create as many as I want and they're shared between projects.#2019-05-1617:26flowthingWeird. I’m fairly sure that has worked for me. I’ll check when I get in front of my laptop.#2019-05-1617:47flowthingYeah, it definitely works for me — although not for the user namespace, for some weird reason.#2019-05-1618:15p-himikHa! That was the namespace that I tried! 😄#2019-05-1618:17p-himikOK, am confused. Could you please send me a small snippet that works for you? Because when I replace user with something else, even require and use stop being recognized.#2019-05-1618:20flowthingI have:
(ns 
  (:require [integrant.core :as ig]
            [ :as io]))


(def config
  (ig/read-string (slurp (io/resource "config.edn"))))


(ig/load-namespaces config)
And then, in the scratch file (not buffer, just a sanity check):
(in-ns ')

(println config)
And that works fine and everything is resolved.
#2019-05-1618:25p-himikThanks! Specifying an ns that I've already defined somewhere definitely works better for me. However, half of items in require and use are still not resolved for some reason. Maybe it has something to do with what the original ns requires and uses.#2019-05-1618:25flowthingRight, that makes sense.#2019-05-1618:26p-himikYep, looks like it. So I guess Cursive doesn't parse (require) and (use). @cfleming Is my guess correct?#2019-05-1622:03cflemingNo, Cursive does parse require and use.#2019-05-1622:03cflemingThis is a pretty odd use case though so I’m willing to believe there are problems 🙂#2019-05-1610:48cfleming@p-himik I’m not sure. Scratch files are weird internally, and it’s possible things won’t work with them. I have a mental to-do to look at them, but haven’t got to it yet.#2019-05-1611:29p-himikI see. So the intended workflow with "Load file in REPL" is to create a file within the project? Or are there any other options? The phrase "scope for the module used to start the REPL" is a bit confusing.#2019-05-1622:04cflemingRight, “Load file in REPL” was thought of as loading one of your standard source files into the REPL.#2019-05-1622:05cflemingThat predated scratch files entirely, but is also standard for lisp editors.#2019-05-1616:53wilkerlucio@cfleming I'm still having the problem with the intellij losing referneces, just happened now, how can I take the logs to send to you?#2019-05-1709:26conanhi, refreshing tools.deps versions just hangs for me, and the box sits there empty. I've tried in both the project import page, and the build execution and deployment settings page, and i've tried invalidating caches and restarting. is there a way i can manually insert a version so i can get cursive to download it?#2019-05-1709:26conan#2019-05-1709:26conanjust sits there spinning#2019-05-1709:27conani've just updated to the latest version of intellij / cursive#2019-05-1709:36conanI'm a bit worried about this, just did a full reinstall of intellij/cursive and the problem persists. i can't import a project without this#2019-05-1709:46conansimilar issues: https://github.com/cursive-ide/cursive/issues/2117 https://github.com/cursive-ide/cursive/issues/2126 my issue is that first one, except the workaround displays the same behaviour#2019-05-1710:05conanOnly after removing intellij, deleting all previous versions, re-installing without importing settings from any previous version (i tried four) would it work. So maybe it's a problem with importing settings? Please could cursive ship with at least the latest version of tools.deps included so that can be downloaded? Otherwise this is a breaking problem, the only workaround being to lose all settings and configuration#2019-05-1721:06cfleming@U053032QC Ugh, sorry, that’s a bug which is fixed in the next build. I had hoped to get it out by now, but what I’m working on is taking longer than expected. I’ll move what I’m going to the next build and get that out today.#2019-05-1805:37cfleming@U053032QC That bugfix is now released in 1.8.2-eap3.#2019-05-1712:18CaseyIs there an action for force regenerating stubs? i dismissed the message and it won't come back#2019-05-1721:07cflemingRefreshing your lein/deps project should prompt you again.#2019-05-1715:31conanIt seems as though cursive is adding tools.deps.alpha to the classpath when I run a REPL; we use a fork of it, so I need to exclude it. Is there a way of doing this?#2019-05-1715:43conani seem to be able to work around it by adding an empty :deps alias to my deps.edn, but i don't really want to have to do this#2019-05-1721:08cflemingCursive won’t do that automatically. Do you have an alias called deps, or is your REPL run config using one? Deps itself has a deps alias you can use to add t.d.a to the classpath, it’s not a Cursive thing.#2019-05-1810:23cflemingFor those of you affected by the symbol resolution problem (@wilkerlucio, @ikitommi, @manderson and others), someone at JetBrains suggested that it might be related to https://youtrack.jetbrains.com/issue/IDEA-211346. The symptoms would be that the project view doesn’t show all the elements that it should. What should fix it is refreshing your project in either the lein or deps toolwindow.#2019-05-1810:24cflemingIf you could check both those things (the symptom and the cure) if you experience the problem again, that would be great.#2019-05-1810:49cflemingSeems like the root cause might be this issue here, which is the best bug report I’ve seen in a while: https://youtrack.jetbrains.com/issue/IDEA-210479#2019-05-1814:36jeremysHello, quick question, cursive doesn’t want to load one of my files in the repl anymore. The cause being cyclic dependencies. The thing is even if I delete all content of the file and leave only a basic ns declaration like (ns my.ns) cursive still doesn’t want to load the file. Is there some kind of a cache cursive maintains I can clear?#2019-05-1819:16todoa bit off topic: does cursive support (or have plans to support) Racket scheme?#2019-05-1822:56cfleming@jeremys Can you send a screenshot of the error? This is usually caused by having another copy of the file somewhere, perhaps in an output directory that shouldn’t be indexed. Someone reported the other day that it can also be provoked by lein checkouts, but I haven’t had time to investigate that yet.#2019-05-1822:57cfleming@todo No, that would be a whole different (although very interesting!) thing.#2019-05-1914:27jeremys@cfleming Hello Colin, here is a screenshot of the error message. I believe the error might happen because I am trying to require my meta.schema ns inside itself with the :require-macros part at the top. The error seems to disappears when I delete the .cljs_node_repl directory, in which case restart using cmd+shift+L to load the entire ns in a clj repl. Maybe the indexing of this directory confuses cursives ns analysis. I don’t exclude the possibility of me doing something wrong though. Hope this helps.#2019-05-1922:39cfleming@jeremys Oh, right - that’s what I mean by: “usually caused by having another copy of the file somewhere, perhaps in an output directory that shouldn’t be indexed”. If you exclude that .cljs_node_repl directory (right click in project view, mark directory as, excluded) then IntelliJ won’t try to index it.#2019-05-2000:23cfleming@nxtk I just looked at the *print-namespaced-maps* thing. It’s definitely fixed in recent nREPL versions. I’m not sure why it doesn’t work in :init, but it also doesn’t work in :init in lein repl:
~/d/c/cursive-1541> cat project.clj
(defproject cursive-1541 "0.1.0-SNAPSHOT"
  :description "FIXME: write description"
  :url ""
  :license {:name "Eclipse Public License"
            :url ""}
  :dependencies [[org.clojure/clojure "1.9.0-alpha13"]]
  :repl-options {:init (set! *print-namespace-maps* false)})
~/d/c/cursive-1541> lein repl
nREPL server started on port 53237 on host 127.0.0.1 - 
REPL-y 0.3.7, nREPL 0.2.12
Clojure 1.9.0-alpha13
Java HotSpot(TM) 64-Bit Server VM 1.8.0_144-b01
    Docs: (doc function-name-here)
          (find-doc "part-of-name-here")
  Source: (source function-name-here)
 Javadoc: (javadoc java-object-or-class-here)
    Exit: Control+D or (exit) or (quit)
 Results: Stored in vars *1, *2, *3, an exception in *e

user=> *print-namespace-maps*
true
user=>
#2019-05-2000:24cflemingPerhaps ask over in #clojure how people solve this?#2019-05-2000:30cflemingThe :welcome thing is because lein translates that internally into an option that it then passes to REPL-y (https://github.com/trptcolin/reply), which Cursive doesn’t use.#2019-05-2008:12jeremys@cfleming thanks you I didn’t know I could exclude files this way!#2019-05-2021:00mfikesCursive doesn't have a way to only format VCS changed text, right? (It seems you have to manually select a scope to be formatted, or format the entire file.)#2019-05-2023:26cfleming@mfikes The doc says yes: https://www.jetbrains.com/help/idea/reformat-file-dialog.html#2019-05-2023:28cflemingBy default it doesn’t pop that dialog up any more, so you need the Emacs Claw invocation to show the dialog rather than just automatically reformatting the current file.#2019-05-2023:31cfleming(I’ve never actually tried that BTW, but at least the doc claims it’s possible. I think that might be new, I don’t recall seeing it previously).#2019-05-2101:13mfikes@cfleming Ahh, cool. It works. The trick is, you have to make a change to the file. Then it lets you select the "Only VCS Changed Text" selection. The key aspect is that this choice appears to be "sticky", so it starts behaving that way.#2019-05-2101:14mfikes#2019-05-2101:14mfikesTIL!#2019-05-2101:16mfikesFor those curious, the above is accessed via the Code > Show Reformat File Dialog menu#2019-05-2104:12tapHas anyone had this issue where syntax checker is messed up when opening more than one clojure projects concurrently?#2019-05-2104:50cfleming@tap yes, that’s https://github.com/cursive-ide/cursive/issues/2173. It’s not clear yet whether it’s a bug in Cursive or in IntelliJ - the corresponding platform bug is https://youtrack.jetbrains.com/issue/IDEA-211736.#2019-05-2104:50cflemingAre you experiencing it right now?#2019-05-2104:50cflemingIf so, I have some questions for you 🙂#2019-05-2105:29tap@cfleming Yes, I am. Anything I can help?#2019-05-2105:34tapI can always make it happen actually#2019-05-2105:42cfleming@tap Oh, great. Can you check your project view, and see if everything looks ok? i.e all your modules and libraries are there?#2019-05-2105:42cflemingIs this a big project? Are you using lein or deps?#2019-05-2105:48taplein#2019-05-2105:49tapOne thing I found is when I open the second project, the first project start indexing as well.#2019-05-2105:50tapIn project view, libraries are there.#2019-05-2105:58tapHmm, it happens only when I open a project that I didn't open recently. The projects that have the issue, after restart, the issue disappear. I remember the issue reappear at some point. I'll pay attention to that next time.#2019-05-2107:03cfleming@tap Ok - when you get the issue again, could you try refreshing your lein projects in the lein toolwindow, and see if that fixes the problem?#2019-05-2211:41flowthingFWIW, I experienced the same problem today and refreshing Leiningen projects fixed the issue for me. On the other hand, it seems to happen quite frequently with the project I'm currently working on, and sometimes making any change to the ClojureScript file fixes symbol resolution. :man-shrugging:#2019-05-2107:16tap@cfleming No, that doesn't fix the problem. Neither refreshing from lein toolwindow nor right-click on project.clj and "Refresh Leiningen Projects"#2019-05-2107:49cfleming@tap Ok, thanks - that’s a bummer.#2019-05-2107:49cflemingDoes restarting the IDE help?#2019-05-2107:49cflemingThat seems to be what fixes it for most people.#2019-05-2107:53tapYes, it does help#2019-05-2107:56tapI get a feeling that I reappear often though. Maybe after cursive update and/or IntelliJ update. I can't make it happen now.#2019-05-2107:56cflemingYeah, it only seems to happen on IntelliJ 2019.1, but that doesn’t mean it’s an IntelliJ bug - something may have changed which has provoked a bug in Cursive.#2019-05-2116:20tony.kayAny chance we’ll get decent keyword rename refactoring soon? Currently I’m adopting the following rule: New Rule: always prefer
(let [{:keys [::a/b]}] ...)
over
(let [{::a/keys [b]}] ...)
The former can handle kw renames via refactoring tools, the latter cannot. I’ve lost like 4-5 hours this week trying to keep things organized…and that kills me every time
#2019-05-2118:55roklenarcicdoes anyone else have a problem with autocomplete and source lookup when using deps+shadowcljs+npm#2019-05-2118:55roklenarcicinstead of autocomplete showing me results from cljs, it shows me results from compiled js#2019-05-2123:49cfleming@tony.kay I’m definitely interested in cases where the current rename refactoring doesn’t work. I wasn’t aware that some of them don’t.#2019-05-2123:51tony.kayyeah, I’m writing Fulcro 3 and spec’ing a lot of things…but heavy refactoring is a continuous need…and renaming spec keywords (or moving them to new nses when I start out with ::kw) does not work well#2019-05-2123:52tony.kaymainly in destructuring#2019-05-2123:52tony.kaythis one is a real bear:
(let [{::keys [a b]} something] ...)

;; to: I move a to diff ns, which would need to end up liek this:

(let [{::other/keys [a] ::keys [b]} something] ...)
#2019-05-2123:52cfleming@roklenarcic That’s probably because you have a CLJS output directory which hasn’t been excluded. Cursive tries to do that automatically, but may not understand Shadow’s output dir locations.#2019-05-2207:34roklenarcicExcluded in deps.edn or somewhere in cursive settings?#2019-05-2208:22roklenarcicThere's also the thing that all my clj, cljc files are yellow all over the clojure.core functions, but cljs files are not. Cursive seems to not be able to recognize clojure.core functions in my clj files#2019-05-2208:32roklenarcicThe deps file isn't my own, it was generated by lein new fulcro I just ran "New -> Project from existing sources"#2019-05-2221:48cfleming@roklenarcic The symbol resolution problem might be this one: https://groups.google.com/d/msg/cursive/m2QzxhCMk7I/D3l2tTokAQAJ#2019-05-2221:54cflemingRe: the exclusion, hopefully you can figure out where the compiled JS is being stored - you might be able to do this by accepting one of the erroneous completions and then navigating to the result. Once you have the JS file open, then use Navigate | Select in… to open the file in the project view. There you’ll be able to see which directory that’s being stored under, and then you can right click | Mark directory as… | Excluded.#2019-05-2123:53cfleming@tony.kay Ok, so there if you rename :keys/a to :other-keys/a then it doesn’t work.#2019-05-2123:54tony.kayit works fine as long as the keyword is “contiguous”…e.g. (let [{:keys [::b ::a]} thing] ...)#2019-05-2123:54tony.kaythat will refactor rename correctly, but it’s an ugly notation#2019-05-2123:54cflemingYeah, the split keyword thing (this, and namespaced maps) are really a pain to handle.#2019-05-2200:05cflemingI actually didn’t even know that ::keys and ::a/keys in destructuring was a thing - https://clojure.org/guides/destructuring makes no mention of it.#2019-05-2200:11cfleming@tony.kay https://github.com/cursive-ide/cursive/issues/2178#2019-05-2200:12tony.kay😄#2019-05-2200:20cfleming@tony.kay Actually… those cases should already be handled, and there are even tests for them. I’ll check what’s going on there.#2019-05-2200:26cfleming@tony.kay Right, so I have a test that:
(let [{::keys [foo bar]} item] ...)
When ::foo is renamed to :other/baz, is changed to:
(let [{:keys [:other/baz ::bar]} item] ...)
#2019-05-2200:26cflemingWhich is not exactly the transformation you wanted, but is correct.#2019-05-2200:26cflemingAre you not seeing anything like that happening?#2019-05-2200:32cflemingThat does work, I just tested it. Also:
(ns cursive-2178.core
  (:require [clojure.string :as str]))

(let [{::str/keys [a b]} nil])
is correctly transformed to:
(let [{:keys [:other/baz ::str/b]} nil])
#2019-05-2200:32cflemingIf I rename ::str/a to :other/baz#2019-05-2200:33tony.kayhave there been recent fixes?#2019-05-2200:33tony.kayI just got an update notice#2019-05-2200:33cfleming(I had forgotten those destructuring options even existed, but I did fix them back in the day)#2019-05-2200:33cflemingNo#2019-05-2200:33cflemingThat hasn’t changed since my memory fade-off point, since I had forgotten they were supported 🙂#2019-05-2200:34tony.kayso you cannot repro?#2019-05-2200:34tony.kayI can make failing cases for you if you want#2019-05-2200:34cflemingYes please!#2019-05-2200:34tony.kayok, just a few#2019-05-2200:34tony.kayOH…these are CLJC files, if that matters#2019-05-2200:35cflemingHmm, I wonder#2019-05-2200:35cflemingLet me check#2019-05-2200:37tony.kay
(ns com.fulcrologic.fulcro.b
  (:require
    [clojure.spec.alpha :as s]))

(s/def ::y number?)

-----

(ns com.fulcrologic.fulcro.a
  (:require
    [com.fulcrologic.fulcro.b :as b]
    [clojure.spec.alpha :as s]))

(s/def ::x int)

(defn f [{::keys   [x]
          ::b/keys [y]}])
#2019-05-2200:37tony.kayboth cljc files#2019-05-2200:37tony.kaytry renaming ::y in b#2019-05-2200:39tony.kayAlso, while we’re talking CLJC…doc string lookup fails in IDE if you’re in a CLJS file that uses a func from a CLJC file#2019-05-2200:40tony.kay#2019-05-2200:40tony.kayeven though the function is obviously available#2019-05-2200:41cflemingYeah, I can see that rename failing.#2019-05-2200:41cflemingI’ll debug that, thanks.#2019-05-2200:41tony.kaywelcome…thanks for looking into it#2019-05-2200:41cflemingOhhhh#2019-05-2200:42cflemingI see what the problem is.#2019-05-2200:42cflemingThat keyword is used with s/def, which means that they get treated as if they were definitions.#2019-05-2200:42cflemingBut the destructuring should still work.#2019-05-2200:43cfleming@tony.kay ^^^#2019-05-2200:43cflemingUgh, that’s tricky.#2019-05-2200:43tony.kaydestructuring works, but renaming does not#2019-05-2200:44tony.kayI see…so treating them like definitions is sort of like the problem of moving functions among nses#2019-05-2200:44cflemingYeah, I mean the renaming should update destructurings.#2019-05-2200:44cflemingFind usages is also affected I think.#2019-05-2200:44tony.kayYes, it is, now that you say it#2019-05-2200:45cflemingIn fact, there’s an issue about that one - https://github.com/cursive-ide/cursive/issues/1908#2019-05-2200:46cflemingThese frankenkeywords are getting tricky.#2019-05-2200:47tony.kayI bet#2019-05-2206:35Lennart BuitAlso, if you c/p some code around, Cursive isn’t smart enough to find that ::alias/keyword can be required. So the only real way to check whether you missed a require for a aliased keyword is trying to load into the repl#2019-05-2220:43kingmobIs anyone else having an issue where IntelliJ/Cursive keeps recategorizing resource directories as source directories? I’m trying to isolate the problem, and thought I’d ask.#2019-05-2221:55cfleming@lennart.buit Yes, it would be nice if Cursive auto-prompted in that case, you’re right.#2019-05-2221:56cfleming@kingmob No-one else has reported that, no. Are you manually categorising them as resource dirs? i.e. by right clicking in the project view?#2019-05-2221:57kingmob@cfleming Yes, but it never lasts. It didn’t use to be a problem, but I can’t figure out what change caused it.#2019-05-2221:59cflemingSo when you sync your lein/deps project, Cursive will re-mark all the directories to what the project file specifies them as. Clojure doesn’t really make the distinction between source and resource folders, there was an issue about this ages ago, I’ll see if I can dig it up.#2019-05-2221:59cflemingWhy do you need it marked as a resource folder?#2019-05-2221:59kingmob…because miscategorized dirs offend my librarian ancestors? 😄#2019-05-2222:00kingmobIt’s not that big a deal, it’s more like an itch that won’t go away.#2019-05-2222:00cflemingHere it is: https://github.com/cursive-ide/cursive/issues/241#2019-05-2222:01kingmobThx!#2019-05-2222:01cflemingBasically, Lein and IntelliJ treat resource folders in different ways. The tl;dr is you should just leave it as Cursive sets it 🙂#2019-05-2222:02cflemingYour librarian ancestors will just have to turn in their graves.#2019-05-2222:02kingmobI must now slit my wrists with a sharp bookmark.#2019-05-2222:02kingmobIn all seriousness, thanks for checking, @cfleming!#2019-05-2222:02cflemingThat is as it should be, yes.#2019-05-2304:18cfleming@tony.kay @wilkerlucio @conan Ok, I think I’ve fixed #1908. Basically, keywords will act as they did before the keyword definition change, but you can still navigate to the definition sites (if there are any) and they will still show up in structure view.#2019-05-2308:46conanThanks for letting me know, that's fantastic! I'm now in an all-emacs team so I value this stuff beyond the functional =D#2019-05-2408:46cflemingThat’s out now in 1.8.2-eap4#2019-05-2408:49cflemingFeedback very welcome on whether this now does what you want!#2019-05-2408:49cfleming(that’s the Royal You, i.e. anyone suffering from the problems this fixes)#2019-05-2304:22cflemingOne thing though - currently if there’s a destructuring like:
(defn f [{::b/keys [x y]}]
and I rename ::b/y to :other/baz, the destructuring will be changed to:
(defn f [{:keys [::b/x :other/foo]}]
#2019-05-2304:23cflemingBasically right now a :keys destructuring will never be split, just the prefixes will be adjusted to ensure the code is correct.#2019-05-2306:49Jakub Holý (HolyJak)@cfleming I had no idea what Tools→REPL→Clear all test markers meant until I read the docs. Wouldn't "Clear all test errors" be clearer? And, regarding Re-run last test action in REPL, what is a "test action"? When I run (test-var #'my-test) in the REPL, does that constitute a test action? If not 1) what are test actions, 2) is there a way to run a single test via keystrokes? Thank you!!!#2019-05-2308:49conan2) yes, what you're looking for are: REPL > Run tests in current NS in REPL REPL > Run test under caret in REPL they'll let you run all or one test in a ns via a keystroke#2019-05-2308:50conan1) I'm not sure exactly what constitutes a test, for my use cases it's always the entire contents of one deftest, including fixtures#2019-05-2308:52conanincidentally, if you have some code you want to re-run over and over from a keystroke, you can add REPL commands and bind them to keystrokes; for example, i always have (go) and (reset) bound to F11 and F12 for easy reloaded workflow. maybe if you have a fn which kicks off your tests but isn't picked up by the cursive integration you could bind it to a key this way?#2019-05-2309:11Jakub Holý (HolyJak)awesome, thanks a lot!#2019-05-2403:05cfleming@U0522TWDA The test markers are not all errors, they’re also the green checkmarks beside passing tests.#2019-05-2403:06cflemingThe last test action is the last one of “Run tests in current NS” or “Run a particular test” that you did. You can use it to repeat the last test(s) that you ran, whatever they were.#2019-05-2403:08cflemingWhat I do for testing is to use Preferences | Appearance &amp; Behavior | Quick Lists. I have one called “Testing” that contains Re-run last test action, Run test under caret, Run tests in NS, and Clear markers. Then I bind that to a key (Cmd-Shift-Space in my case) and when I use that key I get a menu, like this:#2019-05-2403:10cfleming(image in main channel, I can’t add it to a thread)#2019-05-2404:33Jakub Holý (HolyJak)awesome ,thanks a lot for the tip!#2019-05-2309:14tap@cfleming This issue doesn't specific to lein https://github.com/cursive-ide/cursive/issues/2173. This time the issue happens when I first open lein project, then I open deps project.#2019-05-2322:57cflemingYes, I believe this issue will happen with any project.#2019-05-2312:30Jakub Holý (HolyJak)How to fix "Cannot apply parinfer due to inconsistent indentation"? How do I find the problematic line(s)?#2019-05-2312:33Mnonormally there’s little red squiggly lines.#2019-05-2312:34Mno#2019-05-2403:08cflemingWhat I do for testing is to use Preferences | Appearance &amp; Behavior | Quick Lists. I have one called “Testing” that contains Re-run last test action, Run test under caret, Run tests in NS, and Clear markers. Then I bind that to a key (Cmd-Shift-Space in my case) and when I use that key I get a menu, like this:#2019-05-2400:51cfleming@holyjak Right, as @hobosarefriends says there are error markers at the start of the lines - those squiggly ones are in the dark mode, in light mode they’re solid red. You can jump to them with Navigate | Next highlighted error#2019-05-2403:10cfleming#2019-05-2403:15cfleming@kenny You gave a :thumbsup: to the issue asking for stubs support for datomic ions. I’m having trouble working out which namespaces actually need that support - I have datomic.ion, datomic.ion.cast and datomic.ion.lambda.api-gateway - am I missing any you’re aware of? I can’t seem to find any API docs for Ions anywhere.#2019-05-2403:56kennyYeah, docs aren’t great. We also use datomic.ion.dev. I think that’s in a different artifact though. #2019-05-2403:58kennyIt’s in com.datomic/ion-dev. #2019-05-2404:24cflemingGreat, thanks#2019-05-2416:20Lone RangerDoes anyone happen to know if it's possible to have seperate REPL tabs into different windows instead of a tabbed view?#2019-05-2421:58cfleming@goomba Not right now, but I’m expecting to make some improvements in this area very soon.#2019-05-2611:35MnoIt doesn’t feel like resolving anything today apparently. I feel like this has been answered before but I couldn’t find how to search the archives.. so if anyone can point me to the right place.#2019-05-2619:00gklijsDid you already try to import the project again?#2019-05-2620:33MnoI have not, do I do that by closing the project an reopening it with intellij?#2019-05-2621:02gklijsYes, by going to the folder, and choose to create the project again. That was the 'fix' sometimes.#2019-05-2708:33Mnookidoke gonna try that#2019-05-2622:34cfleming@hobosarefriends That is probably https://github.com/cursive-ide/cursive/issues/2173#2019-05-2622:35cflemingBest solution is to restart the IDE, sorry 😞#2019-05-2708:33Mnocool good to know, thanks!#2019-05-2803:40sova-soars-the-soraHello, i'm trying to run my ring application but I simply get Process finished with exit code 0#2019-05-2803:40sova-soars-the-soraWhich is great, i'm glad my hello world is error free, but how can I get it to run my ring application (as in the case of lein ring server)?#2019-05-2811:25jumarSounds like some variant on the :join? flag? https://ring-clojure.github.io/ring/ring.adapter.jetty.html JVM stops if all non-daemon threads finish, so you wanna make sure that at least the server thread blocks until you're ready to shutdown your server.#2019-05-2814:49sova-soars-the-sorathank you.. that makes sense but i'm not sure how to do that.#2019-05-2815:25shaun-mahood@cfleming Is there anything written up on how to use the clojuredocs integration? I've got the docs downloaded but can't figure out how to actually use it.#2019-05-2821:55cfleming@shaun-mahood You don’t have to do anything further, once downloaded you’ll get the examples, notes etc in the View | Quick Documentation popup.#2019-05-2821:56shaun-mahood@cfleming Perfect! I've never used that in Cursive before 🙂#2019-05-2821:56cfleming!!!!#2019-05-2821:57shaun-mahood(I've always just looked stuff up in clojuredocs manually when I needed it)#2019-05-2907:16flowthingClojureDocs examples have stopped showing up for me. Are there any known issues that would cause that?
#2019-05-2908:22Ivar Refsdal@flowthing It works here#2019-05-2909:54cfleming@flowthing Not that I’m aware of. If you look under Preferences | Languages &amp; Frameworks | Clojure what do you see under Documentation Options?#2019-05-2912:17flowthingScreenshot 2019-05-29 at 15.16.59#2019-05-2912:17flowthingI’ll try a different project.#2019-05-2912:25flowthingNever mind, I’m an idiot. I was editing a ClojureScript file. facepalm Sorry for the noise.#2019-05-2919:59Jakub Holý (HolyJak)How do I get Cursive to automatically align map values, binding righht sides etc. to the same column? It doesn't do that automatically and Reformat Code doesn't help either. I.e. not this:
let [{:keys [index-path create?]} {:index-path "index", :create? true}
        analyzer (StandardAnalyzer.)
        iw-cfg (IndexWriterConfig. analyzer)
        idx-dir (FSDirectory/open (Paths/get index-path))
        idx-writer (IndexWriter. idx-dir iw-cfg)]
but this
...
idx-dir    (FSDirectory/open (Paths/get index-path))
idx-writer (IndexWriter. idx-dir iw-cfg)]))
#2019-05-3007:43danierouxAre you perhaps seeing the destructuring part unaligned, and the rest aligned? This is: https://github.com/cursive-ide/cursive/issues/949#2019-05-2920:05manutter51Try Preferences -> Editor -> Code Style -> Clojure -- General tab -- “Align let-binding values”#2019-05-2920:06manutter51@holyjak#2019-05-2920:29Jakub Holý (HolyJak)Thanks! I tried that but Reformat Code still does not fix the alignment... 😞#2019-05-2920:36manutter51Weird, works fine for me.#2019-05-2923:18simonHello, I have been having issue where running repl with cursive results in
Error: Could not find or load main class clojure.main
Exception starting REPL: java.lang.InterruptedException
Running repl in console lein repl and cider-jack-in working fine. Issue started happening after upgrading to Mojave
#2019-05-2923:18simonfor Mac#2019-05-2923:38cfleming@holyjak That should definitely work - I haven’t heard any other reports of that being broken.#2019-05-3110:53Jakub Holý (HolyJak)thx, I will look more into it, perhaps I was doing something wrong.#2019-05-2923:39cfleming@simon.orlovsky That’s very odd. Do you get anything else in your log? Help | Show log in Finder/Explorer#2019-05-2923:56simon@cfleming all I get is
2019-05-29 16:56:13,182 [446250485]   INFO -            #cursive.repl.nrepl - Shutting down REPL executor
#2019-05-2923:59simonAlso the clojure repl configuration for intellij has a red x#2019-05-3001:42cfleming@simon.orlovsky Can you send a screenshot of the REPL configuration?#2019-05-3016:19simon@cfleming here is my configuration#2019-05-3122:38cfleming@simon.orlovsky So the problem is the error message at the bottom, saying that Cursive can’t find clojure.main, which generally means that Clojure isn’t attached to your project.#2019-05-3122:38cflemingHow did you set this project up? Looks like you’re using Leiningen, right? What does your leiningen toolwindow look like?#2019-05-3122:41simon@cfleming yes I am using leiningen. Doesn’t seem to be much going on in this tab#2019-05-3122:45cflemingOk, so what you want to do is find your project.clj in the Project View, right click on it and select “Add as leiningen project”#2019-05-3122:56cfleming@simon.orlovsky ^^#2019-06-0320:52simonFor some reason I am not getting that option#2019-06-0320:53simonI tried adding project.clj with + sign here as well but that didn’t work#2019-06-0320:54simon@cfleming ^^#2019-06-0422:35simonI have one project that still works. It has this in the project structure#2019-06-0422:36simonfor new projects libraries don’t have any dependencies in there#2019-06-0422:36simon@cfleming ^^#2019-06-0422:37cfleming@simon.orlovsky how are you creating these projects?#2019-06-0422:38simonlein new testapp#2019-06-0422:38cflemingOk, but how are you importing them into Cursive?#2019-06-0422:42simonI do file->`open`#2019-06-0422:42simonthen I get the x#2019-06-0422:42simonso I try https://cursive-ide.com/userguide/leiningen.html#2019-06-0422:44cflemingSo if you do lein new testapp, then File | Open…, then select the project.clj in the new project, it doesn’t get created correctly?#2019-06-0422:44cflemingCould you try that on a new project, then let me know so we can try to figure out what’s going on?#2019-06-0422:47simonyes it doesn’t set up correctly — I get Run Configuration Error: No modules containing clojure.main found#2019-06-0422:47simonwhen I try to set up the project#2019-06-0422:48cflemingWell, that’s when creating the run config, right? But before that, after File | Open Cursive does create a project? What does the Leiningen toolwindow look like for that new project?#2019-06-0422:50simon#2019-06-0422:50simondoesn’t seem to have any profiles#2019-06-0422:50simonmaven is also empty#2019-06-0422:50cflemingThat’s really weird.#2019-06-0422:51cflemingWell, it won’t use Maven, just Leiningen. Can you send me your log? Help | Show log in Finder#2019-06-0422:54simonSent as DM#2019-05-3013:16mhuebertI found this old/closed issue about excluding cljs-out, https://github.com/cursive-ide/cursive/issues/2080 I was wondering if there is any general way to always exclude folders matching a certain pattern? I’m finding that certain directories are continually re-added to the index, probably after I’ve made changes to my deps.edn, so I end up repeatedly hunting for the same directories to exclude. in my case they all have names like public/compiled, cljs-runtime, out, .shadow-cljs, etc#2019-05-3017:22devnHow do I stop automatic alignment of maps and such?#2019-05-3017:23devnI want:
{:a 1
 :bcd 2}
not
{:a   1
 :bcd 2}
#2019-05-3017:25manutter51Preferences -> Editor -> Code Style -> Clojure -- General tab -- “Align let-binding values”#2019-05-3017:27devnthank ya#2019-05-3022:34cfleming@manutter51 @devn Actually there are two separate settings there, “Align let-binding values” and “Align map values” - obviously you want the map one for that case.#2019-05-3022:45devn@cfleming yes, saw that, thank you. also, please register my vote for leaving those off as a default. they create messy merges and diffs.#2019-05-3022:53cfleming@devn Ok, noted, thanks - I think the binding forms are off by default but the maps are on.#2019-05-3023:27manutter51Oops, I copy-pasted from the very similar question yesterday or the day before, should have paid closer attention.#2019-05-3023:44cfleming@mhuebert There isn’t right now, but I’ll look at that. What used to happen using Leiningen is that the lein integration would add excluded directories but never remove them, so if they had been configured manually they would remain excluded.#2019-05-3023:45cflemingTo my eternal regret I used an IntelliJ framework for deps rather than just replicating what I did for lein, and now I have less control over things like that. I think that that may be why this no longer works under deps.#2019-06-0410:52Lone Rangerfor what it's worth, deps is working on great for me#2019-06-0421:12cfleming@U3BALC2HH Thanks for letting me know! It mostly works ok and does save a lot of work at first, but internally it’s not too flexible.#2019-05-3023:46cflemingAlso, in Lein generally e.g. cljsbuild is configured in project.clj so Cursive can work out the directories to exclude, but with deps that’s not always the case, and not in any standard format that Cursive could extract.#2019-05-3118:53sooheonWhat could be causing the Clojure file template to be unavailable in the new file menu?#2019-05-3119:25sooheon^^^ invalidate cache / restart fixed issue#2019-06-0314:01roklenarcicHm I'm having an issue where when I start cljs REPL, I get a prompt for a string:#2019-06-0314:06flowthingAre you using Figwheel?#2019-06-0314:01roklenarcic#2019-06-0314:01roklenarcicAnd when I cancel this I get another prompt#2019-06-0314:01roklenarcicbasically blocks my IDE#2019-06-0314:08roklenarcicanyone else had this problem?#2019-06-0314:14flowthingYes. Are you using Figwheel?#2019-06-0314:22roklenarcicyes#2019-06-0314:27flowthingWhich version?#2019-06-0314:28roklenarcic[figwheel-sidecar "0.5.14"]#2019-06-0314:28roklenarcicand figwheel is the same version#2019-06-0314:32flowthingSlack eats message history quite eagerly, so I don’t remember the exact explanation, but updating to both Figwheel dependencies to 0.5.18 and swapping [org.clojure/tools.nrepl "0.2.13"] for [nrepl/nrepl "0.6.0"] and [com.cemerick/piggieback "0.2.2"]for [cider/piggieback "0.4.0"] fixed the issue for me. Possibly also need to change :nrepl-middleware [cemeric.piggieback/wrap-cljs-repl] under :repl-options to :nrepl-middleware [cider.piggieback/wrap-cljs-repl].#2019-06-0314:32flowthingCould try just updating the Figwheel dependencies first.#2019-06-0407:08roklenarcicHm... I have piggieback 0.4.0, nrepl 0.6.0, and :nrepl-middleware [cider.piggieback/wrap-cljs-repl]#2019-06-0319:38kennyI updated to 2019.1 and now the keywords in my Clojure projects are in italics. Any idea how to fix this?#2019-06-0319:40kennyIn Editor > Color Scheme > Clojure > Keyword you need to: - Uncheck "Inherit values from:" - Uncheck Italic#2019-06-0400:09artrmrnoWould it be possible to get clojuredocs support in cljs files? I know there's no 100% parity between Clojure and Clojurescript, but it will be nice to have it for common functions.#2019-06-0401:41cfleming@roklenarcic What that means is that you’re using an nREPL connection with a REPL designed to be used as a streaming one, i.e. reading from stdin. What that means in Cursive terms is that you’re probably choosing an nREPL REPL type instead of clojure.main. If you do want to use nREPL with CLJS (which works better with Cursive) then you need to set up piggieback and use that.#2019-06-0407:05roklenarcicok thanks cflemming#2019-06-0412:07Jakub Holý (HolyJak)Since a while ago my REPL/Cursive "freezes" when I run "Switch REPL NS to current file" for +- 5s - when I type in the REPL input window, nothing happens, when I want to move the cursor using arrows in the source file, nothing happens... . Anybody else has experienced this? IntelliJ 2019.1.2, OSX. Could be due to a recent IntelliJ or Cursive update. Running manually (in-ns ..) in the REPL is OK.#2019-06-0414:38Ivar Refsdal@holyjak Not having this issue here. IntelliJ 2019.1.3, Cursive v1.8.2-eap4-2019.1, Linux#2019-06-0418:43Kari MarttilaAre there somewhere good color schemes for Clojure for IntelliJ. I kind of like Emacs Clojure mode color scheme and I'd like to configure the same color scheme for IntelliJ for Clojure - to have the same look and feel. Or where do I see the actual color mappings in Emacs Clojure mode (tried to find them in the eLisp source code but couldn't find them there)?#2019-06-0419:33Kari MarttilaIs there some Cursive keymap command that would kill the S-expression around the cursor? E.g. if I have
(def my-keys (map keyword my-header))
in my editor and my cursor is inside the inner S-expression somewhere (e.g. after the "k" in "keyword"), then giving that shortcut key command would kill the whole S-expression (i.e.
(map keyword my-header)
) leaving:
(def my-keys )
... and
(map keyword my-header)
would be in clipboard.
#2019-06-0419:42isak@kari.marttila I'm not sure if you can do it exactly like that, but you could "Move backward out of Sexp" then go for the kill#2019-06-0419:48isakoh, looks like you can record a macro that does both, then assign it#2019-06-0420:08Kari MarttilaOk. But there is no ready paredit command, I guess?#2019-06-0420:09Kari MarttilaThis is no big deal, I was just wondering if there is such a paredit command...#2019-06-0421:03cfleming@holyjak I haven’t experienced that, or received any reports of anyone else getting that either.#2019-06-0421:04cflemingIf it continues to happen let me know and we can try to diagnose it.#2019-06-0421:05cfleming@kari.marttila No, there’s no command that will do that in one go.#2019-06-0422:37kennyI have some huge items in my REPL history that cause IntelliJ to slow to a halt when bringing up the REPL history window. Is there a way to clear the REPL history?#2019-06-0422:55cfleming@kenny Ugh, sorry, no, I think there’s an issue about that. As a workaround, you could quit IntelliJ, delete .idea/replstate.xml from your project and then restart.#2019-06-0422:55kennyI don't see a replstate.xml file.#2019-06-0422:55kennyOh, maybe it only gets created when the REPL is exited?#2019-06-0423:01cflemingPossibly, and IntelliJ will cache the data in memory and just write it periodically, which is why you have to exit.#2019-06-0508:35Jakub Holý (HolyJak)What do I need to do so that Cursive understands (with-test (defn myfn [] ...))? Resolve as ... - as what? Thank you! I looked at https://cursive-ide.com/userguide/testing.html but don't see it.#2019-06-0514:42shaun-mahood@cfleming The clojuredocs integration (and learning about the quick documentation button) is so nice. Been doing some C programming lately on a side project and it's amazing how much I miss Cursive when working on it.#2019-06-0605:01Jakub Holý (HolyJak)What is the quick documentation button, please?#2019-06-0621:22cfleming@holyjak Check the View | Quick Documentation menu, that will have the keybinding next to it. Although in my case it says F1 but the one I mostly actually use is Ctrl-J. If you search for “Quick documentation” in Preferences | Keymap that will show all the bindings in your current keymap.#2019-06-0622:39Jakub Holý (HolyJak)thanks!#2019-06-0521:13cfleming@holyjak You can resolve with-test as clojure.core/do, which will index myfn properly.#2019-06-0521:14cflemingThat’s just for the indexing inside with-test though, does that also do some testing function?#2019-06-0605:00Jakub Holý (HolyJak)Not sure I understand? Yes, with-test contains the defn and tests for it, ie it does implicitly creates a deftest#2019-06-0521:14cfleming@shaun-mahood Thanks! Yeah, I find it really useful as well.#2019-06-0521:15cflemingAre you using CLion or AppCode for the C project?#2019-06-0521:17cfleming@holyjak Oh, I see how with-test works (I think, the doc is pretty terse). I’m not sure whether that would require further support from Cursive, please let me know if it works.#2019-06-0608:35ben.mumfordis the cursive license for a year only or is it perennial?#2019-06-0610:06roklenarcicIs there some sort of formatter that follows the Clojure Style Guide that some guy Batsov created that everyone seems to require?#2019-06-0611:21manutter51@ben.mumford620 It's renewed annually (and worth every penny! :D)#2019-06-0611:24ben.mumfordthat's what i thought. intellij asked me to update and without thinking i clicked ok#2019-06-0611:24ben.mumfordnow there's a warning message every time it logged on#2019-06-0611:24ben.mumfordi'm not sure how to downgrade (and which version i'm allowed to use)#2019-06-0611:26manutter51Version of Cursive you mean?#2019-06-0611:43ben.mumfordyep#2019-06-0611:56manutter51You could probably just write to Colin and send him the date you got your old license, and he could send you whatever version is the latest one that was valid under it.#2019-06-0613:17ben.mumfordthanks @manutter51#2019-06-0621:18cfleming@ben.mumford620 The licence is perpetual, but it comes with a year of updates. We have a licence FAQ which addresses that: https://cursive-ide.com/licence-faq.html#2019-06-0622:55manutter51That's what I meant (and should have said) -- sorry If I misled anyone on this.#2019-06-0709:40conanHi, I'd like to run a cljs repl using piggieback; the piggieback docs say I need to add the --middleware "[cider.piggieback/wrap-cljs-repl]" command-line option, but I'm not sure how to do this in a Cursive run config? It doesn't work in the Parameters field. Any clues?#2019-06-0712:27mitchelkuijpersIs there some kind of format that cursive understands? Markdown support or anything like that?#2019-06-0712:27mitchelkuijpersFor docstrings#2019-06-0716:59joelsanchezthis last update is driving me mad, the editor is highlighting the wrong pair of parens . in this example, it used to highlight the inner ones (the expr that starts with f/with-locale). can I disable this?#2019-06-0717:00joelsanchezit will take a lifetime to undo the muscle memory#2019-06-0717:04manutter51Yeah, that’s a recent glitch, and I think it’s IntelliJ rather than Cursive. We’re waiting on an update to fix it. I’m using rainbow parens as a workaround — I don’t like rainbow parens, but it’s better than the off-by-one parens.#2019-06-0717:05joelsanchezI'm using rainbow parens but I never had to actually look at them#2019-06-0717:05joelsanchezthis is the most infuriating one, I always end up writing code inside the map expr because I think I'm already outside of it#2019-06-0717:06joelsanchezbecause if they are highlighted, it used to mean I'm outside...I guess this teaches me how I really write code#2019-06-0717:38mssis there a guide for migrating an existing lein project in cursive to deps.edn? have the newest version of cursive installed, but my repl configration won’t allow me to select Run with Deps for whatever reason#2019-06-0717:58mssfigured it out – had to create a new project from existing sources to blow away the .idea/ that had the project set as a lein-based one and create a new deps.edn-based .idea/#2019-06-0723:12cfleming@joelsanchez Yes, this is an IntelliJ regression, which will hopefully be fixed soon. See https://groups.google.com/d/topic/cursive/AZ8bcx7R8Sk/discussion for details, and voting for the issues is probably a good idea too!#2019-06-0723:13cfleming@mitchelkuijpers Not currently, but I’d like to add support for markdown. Whatever I do will be cljdoc compatible, so basically markdown with wikilinks.#2019-06-0813:19mitchelkuijpersAwesome, good to know! Then I will use those rules for my own docs. Very usefull to have something like cljdoc so we can agree on a format#2019-06-0916:30daniel.spanielI am curious how others are running a clojurescript repl. I follow the instructions and started a clojurescript REPL. When I load a file into this repl it complains that the dependencies are not loaded. If there is a file with no dependencies ( from my repo ) it works fine. So I am wondering why this repl is not loading all the files in my source tree ? might be something really dumb, but can't seem to figure it#2019-06-0918:38msswhat instructions are you working with just so I can help troubleshoot?#2019-06-0918:58daniel.spanieli actually was reading off the cursive slack channel from about a day ago where someone was asking same question#2019-06-0919:00daniel.spanielI got a CLJS repl started by using Templates / Clojure REPL / Local in the add a configuration section#2019-06-0919:01daniel.spanielthen i selected clojure.main as the (Which type of repl to run ) and i picked for How to Run it => ( Run with deps ) option#2019-06-0919:02daniel.spanielthen i tried Run with intellij project classpath for the option ( How to Run it )#2019-06-0919:02daniel.spanieland that not work either#2019-06-0919:04daniel.spanieldon't get me wrong, the repl works as a repl ( where you type stuff in there ) But it does not load all the files in the working dir#2019-06-0919:04daniel.spanielunless there are no other dependencies to anything else ( because it can't find those other namespaced packages )#2019-06-0919:27TrevorI'm wondering if I'm experiencing the same thing trying to import react dependencies using shadow? works fine in vscode but using cursive I get an error. Here's my post on #shadow-cljs https://clojurians.slack.com/archives/C6N245JGG/p1560103024119200#2019-06-0919:27msscool so I might be totally wrong about this, as I was encountering the same issue like a year or two ago when I was diving into cljs and getting it to work with cursive#2019-06-0919:27mssbasically, the crux of it is that cursive doesn’t actually maintain a cljs repl for you#2019-06-0919:28mssyou need to start it with some other tool like figwheel, shadow-cljs, lumo, etc and connect to it in your normal clj repl#2019-06-0919:29mssonce you run whatever your connect-to-cljs-repl function in a normal clj repl, cursive will pick up on the fact that it’s a cljs repl going forward and you’ll be good to go#2019-06-0919:29mssso for example in a project I’m working on right now, my cljs code is built with shadow-cljs#2019-06-0919:31mssI’ll start a process with shadow-cljs watch my-build, switch over to cursive and fire up a normal clj repl in clojure.main. I’ve added a repl command using Tools -> REPL -> Edit REPL Commands called connect-to-browser which runs (shadow.cljs.devtools.api/repl :my-build)#2019-06-0919:31mssdoes that help?#2019-06-0920:18daniel.spanielboy that is very interesting .. and helpful. i will try that and let you know what happens .. thanks for idea#2019-06-0922:29cflemingGood news for those suffering from the random symbol resolution problem - it’s been confirmed as a problem in the IntelliJ platform: https://github.com/cursive-ide/cursive/issues/2173#issuecomment-500250577#2019-06-1013:08YadiaDoes Intellij/Cursive provide auto complete for Java classes ? It doesn't work for me and I didn't find anything ? :face_with_rolling_eyes:#2019-06-1014:01kanweiworks for me - make sure you have a project java ide set#2019-06-1014:17Yadia@kanwei thanks. sorry I didn't get what you mean ?#2019-06-1014:23kanweiapple + ;#2019-06-1014:23kanweiproject#2019-06-1014:24kanweiproject sdk#2019-06-1014:26YadiaI think the error may result from project SDK, currently intellj uses "jre64" that is default java runtime. and intellij uses this SDK by default on Iinux#2019-06-1015:35YadiaI reinstall Java and add JDK to Intellij and it solved problem. It wasn't cursive problem it was java and intellj stuff though:slightly_smiling_face:#2019-06-1016:35j0niCan anyone tell me where to look up an exception report generated by cursive? I'm blocked by an error caused by one of the leiningen plugins we're using (lein-v) - each time it fails, it generates an addendum to exception report #630 but I'm not sure where to look to see what's going on with that report/issue.#2019-06-1022:28cfleming@j0ni Looks like: java.io.FileNotFoundException: resources/big_enos/version.edn (No such file or directory)#2019-06-1022:29j0niright - that file does exist, but I think that path is lacking a PROJECT_DIR before it#2019-06-1022:30cflemingDepending on how you’re doing that, Cursive performs some black magic to make it work.#2019-06-1022:30cflemingCan you share the code that’s writing that file? By DM if it’s sensitive?#2019-06-1022:30j0niI ended up trying a leiningen task as a pre-task for my repl#2019-06-1022:31j0niit's a plugin called lein-v - https://github.com/roomkey/lein-v#2019-06-1022:32j0niturns out there was already an issue on there https://github.com/roomkey/lein-v/issues/26 but none of the workarounds helped in my instance#2019-06-1022:35cfleming@j0ni Ok, I’ll take a look at that later - I should be able to repro based on that.#2019-06-1022:37j0nithumbsup_all thanks!#2019-06-1311:10borkdudegentle reminder, feel free to vote on a convention for cursive and other tooling: https://github.com/borkdude/clj-kondo/issues/241#issuecomment-500805941#2019-06-1316:37tony.kaySo, when running all tests via the REPL in CLJ using Cursive’s running (Run all tests in ns): when there is an exception it shows the whole stack trace. A lot of times the useful info is at the top (e.g. a spec expound description) and I have to scroll back to it. Any chance this can be folded by default or something? I realize you might need it, but the scrolling gets oooold.#2019-06-1413:00joelsanchez😮 !#2019-06-1413:12manutter51That is pretty awesome#2019-06-1420:21dangercoderDoes anyone know how I can bind commands like integrants reset etc to a keybinding? I am a bit unsure how that works in cursive/intellij. 🙂#2019-06-1420:30dangercoderThink I found the solution: https://stackoverflow.com/questions/25539456/shortcut-to-evaluate-an-expression-on-the-repl-in-cursive-clojure#2019-06-1423:08cfleming@UBN9SNVB4 See here: https://cursive-ide.com/userguide/repl.html#repl-commands#2019-06-1421:10hairfireI'm trying to edit Joker (i.e., '.joke') files as if they were .clj files. Is there a way to tell Cursive to treat the .joke files as Clojure files?#2019-06-1423:07cfleming@joelsanchez Haha, yes - it’ll even do it with HTML pasted from outside the IDE: https://twitter.com/CursiveIDE/status/1118280781141438465#2019-06-1423:09cfleming@hairfire Yes, under Preferences | Editor | File Types#2019-06-1710:38p-himikIs there a way to suppress inspections for form/function/file?#2019-06-1717:56kennyctrl+click'ing on keywords used to open the "Usages of ..." window inline. This still works for function symbols but it is not working for keywords. I'm on v1.8.2-eap4-2019.1.#2019-06-2708:37joelsanchezthis 😞#2019-06-1720:21jvtriguerosI'm trying to the REPL like I normally do, but I'm getting this error: > Error running 'REPL': Error executing Leiningen configuration. Are there more logs that I can pull up and see what the issue is? REPL works fine on a different Clojure project.#2019-06-1720:26jvtriguerosI switched the run configuration to this:#2019-06-1720:26jvtriguerosAll is good now, is this expected?#2019-06-1720:59jvtriguerosOk, another update, it seems like it was an issue with having uncompiled Java files. lein javac then running the REPL using "Run with Leiningen" got me back to desired state.#2019-06-1819:16cfleming@U0JAE119P That’s very weird, though. I’m not sure what might have been going on there. The best log to look in is Help | Show log in Finder/Explorer, but lein doesn’t always return much useful information to put in there.#2019-06-1819:18jvtriguerosI did that, but there weren't any logs regarding the error 😞 That error had me going for a while and I couldn't figure out what it was. If there's anything I can do to pinpoint the issue let me know and I can file a more extensive bug report (if it is indeed a bug).#2019-06-2708:37joelsanchezthis 😞#2019-06-1811:39Jakub Holý (HolyJak)@cfleming The "Configure indentation for.." popup window would benefit from some help text. Having just a list of numbers and Cancel/Ok doesn't make it clear how to use it. Otherwise: ❤️#2019-06-1815:05scarytom@cfleming do you process the error reports from IntelliJ? I get 2 or 3 a day, and I mostly hit the "report issue" button and it says something like "reported issue #1120". Do you get those, and are they useful to you?#2019-06-1819:13cfleming@kenny Hmm, that probably got broken in the last release as part of fixing the keyword definition thing (https://groups.google.com/d/topic/cursive/zWWrGZpki3Y/discussion). I’ll see if I can fix that.#2019-06-1819:14cfleming@holyjak Yes, actually re-vamping my documentation is the main thing I’m working on now, and that included clarifying text for that and hopefully a link to the web doc from that popup.#2019-06-1819:15cfleming@t.denley Yes, they are - thank you. I get too many these days to look at them individually, but they’re very useful in aggregate to see which exceptions are one-off and which affect a lot of people.#2019-06-1819:16scarytomCool, thanks#2019-06-1900:42Joe R. SmithHow do I get Cursive to highlight the parens for the form preceding the cursor line, not the form I'm currently in?#2019-06-1900:43Joe R. Smithi.e., this way#2019-06-1900:44Joe R. Smithnot this way:#2019-06-1900:45Joe R. Smithbehavior seems to have changed from IntelliJ 2018.3 -> 2019.1 EAP#2019-06-1900:46cfleming@solussd By complaining in this issue: https://youtrack.jetbrains.com/issue/IDEA-211720 🙂#2019-06-1900:46Joe R. Smithheh, thanks!#2019-06-1916:50wilkerlucio@cfleming hello man, one curiosity, today is it possible to extend cursive custom extensions? I mean, if I like to have some specialised auto-complete in some context, is this possible to implement as an external plugin? or something like that would require some cursive specific hooks?#2019-06-1922:00hlshipHas anyone discussed the EDN viewer w.r.t. navigation? I occasionally edit some fairly large and deeply nested EDN files; it would be outstanding if Cursive could a) show a crumb-trail showing where in the document we were and/or b) provide some kind of navigation by key.#2019-06-2020:34cfleming@wilkerlucio Yes, that would require some kind of extension - I have plans to allow this, but it’s not possible yet, sorry.#2019-06-2108:53Rachel Westmacottthis would be awesome.#2019-06-2020:35cfleming@hlship Good idea. The breadcrumbs feature is probably pretty easy, perhaps the structure view could work well for the navigation.#2019-06-2023:11danielcomptonI found that updating to 2019.1.3 borked my Cursive indexes and all symbol resolution was broken. Invalidating the caches fixed it. It might be a good idea to automatically invalidate caches on IntelliJ version upgrades?#2019-06-2023:38cfleming@danielcompton Hmm, possibly, although I don’t think that’s something that usually happens. There is a bunch of index funkiness in 2019.1 that I’m waiting on a fix for: https://youtrack.jetbrains.com/issue/IDEA-211736#2019-06-2412:14heliosI think I am affected by this today 😢#2019-06-2023:49kennyI have also had this problem occur too. Seems to happen somewhat randomly. Usually closing and opening a project fixes it. Sometimes it will require a cache invalidation though. Sometimes it only affects symbols from particular projects and sometimes it's everything (or mostly everything, can't recall exactly). I pretty much always have multiple projects open.#2019-06-2023:51danielcomptonThis one was particularly tricky as editing a file would rebuild the indexes for that file but not the whole project so find usages only found references on files I had touched since upgrading#2019-06-2102:52cflemingYeah, it’s been identified as a platform issue and JB have been able to reproduce it - it should be fixed in 2019.2 at some point, and hopefully backported to 2019.1 too.#2019-06-2102:52cflemingUnfortunately 2019.x has pretty much sucked in terms of major bugs affecting Cursive.#2019-06-2107:09nblumoeHey 🙂 I got an issue with Cursive and IntelliJ modules. Scanning project.clj/deps files will make Cursive set up IntelliJ modules. I got multiple clojure projects in a single IntelliJ project and they share some folders in their config files (project.clj or deps). This results in Cursive adding those shared folders as source roots in multiple modules. This isn't allowed in IntelliJ and while it seems to work behind the scenes, it leads to problems for example when editing the module config in IntelliJ: I have to remove the conflicting source folders first to be able to save the modules config, then I need to make Cursive rescan the CLJ project files which will add the source roots again behind the scenes. Same game when I need to edit modules again at any point in the future. ;( Is there a way to resolve that or a decent workaround?#2019-06-2320:27nblumoe@U0567Q30W any thoughts about this?#2019-06-2420:46cfleming@U066HBF6J My apologies, I missed this message the first time around. When you say: > they share some folders in their config files (project.clj or deps) can you give an example of what that looks like in the project file? Are these just source roots?#2019-06-2507:20nblumoeHey, no worries. Yes, this is about source roots:#2019-06-2507:22nblumoeHere is a repo as a minimal example https://github.com/nblumoe/cursive-source-root-conflicts#2019-06-2507:23nblumoeImport projects recursively#2019-06-2507:23nblumoeGet the shared src folder as a source path on both app modules#2019-06-2507:24nblumoeModule config cannot be changed due to having the same source root on both app modules.#2019-06-2507:30nblumoeI think I found a related issue and commented on it too: https://github.com/cursive-ide/cursive/issues/2078#2019-06-2508:56cflemingAwesome, thank you for the excellent repro case - I’ll look at that tomorrow.#2019-06-2512:44nblumoeThank you!#2019-06-2109:59heliosFYI it seems that they started to work on the issue about brackets 😄 https://youtrack.jetbrains.com/issue/IDEA-211720#2019-06-2111:52heliosMarked as fixed in 2019.2.. so we just need to wait until that version is shipped bananadance#2019-06-2121:37cflemingI’m hoping it will also be backported to 2019.1.#2019-06-2118:12mishadoes anyone experience this too?: submit something to repl from repl-edit-pane, and up-arrow-key stops cycling through repl-edit-pane-history. submit something again, and up-arrow-key works again#2019-06-2118:14mishait seems to have something to do with trailing spaces of the thing you submit. and often happens when eval results in exception#2019-06-2118:14manutter51I think I saw something like that once, haven’t seen it in a while though.#2019-06-2118:14mishabut in both spaces and exception cases - it is war from 100% of the time#2019-06-2118:15mishaI have this like once per 1-2 hours on a bad day. but at least once a day#2019-06-2118:15mishamy ex-coworker had it too.#2019-06-2118:16manutter51I’m on IntelliJ 2019.1.3, with the latest eap Cursive, haven’t had that problem in something like a year, I’d say.#2019-06-2118:17manutter51Let me try something with trailing spaces and an exception…#2019-06-2118:19manutter51Still works.#2019-06-2118:19manutter51:man-shrugging:#2019-06-2118:19mishaI updated to 2019.1.3 a week ago and am on cursive v1.8.2-eap4-2019.1. same#2019-06-2118:19manutter51I’m on Mac OS X, what’s your system#2019-06-2118:20mishathe thing is: It seems it only happens with spaces and exceptions, but not for all spaces and not all exceptions.#2019-06-2118:20mishayeah OSX, but I doubt it is OS issue.#2019-06-2118:21manutter51Ok, interesting, just seeing what we have in common and what’s different.#2019-06-2118:21mishaif it would be easily reproducible (for me), I'd already reported it -_-#2019-06-2118:21manutter51Do you have an example of an exception that’s caused this for you recently?#2019-06-2118:22mishano, but it just happened to:
Loading src/statecharts/specs.cljc... done
(nat-int? -1)
=> false
#2019-06-2118:22manutter51Very peculiar.#2019-06-2118:23mishaand I can't confirm were there trailing spaces or not, because cursive strips them before printing => :) or does it?#2019-06-2118:24mishafirst of all, It is nice to confirm I am not insane. so that's good#2019-06-2118:24manutter51It’s early morning in New Zealand, maybe leave a ping for cfleming, I expect he’ll be on in a bit.#2019-06-2118:27mishaI think it can wait for him to read this on his own schedule :) thanks for feedback, @manutter51#2019-06-2120:13mishahave an interesting behavior: select top form, move it with shortcut (e.g. cmd+shift+up): form is moved (it and a prev one switch places), but selection stays on earlier line(s): before and after "move":#2019-06-2120:13misha#2019-06-2121:40cfleming@misha @manutter51 That looks like https://github.com/cursive-ide/cursive/issues/2003, which I’ve never been able to reproduce - it’s really weird.#2019-06-2121:40cfleming@misha Hmm, that selection bug is a weird one indeed. Could you file an issue for that please?#2019-06-2123:21mishahttps://github.com/cursive-ide/cursive/issues/2194#2019-06-2221:39cflemingThanks!#2019-06-2122:48jvtriguerosI also get this sometimes but I'm not able to repro 100% of the time.#2019-06-2216:38dpsuttonIf I wanted to try cursive in commercial products I would obviously need the cursive license. Would I also need a commercial license for the underlying IntelliJ? I’m assuming community edition is foreclosed for commercial development?#2019-06-2218:02polymerisNot a lawyer, but I think IntelliJ CE is Apache2-licensed, so should be ok to use for commercial purposes.#2019-06-2304:26cfleming@U11BV7MTK Yes, you can use IntelliJ community edition for whatever you want. It works fine for Cursive, using Ultimate edition doesn’t add anything Clojure-related.#2019-06-2304:29cflemingAlso, Cursive has a 30-day trial period, and I’m fine with using a non-commercial licence for longer trials if required, just let me know.#2019-06-2304:58dpsuttonGauging the cost. It looks like it’ll be $350 per year for IntelliJ plus your fantastic product. I’m happy to pay for good software just making sure I understood the true cost. Thought I remembered IntelliJ costing like 650 per year#2019-06-2306:13cfleming@U11BV7MTK I actually can’t remember what it costs now, things got more confusing since they switched to subscription-lite. It depends on what you’re using of their other products too.#2019-06-2218:27dpsutton> Coordinate type :mvn not loaded for library org.clojure/clojure in coordinate {:mvn/version "1.9.0"} popping up when trying to import a simple deps project. Anyone know why this might be?#2019-06-2218:27dpsutton
{:src ["src"]
 :deps {criterium {:mvn/version "0.4.5"}}}
#2019-06-2304:29cfleming@dpsutton No, I don’t know why that would be. Are you on Windows? What does your Preferences | Build, Execution, Deployment | Build Tools | Clojure Deps page look like?#2019-06-2304:56dpsuttonThis was Linux. Seemed to be related to syncing maven repositories? Gonna try it again tomorrow. Really enjoying it just tough to be back as a beginner for simple things like slurping, sending to the repl, etc#2019-06-2306:14cfleming@dpsutton Haha, yeah, that can be tough. There is actually an Emacs keymap you can use in IntelliJ, and I also rescued this which a lot of people like: https://github.com/cursive-ide/emacs-plus#2019-06-2306:15cflemingIf you switch to that, then paredit etc should use much more familiar bindings.#2019-06-2306:24dpsuttonI started with vim bindings but then all the shortcuts for IntelliJ are shadowed. Worried about the same problem with emacs bindings there. And my keyboard doesn’t have arrow keys or function keys so things are slow going at the moment :)#2019-06-2411:36ignorabilishi - is it possible to use (alpha) clojure cli on Windows?#2019-06-2412:07souenzzoI think that inside cursive it's works without problems but "outside" cursive, there is this work in progress https://github.com/clojure/tools.deps.alpha/wiki/clj-on-Windows#2019-06-2420:44cfleming@U8XSMEQS0 You can use deps with Cursive on Windows at the moment, but I’m not sure if it’s possible to use the CLI stuff. The last I checked it was not even very clear how that was going to work.#2019-06-2508:30ignorabilis@U0567Q30W - thanks a lot; how can I use deps with Cursive on Windows then? My version is 1.8.0-2016.2 and when I try to import a deps project I get Clojure Deps 'xxx' project refresh failed and below that Error: clojure.java.api.Clojure; naturally the project cannot resolve the dependencies and symbols are unrecognized#2019-06-2508:58cfleming@U8XSMEQS0 There’s no official doc about this yet, but that should be done in the next day or so. In the meantime, the release notes for 1.8.0 have info: https://groups.google.com/d/topic/cursive/V7BEEUuGLxM/discussion#2019-06-2509:03ignorabilis@U0567Q30W - thanks a lot for your help; unfortunately I already tried using tools.deps directly and all I got was locator.getService(RepositorySystem::class.java) must not be null when hitting the Refresh button; at least it is now clear to me how things are supposed to work currently 🙂 ; thanks again!#2019-06-2501:34joaohgomesHey guys, Maybe somebody already asked this: Something that annoys me and I can’t find a way to change the default behavior is when I’m debugging and try to evaluate expression. It works with var bindings, but when I have function calls I get “unable to find symbol in this context”. Apparently the debugger defaults current namespace to clojure.core, which is weird. Found out by evaluating *ns*. I can fix by either prepending namespaces to functions or (in-ns '<namespace>)(<code>). Wondering if there’s a way to reset the default namespace to the currently opened file or some other trick that could help avoid prepending namespaces every time.#2019-06-2509:05ignorabilisok, so thanks to @cfleming I found out that I need to be using tools.deps directly and there's no support for the cli; however when hitting the Refresh button I'm getting locator.getService(RepositorySystem::class.java) must not be null; this is the full exception:
locator.getService(RepositorySystem::class.java) must not be null
java.lang.IllegalStateException: locator.getService(RepositorySystem::class.java) must not be null
	at cursive.artifacts.ArtifactManager.newRepositorySystem(ArtifactManager.kt:86)
	at cursive.artifacts.ArtifactManager.<init>(ArtifactManager.kt:44)
	at cursive.artifacts.ArtifactManager.<init>(ArtifactManager.kt:38)
	at cursive.deps.DepsSystemSettingsControl$$special$$inlined$apply$lambda$5$1.run(DepsSettings.kt:389)
	at com.intellij.openapi.application.impl.ApplicationImpl$2.run(ApplicationImpl.java:307)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:748)
Let me know if anyone has seen this and what are some possible reasons for that exception
#2019-06-2722:13cflemingOh, I just realised what this might be - do you have the Maven support enabled? It’s possible that there’s a bug there when it’s not.#2019-06-2722:13cfleming@U8XSMEQS0 ^^#2019-06-2811:35ignorabilis@cfleming sorry, just realized that you're the right guy to talk to about Cursive 😂; I'm using Intellij only for Clojure (and a tiny bit of Haskell) so I'm not very familiar with Maven; what is that support and how can I make sure that it is enabled?#2019-07-0112:56ignorabilis@cfleming - I'm using intellij only for Clojure projects, so I'm not sure what Maven support enabled means - can you elaborate on that one?#2019-07-0120:39cfleming@U8XSMEQS0 There’s a Maven plugin in IntelliJ - you can go to Settings-&gt;Plugins and make sure it’s enabled, and enable it if it’s not.#2019-07-0212:23ignorabilis@cfleming - it was enabled; disable->enable did not help; however since my intellij has not been updated for some time I've updated it and things are now working, so at least for me this is solved 🙂; thanks again for your help!#2019-06-2516:54sparkofreasonKeep getting this exception, results in the REPL being unusable, keeps trying to write over previous output, and only in a limited number of lines.#2019-06-2517:04manutter51Not sure why cursive is blowing up on you, but it looks like it’s reporting a string with “\U” in it (instead of “\\U” possibly?) on line 514 of C:\Users\dave\Projects\Compute\stream-model\customer-dashboard\compute\dashboard.clj. Maybe check that line out?#2019-06-2517:05sparkofreasonAn exception is being thrown there, so the output is from clojure.#2019-06-2517:08manutter51There’s also an error in the cursive.filters namespace, but I suspect if you find the \U string and replace it with \\U or whatever you want it to be, that will fix the problem#2019-06-2517:10sparkofreasonAh, it's because I'm running in windows, somewhere the path is not being handled correctly.#2019-06-2517:11manutter51That makes sense. It’s reading the path without escaping the backslashes, and boom#2019-06-2517:12manutter51Although it seems odd that it would try to eval the contents of the path as a string, hmmm#2019-06-2517:12manutter51It could be a hard-coded path (or relative path) that’s missing the escaped backslashes.#2019-06-2517:42sparkofreasonDon't know for sure, but I'm guessing it has to do with the first line reporting the file in parens, maybe trying to eval that?#2019-06-2517:49manutter51Can you show the code?#2019-06-2522:51sparkofreasonThe code that's causing the exception? No, though I could see if I can come up with a repro. It was a pretty boring NPE, nothing interesting about the code.#2019-06-2523:50sparkofreasonAnd it happens for any exception, AFAICT
#2019-06-2611:41manutter51Hmm, that’s very odd. At this point I would try File -> Invalidate Caches & Restart, and/or re-installing Cursive. Something seems to be in a really weird state.#2019-06-2611:42manutter51I suppose it could also be some kind of weird dependency conflict too.#2019-06-2614:05sparkofreasonCache clear and restart didn't help. It would be interesting if a dependency conflict affected Cursive. I'll try inducing an exception in a different project and see if I can reproduce the errors.#2019-06-2614:06sparkofreasonIt does not. Wild.#2019-06-2614:08manutter51Very odd.#2019-06-2616:34sparkofreasonThink I figured it out. There was an alias in the project that explicitly called out clojure 1.10.1 as a dependency. Removing that solved the problem.#2019-06-2617:05manutter51Wow, wild.#2019-06-2520:43cfleming@joaohgomes I’ve seen this from time to time but haven’t been able to reproduce it. So you see this just when evaluating function calls?#2019-06-2521:13joaohgomesHey. Yes. Only when I’m evaluating function calls that are not part of clojure.core namespace.#2019-06-2521:13joaohgomesThis is what happens when I try to eval a fn ….#2019-06-2521:15joaohgomesThank you for looking into this.#2019-06-2521:16joaohgomesBTW, what is the expected behavior?#2019-06-2722:15cfleming@joaohgomes The expected behaviour is that you should definitely be able to call your function 🙂#2019-06-2722:15cflemingI’ll see if I can repro that, I haven’t tried again recently.#2019-06-2723:36joaohgomesThank you!#2019-06-2520:55hlshipSince upgrading to 1.8.2-eap-2019.1 and 2019.1.3 I'm having a problem on my epically large project where Cursive marks virtually evertything in a namespace as undefined, even things like defn, and all my imports are marked as unused. I fixed it the first time by restarting and clearing indexes, can't keep doing that though!#2019-06-2522:32hlshipThis is happening consistently, even on other projects I'm loading. I have to restart and invalidate caches.#2019-06-2522:32hlshipJust invalidating isn't enough.#2019-06-2522:35hlshipAnd even that isn't always working.#2019-06-2522:51sparkofreasonSame thing is happening to me.#2019-06-2722:10cfleming@U04VDKC4G @U066LQXPZ This is https://github.com/cursive-ide/cursive/issues/2173, which is caused by an underlying platform issue https://youtrack.jetbrains.com/issue/IDEA-211736. Usually restarting will fix the problem temporarily, but the only definitive solution is to downgrade to 2018.3.#2019-06-2722:11cflemingJetBrains said this should be fixed soon and released in a 2019.1 patch, but I haven’t heard from them in a while.#2019-07-0115:36jvtriguerosI just got hit by this one during my morning commute! Is the "fix" to downgrade IntelliJ or Cursive or both?#2019-07-0120:38cfleming@U0JAE119P You can downgrade IntelliJ to 2018.3, and that will fix the problem. The problem is also often temporarily fixed by just restarting IntelliJ.#2019-06-2522:47kidpolloHave smaller projects troll#2019-06-2523:19jvtriguerosDo you have any Java code? That was happening to me, I had to run lein javac externally.#2019-06-2523:19jvtriguerosPerhaps a different issue.#2019-06-2614:54nwjsmith@hlship this is also happening to me relatively frequently#2019-06-2615:53jrotenbergthis might be a stretch, but ... is there a way to get the vim paredit keymap working?#2019-06-2722:17cfleming@U06E5EETE I’m not a vim guy, but this might help: https://github.com/cursive-ide/cursive/wiki/Mapping-IdeaVim-actions-to-Cursive-actions#2019-06-2722:17cflemingI’m interested to know if this works for you, and if so I’ll add it to the doc.#2019-06-2722:22jrotenbergcool, I'll check it out and see.#2019-06-2618:12sparkofreasonPosted earlier, now have a repro. If Clojure 1.10.1 is used running IntelliJ/Cursive from Windows, any exception thrown in the REPL will cause this exception to occur in the IDE, and basically renders the REPL window unusable.#2019-06-2623:55danielcomptonThis issue has really been messing with me since the update https://clojurians.slack.com/archives/C0744GXCJ/p1561111173086600#2019-06-2722:18cflemingYeah, 2019.x has really sucked when it comes to platform issues affecting Cursive.#2019-06-2700:11kennyI accidentally clicked 'Don't ask me again' on the ClojureDocs download popup, but I actually want it to ask me again. Can I reset this setting?#2019-06-2722:19cflemingYep, Preferences | Languages &amp; Frameworks | Clojure | Documentation options#2019-06-2708:37joelsanchezat least "Find usages" still works#2019-06-2719:31onetomif i create an empty directory, open it up in intellij first, then i create a deps.edn file, cursive doesn't allow me to create deps based run configurations or repls. if i run File/New/Project from existing sources... and just let it overwrite the .idea directory, then everything works. how can i manually inform cursive/intellij project about the creation of the deps.edn file?#2019-06-2722:20cfleming@onetom You can add it from the deps toolwindow using the + button.#2019-06-2723:10onetombut i don't even have a deps tool window#2019-06-2723:16onetombtw, im on 2019.1.3 & 1.8.2-eap4 but it didn't work with non-eap version either. imagine, i do this:
mkdir deps-test
idea deps-test
echo '{:paths ["src"] :deps {}} ' > deps-test/deps.edn
and then what's next? i have no deps tool window. cmd-shift-a "deps" doesn't show that option either.
#2019-06-2723:17onetomin fact, cmd-shift-a doesn't even work now, after i've added the deps.edn file 😕 it works in other windows... this happened for the 2nd time today.#2019-06-2723:18onetomit's blinking the Help menu, but the action finder doesn't pop up. but if i select the Find Action... from the Help menu with the mouse, then the popup appears...#2019-06-2723:19cflemingHmm, right, if it’s the very first deps.edn file, you won’t have the toolwindow yet. You can use File | Project Structure, click + there and import a new module, and then point it at the deps.edn file.#2019-06-2723:19onetomok, let me try it#2019-06-2723:27onetomyeah, it kinda works, just have to delete the autogenerated module, which im a bit reluctant to do, since it's auto-generated 😕 also if delete that module, then my project tool window looks weird, like no files there, only the deps.edn anyway, thanks for the clarification#2019-06-2723:33cflemingWhy do you want to delete the autogenerated module?#2019-06-2800:00cjmurphyWhen I was having trouble making an existing lein project into a 'deps.edn only' one I copied across the clojure-deps.xml file (in the .idea directory) from another project (that was a 'from scratch' deps.edn project).#2019-06-2808:18onetom@cfleming maybe i have OCD and i just don't want to have things around which I don't need? or at least I think I don't need 🙂 also, what should i call that Clojure deps module? the default module, which is inherited from the directory name, just sounds too suitable... here is what happened, to understand how i got into this situation: a saw a friend manually looking up data on websites. it told him i can probably automate that, so i made a directory for the project, saved some curl output into some .html files. did some greping on it and saved those commands into some shell scripts. after that, to get more precise data extraction, i did some slicing and dicing in the browser dev tools. now i thought i should just do that same in node.js and im probably done. after an npm init -y; npm install cheerio suddenly my project is a nodejs project from intellij perspective, with some extract.js in the root. but i didn't really like the artificial jquery-like oop interface on top of the parsed html, so i said, let's just go all-in and do it from clojure with jsoup or something, so after an echo '{:deps {}}' >> deps.edn i was expecting to get some clojure repl somehow and that's when i asked here (after some googling and catching up on the cursive mailing list of course). it's very likely that i would want to continue this project by having a combination of js/clj/cljs. for me these intellij concepts of project and modules are still a huge overkill at this stage and feels like accidental complexity. most of what these project concepts provide could be deduced equally well by projectile in emacs for example, which i envy 🙂#2019-06-2809:42cfleming@onetom For better or for worse, IntelliJ is project based, and projects require modules. I’m afraid you’ll just have to grit your teeth and ignore the module files 🙂#2019-06-2810:11cflemingRe: the module name, currently you can’t change its name. Ideally the name would come from Deps, but it provides no way to name a lot of things.#2019-06-2814:28mishahttps://github.com/cursive-ide/cursive/issues/2196 corner case in parinfer smart mode#2019-06-2814:32jamescroftI'm trying out shadow-cljs on a project. I have the shadow-clj nrepl running (outside of cursive), and I have connected to it as a remote REPL from inside cursive. I can evaulate code from the editor (js/alert 1) and all works as expected. When I am in a test file I can load the current namespace into the repl and run (run-tests). The tests run and the output is logged to the REPL. The bit of functionality that I am missing is the test integration within the editor. If I select a test and run 'Run 'my-test' in REPL then I get an error in the REPL, the output is
Running tests in example.core-test
Calls to `require` must appear at the top-level. at line 1 cljs/user.cljs
Any pointers?
#2019-06-2818:05dnolendoes the latest Cursive still auto-detect the kind of REPL you're running (cljs/clj) ?#2019-06-2818:54dnolenit doesn't seem to be working for me#2019-06-2904:46cfleming@jamescroft Sadly, the test integration only works for Clojure right now, but I’m hoping to fix that soon.#2019-06-2904:47cfleming@dnolen It should, but it’s just based on sniffing banner strings so if they’ve been updated it might not work. How are you starting your CLJS REPL?#2019-06-3020:59wilkerluciohello, I'm getting an strange error when trying to load a project from deps:
Error resolving /Users/wilker.lucio/Development/third-part/fulcro-garden-css: java.lang.String cannot be cast to java.io.File
#2019-06-3020:59wilkerlucioany idea what that can be?#2019-06-3021:01wilkerlucioanother interesting point, I'm used to import new projects by dragging the folder, or via terminal idea folder, but now it happens that when the project contains both deps.edn and pom.xml Cursive/IntelliJ seems to prefer the Maven version. Can this be a dialog for the user to choose? and I feel like when this happens getting deps to work is complicated (like the error I described above, when I'm trying to migrate Cursive to understand the project as deps instead of lein I often see it goes a bit crazy)#2019-06-3021:02wilkerluciothis is the project I'm having trouble with to import, the deps are pretty simple: https://github.com/fulcrologic/fulcro-garden-css#2019-06-3021:10wilkerluciotrying invalidating caches but still no luck, is there a way to check for a more detailed error message? java.lang.String cannot be cast to java.io.File is really not helpful, and there is no stack trace =/#2019-06-3021:17wilkerluciogot the trace on the logs, seems something is getting broken inside the process to resolve deps:#2019-06-3021:17wilkerlucio#2019-06-3021:29wilkerluciook, found it, there was a syntax error in my deps.edn, when I tried to run another command on the terminal for another reason I got: Error building classpath. Error reading edn. Unmatched delimiter: } (/Users/wilker.lucio/.clojure/deps.edn), would be nice if Cursive could also use that message#2019-06-3021:31cfleming@wilkerlucio Interesting, thanks - I’ll try to reproduce that and make sure that error gets replicated.#2019-06-3021:32wilkerlucio@cfleming thanks, the error was in my user deps.edn (not in the project one), maybe this gets reported differently#2019-06-3021:33cflemingOh, ok - it looks like it was an unclosed paren or something similar, right?#2019-06-3021:33wilkerlucioyeah, I did a silly editing mistake, forgot remove a }#2019-06-3021:33wilkerlucio(that's what happens when I use vim instead of paredit for short edits)#2019-07-0200:25kennyCursive doesn't always correctly link line numbers in exceptions. For example, I'm in a project that contains compute.db.formulas namespace. The below exception highlights everything except the calls from that namespace.#2019-07-0200:25kennyIt appears to have to do with the fact that the files are .cljc and not .clj.#2019-07-0200:27kennyOn that ^, I think it'd be useful to highlight stacktrace lines that are a part of the current project/module.#2019-07-0201:48cflemingCursive actually does this with the code folding - by default lines from outside the project are folded. I might be able to extend that to highlighting, but I can’t highlight folded sections and Cursive also uses code folding to convert the JVM version to a Clojure-friendly version.#2019-07-0201:47cfleming@kenny That’s odd, I’ll try to reproduce that, thanks.#2019-07-0201:50kennyAfter I changed the file extension to clj, it worked. I need cljc though.#2019-07-0201:50cflemingOk, I’ll fix that.#2019-07-0217:55kenny@cfleming Also in the same space, Spec instrumentation exceptions printed from the tests are not formatted at all. This makes reading these traces really difficult. I actually don't think this has to do with the clojure.test integration though because if I copy the test to the REPL and run it, the resulting exception is also not formatted.#2019-07-0218:00Alex Miller (Clojure team)example? might be something we should fix in clojure.test and I'm not sure that's logged anywhere#2019-07-0218:08kenny@alexmiller Can you see the screenshot above?#2019-07-0218:13kennyIt appears to be the exception-info formatting - it all is printed on one line.#2019-07-0218:15kennyThe above one was particularly nasty because the first line says :path [:argm nil] which, at first, makes no sense. Buried in that text wall is an important piece of info that would've made it immediately obvious what the problem was - :reason "no method".#2019-07-0218:19kennyEven further off topic: it seems like multi-specs should print a similar error to s/keys when a key is missing. For example:
(s/explain (s/keys :req-un [::a]) {})
{} - failed: (contains? % :a)
=> nil
(defmulti example-spec :a)
=> #'compute.db.formulas-test/example-spec
(defmethod example-spec :example 
  [_]
  (s/keys :req-un [::example]))
=> #object[clojure.lang.MultiFn 0x645f9f2 "
The s/keys error is obvious - (contains? % :a). The multi-spec error is far less so - no method at: [nil].
#2019-07-0220:42Alex Miller (Clojure team)the key is not being used as a key, but as a function, and falling through to :default case is perfectly fine#2019-07-0220:43Alex Miller (Clojure team)there may still be something more that can be done here, but this tool is more generic than you're assuming#2019-07-0221:27kennyYes, it is more general but aren't keywords already special conditions for multi-specs?#2019-07-0221:33Alex Miller (Clojure team)no?#2019-07-0221:34Alex Miller (Clojure team)it's special for retagging but not for validation#2019-07-0221:35kennyAh that's different. It feels like validation could also be special conditioned to provide much nicer errors.#2019-07-0220:45nwjsmithIf I was really really eager to have an “Extract function” automated refactoring, is there any path forward for me? Can I bribe you @cfleming?#2019-07-0403:13cfleming@U04V32P6U I’m afraid bribery is not required, and it’s not something that anyone else could easily implement. Badgering might work though, it’s something I want myself and have been meaning to implement forever.#2019-07-0220:48nwjsmithor implement it myself?#2019-07-0221:29kennyHow do you guys pass system environment variables to a Local REPL? IntelliJ seems to have some odd pattern of reading in the environment vars. In the Run Config modal under the System Environment modal, I can see the env vars IntelliJ reads. I can update my PATH env var by changing it in my ~/.profile. However, if I add a new env var to my ~/.profile, IntelliJ won't read that in.#2019-07-0221:38kennyAdding env vars into /etc/environment seems to work.#2019-07-0222:40kennyAnother example of an exception that is not linked.#2019-07-0222:41cfleming@kenny Are you on the latest Cursive? I made some fixes there for the new 1.10.1 exceptions which include a path.#2019-07-0222:42kennyI'm on v1.8.2-eap4-2018.3. Had to downgrade to 2018.3. Too many problems with 2019 version: indexing issue, paren highlights, & random CPU spikes.#2019-07-0222:43cflemingYeah, 2019 has been really bad for issues affecting Cursive.#2019-07-0222:43cflemingOk, I’m going to do a pass over all those matching filters, I’ve received a bunch of examples to fix recently.#2019-07-0222:44kennyThe Help > Check for updates didn't show any Cursive updates so I think that's the latest version. I'm running Clojure 1.10.1.#2019-07-0222:44cflemingYeah, that’s the latest one.#2019-07-0222:45kennyIs the above exception-info formatting a clojure or cursive issue?#2019-07-0222:45cflemingI haven’t had time to look at it, but if it happens in a normal REPL too it’s likely to be Clojure.#2019-07-0222:46kennyCertain exception infos are printed nicely though. A simple example:#2019-07-0403:34cfleming@kenny Are you using aviso/pretty to print your exceptions?#2019-07-0823:29kenny@cfleming Not sure. It may have been installed in that project. Can't recall which project that was now. Is that not how Cursive typically formats exceptions?#2019-07-0823:31cflemingIt looks like aviso/pretty to me - Cursive will use it if it’s available at runtime. I’ve fixed that for the next build, along with your other cljc case.#2019-07-0823:31kennyOh, cool. It just needs to be on the classpath for Cursive to use it?#2019-07-0823:32cflemingWell, Cursive won’t actually require the namespace. IIRC it checks to see whether the ns is loaded, and if so uses it. So there needs to be something that actually loads pretty first.#2019-07-0823:35cflemingYeah, it does this:
(cond
      (find-ns 'io.aviso.exception) ((find-var 'io.aviso.exception/write-exception) *e)
      (find-ns 'clj-stacktrace.repl) (do (require 'clojure.stacktrace)
                                         ((find-var 'clj-stacktrace.repl/pst)
                                          ((find-var 'clojure.stacktrace/root-cause) *e)))
      :else (let [writer (StringWriter.)
      etc etc...
#2019-07-0823:36kennyWas there a reason to not use it if simply provided on the classpath?#2019-07-0902:37cflemingWell, you can’t tell if something is on the classpath, except by trying to load it and catching the exception. I could do that in this case, I guess, since it’s only used when using the action to print the last exception.#2019-07-0915:24kennyYep - that seems useful. Wouldn't need to always create a user.clj and require pretty.#2019-07-0222:48kennyEven a simple instrument exception prints nicely.#2019-07-0313:17pserranoIs there a way of customizing the shift+shift search for only showing clj files?#2019-07-0314:28jvtriguerosI typically resort to using the Search by Namespace shortcut. I don't think it's bound by default. It's under Navigate -> Namespace...#2019-07-0403:32cflemingRight, the shift-shift action is search everywhere, it’s not designed to be limited. Searching by namespace is a much better option.#2019-07-0319:55vlaaadafter updating to latest tools.deps.alpha, cursive can't see "src" dir as a source path#2019-07-0319:56vlaaadso I'm having a deps.edn-based project with clojure.cli version of 1.10.1.458, and no :paths key in deps.edn#2019-07-0320:57souenzzo@UCTNL1JNN that's your problem?#2019-07-0320:26Alex Miller (Clojure team)How did you update?#2019-07-0320:27Alex Miller (Clojure team)Sounds like you are missing the install deps.edn which is now included in tools.deps as a resource#2019-07-0320:31Alex Miller (Clojure team)There is actually a new clj out today that probably fixes it. It’s still working it’s way through brew#2019-07-0320:45cfleming@alexmiller Nice, I’ll update Cursive to use that - that will be great.#2019-07-0322:38Alex Miller (Clojure team)the new functions in tools.deps.alpha.reader should avoid needing to shell out for anything (if you were), and I'd be happy to help you in that quest. but I don't know exactly what cursive does to know what to suggest.#2019-07-0322:39Alex Miller (Clojure team)in particular, there are new functions there that replicate what clj does to find all of the clj files#2019-07-0402:20cflemingOk, I’ll check it out tomorrow, thanks.#2019-07-0321:04vlaaadI'm on linux#2019-07-0321:06vlaaadand I'm having problem with cursive, not tools.deps#2019-07-0321:07vlaaadrunning clj and requiring stuff works fine, it's cursive who does not display src folder as source#2019-07-0321:11Alex Miller (Clojure team)Cursive uses your clj installation #2019-07-0321:11Alex Miller (Clojure team)You should update your clj again to .462#2019-07-0321:19vlaaadit fixed my issue with cursive!#2019-07-0321:19vlaaadthanks!#2019-07-0323:53hlshipAh, this is still a problem?#2019-07-0323:53hlshiphttps://github.com/cursive-ide/cursive/issues/2094#2019-07-0323:53hlshipCurse you clj-pdf!#2019-07-0323:53hlshipI may have to downgrade back to 1.7#2019-07-0323:55hlshipMaybe the EAP build ....#2019-07-0403:24cfleming@hlship It looks like I closed it as fixed, is this still an issue for you?#2019-07-0403:26cflemingIt should have been fixed in 1.8.1#2019-07-0421:45hlshipSorry, yes w/ the downgrade I'm back up and running. Actually, I wiped my whole machine last night too.#2019-07-0421:48cfleming@hlship Which downgrade? Did you experience the clj-pdf issue with Cursive 1.8.1+?#2019-07-0423:14hlshipYes, I downgraded IJ 2018.3 and v1.8.2-eap4-2018.3 and I think the problem is resolved.#2019-07-0514:38nwjsmith@hlship do you have a workaround for the “Everything cannot be resolved” issue?#2019-07-0516:42hlshipYes, unfortunately — downgrade your IntelliJ to 2018.3 and use the Cursive 1.8.2 EAP build.#2019-07-0517:56nwjsmith😞#2019-07-0522:10cflemingActually, the most recent Cursive should be fine, it’s the IntelliJ 2018.3 which is important.#2019-07-0515:31StefanHi all, I’m evaluating Cursive, and I immediately run into an issue that I don’t understand. I have a deps.edn-based project that I imported in Cursive. I then try to create a (local) REPL run configuration (type: nrepl, how to run: tried both “run with IntellIJ class path” and “run with deps”). When I try to start that REPL, I get a little red balloon saying “Error running ‘REPL’: ‘10’ is bad configured”. I haven’t got the foggiest where that ‘10’ is coming from, and I don’t see any additional information. Any ideas?#2019-07-0521:03cfleming@stefan.van.den.oord Yes, I’m sorry - that message is a bit impenetrable, it comes from IntelliJ. I’ll have to see if I can wrap it.#2019-07-0521:04cflemingWhat it’s talking about is your Java SDK, which you can find under File-&gt;Project Structure-&gt;SDKs. Generally just deleting it and recreating it is the best way.#2019-07-0606:02StefanAh yes, thanks @cfleming and @U0CKQ19AQ, the Java SDK was indeed the problem. I had recently reinstalled them using adoptopenjdk instead of from Oracle, and I forgot that I also needed to update IntellIJ for that. And I’ll also add clojure as suggested, thanks for catching that!#2019-07-0515:33StefanThis is my deps.edn:
{:deps
 {clj-http {:mvn/version "3.10.0"}
  org.clojure/data.json {:mvn/version "0.2.6"}
  commons-validator {:mvn/version "1.6"}
  expound {:mvn/version "0.7.2"}}

 :aliases
 {:run {:main-opts ["-m" "metrics-server.core"]}
  :test {:extra-paths ["test"]
         :extra-deps {lambdaisland/kaocha {:mvn/version "0.0-521"}}
         :main-opts ["-m" "kaocha.runner"]}}}
#2019-07-0518:28tony.kay@stefan.van.den.oord I have some guesses around what I would try: 1. I would add an explicit dep on Clojure in the main deps. 2. I would also Look in “module settings” for the project (right click on the project name in the project sub-window …it’s near the bottom). Look through the modules and make sure there is a JDK selected, etc. 3. Make sure you have the clojure tools deps stuff installed from CLI…I think the normal deps support prefers to use that.#2019-07-0518:39tony.kay@cfleming I don’t want to cause noise in issues, but I have an idea that I wanted to share: I was thinking that library-based code analysis tools would be super-helpful if they could be somehow run in the context of Cursive and add warning/error markers to a problems list. For example, if https://github.com/arohner/spectrum got to a usable level how cool would it be to get “compiler error” kind of static proof spec checks (you’re pulling key :x from a map that cannot possibly contain it) for code as you program? I’m not suggesting you do the work to build the actual code-validation part, just a way for such libraries to integrate with Cursive so that the IDE experience could be awesome. Perhaps a way for code running in the REPL to call a function to add a report marker, which would make it possible (via the add REPL command/kb shortcuts) to have a key sequence that would check the current ns and add the marker. Would allow library authors to integrate with the IDE without you having to maintain anything but a “clear/set marker” API.#2019-07-1000:45cfleming@U0CKQ19AQ Sorry, I missed replying to this the other day. Actually clj-kondo already does something like this, see: https://github.com/borkdude/clj-kondo/blob/master/doc/editor-integration.md#intellij-idea#2019-07-0522:11cflemingMy apologies for the lack of a build supporting the 2019.2 EAP yet, there have been a series of platform issues which have meant that I haven’t been able to release it. I’m hoping it’ll be resolved soon.#2019-07-0601:49wilkerluciohello, can someone help me figure how do I write a Java class and import it using Cursive? this may not be a cursive specific issue, but I wonder if Cursive can help in some way. I was expecting to be able to just write a class along with the clojure namespaces, but when I try to import it, it is like the class doesn't exists#2019-07-0601:49wilkerlucioI posted on #clojure before, if someone please can give me some light https://clojurians.slack.com/archives/C03S1KBA2/p1562375761439100#2019-07-0617:30Jakub Holý (HolyJak)What is common and worked for me was to have Java under another root folder. You just need to configure lein/... for it. https://github.com/technomancy/leiningen/blob/master/doc/MIXED_PROJECTS.md#source-layout#2019-07-0618:46wilkerluciothanks, I guess whats making my life harder is that I'm using deps.edn, but I got some help yesterday and made it work, there are more details in the #clojure discussion, thanks for the lein hint#2019-07-0603:41dominicmUsing the cursive-started nrepl, is it possible to configure additional middleware. In particular, piggieback?#2019-07-0603:45cfleming@dominicm Not yet, but it will be very shortly.#2019-07-0603:46dominicm@cfleming I should probably have mentioned "deps.edn" at the same time 😄 Will this new feature support some kind of "injection". Would it be possible for aspiring cursive-compatible templates to place a file somewhere (in .idea or something) that will instruct cursive on what middleware and dependencies to inject?#2019-07-0603:48cflemingUmm, maybe - I haven’t gone far enough down the rabbit hole yet to know that, but I’ll keep that use case in mind.#2019-07-0603:49cflemingCurrently Cursive injects nREPL itself, and for piggieback it probably makes sense to bundle and inject a compatible version.#2019-07-0603:50cflemingI’ll also shortly be adding dual clj/cljs REPLs to make all this easier.#2019-07-0603:50dominicmThat would be good too. One drawback is that currently piggieback blows up if cljs isn't present (due to a tools.reader thing)#2019-07-0603:50cflemingUgh, that sucks.#2019-07-0603:50dominicmAlthough, cursive knows if it's a cljs project.#2019-07-0603:50cflemingI don’t want to bundle cljs#2019-07-0603:50dominicmI think it can be worked around with some dynamism, but I haven't tried yet.#2019-07-0603:51dominicmMaybe if I work on that, it'll make it easier for you to bundle 🙂#2019-07-0603:51cflemingCursive does include Maven download functionality, so perhaps the best option is not bundle at all and download specified versions as required.#2019-07-0603:52dominicmCursive analyzes the whole deps tree doesn't it?#2019-07-0603:52cflemingI can check if CLJS is on the classpath, yes, if that’s what you mean.#2019-07-0603:53dominicmBasically, yeah. But you know that before starting nrepl. Would that be a good way to determine whether to include piggieback?#2019-07-0603:55cflemingIt would certainly be a good cue to suggest it, yes.#2019-07-0604:08cflemingI’m planning to try to figure out how best to handle CLJS in all its REPL forms next week. Apart from the technical challenges, it’s a fearsome UI problem.#2019-07-0604:32dpsuttonDoes piggieback blow up without cljs in cursive or in general? Ive been wanting to get in there and that would be a great first issue#2019-07-0604:42dominicmin general.#2019-07-0604:42dominicm@dpsutton I've just finished the patch for making it not blow up#2019-07-0604:45dominicmhttps://github.com/nrepl/piggieback/pull/107 Your review would be valuable of course 🙂#2019-07-0605:23dpsuttonThat’s a hell of a diff :)#2019-07-0605:34dominicmIt's mostly just moving code from A to B. git just gets a little confused because of the prefixing.#2019-07-0605:38dpsuttonYeah I was glancing at it. It’s too late tonight here but I’ll try it out and look on Sunday#2019-07-0613:14wilkerlucioI've been using deps for some time now, one feature I miss from Lein is that since deps Cursive can't figure the test roots because this is not supported by deps. Makes sense in terms of Clojure, but I was wondering if would be useful to also have some special key to tell Cursive (or any other editor) which as the test roots, this is useful for things like navigating to tests or creating new tests. what you think we use some custom keys on deps.edn to let Cursive knows which are the tests roots? maybe :cursive/test-paths, or :editor/test-paths, something in this direction#2019-07-0615:42minhnncan I delete a expr without saving it to clipboard ?#2019-07-0622:05cfleming@wilkerlucio Cursive will mark as a test root any source path that comes from an alias containing “test”.#2019-07-0701:57wilkerlucio@cfleming just tried this (full deps):
{:paths
 ["src/server" "src/client" "src/shared" "resources"]

 :deps
 {cheshire                          {:mvn/version "5.8.1"}
  clj-http                          {:mvn/version "3.10.0"}
  com.cognitect/transit-clj         {:mvn/version "0.8.313"}
  com.cognitect/transit-cljs        {:mvn/version "0.8.256"}
  com.wsscode/pathom                {:mvn/version "2.2.16"}
  fulcrologic/fulcro                {:mvn/version "2.8.11"}
  com.fulcrologic/fulcro            {:mvn/version "3.0.0-alpha-15"}
  com.fulcrologic/fulcro-garden-css {:mvn/version "3.0.4"}
  fulcrologic/fulcro-incubator      {:mvn/version "0.0.35"}
  io.bdrc/jena-stable-turtle        {:mvn/version "0.6.0"}
  io.pedestal/pedestal.jetty        {:mvn/version "0.5.5"}
  io.pedestal/pedestal.route        {:mvn/version "0.5.5"}
  io.pedestal/pedestal.service      {:mvn/version "0.5.5"}
  org.apache.jena/jena-arq          {:mvn/version "3.12.0"}
  org.apache.jena/jena-core         {:mvn/version "3.12.0"}
  org.apache.jena/jena-iri          {:mvn/version "3.12.0"}
  org.apache.jena/jena-tdb          {:mvn/version "3.12.0"}
  org.clojure/clojure               {:mvn/version "1.10.0"}
  org.clojure/data.csv              {:mvn/version "0.1.4"}
  potemkin                          {:mvn/version "0.4.5"}}

 :aliases
 {:dev
  {:extra-paths ["src/dev" "src/cards"]
   :extra-deps  {binaryage/devtools         {:mvn/version "0.9.10"}
                 fulcrologic/fulcro-inspect {:mvn/version "2.2.5"}
                 gnl/ghostwheel             {:mvn/version "0.4.0-SNAPSHOT"}
                 nubank/workspaces          {:mvn/version "1.0.8"}}}

  :test
  {:extra-paths ["src/test"]}

  :prod
  {:extra-deps {gnl/ghostwheel.stubs {:mvn/version "0.3.9"}}}}}
#2019-07-0701:57wilkerluciobut it still marking src/test as source root, not test root, am I missing something?#2019-07-0704:36cfleming@wilkerlucio No, that should work, I’ll try that#2019-07-0704:41cfleming@wilkerlucio I get this:#2019-07-0704:42cflemingDo you have something in your user deps.edn?#2019-07-0704:45cfleming@minhnhat10bk You can use Expand Selection (https://cursive-ide.com/userguide/paredit.html#selecting-things) to select it, and then Delete or Backspace to delete it. There isn’t a single built-in action.#2019-07-0714:09wilkerlucio@cfleming I do have a user deps, but there is nothing with the word test there#2019-07-0722:27cfleming@wilkerlucio Could you go to Help-&gt;Debug log settings…, add #cursive.deps.DepsProjectResolver in there, refresh your project and send me the output?#2019-07-0718:08wilkerlucio@cfleming not related to what we are talking, but on the topic of keyword destructuring, would be nice if Cursive could refactor this: {:keys [::flow/data-property ::flow/data ::editor/update-data]} to {::flow/keys [data-property data] ::editor/keys [update-data]}. I remember you were talking about making the later one option to cursive use during refactoring, so I imagine if you could use the same algorithm to give an explicit option to convert from one to the other#2019-07-0722:28cflemingSure, once I have implemented one, re-using the logic for the other should be easy.#2019-07-0800:43cjmurphyI'm using IDEA 2019.1.3 and Cursive 1.8.1-2019.1 and getting "Cannot execute: Clojure command not configured". My suspicion is that the attached file is of a format that is too old. clj works fine from the command line.#2019-07-0800:46cjmurphyi.e. My deps.edn project is mis-configured. By the way this file comes from under the .idea directory.#2019-07-0806:57cfleming@U0D5RN0S1 If you correct the deps settings at Preferences | Build, Execution, Deployment | Build Tools | Clojure Deps, does that help?#2019-07-0807:23cjmurphyThe settings there seem fine: /usr/local/bin/clojure exists and works fine when I run it from the command line, and /home/chris/.clojure exists and has a deps.edn with everything commented out. This just the default setup I presume. This is a machine I've got going recently, a temporary and under-powered machine. I'm guessing the error message occurs because /usr/local/bin/clojure can't be found?? Is there a timeout for instance? Perhaps from the command line I'm picking up a different version of Java and that's why it works there.#2019-07-0820:38cflemingThat’s weird, that error message should only happen if there’s no path entered in that box. If you edit that field (e.g. add and remove a character), then apply the change and try again, does that fix it?#2019-07-0820:47cjmurphySomething indeed did fix it. I've got another project and soon a new machine to setup. So next time come across that error I'll try that trick and let you know if it doesn't work.#2019-07-0820:51cjmurphy(I did 'Reset', the equivalent of changing a character).#2019-07-0814:09Mark AddlemanI find myself doing some core.logic. Any idea how I should I should configure cursive to resolve fresh ?#2019-07-0814:24heliosselect it, and then resolve as defn ?#2019-07-0814:24helios(clicking the light bulb)#2019-07-0814:34Mark AddlemanThanks but fresh doesn't quite match defn syntax.#2019-07-0814:35Mark AddlemanBut you gave me the idea to resolve it as fn which does match the syntax. Thanks!#2019-07-0814:36heliosyou're totally right, I meant fn but somehow typed defn 😄#2019-07-0814:37Mark Addleman😄#2019-07-0814:37Mark AddlemanI think defne is going to be harder 🙂#2019-07-0919:13kennyIt'd be nice if when typing in the :local/root string, you got an autocomplete for the directories available. The IntelliJ Sass plugin does this. Not sure if there's some feature to automatically enable this for deps.edn local/root's.#2019-07-0921:58kennyI'm getting this message when trying to start a REPL in a new deps project
Error running 'REPL': '1.8' is bad configured
Any idea what that means?
#2019-07-0921:59cfleming@kenny It’s talking about your Java SDK, generally either reselecting or recreating it will work.#2019-07-0921:59cflemingThat message comes from IntelliJ but I’ve got to catch that and improve it.#2019-07-0922:00kennyYeah - I would've immediately know how to fix it if it said something about Java SDK. I was thinking it was talking about Clojure 1.8 for some reason#2019-07-0922:19kennySomewhat recently I've started noticing test output look like this. Seems a bit strange. The rest comes in a few seconds later.#2019-07-0922:21kenny... where "the rest" is defined as:#2019-07-0922:21cflemingThat does look weird - I’m not sure what might be going on there.#2019-07-0922:26kennyI think it may have happened some time around the nrepl update? Perhaps something to do with streaming content?#2019-07-0922:26kennyIt happens fairly frequently.#2019-07-0922:27cflemingYeah, that’s possible - their change to chunking streaming actually broke something else with the test integration recently.#2019-07-1016:13hlshipLately, I've seen bits of EDN output on the console when running tests. I suspect its the same underlying thing.#2019-07-1022:55cfleming@hlship That’s probably https://github.com/cursive-ide/cursive/issues/2123, fixed in 1.8.2-eap2#2019-07-1023:07hlshipCool.#2019-07-1105:45j0nihi @cfleming - I just wanted to check in re a thing I asked about here a couple months ago (but which now is lost to the slack infinity hole) - it related to the lein-v plugin which requires prep tasks to execute. with cursive, they don't appear to execute, so nothing (other than typing) works in cursive for this project. The config and the error message are included in separate snippets below#2019-07-1301:54cflemingHi @U06MD7077, sorry, I haven’t looked at this. Could you create an issue with that info, and that will hopefully stop it falling through the cracks?#2019-07-1302:18j0niSure will do - thanks!#2019-07-1105:45j0ni#2019-07-1105:46j0ni#2019-07-1114:29stacktracerIs there a way to force Cursive to recognize a symbol as a macro? ... I'm using the Pedestal library, and calling the "defbefore" macro -- which is itself defined by a call to another macro. Cursive warns "defbefore cannot be resolved," but it does not show a lightbulb for the "customize macro resolution" intention.#2019-07-1301:55cfleming@UKZHCSQ7M What does the definition of defbbefore look like? You said it was created using another macro?#2019-07-1302:58stacktracerhttps://github.com/pedestal/pedestal/blob/11173904c69ccf1a6c146752f3edb86e388d221e/interceptor/src/io/pedestal/interceptor/helpers.clj#L111#2019-07-1303:00stacktracerI suspect it would work for cursive to treat it as a "def"-type macro (... although I'm new at this, so my intuition isn't great)#2019-07-1303:47cfleming@UKZHCSQ7M Hmm, unfortunately no - if you resolve defsimpleinterceptordef as def it won’t work, because it doesn’t define a var called before, it creates one called defbefore.#2019-07-1313:25stacktracerdefsimpleinterceptordef is actually getting called to define a macro called defbefore, and I think the resulting defbefore macro could be resolved as def#2019-07-1313:26stacktracerdefbefore is what gets called from client code, so that's the one it would be nice for Cursive to handle better#2019-07-1313:31stacktracer... but defbefore isn't even defined until defsimpleinterceptordef gets called#2019-07-1313:35stacktracerI'm guessing stub generation would solve this, but Cursive only does that for specific namespaces#2019-07-1323:56cflemingRight, so if you don’t care about actually using defsimpleinterceptordef, then you might be able to hack defbefore.#2019-07-1323:59cflemingUgh, actually, no - I don’t think that will work - you still need to have defbefore defined somewhere.#2019-07-1400:00cflemingI’ll look at adding support for Pedestal, it should be pretty straightforward and it’s fairly widely used.#2019-07-1512:50stacktracerAwesome!#2019-07-1209:18Adrian SmithI'm running these tests without a problem but shouldn't cursive show markers in the gutter?#2019-07-1209:30Adrian SmithI did notice I was in the wrong ns but changing it to the correct ns doesn't appear to change the lack of gutter icons#2019-07-1301:56cfleming@UCJCPTW8J Yes, it should - I’m not sure why that wouldn’t happen. I’ll try to reproduce that.#2019-07-1302:02cflemingActually, it looks like that’s a learning project, right? Could you send me a zip of the project directory to <mailto:/cdn-cgi/l/email-protection|/cdn-cgi/l/email-protection>?#2019-07-1507:31agigao@UCJCPTW8J off-topic but which font are you using?#2019-07-1507:33Adrian SmithSource code pro just seen @U0567Q30W's response I'll try and package it tonight (GMT)#2019-07-1215:36antonmoshello! does anyone know how to get this to work? * Start Figwheel somewhere * Open a browser session for that Figwheel instance * Connect Cursive to the browser session’s ClojureScript REPL I tried starting Remote Repl in Cursive, switching it to CLJS, then running (figwheel.main.api/cljs-repl "dev") i get the following output
Connecting to remote nREPL server...
Clojure 1.10.1
(figwheel.main.api/cljs-repl "dev")
Prompt will show when REPL connects to evaluation environment (i.e. a REPL hosting webpage)
Figwheel Main Controls:
          (figwheel.main/stop-builds id ...)  ;; stops Figwheel autobuilder for ids
          (figwheel.main/start-builds id ...) ;; starts autobuilder focused on ids
          (figwheel.main/reset)               ;; stops, cleans, reloads config, and starts autobuilder
          (figwheel.main/build-once id ...)   ;; builds source one time
          (figwheel.main/clean id ...)        ;; deletes compiled cljs target files
          (figwheel.main/status)              ;; displays current state of system
Figwheel REPL Controls:
          (figwheel.repl/conns)               ;; displays the current connections
          (figwheel.repl/focus session-name)  ;; choose which session name to focus on
In the cljs.user ns, controls can be called without ns ie. (conns) instead of (figwheel.repl/conns)
    Docs: (doc function-name-here)
    Exit: :cljs/quit
 Results: Stored in vars *1, *2, *3, *e holds last exception object
Execution error (ExceptionInfo) at figwheel.main/nrepl-repl (main.cljc:1525).
Failed to launch Figwheel CLJS REPL: nREPL connection found but unable to load piggieback.
This is commonly caused by
 A) not providing piggieback as a dependency and/or
 B) not adding piggieback middleware into your nrepl middleware chain.
Please see the documentation for piggieback here 

Note: Cider will inject this config into your project.clj.
This can cause confusion when your are not using Cider.
I do have piggieback dependency in my “dev” profile in project.clj and :repl-options {:nrepl-middleware [cider.piggieback/wrap-cljs-repl]}
#2019-07-1215:41joelsanchezwhich version of figwheel and piggieback? also I think #clojurescript would be a better channel for this (cursive is only tangentially related. you could achieve the same with lein repl :connect)#2019-07-1215:50antonmosThanks! i asked in #clojurescript as well
[com.bhauman/figwheel-main "0.2.1"]
[cider/piggieback "0.3.8"]
#2019-07-1216:29joelsancheztry piggieback "0.4.1"#2019-07-1216:33joelsanchez@antonmos depending on your version of nrepl you might need at least 0.4.0. so maybe try that#2019-07-1219:11manutter51Is it possible to switch from lein to deps “midstream”? I have a project that I initially created from source as a Leiningen project, and now I want to run it using deps.edn. I may need to work on old branches that don’t have the deps.edn file, so I don’t want to give up leiningen.#2019-07-1220:26antonmos@joelsanchez bumping up piggieback did not help 🤷#2019-07-1301:30tony.kay@manutter51 there is a plugin for lein to pull deps from deps.edn#2019-07-1301:30tony.kayhttps://github.com/RickMoynihan/lein-tools-deps#2019-07-1301:31tony.kayworks well enough. I’ve gone over to deps completely now, but for a time I was using that#2019-07-1301:58cfleming@antonmos I’m looking at CLJS REPLs at the moment actually - I’ll look at that when I get a moment and try to figure it out.#2019-07-1301:59cfleming@manutter51 Yes, you can use the lein plugin tony.kay suggested, or you can just create a deps.edn with the same info as your project.clj (I seem to recall seeing a project that did that automatically? I can’t remember now), and remove your lein project and import the deps one.#2019-07-1302:00cflemingQuite a few projects seem to have both recently.#2019-07-1518:35souenzzo((fn [x {:keys [y] :or {y (inc x)}}] y) 1 {}) x inside (inc x) is a valid reference but cursive can't resolve this. Should I open a issue?#2019-07-1521:41cfleming@souenzzo Yes please#2019-07-1716:06kennyCould the REPLs listed in the Run Configurations be sorted by name? I could see this list becoming hard to navigate as more get added in.#2019-07-1721:54cflemingI’m not sure about this, that’s an IntelliJ thing - I’ll check.#2019-07-2211:11clariceHey Kenny, I am not sure if this is going to help. If you go to edit configurations and look at your Clojure REPLs to the left, you can drag them up and down sorting it manually which should change the order in the drop down.#2019-07-1719:30Kari MarttilaCan someone recommend some light color scheme for IntelliJ which provides good highlighting for Clojure (and Java and Python). I tried Solarized Light (https://github.com/jkaving/intellij-colors-solarized) but I found the background pretty awkward.#2019-07-1719:45Kari MarttilaI found "IntelliJ Light Theme" plugin. It seems to be pretty much what I was looking for.#2019-07-1719:50danierouxI use this: https://github.com/tonsky/intellij-alabaster#2019-07-1719:51danieroux(did enhance it to also highlight keywords)#2019-07-1720:15Kari MarttilaThanks, I'll try it tomorrow.#2019-07-1720:15Kari MarttilaI was also trying various fonts. Droid Sans Mono looked best to my eyes.#2019-07-1721:57cfleming@U76D9RZRR Yes, I was going to add a link to that - it will be the new default from 2019.3. I actually haven’t tried it with Cursive yet.#2019-07-1810:35Kari MarttilaI tried the alabaster theme as well. But I must say that I like the new IntelliJ Light Theme more - syntax highlighting is great. And I like the Droid Sans Mono font. I downloaded IntelliJ Light Theme to my PyCharm and GoLand IDEs as well - nice to have the same look and feel in all of my IDEs. I think my eyes are getting a bit old, I had to change the font from 12 to 14 (at least when I'm coding now in summer in my terrace with only the laptop screen - let's see if I'm able to use 12 font in my main screen in my study room later).#2019-07-1810:36Kari MarttilaBTW. I wonder why so many younger developers use these dark themes with IDEs - there are a lot of studies which say that black letters in white background is better for the eyes than vice verse.#2019-07-1902:58rutledgepaulvI really like https://github.com/Misophistful/borealis-cursive-theme#2019-07-1903:01cflemingYeah, borealis is nice. I also prefer light themes, though.#2019-07-1813:38thumbnailWhat’d be the recommended way to downgrade the plugin to an earlier version? The broken test integration is really hurting my flow rn#2019-07-1817:08mssis it possible to get a multi module project working with deps.edn? cursive seems to be a little angry when I’m importing a multi-module, deps.edn-based project#2019-07-1817:18mssfigured it out – you can just open the monorepo and add modules for each artifact in the file -> project structure submenu#2019-07-1822:14cfleming@jeroen.dejong How are you finding the test integration broken? Is that https://github.com/cursive-ide/cursive/issues/2123? If so, it’s fixed in the latest EAP, which you could upgrade to as an alternative to downgrading. Instructions for both are here: https://cursive-ide.com/userguide/#choosing-to-receive-eap-beta-builds#2019-07-1904:53thumbnailIt's exactly that one. Didn't realize I could update to an early release. Thanks 👍#2019-07-1822:15cfleming@mss https://cursive-ide.com/userguide/deps.html#working-with-multi-module-projects#2019-07-1915:44bfabryit seems like with latest clojure cursive and java 11 I’m getting a lot more errors like this
Syntax error (ClassCastException) compiling at (src/specify_it/bst_spec.clj:301:1).
class java.lang.String cannot be cast to class java.lang.Number (java.lang.String and java.lang.Number are in module java.base of loader 'bootstrap')
which tries to tell me my error is at the call site rather than giving me the trace and line number where the class cast exception actually happened
#2019-07-1915:44bfabrythere’s no macros in use here so syntax error is particularly confusing#2019-07-1915:47bfabry(pst *e) solves it, but I just don’t remember having to do that for every single exception in the past#2019-07-1915:50Alex Miller (Clojure team)Can you give a code example where this is happening?#2019-07-1915:51Alex Miller (Clojure team)Also, which Clojure version?#2019-07-1915:51Alex Miller (Clojure team)1.10 or 1.10.1?#2019-07-1916:04bfabry1.10.1#2019-07-1916:04bfabrysure#2019-07-1916:05bfabry
(defn report! []
  (doseq [[property measurements] @labels]
    (println (str property ":"))
    (doseq [[measurement labels] measurements]
      (println (str "\t" measurement ":"))
      (let [total (apply + (vals labels))]
        (doseq [[label num] labels]
          (println (str "\t\t" label ":" (* 100 (/ (double num) total) "%"))))))))
=> #'specify-it.bst-spec/report!
(report!)
:prop-measure:
	:presence:
Syntax error (ClassCastException) compiling at (src/specify_it/bst_spec.clj:291:1).
class java.lang.String cannot be cast to class java.lang.Number (java.lang.String and java.lang.Number are in module java.base of loader 'bootstrap')
#2019-07-1916:07bfabryusing run configuration of nrepl, deps, no aliases#2019-07-1916:08bfabryI did pull in all of sean corfield’s .clojure/deps.edn but it seems like 100% of that is scoped under aliases so none of it should be being used#2019-07-1916:13Alex Miller (Clojure team)and pst says?
#2019-07-1916:13Alex Miller (Clojure team)or *e#2019-07-1916:14bfabry
(pst *e)
Note: The following stack trace applies to the reader or compiler, your code was not executed.
CompilerException Syntax error compiling at (/Users/bfabry/Code/specify-it/src/specify_it/bst_spec.clj:290:1). #:clojure.error{:phase :compile-syntax-check, :line 290, :column 1, :source "/Users/bfabry/Code/specify-it/src/specify_it/bst_spec.clj"}
	clojure.lang.Compiler.load (Compiler.java:7648)
	user/eval11188 (form-init5824827466414742383.clj:1)
	user/eval11188 (form-init5824827466414742383.clj:1)
	clojure.lang.Compiler.eval (Compiler.java:7177)
	clojure.lang.Compiler.eval (Compiler.java:7132)
	clojure.core/eval (core.clj:3214)
	clojure.core/eval (core.clj:3210)
	clojure.main/repl/read-eval-print--9086/fn--9089 (main.clj:437)
	clojure.main/repl/read-eval-print--9086 (main.clj:437)
	clojure.main/repl/fn--9095 (main.clj:458)
	clojure.main/repl (main.clj:458)
	clojure.main/repl (main.clj:368)
Caused by:
ClassCastException class java.lang.String cannot be cast to class java.lang.Number (java.lang.String and java.lang.Number are in module java.base of loader 'bootstrap')
	clojure.lang.Numbers.multiply (Numbers.java:3845)
	specify-it.bst-spec/report! (bst_spec.clj:289)
	specify-it.bst-spec/report! (bst_spec.clj:282)
	specify-it.bst-spec/eval11192 (bst_spec.clj:290)
	specify-it.bst-spec/eval11192 (bst_spec.clj:290)
	clojure.lang.Compiler.eval (Compiler.java:7177)
	clojure.lang.Compiler.load (Compiler.java:7636)
	user/eval11188 (form-init5824827466414742383.clj:1)
=> nil
#2019-07-1916:14bfabryjust noticed there’s a cursive version bump I can do. let me try that#2019-07-1916:16Alex Miller (Clojure team)so the bug is in the misplaced "%"#2019-07-1916:16Alex Miller (Clojure team)should be outside the *#2019-07-1916:17Alex Miller (Clojure team)so it is reporting the proper error location#2019-07-1916:17Alex Miller (Clojure team)and the class cast error is the right error#2019-07-1916:17Alex Miller (Clojure team)the confusing part is the phase reporting (syntax error based on being in :compile-syntax-check)#2019-07-1916:22bfabryyeah I put the bug in on purpose to demonstrate. the location is also incorrect (though my example is bad), but line 291 is the location of the (report!) call not the location of the println#2019-07-1916:25Alex Miller (Clojure team)I think this may be a missing phase declaration at clojure.lang.Compiler.load (Compiler.java:7648) - it will just take the default, which is compilation here, but we're in a load so that doesn't necessarily make sense. I'm not entirely sure why there is a load here though, so that's the part puzzling me.#2019-07-1916:26bfabrynew cursive didn’t help. so intellij ultimate 2019.1.3, cursive latest eap just for the record#2019-07-1916:28Alex Miller (Clojure team)that may be something Cursive is doing behind the scenes (namely, what is in form-init5824827466414742383.clj) - seems like that is maybe a temp wrapper around your actual (report!) call, and that's what is walking this path in the first place#2019-07-1916:28Alex Miller (Clojure team)like I suspect if you just did this with clj at the repl, you would not see that and it would not report as a compiler error#2019-07-1916:28bfabrysame deal switching to java 1.8#2019-07-1916:28Alex Miller (Clojure team)yeah, none of that is important#2019-07-1916:29Alex Miller (Clojure team)this is about Clojure error reporting and what Cursive is causing to be evaluated#2019-07-1916:29bfabryyeah figured, it’s just one of the major differences for my setup from a few years ago. yeah clj repl works fine.#2019-07-1916:32bfabryactually no I’m wrong about that. same thing in clj…. I was just confused by different reporting styles. I think I know what this is#2019-07-1916:32Alex Miller (Clojure team)what do you see in clj?#2019-07-1916:32bfabryI have a call to “run all the stuff” at the bottom of the file. because the failure then happens during initial file load the namespace never gets marked as loaded#2019-07-1916:32bfabryand so everything is broke#2019-07-1916:33Alex Miller (Clojure team)so you see the error when you require in clj?#2019-07-1916:34bfabryyes. removing that line when I get the exception it gives me the line number where it originates#2019-07-1916:34Alex Miller (Clojure team)seems like you should see same kind of thing in Cursive too then, unless you loaded successfully, then modified, then ran the repl command in Cursive#2019-07-1916:34bfabryI think that’s what’s happened#2019-07-1916:35bfabrythe difference is in clj it’s obvious that the ns isn’t properly loaded. in cursive where I can send individual forms etc successfully not so much#2019-07-1916:36Alex Miller (Clojure team)in any case, I'd like to hear more from Colin about what is in the form-init...clj so I can see whether there is something more to do in the Compiler error reporting during load#2019-07-1916:37bfabryactually… cursive is still doing it even after restarting the repl, loading the file successfully and sending the form that throws a runtime error afterwards. and it’s still calling it a syntax error#2019-07-1916:38bfabry
Connecting to local nREPL server...
Clojure 1.10.1
nREPL server started on port 64285 on host 127.0.0.1
Loading src/specify_it/bst_spec.clj... done
(check-props)
*snip*
:prop-measure:
	:presence:
Syntax error (ClassCastException) compiling at (src/specify_it/bst_spec.clj:301:1).
class java.lang.String cannot be cast to class java.lang.Number (java.lang.String and java.lang.Number are in module java.base of loader 'bootstrap')
#2019-07-1916:43Alex Miller (Clojure team)yeah, Cursive is doing something else - whatever user/eval11188 (form-init5824827466414742383.clj:1) is, that's neither you nor Clojure#2019-07-1916:44Alex Miller (Clojure team)possibly, Cursive should unroll one layer of exception before printing, or it might be solvable by not stamping this particular wrapper as a compiler phase#2019-07-1916:45Alex Miller (Clojure team)like if you did (-> *e .getCause Throwable->map clojure.main/ex-triage clojure.main/ex-str println)#2019-07-1916:46Alex Miller (Clojure team)that would probably match what you see in clj#2019-07-1916:47bfabryit’s such a weird experience coming back to clojure and all the error’s only being two lines. I thought something was way more deeply wrong for a while 😅 but yeah it seems like there’s just an extra stack layer on top showing up#2019-07-1916:51Alex Miller (Clojure team)well Cursive has for a long time printed both way too much (unnecessary stack trace) and entirely the wrong thing (the top level, not the root cause). lots of progress being made on this and I'm glad to see it.#2019-07-1916:52Alex Miller (Clojure team)but there is some "contract negotiation" occurring here between Clojure and tooling that will take a bit of time to shake out#2019-07-1916:53Alex Miller (Clojure team)Cursive is better, lein is better (when using Clojure 1.10.1), clj is better (1.10 and more improvements in 1.10.1)#2019-07-1917:14bfabrynice#2019-07-1917:19Alex Miller (Clojure team)I will spend a little more time on this later and log something for Clojure (assuming that makes sense)#2019-07-1917:35bfabrythanks Alex. I haven’t been using clojure in a while but I’ve been following the improvements and they seem like great steps#2019-07-1920:15wilkerluciodo you guys know if there is something we can do to speed up editing on large files? in my project I have a file that contains pretty much all the specs, currently it has 1700 lines, trying to paste anything on it gets really slow, is there anything I can do to make it faster?#2019-07-1922:13cflemingHmm, that doesn’t seem that big. I have to run now, but I’ll get a CPU snapshot from you later to see if that sheds any light on the problem.#2019-07-1922:30wilkerlucioyeah, one operation that gets particularly slow is doing sexp over multiple lines, today I did multi-line selection with 18 items on it and run Wrap with (), that took about a minute to run#2019-07-2000:49cflemingOk, I think the formatting code might be the problem there, someone else reported something similar.#2019-07-2023:19cfleming@U066U8JQJ Do you only see extreme slowdowns when using multiple cursors?#2019-07-2023:20wilkerluciono, the regular editing gets quite slow on this file#2019-07-2023:20wilkerlucioits a file containing a lot of spec definitions#2019-07-1921:09bfabryfor a lot of different reasons my answer is: split it up into smaller files#2019-07-1921:29csdIs there anything I can do to improve the experience of using the REPL inside Cursive + IdeaVim? The vim bindings don't work but the "readline-style" bindings don't work either (⌃N, ⌃P, ⌃F, ⌃B, etc.). Instead I can only navigate user the arrow keys. This seems to be a Cursive-specific issue, because the readline-style bindings work if I'm using IdeaVim and am working in the terminal window.#2019-07-1922:02csdLooks like the issue is that, unlike in the terminal window, in the REPL window I'm in vim insert mode. Per the Cursive issue tracker, hitting Ctrl-C will put you into normal mode, so you can move around: https://github.com/cursive-ide/cursive/issues/647 TBH, if there were some way to disable ideavim in the REPL that would be nice.#2019-07-1921:48bfabryTried turning structural editing off?#2019-07-1921:49csdTurning structural editing off doesn't change anything for me. I'm running an older version of IDEA though (2017.3), so maybe that's the problem?#2019-07-1921:57manutter51Is there any way to change the color of the rainbow parens? The dark blue ones are hard to see in dark mode.#2019-07-2321:21jffryPreferences > Editor > Color Scheme > Clojure > Rainbow parens level 1-9 The preview window there even has an example showing them in action#2019-07-2323:55manutter51Awesome, I looked all over for that and didn't find it, thanks much!#2019-07-1922:02csdLooks like the issue is that, unlike in the terminal window, in the REPL window I'm in vim insert mode. Per the Cursive issue tracker, hitting Ctrl-C will put you into normal mode, so you can move around: https://github.com/cursive-ide/cursive/issues/647 TBH, if there were some way to disable ideavim in the REPL that would be nice.#2019-07-1922:04cfleming@alexmiller I don’t have time to reproduce this right now, but the unexpected load could be the one discussed here: https://github.com/cursive-ide/cursive/issues/2113#2019-07-2016:23Alex Miller (Clojure team)ah, right. so perhaps would go away with the upcoming change for that?#2019-07-2023:15cflemingFingers crossed. I’ll try to reproduce this and see if it works better after that fix.#2019-07-2214:31mishais there solution to "broken" open/closed paren at caret in the latest IDEA? it seems to highlight opening paren when caret is before closing, rather than after (as before). I think I read something about it here, but logs are lost(?)#2019-07-2214:34dpsuttonhttps://twitter.com/mfikes/status/1139273845112803336 colin chimes in here#2019-07-2214:40mishaI wonder if their issue ids start from 1 for every project: https://youtrack.jetbrains.com/issue/IDEA-211720#2019-07-2220:31Julien MaligeHi, I am trying to enable the ClojureDocs support of cursive. Is there a way to do it if I have already clicked on "Don't ask me again" the first time the pop up appeared. #cursive (https://cursive-ide.com/userguide/documentation.html#clojuredocs-support)#2019-07-2220:41manutter51Check in Preferences under Languages & Frameworks -> Clojure, at the bottom of the window, should be a Documentation options section.#2019-07-2221:07Julien Malige#2019-07-2221:10Julien Maligecursive 1.8.1-2019.1#2019-07-2221:10Julien MaligeIntelliJ IDEA 2019.1.3 (Community Edition) Build #IC-191.7479.19, built on May 28, 2019 JRE: 1.8.0_202-release-1483-b58 x86_64 JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o macOS 10.14.5#2019-07-2221:18cfleming@ULMT8RVFE The ClojureDocs support is only in the 1.8.2 EAP.#2019-07-2221:40Julien MaligeAh!#2019-07-2221:40Julien Maligethanks 🙂#2019-07-2221:00scarytom@cfleming any chance you can do a sweep of the most common crash reports? I'm pretty happy with Cursive, but of the many IntelliJ plugins I use, it is the only one that crashes, and it does so many times a day. I am in the habit of sending reports whenever this happens, but it is rather frustrating to have to keep restarting the IDE to get Cursive working properly again.#2019-07-2222:26cfleming@UCQV87CN7 I’m sorry to hear that - AFAIK you should not have to be restarting the IDE. Is there a particular error that causes that? I just looked at the list, and the main one that lots of people seem to suffer from is around JS parsing - I have a fix for that in the works, but it’s a much larger change than I had anticipated.#2019-07-2306:31scarytomThe one that happens when I do a refactor -> extract variable. After that throws, the IDE behaves strangely: reference highlighting stops working, and further extract variables just call the variable "value" without offering to rename.#2019-07-2308:00scarytom
java.lang.RuntimeException: Document is locked by write PSI operations. Use PsiDocumentManager.doPostponedOperationsAndUnblockDocument() to commit PSI changes to the document.
Unprocessed elements: WHITE_SPACE(14501,14502)
	at com.intellij.psi.impl.source.PostprocessReformattingAspect.assertDocumentChangeIsAllowed(PostprocessReformattingAspect.java:291)
	at com.intellij.psi.impl.source.PostprocessReformattingAspect.assertDocumentChangeIsAllowed(PostprocessReformattingAspect.java:274)
	at com.intellij.codeInsight.template.TemplateBuilderImpl.buildInlineTemplate(TemplateBuilderImpl.java:181)
	at com.intellij.refactoring.rename.inplace.InplaceRefactoring.startTemplate(InplaceRefactoring.java:401)
	at com.intellij.refactoring.rename.inplace.InplaceRefactoring.lambda$buildTemplateAndStart$0(InplaceRefactoring.java:358)
	at com.intellij.openapi.command.WriteCommandAction$BuilderImpl$1.run(WriteCommandAction.java:124)
	at com.intellij.openapi.application.RunResult.run(RunResult.java:35)
	at com.intellij.openapi.command.WriteCommandAction.lambda$null$1(WriteCommandAction.java:263)
	at com.intellij.openapi.application.impl.ApplicationImpl.runWriteAction(ApplicationImpl.java:1054)
	at com.intellij.openapi.command.WriteCommandAction.lambda$performWriteCommandAction$2(WriteCommandAction.java:262)
	at com.intellij.openapi.command.WriteCommandAction.lambda$doExecuteCommand$4(WriteCommandAction.java:319)
	at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:212)
	at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:188)
	at com.intellij.openapi.command.WriteCommandAction.doExecuteCommand(WriteCommandAction.java:321)
	at com.intellij.openapi.command.WriteCommandAction.performWriteCommandAction(WriteCommandAction.java:262)
	at com.intellij.openapi.command.WriteCommandAction.execute(WriteCommandAction.java:244)
	at com.intellij.openapi.command.WriteCommandAction$BuilderImpl.run(WriteCommandAction.java:126)
	at com.intellij.refactoring.rename.inplace.InplaceRefactoring.buildTemplateAndStart(InplaceRefactoring.java:358)
	at cursive.refactoring.introduce.proxy$com.intellij.refactoring.introduce.inplace.InplaceVariableIntroducer$ff19274a.buildTemplateAndStart(Unknown Source)
	at com.intellij.refactoring.rename.inplace.InplaceRefactoring.performInplaceRefactoring(InplaceRefactoring.java:207)
	at cursive.refactoring.introduce.proxy$com.intellij.refactoring.introduce.inplace.InplaceVariableIntroducer$ff19274a.performInplaceRefactoring(Unknown Source)
	at cursive.refactoring.introduce$introduce_variable$fn__13961.invoke(introduce.clj:139)
	at cursive.refactoring.introduce.proxy$com.intellij.openapi.command.WriteCommandAction$ff19274a.run(Unknown Source)
`
#2019-07-2320:59cflemingHmm, ok, thanks - I’ll look into that one.#2019-07-2318:38Alex Miller (Clojure team)@bfabry fyi, I added a bug and and a patch for the thing we talked about at https://clojure.atlassian.net/browse/CLJ-2529 - should get a look for 1.11#2019-07-2318:39bfabryawesome, thanks alex#2019-07-2408:19danierouxI’m on the EAP as of today: (throw (ex-info "An error" {:keyed "error"})) Gives me this result:#2019-07-2408:19danieroux#2019-07-2408:20danierouxThat’s much better than the previous, thank you - I can see the message. Still surprising to see Syntax error, and can cope with that#2019-07-2410:02cfleming@U9E8C7QRJ Is that now the same as you see using a REPL outside of Cursive?#2019-07-2410:02cflemingHopefully it should be if you’re using Clojure 1.10+#2019-07-2410:05cflemingActually, no, wait - my apologies, that fix is not in the latest EAP.#2019-07-2410:06danierouxAh, cool. I’ll wait for that fix then (am using 1.10.1, not seeing the same)#2019-07-2409:11frankiesardoMorning everyone! Joined a new team that uses a variety of editors (atom, vim, emacs, cursive 🙂 ) what's the best plugin you use to keep formatting in sync? I am using parinfer for cursive and my team mates keep breaking it. I was considering something like zprint https://github.com/kkinnear/zprint but as far as I know there's not a nice way to integrate to cursive or am I wrong? Thoughts and help appreciated!#2019-07-2412:59danierouxWe’ve adopted https://tonsky.me/blog/clojurefmt fully. Cursive and Emacs formatting plays well together, except for destructuring in a let block, case/condp statements and type hinting.#2019-07-2413:00danieroux(let me know if you want the Emacs and Cursive settings to make this work)#2019-07-2417:45salamthis feels like a combination of social and technical problems. the technical problem is easy to fix as long as the social one is fixed first. 🙂#2019-07-2418:40thumbnailIn our team we build a formatter / linter which runs existing tools after a refresh/reload of the system, linting all changed files and reformatting staged files during development. It helped a lot as we've had a big influx of new clojurists. The tool isn't open source (yet) though :(#2019-07-2507:57dominicmYou might want to look into parlinter as the minimum people can agree on while having parinfer work @U050SU21B#2019-07-2414:56kanweiupgraded to 2019.2 final release and nothing is resolving (using deps.edn)#2019-07-2417:44salam@cfleming hasn't put out a stable Cursive release that's compatible with intelij idea 2019.2 yet (which is not uncommon for intellij idea plugins whenever a new intellij idea release comes out) and hopefully it will come out soon. meanwhile, you may switch to the latest eap release of Cursive if you would like to continue using it with intellij idea 2019.2: https://plugins.jetbrains.com/plugin/8090-cursive/versions#2019-07-2418:11kanweiI'm on EAP 1.8.2-eap5, the latest one he shipped this morning#2019-07-2418:28salami'm afraid that you're right. i can confirm that cursive (https://plugins.jetbrains.com/plugin/8090-cursive/update/65985), when used with intellij idea 2019.2, is unable to resolve any symbol.#2019-07-2418:30salamthe only log entry that looks suspicious is:
2019-07-24 11:29:17,370 [ 511081]   WARN - eInsight.daemon.LineMarkerInfo - Performance warning: LineMarker is supposed to be registered for leaf elements only, but got: -main (class cursive.psi.impl.symbols.ClEditorSymbol) instead. First child: PsiElement(Symbol token) (class com.intellij.psi.impl.source.tree.LeafPsiElement)
Please see LineMarkerProvider#getLineMarkerInfo(PsiElement) javadoc for detailed explanations. 
#2019-07-2421:19cfleming@UDCGPTV9R @U0ELT5ZDE I believe this problem is https://github.com/cursive-ide/cursive/issues/2173, which appears to be worse under 2019.2. I’m speaking with the dev to see if there is anything that should have made it worse in 2019.2. Workarounds in the issue.#2019-07-2421:31kanweithanks for the update!#2019-07-2421:40salamoh, i see. i thought that the occurrence of this issue is sporadic and can be worked around with a restart. as you mentioned, it indeed seems to have gotten worse. i’ll go ahead and vote for the youtrack issue. i would also encourage everybody who is affected by this issue to vote for it to help jetbrains correctly assess the severity of the matter. #2019-07-2414:56kanweieven after invalidating caches and manually adding src folders#2019-07-2417:43SgtZdog(reposted from #beginners ) Hello all! I could use help getting Cursive setup. I'm trying to debug some tests in the leiningen generated test folder and I don't know how to get a debugger (repl or otherwise) to tie into 'lein test' code execution.#2019-07-2417:44SgtZdog(It should be noted I'm very new to Clojure overall)#2019-07-2417:53salam@kevin.zemon cursive, when used with a leiningen project, has built-in support for running tests within the editor. you need to start a repl with the leiningen profile and then you should see run buttons in the gutter right next to test suite names.#2019-07-2417:55salamfrom there on, you should be able to use intellij idea's built-in debugging features (marking a breakpoint in the gutter, single-step debugging, etc.).#2019-07-2419:26shaun-mahood@cfleming I've just updated my intellij to the most recent (community edition, build 192.5728.98) and my cursive to 1.8.2-eap5-2019.2 and I'm having some issues with using projects based on deps.edn.#2019-07-2419:30shaun-mahoodAm I right that this should be working? Build is newer than 192.5728.74 which was on the mailing list post, but I'm not sure if I'm on early access or not...#2019-07-2421:20cfleming@shaun-mahood Yes, that should be working - please send a mail or leave some details here and I’ll investigate.#2019-07-2422:29shaun-mahoodOk, I've sent the details and log file through email. Thanks!#2019-07-2513:30octahedrionI'm also having issues with deps.edn projects since upgrading to 2019.2 today - my Run-configurations for deps.edn-based REPLs don't work#2019-07-2419:36SgtZdogIs the cursive eap compatible with intellij 2019.2? I'm using the release build right now and it's flagged as incompatible.#2019-07-2420:26kanwei@shaun-mahood yup same issue here, had to downgrade#2019-07-2420:37manutter51Just updated intellij to 2019.2 and got the latest EAP Cursive, and my REPL won’t start, keeps saying, “No external project path found for <project>“. Not sure how to proceed from here.#2019-07-2420:37manutter51It’s a deps.edn-based project, if that matters.#2019-07-2420:37dnoleneverybody's having the same issue it seems including myself - just have to downgrade for now#2019-07-2420:40manutter51Cool, tks#2019-07-2421:35SgtZdogI've re-installed 2019.1.3 and am still trying get the debugger working. so far, my attempts have not yielded any icons in the gutter. When you say > you need to start a repl with the leiningen profile what script should I point the run configuration at? right now I have it pointing to the root script in my tests folder#2019-07-2421:56salamsorry for the confusion caused by my usage of the overloaded world "profile". what i meant is the "Run with Leiningen" option on the run configuration pop-up dialog.#2019-07-2421:59salamyou don't need to put anything in the "Profiles:" input box. you may leave everything with their default selection/value and just hit "Run". that is: Which type of REPL to run: nREPL How to run it: Run with Leiningen Module: <your root module should be automatically selected here, if not select it manually>#2019-07-2421:59salamthis is just getting a regular REPL up and running, there's nothing test-specific here.#2019-07-2422:51SgtZdogHow do I use that to run the tests in the leiningen generated test folder (with breakpoints)?#2019-07-2501:58salam1) start a debug repl as described here: https://cursive-ide.com/userguide/repl.html#starting-a-debug-repl 2) load a test namespace by following the steps shown here: https://cursive-ide.com/userguide/repl.html#interaction-with-the-editor 3) run your tests in that namespace by following the steps shown here: https://cursive-ide.com/userguide/testing.html#2019-07-2512:45SgtZdogThank you @UDCGPTV9R! I spent far too long trying to grock how to do this. I had to 'Run X in REPL' to get the gutter icons to appear on what had and had not passed, but I was able to both include the ns/files and run the tests and call the functions in the repl! TY very much! (I also found that you can right click in the file to get the REPL commands rather than having to go up to the Tools dropdown.)#2019-07-2517:18salamyou're welcome, @kevin.zemon. i'm glad to be of help!#2019-07-2517:18SgtZdogAny ideas on the new problem I posted?#2019-07-2421:38SgtZdogNevermind... I was looking at a different run config. nREPL run config doesn't have a script option#2019-07-2421:41SgtZdogSo now that I'm looking at the right run config, I'll try to describe again: REPL is set to nREPL "How to run it" is "Run with Leiningen" and the leiningen/deafult is a selected profile Module is set to the root project module#2019-07-2421:45SgtZdogIf I replace leiningen/default with leiningen/test, i get an exception complaining that it can't find nrepl.server#2019-07-2500:36salamthis is not necessary and might cause problems. what we are doing here is just setting up a regular repl run configuration. leave the “Profiles:” input box empty.#2019-07-2500:40salamonce the regular run configuration is created, use it to start a debug session: (menu bar) -> Run -> Debug... -> (choose the repl run configuration) and after that, you’ll have a repl that’s running in the debug mode. from there on, you can switch to the test namespace, load that namespace, mark breakpoints, and run tests in the repl.#2019-07-2500:05kennyThe aliases folder in Clojure Deps appears to have gone away in 1.8.2-eap5-2019.2.#2019-07-2500:06kennyOr am I crazy? It doesn't seem to be there...#2019-07-2500:08kennyI think it's usually under the project name. I updated to 2019.2 on Ubuntu. This is a multi-module project.#2019-07-2500:14kennyYeah, it's usually there: https://cursive-ide.com/userguide/images/deps/toolwindow-aliases.png.#2019-07-2500:19kennyI tried specifying the aliases in the run configurations but all that does is pop open a Run window that says "java/sql/Timestamp".#2019-07-2503:04cfleming@kenny Thanks, will check - 2019.2 has been a bit of a disaster for deps support, sorry.#2019-07-2505:58caleb.macdonaldblackWhen I require the amazonica library in the repl, all of its functions are defined and I can autocomplete them. When I require in a standard clojure file they don't autocomplete. Can I standard clojure files to autocomplete like in the repl somehow?#2019-07-2509:23tapGot the same "java/sql/Timestamp" error on Leiningen project#2019-07-2509:54cfleming@caleb.macdonaldblack Did you get a prompt to create stubs for your project?#2019-07-2509:55cfleming@tap can you send a screenshot of that?#2019-07-2510:06tap#2019-07-2510:27cfleming@tap Thanks, which JDK are you using to run IntelliJ?#2019-07-2510:31tapInteresting. I didn't realize I'm on java 11 for IntelliJ.#2019-07-2510:36tapWill try with "2019.2 for macOS with Bundled JBR 8 (dmg)". Maybe it fixes the issue because my project is developing against java8.#2019-07-2512:16mbjarlandQuick question: assume I have a clojure script on disk as somefile.clj, it has no deps, and I don't want to create a project or a deps.edn as there are no dependencies and I would like to work in an ad-hoc manner by just opening the ifle. Is there a way to work with this file in cursive using a repl or am I forced to create a project?#2019-07-2512:17mbjarlandJust creating a "bare" clojure project and trying to send the file contents to a repl results in "Cannot load file into the active repl. It is not in scope for the module used to start the repl"#2019-07-2512:18mbjarlandor rather let me clarify, I would like to leave the file where it is and not set up a project structure with src etc, this is for ad how scripting to do stuff on the command line from clojure#2019-07-2822:23cflemingUnfortunately IntelliJ doesn’t really work this way, it’s fundamentally project-focused.#2019-07-3105:57mbjarlandYeah, now that I had time to mull things over, I think I might have asked this question before. Thanks for the reply. It’s a bit of a shame, I find myself quite often in an ad hoc situation where I just want to fire up an editor from the command line, run some repl stuff, save a file and breeze to the next thing. Anyway, thanks for the reply and thanks for Cursive, it is still the best clojure editor out there and is making my life easier on a daily basis.#2019-07-3122:29cflemingThanks for the kind words! Yes, it’s occasionally a pain, but it’s unfortunately just what IntelliJ is.#2019-07-2517:12SgtZdogHey guys, I think I've missed a setup step here, but I'm not sure how to fix it/what step I missed. (It's entirely possible there is actually something wrong with the code.) I keep getting "cannot find source class for java.util.map" (This generated by intellij/cursive debugger) How can I inspect my maps in the debugger? Or is there not a way to do so with Cursive?#2019-07-2517:21SgtZdogIn my REPL output while debugging: Error updating class definitions: NullPointerException java.util.concurrent.ConcurrentHashMap.get (ConcurrentHashMap.java:936)#2019-07-2517:27salammaybe it's related to this? https://stackoverflow.com/questions/45654299/intellij-idea-unable-to-evaluate-the-expression-cannot-find-source-class-for-c take a look at your Project Structure | Platform Settings | SDKs and Project Settings | Project SDK.#2019-07-2517:37SgtZdogI bow before your google-fu! More seriously, that does seem to have resolved the issue. I think maybe that setting got reverted when I did a separate install of intellij 2019.1.3#2019-07-2517:37SgtZdog(since cursive release plugin isn't compatible with 2019.2#2019-07-2517:47salami've read my books d https://boyter.org/static/books/CiHHf9-UYAA6aVB.jpg https://boyter.org/static/books/pRDPMx2.jpg#2019-07-2518:13SgtZdoglol, those are great.#2019-07-2517:22SgtZdogSeparately, why does the debugger have 2 calls to functions? One normal and one as a static invoke? Is this a result of java needing everything to be in classes?#2019-07-2517:36salamyou're right, every single function in clojure is implemented as an individual java class. what you're seeing in the debugger is the spilling of the implementation details. there's a jira ticket to help mitigate this: https://clojure.atlassian.net/browse/CLJ-2456#2019-07-2517:38SgtZdogok, thought that was probably the case. ty for your help again#2019-07-2822:27cflemingThe root cause of this is tangentially discussed in that issue, but the problem is this: when compiling a Clojure function call, normally the function is implemented in a static method, and then the IFn is stored in a var. So the call goes: 1. Load IFn from var. 2. Call IFn, which calls static method. Those are the two steps you have to step through. I’m hoping to fix the debugger so this is not required.#2019-07-2822:38SgtZdogAwesome, thanks!#2019-07-2518:23tapJust to report back, I don't find my "java/sql/Timestamp" error on leiningen project issue on IntelliJ with java 8 bundled.#2019-07-2822:27cflemingAwesome, thanks for letting me know.#2019-07-3120:48antonmos@cfleming so, this not a cursive issue, right?#2019-07-3120:49antonmosoh turns out that upgrading to s3-wagon-private “1.3.2” (from 1.3.1) fixes this as well#2019-07-3122:28cfleming@U5CV9L3QV Well, sort of. The issue is that Cursive resolves lein projects in-process, so it always uses the JVM used to run IntelliJ itself. This is becoming more of a problem as we move on from Java 8 since later JVMs are more restrictive (modules etc)#2019-07-3122:29cflemingLater versions of things like lein plugins will probably have fixes for these problems (like s3-wagon-private)#2019-07-3122:29antonmosgotcha! thanks for the clarification#2019-07-3122:31antonmosand thanks for Cursive! i am huge fan#2019-07-3122:31cflemingGreat! Glad it’s working well for you.#2019-07-2520:00cflemingTo those who experienced the NPE with deps under 2019.2, was that during project import or refreshing an existing project? Jetbrains over at https://youtrack.jetbrains.com/issue/IDEA-218954#comment=27-3608433 have suggested that a reimport might fix it.#2019-07-2520:30salami just got an NPE while re-importing an existing deps.edn project:#2019-07-2521:00shaun-mahoodYeah, I only got that message when trying to import an existing deps.edn file. The only reason I tried that was because Cursive wasn't working at all for me on the existing one.#2019-07-2521:02salamin my case, simply opening (not importing) an existing deps.edn project doesn’t throw that NPE but symbols are still unresolved which, i think, is a different issue.#2019-07-2521:03shaun-mahoodYeah, same thing happens here#2019-07-2601:10cflemingOk, I’ll comment on the issue over there.#2019-07-2520:25SgtZdogHey! Cursive plugin updated so I can use release version of intellij! Yay!#2019-07-2521:58SgtZdogHow do I fix broken require statements? I have some methods which intellij can't resolve (thrown? for example)#2019-07-2522:01kennyThis is not an actual clojure function and is (probably) only used in conjunction with clojure.test. There's an issue for the clojure.test integration not resolving those symbols though: https://github.com/cursive-ide/cursive/issues/238#2019-07-2522:01SgtZdogah, fair enough then. thanks#2019-07-2523:40genekimAgh. I can’t remember how to fix this — reaching out for help, after spending a half hour on this… I’m trying to start a REPL in a project using lein and deps.edn. I’m getting this error:
2019-07-25
16:28	Error reading /Users/genekim/src.local/gphotos1/project.clj
			Cannot run program "clojure" (in directory "/Users/genekim/src.local/gphotos1"): error=2, No such file or directory
			error=2, No such file or directory
I thought it was an issue with lein-deps-edn, and I think I even had this problem before. Somehow I fixed it before, I think after having stumbled upon this before: https://github.com/RickMoynihan/lein-tools-deps/pull/31 I upgraded to latest IntelliJ, thinking that was how I fixed it, but that doesn’t work. lein repl from command line works. In the REPL config screen, I see this error at the bottom, too.
Run Configuration Error: No Leiningen modules containing clojure.main found
Does anyone know how to fix this? Thank you in advance!!!
#2019-07-2523:45genekimHere’s my minimal project.clj file:
(defproject gphotos1 "0.1.0-SNAPSHOT"
  :min-lein-version "2.0.0"
  :plugins [[lein-ring "0.12.5"]
            [lein-tools-deps "0.4.5"]]
  :middleware [lein-tools-deps.plugin/resolve-dependencies-with-deps-edn]
  :lein-tools-deps/config {:config-files [:install :user :project]}
  :ring {:handler gphotos1.handler/app}
  :profiles
  {:dev {:dependencies [[ring/ring-mock "0.3.2"]]}
   :uberjar {:aot :all}}
  :uberjar-name "google-photos.jar"
  :main gphotos1.handler)

#2019-07-2602:40cfleming@U6VPZS1EK So, I’m not sure about this. The clojure.main message just means that your project hasn’t synced correctly, so Clojure is not attached as a dependency. The root cause is the earlier issue. It looks to me like you need to specify the full path to the clojure command explicitly to lein-tools-deps, maybe? I’m not sure.#2019-07-2602:58genekimThanks, @cfleming — I’m sitting down to try again!#2019-07-2603:05genekimFixed, @cfleming! You were right — adding this fixed the problem! Thank you!
:lein-tools-deps/config {
                           :config-files [:install :user :project]
                           :clojure-executables ["/usr/local/bin/clojure"]}
#2019-07-2604:46cfleming@U6VPZS1EK It’s a bit ugly, sorry 😞. This is due to the fact that Cursive resolves lein projects in-process, so the CWD is wrong. I do a bunch of black magic to hide that fact, but it doesn’t work for everything.#2019-07-2604:48genekimHey, I think Cursive and Clojure are freaking magical — like, a genuine technical marvel and miracle. You’ll never hear me complain about it!!! Thanks for all your great work, @cfleming!!! (And if I had to learn Emacs, I would have thrown in the towel long ago. :)#2019-07-2606:05genekimHmm. Adding the lein-tools-deps {:clojure-executables} causes a problem you push to Heroku, as Heroku installs the Clojure binary in /app/.heroku/clj/bin/clojure during runtime, but a temporary directory during build-time (e.g. /tmp/build_cbd87f5c06a1f53ce752790e2642e2a0/.heroku/ — presumably, this is in PATH environment variable. For now, I’ll just comment it out on laptop… Or use @U04VDQDDY suggestion of opening IntelliJ in the terminal window… But it does seem like getting a config that works for Cursive and lein-deps-edn for laptop and Heroku isn’t possible right now… (Sorry, just trying to organize my thoughts. Maybe I’ll file this as a new issue in lein-deps-edn. This person was having similar problems: https://github.com/RickMoynihan/lein-tools-deps/issues/79)#2019-07-2606:20genekimJust FYI: posted this here: https://github.com/RickMoynihan/lein-tools-deps/issues/79#2019-07-2604:48genekimHey, I think Cursive and Clojure are freaking magical — like, a genuine technical marvel and miracle. You’ll never hear me complain about it!!! Thanks for all your great work, @cfleming!!! (And if I had to learn Emacs, I would have thrown in the towel long ago. :)#2019-07-2602:50Mark AddlemanWhen I try to open one of my deps.edn projects with latest IntelliJ + Cursive, I get this exception#2019-07-2602:51Mark AddlemanThis is from idea.log#2019-07-2602:51Mark AddlemanMy deps.edn#2019-07-2603:23salamthis is a known issue that's being actively worked on: https://youtrack.jetbrains.com/issue/IDEA-218954#2019-07-2614:39Mark Addlemanfyi - IntelliJ to 2019.1 doesn't have this problem.#2019-07-2822:28cflemingYes, this is new in 2019.2.#2019-07-2606:08tony.kayAnyone seeing “Couldn’t read deps.edndeps.edn (No such file or directory)”#2019-07-2606:08tony.kay?#2019-07-2606:08tony.kayhappens when I try to import a project or just start the IDE on an existing one that tries a refresh#2019-07-2606:11tony.kayI switch from CLI to internal lib and that seems to have fixed it#2019-07-2606:11tony.kaymust be a homebrew issue#2019-07-2612:28potetmhttps://twitter.com/CursiveIDE/status/1154612905687445504#2019-07-2612:28potetm@tony.kay#2019-07-2615:01tony.kaygot it, thx…I did downgrade#2019-07-2616:31SgtZdogHey guys, I was wondering, is there a way to in the debug REPL run all leiningen tests? I know how to run an individual test and all tests in a file, but not how to do all of them.#2019-07-2619:41Chris(clojure.test/run-all-tests)?#2019-07-2919:36SgtZdog(Sorry, finally able to get back to this) So, amusingly, this does seem to work, but also runs all the unit tests. on the clojure ns as well. Which I'm perfectly willing to tolerate, as most of my time is spent on the tests for the code I'm actually working on.#2019-07-2919:37SgtZdogI also think (I need to look at the return some more) that this might be running the tests on all of the dependencies as well. And I'm not sure everything is being imported properly either. I'll have to keep playing around with this (unless someone else has a more complete answer?)#2019-07-2620:18osifor those on a mac, how have you customized your key-bindings such that you can navigate between editor tabs? both intelliJ shortcuts for tab navigation are overridden by cursive#2019-07-2621:32salami don't use tabs, instead i use the more keyboard and search-friendly Recent Files/Locations pop-up to navigate between files: https://www.jetbrains.com/help/idea/navigating-through-the-source-code.html#recent_files#2019-07-2622:02wilkerlucioI use AceJump lite (the non light version is very buggy), its a navigation thing, it allows to jump to any character in any visible buffer quite quickly#2019-07-2623:30tony.kayI just set CTRL-TAB CTRL-SHIFT-TAB so it works like a browser#2019-07-2804:25steveb8nI remapping mine for min finger movement since it’s such a common operation. It’s now CMD-N which invokes the “switcher”, non-standard but easy to reach#2019-07-2804:26steveb8nI’m also tab free#2019-07-2817:38osi@tony.kay ah! I didn’t realize about those browser shortcuts! I had been using command-shift-[ or ] for moving between tabs since it is also universal across mac apps.#2019-07-2810:45misha@cfleming when I rolled back from 2019.x to 2018.2, I noticed lack of frustration with keywords autosuggest. I realized it got rolled back to case-insensitive. was it change in cursive or IDEA from case insensitive to sensitive? I vote for making it case-insensitive again, as in 2018.x. This makes it waaay easier to search for camelCase ones imposed on you, given that camelCase in clojure is pretty rare, and switching back and forth from it is a noticeable friction (breaks my flow™ 9/10 times):#2019-07-2822:21cfleming@U051HUZLD I’m pretty sure I didn’t change anything there, but I’ll check.#2019-07-2810:47mishaespecially then names you have to deal with are this bad:#2019-07-2810:47misha#2019-07-2810:48mishain 2019.x I had to remember which is collapsed and which is Collapsed.#2019-07-2816:10Mark AddlemanI'm finally playing with REBL and Cursive. I can send individual top level forms to REBL without a problem but when I try to evaluate an entire file, the Cursive repl reports a socket closed exception and the repl process (include REBL) shuts down. Is this normal? I am using the latest REBL bits (v 0.9.172) and Clojure 2019.2.#2019-07-2819:41shaun-mahoodHow are you starting your REPL?#2019-07-2819:47shaun-mahoodI’ve been using clojure.main, and I set up my Cursive REPL config to run the alias rebl (from https://github.com/cognitect-labs/REBL-distro#usage) and loading the entire file work for me.#2019-07-2903:18Mark AddlemanI'm using the instructions here: https://github.com/cognitect-labs/REBL-distro/wiki/REBL-in-IntelliJ-Cursive#2019-07-2903:19Mark AddlemanI'll try starting REBL from the repl manually#2019-07-2903:41shaun-mahoodYeah, those should be fine. Maybe try putting intellij back one version, there have bren different issues getting it to work with Cursive so maybe you discovered a new one.#2019-07-2916:41SgtZdogHey guys, another newb question, how can I continue using my REPL (in Cursive) while I have the debugger stopped at a breakpoint, or would I need to start a second repl process? (Directly in the terminal?)#2019-07-2921:15SgtZdogSo, it looks like right now the closest I can get to that is using the Evaluate in the debugger. The problem I am having at the moment is that when I tried using a (require) so that I could all a function I got a CompilerException on not being able to use :all.#2019-07-2921:17SgtZdogeh, managed to get it to work by not using the require.#2019-07-2923:51cflemingYeah, currently that’s the best you can do - I’d like to be able to use that transparently behind the scenes when the debugger is paused, but I haven’t got to that yet.#2019-07-2923:58SgtZdogIs there a way to use (requires) to simplify function calls?#2019-07-2923:59SgtZdog(thank you for being so active in this slack)#2019-07-3000:00cflemingYou can use the same completion functionality for namespace aliases and classes as is documented here: https://cursive-ide.com/userguide/editing.html#completion#2019-07-3000:02cflemingThey’re stored temporarily for the expression you’re evaluating, so you can write (str/tr|) and autocomplete will offer trim in clojure.string as str, and then you can use that.#2019-07-3000:02SgtZdogok, I'll give that a try.#2019-07-2917:24hlshipCan't help but wonder ... what would it take to add Joker support to Cursive?#2019-07-2923:52cflemingPrincipally, more people asking for it. Technically there’s not much to it probably (since IIRC it has no interop) but there’s a lot around the edges, things like running processes and so on.#2019-07-3017:01jvtriguerosA few months ago someone suggested that I try using tubular and connect to Joker's socket REPL. I set up a remote REPL in Cursive, and this almost worked, I was able to execute code in the REPL, but the moment I ran evaluate expression in REPL from the editor, I ran into an issue. I'll dig up more information if it's valuable to you, but I believe Cursive is sending more stuff than just the s-expression to the REPL so Joker wasn't able to evaluate.#2019-07-3017:18cfleming@U0JAE119P Ah, I know what you mean. Yes, just being able to turn that off would probably help a lot.#2019-07-3017:19cflemingAnd is an easy fix.#2019-07-3017:21jvtriguerosYeah that'd give me the awesomeness of editing Joker scripts with Cursive (and all my slurp/barf bindings) while keeping my "send to REPL" workflow. If it makes it to the next EAP I'll give it a shot!#2019-07-2923:44kennyDoes Cursive respect CLJ_CONFIG env var?#2019-07-2923:53cflemingI suspect not, although I’m not sure.#2019-07-3000:01kennyTested it with a EnvFile and that definitely doesn't work.#2019-07-3000:02kennyIs there a way to set the config directory for clojure?#2019-07-3000:03kennyIt looks like you're able to set the user deps.edn if you click on "use tools.deps directly"#2019-07-3000:04cflemingRight, that’s mostly because when using t.d.a as a lib you have to supply all the deps.edn files programmatically, i.e. it has no concept of system/user/project deps file#2019-07-3000:04cflemingI’ll have to check where that env var is used.#2019-07-3000:04cflemingCould you file an issue with what you’d like to see, so it doesn’t get lost?#2019-07-3000:05kennySure#2019-07-3000:08kennyhttps://github.com/cursive-ide/cursive/issues/2212#2019-07-3009:14octahedrionhaving upgraded from 2018.3 to 2019.2 then downgraded to 2019.1, I notice that matched-bracket highlighting is semi-broken: it now highlights the correct ) for a (, but if your cursor is to the right of a ) i.e. )| and there's an outer paren immediately after, )|), then it highlights the outer paren's ( not the inner one you're on#2019-07-3010:41cfleming@U0CKDHF4L See https://twitter.com/CursiveIDE/status/1139289641662599168#2019-07-3010:42cfleming2018.3 is still the most stable IntelliJ version to use with Cursive - both the 2019.x releases have serious platform bugs affecting it.#2019-07-3010:43cflemingI’m cautiously optimistic that 2019.2.1 will be better.#2019-07-3015:04Lone RangerDoes there happen to be a blog or newsletter of some sort where I can see things like "this is the best version of intellij to use" without having to bother you in the channel @U0567Q30W?#2019-07-3017:18cfleming@U3BALC2HH I’ve written about it a bit on the mailing list, although I haven’t sent a summary email of the state of the problems - I should do that.#2019-07-3017:22Lone Rangerno worries, thank ya sir!#2019-07-3011:01flowthingThe "Resolve foo as..." feature seems to be broken for me. Is that a known issue (possibly related to other symbol resolution issues on 2019.x)?#2019-07-3011:01flowthingBroken as in the menu item does not appear at all for me when I press Alt+Enter.#2019-07-3017:21cfleming@U4ZDX466T The first thing to check there is that the intention is enabled: Preferences | Editor | Intentions | Clojure#2019-07-3105:30flowthingThat was it, thanks! I guess I must've accidentally disabled the intention at some point. :thinking_face:#2019-07-3016:16tapCursive 1.8.2-2019.2 maven central and .m2 are missing from this list. How to bring them back? (dependency autocomplete on project.clj isn't working)#2019-07-3016:20Alex Miller (Clojure team)what version of clj do you have installed?#2019-07-3016:20Alex Miller (Clojure team)clj -Sverbose#2019-07-3016:21Alex Miller (Clojure team)if not 1.10.1.466, I would recommend getting latest#2019-07-3016:50tapUpdated, still don't see maven central and .m2. Curious, how do you see it could be related, leiningen and clj?#2019-07-3017:15Alex Miller (Clojure team)oh, I missed the project.clj part of that question#2019-07-3017:15Alex Miller (Clojure team)so, wouldn't be related (my bad!)#2019-07-3017:48tapIt's actually me was confused. You are right, this could be a problem related to clj as well#2019-07-3017:16Alex Miller (Clojure team)similar problem could occur with a relatively recent clj#2019-07-3017:17Alex Miller (Clojure team)I don't think you should expect to see .m2 there - that's the local cache, not a "repo" (unless that's something cursive integrates together)#2019-07-3017:17Alex Miller (Clojure team)I don't know enough about the middle bits to suggest anything on central#2019-07-3017:24cfleming@tap Does refreshing your lein project manually help?#2019-07-3017:45tapNo, it doesn't help.#2019-07-3017:26cflemingI think .m2 did appear there previously as an option you could update the indexes for, but it doesn’t seem to now - that may have changed in recent IntelliJ versions.#2019-07-3017:33SgtZdogOk, so, getting a little more into this clojure project, and he's using the clojure.test framework for the actual running of the program (it is a testing tool, so it isn't as weird as it sounds). Does Cursive support running deftest functions outside of the leiningen generated test folder?#2019-07-3017:35cflemingYes, I think that should work.#2019-07-3017:37SgtZdogok, I'll keep playing around with it. Will it still use the (ns user) of the repl?#2019-07-3017:37SgtZdog(if I get any terms or expressions wrong, let me know, I'm still pretty new to Clojure too. Cursive is helping make the transition much easier)#2019-07-3017:38cflemingGreat, glad it’s helping! Making Clojure more accessible is a major goal.#2019-07-3017:38cflemingIf you run tests in the REPL, they’ll be run in the ns they come from in the source, not the current REPL ns.#2019-07-3017:39cflemingThe ns evaluation happens in is controlled by a flag, see: https://cursive-ide.com/userguide/troubleshooting.html#unresolved-symbols-from-clojure-core-when-sending-forms-to-repl#2019-07-3017:43SgtZdogOk, thanks, that was a very helpful read.#2019-07-3018:20SgtZdogSo, I tried running (require my.nested.file.ns) in the repl so that I could do my function calls and got this: UnsupportedOperationException nth not supported on this type: Class clojure.lang.RT.nthFrom (RT.java:947)#2019-07-3018:21SgtZdognvm, I am just good at making syntax errors.#2019-07-3019:04SgtZdogI'm trying to run the unit test in my src folder and there is no option to run the test where the cursor is.#2019-07-3019:06SgtZdogWhen I tried to run all tests in the NS I got ArityExceptions @U0567Q30W. Am I doing something wrong or is this a bug/missing feature?#2019-07-3019:08SgtZdog...#2019-07-3019:09SgtZdognvm. The original author wrote this testing framework to use the same macro names as clojure.test but they are actually part of the utils of this project. Sorry to have wasted your time.#2019-07-3018:30SgtZdogIs there a way to change the syntax highlighting for macros so that I (as a learner) can more easily differentiate them from functions?#2019-07-3023:42SgtZdogHey guys, I'm suddenly getting cursive Error running 'REPL': '11' is bad configured when I try to run my REPL debugger. Not sure what's wrong? I tried deleting and comparing against another one in a different project that's working and I have no idea what's wrong.#2019-07-3023:43cflemingSorry, this is a terrible message that comes back from IntelliJ. It’s referring to your SDK (i.e. the JDK you’re using).#2019-07-3023:43SgtZdogah, ok, thanks, I'll check that it is set properly#2019-07-3023:43cflemingUsually the easiest fix is just to recreate it (File->Project Structure)#2019-07-3023:46SgtZdogThat did it! Thanks. Not sure how I lost my jdk 11, but w/e.#2019-07-3023:47SgtZdog(I looked, and my other project which uses open jdk 8 also has a bad ref to 11, but oh well)#2019-07-3111:23Ben Hammondwhat is the currently recomended version of intellij for deps.edn projects 2019.1.4?#2019-07-3111:27Ben Hammond2019.1.4 is looking good to me#2019-07-3113:32heliosI thought it was 2018.x but @cfleming can confirm#2019-07-3113:46manutter51I’m using 2019.1.* with deps.edn, and it’s working acceptably if you don’t mind the wonky paren matching.
#2019-07-3115:05Ben HammondI still have not got used to that#2019-07-3115:06manutter51Yeah, it’s annoying, hope they get that fixed soon. (It’s partially fixed in 2019.2, I hear, but…)#2019-07-3115:06joaohgomesHey guys! Anyone knows if it is possible to manually “generate stubs”? https://cursive-ide.com/userguide/macros.html#stub-generation Stub modal is not showing for me… Weird that this is exactly the scenario as described in the user guide (java-time).#2019-07-3120:52antonmosFYI, if you get a java.lang.NoClassDefFoundError: java/sql/Timestamp in IDEA 2019.2 AND you are using s3-wagon-private - update the latter to 1.3.2 (it uses newer AWS SDK which doesnt try to load that class)#2019-07-3120:53antonmos@U05111TCS ^#2019-07-3122:34cfleming@ben.hammond @helios @manutter51 Yes, if you don’t want any problems at all, 2018.3 is the current best version. If you don’t mind the brace matching and you’re not affected by the indexing issue 2019.1 is ok. If you use deps 2019.2 is totally broken. Fingers crossed that 2019.2.1 will fix all of this.#2019-07-3123:00cflemingPSA - here are the details on the recent problems with IntelliJ versions, and recommendations about which to use: https://groups.google.com/d/topic/cursive/ntvsiLAehY0/discussion#2019-08-0104:23cfleming@joaohgomes Sorry, I missed your question earlier - if that doesn’t get picked up, try refreshing your project in either the lein or deps toolwindow.#2019-08-0113:17joaohgomesHey, thanks… I already tried that to no avail 😞. Any other tip?#2019-08-0118:49joaohgomesDowngrading to 2018.3 fixed everything after refreshing project in deps tool window. 😛 Thanks!#2019-08-0107:07p-himikThank you for that post with the links to the issues in YT. I thought I was going crazy.#2019-08-0110:49thumbnailMy repl-input is gone; how can i convince intelliJ to show it again 😅 ?#2019-08-0111:05thumbnaildoubleclicking the bottom bar helped.#2019-08-0209:46cflemingYeah, for some reason that gets totally collapsed sometimes - I don’t know why.#2019-08-0209:49thumbnailIt’s also pretty hard to describe this problem as a google-query 😛#2019-08-0210:10cflemingHaha, yeah - I’ve been meaning to put in a check with a popup when it happens#2019-08-0114:23dabrazheHi, I've noticed unexpected behaviour on the shadow-cljs repl, when using Cursive with (shadow.cljs.devtools.api/node-repl): macros, such as (time) and side-effects eg (print ) won't produce any output. Has anyone ideas how to fix this?#2019-08-0115:14p-himikI'm trying to send a form with defmacro to REPL and all I get is Unable to resolve symbol: defmacro in this context. However, if I copy the form by hand, all works just fine. Is sending a form somehow incompatible with defmacro?#2019-08-0115:37Mark AddlemanI get this error if I have forgotten to load the file into the REPL. At a minimum, you'll need to evaluate the ns form#2019-08-0115:44p-himikThanks! That works. But it's still really confusing nonetheless.#2019-08-0115:49Mark AddlemanAgreed. I've been using Clojure and Cursive for years and I get bitten by that more often than I'd like. It always takes me a few seconds to figure out what's going on.#2019-08-0115:51SgtZdogThere is a setting for having the nREPL load in the ns of your current file by default instead of its own ns, I think that might help you out. Ping me here if you need help finding it.#2019-08-0209:47cfleminghttps://cursive-ide.com/userguide/troubleshooting.html#unresolved-symbols-from-clojure-core-when-sending-forms-to-repl#2019-08-0209:47cfleming@U2FRKM4TW ^^#2019-08-0210:45p-himikOh, thank you! That's an interesting read. A bit funny how 70% of the whole troubleshooting page is devoted to this behavior.#2019-08-0210:51p-himik@U0567Q30W From the UX point of view, how do you think - would it make sense to intercept the error and provide that link in case that's what's happening? Or is it too unreasonable and/or unfeasible?#2019-08-0321:33cflemingYes, actually I’ve been meaning to investigate why that’s not already happening.#2019-08-0119:35thumbnailHi, I’m a big fan of the show difference-option for =-predicates in tests (https://cursive-ide.com/userguide/testing.html). Is there any way to extend the predicates for which this option works? I noticed any assertion will work, as long as the :actual value is in the form of (not (= expected actual)), but that feels kind of like a hack 😅#2019-08-0207:19guy👋 is there a way in cursive to re-order a :require form to make it alphabetical?#2019-08-0209:01thumbnailI use a formatting tool and occasionally a string-pluging in intellij. lemme check#2019-08-0209:02thumbnailThe plugin is called string manipulation and allows you to sort a subselection. This works for me because i can order arbitrary selections such as :dependencies in project.clj#2019-08-0209:14guyoh right that sounds neat! I’ll try it out#2019-08-0209:16thumbnailWe use https://github.com/gfredericks/how-to-ns with :sort-clauses? true as the linter btw#2019-08-0209:55guyoooh thanks 🙇#2019-08-0211:12Teemu KaukorantaJust had cursive break down on me. Nothing gets resolved anymore, but is highlighted as an error. I've removed and re-added the project through the Leiningen integration, invalidated caches and restarted, and even recreated the whole Idea project. Any ideas?#2019-08-0212:07Teemu KaukorantaI disabled and enabled Cursive, that seems to have helped#2019-08-0212:15p-himikIf you have IDEA 2019.2, there's a pinned post explaining the issue.#2019-08-0212:20Teemu Kaukorantaah, thanks. I'll keep that in mind if it breaks again#2019-08-0212:07Teemu KaukorantaI disabled and enabled Cursive, that seems to have helped#2019-08-0216:11kennyI have a single IntelliJ project with multiple modules. Module A depends on library B via a :local/root dependency. Cursive automatically creates/imports library B as some sort of IntelliJ Module. Normally this behavior is nice but it seems to be preventing a critical task. I want to open a REPL in library B with some extra aliases. Normally you can do this by opening the Clojure Deps panel, expanding the project you're interested in, and checking the alias boxes you need. Because Cursive automatically imported library B, it does not appear as a top level item in the Clojure Deps panel and therefore does not have the aliases checkbox. I can create a REPL through the usual mechanisms, selecting the Cursive-imported module B but, again, no way to select the aliases I need. I tried adding library B by doing File > New module from existing sources and selecting library B's deps.edn. This presents the "Import Module from Deps" popup. When I select "OK", I get a message that says "The project is already registered." Is there no way to create a REPL in library B with selected aliases? This is a big workflow impediment.#2019-08-0322:01cflemingThere’s only one Aliases tree in the toolwindow, and those aliases apply to all projects. That’s because there’s no way to pass aliases transitively to sub-projects in deps. However that aliases tree isn’t used at all for run configs like REPLs, it’s only used when syncing the project to IntelliJ.#2019-08-0322:02cflemingTo add an alias when running a REPL, in your REPL run config choose “Run with Deps”, choose module B, and you should be able to just enter the aliases in the alias box there.#2019-08-0516:09kennyI see multiple Aliases folders - one under each sub project. The bigger issue was that every time I changed the deps in library B, Cursive won't refresh its deps.#2019-08-0516:09kenny#2019-08-0715:07kennyIs there a way to refresh the deps for library B?#2019-08-0816:59kennyThis is actually quite a big annoyance. We have several cases like this and none of them will refresh their deps without refreshing a parent lib first.#2019-08-0817:03kennyIn library B, all the deps in the :test alias are never refreshed and therefore all marked as "cannot be resolved"#2019-08-0817:06kennyThis has another consequence - all symbols that have been marked as Resolve as... change their indentation back to the default. This causes code to get reformatted with no way to fix it.#2019-08-0901:01cflemingSo you want to be able to refresh the deps for B without refreshing A?#2019-08-0901:01kennyDefinitely#2019-08-0901:01cflemingWhy is it a problem to refresh A?#2019-08-0901:02kennyFurther, refreshing A does not cause the changes in B's :test alias to get updated.#2019-08-0901:02kennyBecause I am working in project B independent of A.#2019-08-0901:03cflemingSure, I understand it’s slightly counterintuitive, but does it actually cause a problem if you refresh A in order to refresh B?#2019-08-0901:03kennyYes. That does not work when changing deps in B's aliases.#2019-08-0901:03cflemingYeah, the alias thing is annoying.#2019-08-0901:04cflemingok, I’ll look at that - thanks for the report. Unfortunately the Deps support is based on an inflexible IntelliJ API. I want to migrate it off due to all the recent breakage and problems like this, but it’s a big job.#2019-08-0901:05kennyRight. It's quite an issue for our setup. It's possible that removing all project-A type projects, then adding all project-B type projects, then adding project-A type back in again would work.#2019-08-0901:06kennyThere's no way to even load a test file stored in project B.#2019-08-0901:06kennyYou will always get "Cannot load metrics_stream_test.clj file into the active REPL. It is not in scope for the module used to start the REPL."#2019-08-0901:08cflemingIs that a REPL started with module B as the context module?#2019-08-0901:08cflemingDeps doesn’t make this any easier unfortunately, since aliases are not transitive there either.#2019-08-0901:08kennyYes but if you changed the paths in the :test alias, it never updates.#2019-08-0901:09cflemingOh I see, so the problem is also that B’s :extra-paths are never added?#2019-08-0901:11kennyJust tested that. I need to refresh project A to get it to update -- no auto import.#2019-08-0901:11kennySo the project is just with the :extra-deps.#2019-08-0901:11cflemingOh, I see - changes in B’s project are not auto-imported. If changes in B’s deps.edn triggered an auto-import of A, would that be ok?#2019-08-0901:12kennyI suppose that would work.#2019-08-0901:13kennyBut it needs to apply for aliases as well.#2019-08-0901:13cflemingYes, I think that’s a separate issue.#2019-08-0901:13kennyWe can do what you mentioned earlier by specifying the aliases explicitly in the "Run with Deps" text box. That approach will let you load things in the REPL but not resolve symbols from the aliases specified. This is annoying and leads to bad formatting of code using the unresolved symbols.#2019-08-0901:13cflemingYes, definitely both cases need to work.#2019-08-0901:14cflemingLet me just capture all this in an issue and I’ll get you to look it over.#2019-08-0901:14kennyHaha ok. Not sure if IntelliJ APIs are a blocker here but being able to move a Module's "sub-module" to a top level Module would fix this too.#2019-08-0901:15cflemingYeah, I can’t do that, unfortunately.#2019-08-0901:15cflemingI really hate that thing.#2019-08-0901:15cflemingI should have just duplicated the lein integration, which works great now.#2019-08-0901:16kennyHmm, ok. Another possible workaround would be to disable the local/root auto module import thing for certain projects and let the user explicitly add them as a module.#2019-08-0901:29cflemingDoes this capture it all? https://github.com/cursive-ide/cursive/issues/2214#2019-08-0901:33kenny4. This actually works with the caveat that your deps in the :test alias may not actually be on the classpath. Not sure how the suggested solution would really solve the problem though. You'd need to know which aliases in project B to update.#2019-08-0901:37cflemingYes, you’d have to do that selecting the Aliases in the A project, which means you need to know how B was pulled into the project.#2019-08-0901:38kennyOhhh. B's aliases show up in A?#2019-08-0901:38cflemingYes.#2019-08-0901:38cflemingAt least, I think so.#2019-08-0901:39kennyAh, I had no idea haha. +1 for changing that to be more intuitive 🙂#2019-08-0901:39cflemingIt’s actually worse than that, if you also have another top-level project C which also pulls in B, then the aliases will be different there.#2019-08-0901:39cflemingThe way that lein works is that there’s one single top-level Profiles tree, which applies globally to all projects.#2019-08-0901:40cflemingMaybe that is the simplest solution here. It’s what I thought I had implemented, but I didn’t realise that the aliases are currently per-project.#2019-08-0901:41kennyHmm. So that makes sense for the resolving of symbols in the editor. It isn't great for starting a REPL. The Run with Deps should let you select the aliases per project though.#2019-08-0901:41cflemingYes, that is different and configured as you describe for lein.#2019-08-0901:42kennyThat's much clearer than the way it is now, IMO.#2019-08-0901:43cflemingOk, I’ll try to fix that. That would hopefully fix a lot of the confusion.#2019-08-0901:44kennyIf you take a step back, really aliases should be per-project. That's the mindset you have when working with deps.edn so that's the mindset people would have when working with Cursive. Whether that actually fits into IntelliJ's model is another story, it sounds like.#2019-08-0901:44cflemingDo you mean per-deps.edn, or per-IntelliJ project (i.e. per-all-your-deps.edn)?#2019-08-0901:45kennyper-deps.edn. IntelliJ projects are just a way of viewing many individual deps.edn projects.#2019-08-0901:45cflemingRight. However literally no-one has ever complained about the profiles support in lein, and it’s how the Maven support in IntelliJ works too.#2019-08-0901:46cflemingI think you’d have to get pretty crazy with inconsistent meanings for the same aliases for a global list (for project sync purposes) to become a problem.#2019-08-0901:48cflemingThinking about it, it would only be a problem if you have an alias that pulls in a dep or adds a source root for one project, which also pulls in things in a different project that you don’t want. For project sync purposes you mostly want a superset of everything anyway, so it seems unlikely to cause a problem.#2019-08-0901:49kennySure, that's fair. The reason it feels weird to me is it is conflating IntelliJ's definition of projects with deps.edn's definition of projects.#2019-08-0901:50cflemingRight, but the same is true of lein and Maven, and it’s not been a point of confusion there (at least, definitely not for lein)#2019-08-0901:51kennyI'm curious if there's other reasons for that. deps.edn has certainly changed my mental model for this stuff.#2019-08-0901:53kennyAnyway, having a superset for resolving symbols would work. I can't think of a reason why you wouldn't want that. You would then (always?) want to select the individual project-level aliases to start your REPL with.#2019-08-0901:56cflemingYes, definitely, no plans to change that part.#2019-08-0901:57kennyMaybe some checkboxes in the run configuration box so I can remember what aliases are available in that project? :) #2019-08-0901:57cflemingSo, I’ll fix the global alias bit. That was my intention anyway, and I didn’t realise it wasn’t working like that. If there do turn out to be problems with that, I can perhaps allow customisation of the global list at a project level if required.#2019-08-0901:57cflemingHehe, sure, or autocomplete perhaps.#2019-08-0902:01kennyThank you so much! This will be a huge fix for us. #2019-08-1003:06cflemingOk, this sucks. I cannot make that change, nor can I change this in any non-confusing way.#2019-08-1003:07cflemingI’m going to migrate the deps support off that API. It will probably take ~2 weeks, but it’s going to be my main focus until I get it done.#2019-08-1003:07cflemingThen I’ll be able to do whatever changes I need to, and you’ll have new and exciting bugs to find 🙂#2019-08-1003:07cflemingSorry for the wait.#2019-08-1003:55kennyHaha it’s ok. Happy to help make Cursive better! #2019-08-1003:55cflemingCool, I’ll let you know when I have a dev build worth testing.#2019-08-1003:56kenny👍:skin-tone-2:#2019-08-0216:13ghedeonnot sure if an issue or I'm using it wrong but sometimes parentheses are being too insistent. Ex: ((foo)) Try to delete one of the parentheses or try to make it (foo). Can't quickly unwrap it.#2019-08-0216:14Joe Lane@asfalit Do you have paredit mode on?#2019-08-0216:20ghedeonNot sure. Was looking for plugin settings but no luck. Do I miss anything? "Paredit" toggle appears only in my quick actions but it doesn't affect my issue.#2019-08-0216:23ghedeonOk, it's controlled by Edit -> Toggle Structural Editing Style.#2019-08-0216:25ghedeonAnd, in case I want to keep it on, then Raise does the unwrapping. Thanks, rubber duck in its glory))#2019-08-0216:27Joe Lane👍#2019-08-0216:28ghedeonTwo cents, it's common to have Unwrap action in IntelliJ, usually, bind to Ctrl + Shift + Delete. Could be a secondary key mapping for Raise. Awesome plugin, overall!#2019-08-0216:34kennyI managed to get around the above by launching a nrepl in a terminal and connecting via a Remote REPL. I noticed that a remote REPL does not have all the error highlighting a regular REPL has:#2019-08-0422:16davewoI encounter a problem when importing a project by selecting deps.edn inside a lein template. An error dialog pops up with the title of "Resolve Error" and this content
java.lang.NullPointerException at com.intellij.openapi.externalSystem.model.DataNode.nodeCopy(DataNode.java:284) at com.intellij.openapi.externalSystem.model.DataNode.copy(DataNode.java:290) at com.intellij.openapi.externalSystem.model.DataNode.graphCopy(DataNode.java:224) at com.intellij.openapi.externalSystem.service.project.manage.ExternalProjectsDataStorage.update(ExternalProjectsDataStorage.java:197) at com.intellij.openapi.externalSystem.service.project.manage.ExternalProjectsManagerImpl.updateExternalProjectData(ExternalProjectsManagerImpl.java:209) at com.intellij.openapi.externalSystem.service.project.manage.ProjectDataManagerImpl.updateExternalProjectData(ProjectDataManagerImpl.java:399) at com.intellij.openapi.externalSystem.service.internal.ExternalSystemResolveProjectTask.setState(ExternalSystemResolveProjectTask.java:150) at com.intellij.openapi.externalSystem.service.internal.AbstractExternalSystemTask.execute(AbstractExternalSystemTask.java:147) at com.intellij.openapi.externalSystem.service.internal.AbstractExternalSystemTask.execute(AbstractExternalSystemTask.java:132) at com.intellij.openapi.externalSystem.util.ExternalSystemUtil$3.executeImpl(ExternalSystemUtil.java:535) at com.intellij.openapi.externalSystem.util.ExternalSystemUtil$3.lambda$execute$0(ExternalSystemUtil.java:388) at com.intellij.openapi.project.DumbServiceImpl.suspendIndexingAndRun(DumbServiceImpl.java:149) at com.intellij.openapi.externalSystem.util.ExternalSystemUtil$3.execute(ExternalSystemUtil.java:388) at com.intellij.openapi.externalSystem.util.ExternalSystemUtil$4.run(ExternalSystemUtil.java:633) at com.intellij.openapi.progress.impl.CoreProgressManager$TaskRunnable.run(CoreProgressManager.java:894) at com.intellij.openapi.progress.impl.CoreProgressManager$5.run(CoreProgressManager.java:447) at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$2(CoreProgressManager.java:169) at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:591) at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:537) at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:59) at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:156) at com.intellij.openapi.application.impl.ApplicationImpl.lambda$null$9(ApplicationImpl.java:552) at com.intellij.openapi.application.impl.ApplicationImpl$1.run(ApplicationImpl.java:294) at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) at java.base/java.lang.Thread.run(Thread.java:834)
idea.log does not seem to have any further info, but a line like this:
2019-08-04 14:56:15,997 [  76462]   INFO - System.util.ExternalSystemUtil - External project [/home/dave/projects/foo] resolution task executed in 741 ms.
Am I on the right track thinking of this as a Cursive issue, or should I take this up with JetBrains?
#2019-08-0422:34davewoAh, this has been reported already: https://github.com/cursive-ide/cursive/issues/2209#2019-08-0422:34davewoAh, this has been reported already: https://github.com/cursive-ide/cursive/issues/2209#2019-08-0423:49cfleming@davewo Yes, see the pinned post in this channel#2019-08-0506:22danierouxMaybe set the topic to that too?#2019-08-0508:17Teemu KaukorantaWith the new Idea, when I highlight something and type (, the highlighted value is wrapped with (). I don't think this is how my editor worked previously. Anyone know if there is a setting to change this? (I don't think this is related to the known problems with newer versions of Idea..)#2019-08-0515:48conanTry Settings > General > Smart Keys, and look for "Surround selection on typing quote or brace" and "Maintain selection when surrounding with braces"#2019-08-0610:46Teemu KaukorantaThank you @U053032QC!#2019-08-0612:52conanIt's so far from obvious that one!#2019-08-0508:48joelsanchez2019.2 has been a very positive update for me (I was using 2019.1 and I don't use deps.edn), thank you#2019-08-0518:03joshkhis there a configuration for emacs that matches the alignment options of Cursive? i share projects with those emacs nerds and our pull requests are often littered with whitespace changes.#2019-08-0518:43danierouxWe follow https://tonsky.me/blog/clojurefmt and we get near perfect agreement between Emacs and Cursive. https://github.com/cursive-ide/cursive/issues/949 is a difference, as is case and cond alignment. There are a few other corner cases as well.#2019-08-0518:44danieroux(https://github.com/danieroux/emacs/commit/09403e601a1d0d0e33fe0d2c3238e77bef1c53b6 is the Emacs config for that)#2019-08-0720:49joshkhmany thanks @U9E8C7QRJ. we'll give it a go. 🙂#2019-08-0518:03joshkh#2019-08-0713:58ikitommiBack in a situation where switching between basically any project in Cursive causes all the symbols to be unresolved 😞#2019-08-0713:58ikitommiInvalidate and Restart helps, but kinda harsh for this.#2019-08-0713:59ikitommilog has these:
2019-08-07 16:52:40,923 [3644447]   INFO - il.indexing.FileBasedIndexImpl - Rebuild requested for index ClojureSymbolMeta 
java.lang.Throwable
	at com.intellij.util.indexing.FileBasedIndex.requestRebuild(FileBasedIndex.java:78)
	at cursive.intentions.resolve$rebuild_all_indexes_BANG_.invoke(resolve.clj:142)
	at clojure.lang.Var.invoke(Var.java:383)
	at cursive.api.DelayedFn.invoke(DelayedFn.java:36)
	at cursive.settings.ClojureProjectResolveSettings$loadState$1.run(ClojureResolveSettings.kt:95)
	at com.intellij.openapi.application.impl.ApplicationImpl$1.run(ApplicationImpl.java:294)
	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
	at java.base/java.lang.Thread.run(Thread.java:834)
2019-08-07 16:52:41,068 [3644592]   INFO - il.indexing.FileBasedIndexImpl - Rebuild requested for index ClojureKeywordDefinition 
java.lang.Throwable
	at com.intellij.util.indexing.FileBasedIndex.requestRebuild(FileBasedIndex.java:78)
	at cursive.intentions.resolve$rebuild_all_indexes_BANG_.invoke(resolve.clj:142)
	at clojure.lang.Var.invoke(Var.java:383)
	at cursive.api.DelayedFn.invoke(DelayedFn.java:36)
	at cursive.settings.ClojureProjectResolveSettings$loadState$1.run(ClojureResolveSettings.kt:95)
	at com.intellij.openapi.application.impl.ApplicationImpl$1.run(ApplicationImpl.java:294)
	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
	at java.base/java.lang.Thread.run(Thread.java:834)
#2019-08-0714:00polymerisI had that happen for a while (not sure why it stopped), and just restart (no invalidate) would help#2019-08-0714:01ikitommithanks! much better (until a real fix is found)#2019-08-0721:24cfleming@U055NJ5CC That’s a platform issue. A fix has been developed, and is possibly in the new 2019.2.1 build, although I’m waiting on JetBrains to confirm that.#2019-08-0808:44ikitommi👍#2019-08-0901:00cflemingIt’s not in the new build 😞. But will hopefully be in the next one - it’s still waiting for sign-off inside JetBrains.#2019-08-0714:23NoahTheDukei'm new to cursive, coming from vim+fireplace, and i'm looking to do some breakpoint debugging. are there any tutorials for getting that to work? I have intellij and cursive working, i can run a test from the cursive repl. how do i make cursive "pause" at a line and step through execution?#2019-08-0721:36cflemingIt’s not as quickly digestible as proper documentation, sorry, but it’s the closest thing right now.#2019-08-0721:36cfleming@UEENNMX0T I gave a talk a couple of years ago about debugging with Cursive: https://www.youtube.com/watch?v=ql77RwhcCK0. It’s basically a long demo of what you can do with the debugger, and discussion of some of the issues when debugging Clojure code.#2019-08-0721:37NoahTheDukeoh fantastic, thank you! i'll check that out!#2019-08-0714:25manutter51Set a breakpoint by clicking in the left margin next to the line number, and then start your repl with the “bug” button instead of the green arrow button.#2019-08-0714:36NoahTheDukeoh fantastic, thank you#2019-08-0719:12kanweiFYI 2019.2.1 Preview is out and deps.edn seems to work again 🙂#2019-08-0813:36souenzzoSync finish event has not been received here#2019-08-0720:25kennyCould the auto suggest feature be improved a bit? There's a bunch of classes that appear first which are never used. I was really after the auto fill for clojure.data.csv which is way at the bottom of this list.#2019-08-0721:37cflemingYes, I’ll see if I can filter those out.#2019-08-0721:38kennyGreat, thanks!#2019-08-0807:35maxt@cfleming I love the REPL-commands. One additional thing I would like to be able to do, is replace the selection with the result. Would that be possible?#2019-08-0812:50mitchelkuijpersThis is a really cool one, I used to do this a lot in Emacs. You can then write parts of your program with Clojure#2019-08-1000:38cflemingYes, there are a lot of this sort of command that you might want to have, and I don’t want to implement them all and have a combinatorial explosion of possibilities. So my plan is to extend the REPL commands to allow you to build the ones you use yourself.#2019-08-0813:26isakIs there a way to do this in Cursive? (Ctrl-Space - extend selection from Emacs). Similar to Ctrl-W in Cursive, but going forward, not up.#2019-08-0813:44isaklooks like you can just "Toggle Sticky Selection", and then navigate forward#2019-08-1000:39cflemingYes, this is the best option right now. I’d like to implement “Extend selection left/right” too.#2019-08-0813:53Lone Rangerdoes anyone have a decent clojurescript+node.js+deps.edn+(n)repl workflow down?#2019-08-0814:12souenzzo@U3BALC2HH I usually use 2 REPL The first one, a regular cursive clojure REPL where I call:
(shadow.server/start!)
(shadow.api/watch :my-node-app)
Where the shadow-cljs.edn looks something like this
{:deps   true
 :nrepl  {:port 9000}
 :builds {...
Then I start other "remote repl", connected on port 9000 This REPL is managed by shadow-cljs and I can call
(shadow.api/repl :my-node-app)
to "dig in" nodejs REPL
#2019-08-0814:13Lone Rangerok. I'm seeing online that you need to maintain a seperate project.clj to "trick" cursive into playing appropriately with shadow-cljs ... is that still the case?#2019-08-0814:13Lone RangerThat's the main reason I've avoided shadow-cljs up until now#2019-08-0814:14Lone Ranger(also thanks for taking the time to respond!)#2019-08-0815:05souenzzoshadow-cljs can use "built in deps", deps.edn or project.clj #cursive just handle deps used at deps.edn or project.clj In that example, I'm using deps.edn, but should work with project.clj too#2019-08-0815:21Lone Rangerokay I'll give that a shot#2019-08-0923:18kennySometimes Cursive does not link stacktrace code correctly. diff-projects namespace is in my current project and it is not linked in the below stacktrace.#2019-08-1000:41cfleming@kenny Could you add that to https://github.com/cursive-ide/cursive/issues/2199?#2019-08-1212:48miikkaHey, I upgraded IDEA to 2019.2 and Cursive as well and now all symbols are unresolved and the deps.edn tab does not show any aliases#2019-08-1212:48miikkai.e. nothing works, halp#2019-08-1212:49miikkaI guess it's a known problem#2019-08-1212:52miikkaor not#2019-08-1212:52miikkai'm now confused#2019-08-1212:53heliosIt is a known problem, afaik, that deps.edn in 2019.2 is not working (and possibly fixed in the latest preview of 2019.2.1?)#2019-08-1212:54heliosAbout the symbols, try to do "File > Invalidate Cache / Restart", it does help with me (but im not using deps.edn)#2019-08-1212:56dpsuttoncheck the pinned message about the current versions.#2019-08-1212:59miikkahow do I see pinned messages?#2019-08-1213:00miikkaI found the pinned messages but the view message button does not do anything...#2019-08-1213:03Jonihttps://github.com/cursive-ide/cursive/issues/2209 i’m guessing this is related?#2019-08-1213:03miikkaInvalidate Cache / Restart did not help with either of my problems#2019-08-1213:03JoniI just joined here for a related issue and that’s the only thing i found.#2019-08-1213:04miikkaAlso I'm not getting any NPEs#2019-08-1213:07manutter51Here’s the link from the pinned message: https://groups.google.com/d/topic/cursive/ntvsiLAehY0/discussion#2019-08-1213:07manutter51Basically there’s issues with 2019.2 (and to a lesser extent 2019.1), and the most stable version to use with Cursive right now is 2018.3.#2019-08-1213:09manutter51I’m currently sticking to 2019.1, which has the issues where the paren matching is a bit messed up, but I work around that by using rainbow parens and paying real close attention to the matching colors.#2019-08-1213:10miikkaThanks#2019-08-1213:23miikkaDowngraded to 2019.1, it works again.#2019-08-1220:05SgtZdog@cfleming is it a bug that the Evaluate Expression (alt+shift+8) during debug can't resolve symbols at the current breakpoint? I know this is the current best way to get a REPL while execution is suspended, but I was hoping I would have symbol resolution in the Evaluate. Perhaps I'm doing something wrong. If this is working as intended, I'm definitely putting in a feature request.#2019-08-1222:45cfleming@miika Yes, for deps support 2019.1 works fine. As reported in that mailing list post, the problem you saw with unresolved symbols is still present there but it’s intermittent. If you get it again, restarting the IDE tends to fix it again for a while.#2019-08-1319:46joaohgomesI had a similar issue but after downgrading to 2018.3 everything seems much stable now.#2019-08-1407:41torbjornvatnI've tried upgrading to 2019.2.1 and downgrading to 2018.3, but I still get the unresolved symbols warning everywhere. A bit hard to code when I can't follow any references 😕#2019-08-1407:43torbjornvatnI kept the 2019.2 "regular" version though, maybe that's causing some kind of confusion?#2019-08-1708:17torbjornvatnAny news on when we can expect things to be back in a working state @cfleming? Do you have links to the relevant YouTrack tickets so I can follow them?#2019-08-1708:48cfleming@U06BKCW95 There’s a pinned message in this channel which links to this: https://groups.google.com/d/topic/cursive/ntvsiLAehY0/discussion - that has all the details.#2019-08-1708:57torbjornvatntanks#2019-08-1708:57cflemingUnfortunately it’s not looking like either Deps or the indexing will be fixed in 2019.2.1, at least I haven’t heard that they will be.#2019-08-1708:58cflemingI just posted an update to that thread about the recent Deps issue.#2019-08-1222:46cflemingWhoops, @miikka I mean#2019-08-1222:57cfleming@kevin.zemon Yes, there’s an issue for that - I haven’t looked at it yet though.#2019-08-1316:50joshkhi just stumbled upon the Convert HTML to Hiccup auto detection when pasting HTML into Cursive. thanks for this excellent feature!#2019-08-1322:30cfleming@joshkh No worries, I’m glad it’s helpful!#2019-08-1410:49Lone RangerCurious if anyone has any suggestions for the following clojurescript heavy REPL workflow. In order to get REPL workflow working correctly, 1. Run clj -R:nREPL -m nrepl.cmdline --middleware "[cider.piggieback/wrap-cljs-repl]" where
{:aliases {:nREPL {:extra-deps
                 {nrepl/nrepl                     {:mvn/version "0.6.0"}
                  cider/piggieback                {:mvn/version "0.4.0"}
                  com.bhauman/figwheel-main       {:mvn/version "0.2.0"}
                  com.bhauman/rebel-readline-cljs {:mvn/version "0.1.4"}
                  } ... }
2. Start a remote repl session connecting to the leiningen port 3. Run (do (use 'figwheel.main.api) (start "dev")) to kickstart the REPL session. it all works flawlessly except for the fact that if I screwed up my compilation, need to redo my webpack, or whatever, I need to restart all three steps. Does anyone have a cleaner clojurescript workflow for Cursive?
#2019-08-1418:15kennyCould REPLs be named based on the Run Configuration name instead of the namespace you are in? I have several different REPLs with different context modules and have no idea which REPL was started within which project.#2019-08-1423:20cfleming@kenny Yes, I’m actually working on a large bunch of REPL improvements, and that’s one of them. Now the current ns is shown in an overlay over the input pane:#2019-08-1423:21cflemingI haven’t changed the tab title yet, but I’m planning to have a Title field in the Run Config itself, since you might want a shorter name in the tab.#2019-08-1423:21kennyWoo, that's great!#2019-08-1423:22cfleming@goomba As part of those REPL changes I’m also working on CLJS REPLs, so that should get easier soon.#2019-08-1423:22cflemingI have socket REPL support working, and I’m hoping to have native support for CLJS REPLs that won’t require piggieback.#2019-08-1423:22cfleming(or nREPL)#2019-08-1423:24kennyNot sure if this fits in those changes but being able to select text in the REPL output panel using "extend selection" action would be great.#2019-08-1423:25cflemingHmm, yeah, that’s trickier since that is just text, it’s not structured like the input pane.#2019-08-1423:25Lone RangerWooooo!! That would be great. If you don't mind me scope creeping you, it would be really fantastic if you could put in some shortcut keys or something to make switching between multiple simultaneous REPL sessions easier as well. You know, while you're in there. #2019-08-1423:25cflemingI’m planning an action to copy the last command result to the clipboard, though.#2019-08-1423:26Lone Ranger(preferably can view them side by side). Ok I'm done. #2019-08-1423:26cflemingYeah, that’s on the list. There will also be dual clj/cljs REPLs, so it’ll send things to one or the other (or both) depending on the file type.#2019-08-1423:26Lone Rangerdrool#2019-08-1423:27cflemingDo you mean you’d like the CLJ and CLJS REPLs side by side?#2019-08-1423:28cflemingI’ve thought about that, and was considering reusing the debugger UI, but it’s finicky and complicated, and needs a lot of screen space.#2019-08-1423:29Lone RangerThat would be very helpful, personally, when I'm doing simultaneous server/front end development, especially for websocket work. It's a lot of ping pong. That being said I'd settle for good keyboard shortcuts to switch if making the REPL tabs into breakout windows is too irritating#2019-08-1423:30cflemingWhat about interleaving them in the same REPL? So you could switch in the input pane which REPL you’re sending to, and the output would be marked somehow with the REPL it came from.#2019-08-1423:31cflemingI’d need to try that to see if it’s confusing or not.#2019-08-1423:31Lone RangerAs in the output of server and client goes to same REPL output area? Hell yeah that would be even better. #2019-08-1423:32cflemingOk, I’ll try that and see how it works, and maybe get a dev build so that people can try it.#2019-08-1423:32Lone RangerYasss. You spoil us.#2019-08-1423:32cflemingI’ve had to park the REPL stuff for a bit to work on a Deps change, but I’ll be back on it soon.#2019-08-1423:33Lone RangerI'm amazed you can keep up with all the tooling changes. And somehow answer slack#2019-08-1423:34cflemingWell, I’m just adding support for Socket REPL which came out, what, 2 years ago? And I’m also planning to add support for the NPM requires for CLJS which must be about the same, so…#2019-08-1423:34cflemingThere’s a lot to keep up with these days, for sure.#2019-08-1423:35Lone RangerYou're supporting the npm? Audacious. Even the docs itself say it's unstable in advanced. #2019-08-1423:36cflemingYeah, but lots of people use Shadow these days.#2019-08-1423:37cflemingI’d like to add proper support for that too, which should be easier after this round of Deps fixes.#2019-08-1423:39Lone RangerYeah. This is probably why clojure is such a hard language to get into. Fortunately you've done a lot to make it approachable. Thanks again!#2019-08-1423:42cflemingNo worries, glad it’s helping! Making Clojure accessible is one of my main goals.#2019-08-1508:44Jakub Holý (HolyJak)Hello, is it possible somehow to run REBL with nREPL (and not as the "main" as described at at https://github.com/cognitect-labs/REBL-distro/wiki/REBL-in-IntelliJ-Cursive)? The thing is that if I run REPL as instructed at the link, I loose many Cursive-REPL integration goodies such as "run tests in the current NS" and display of test results in the editor. Or am I wrong? Is there any roadmap here? BTW, @cfleming, awesome work! Thanks a lot for Cursive! (Currently I experiment with running two REPL sessions, one with REBL and one for test & integration but it is suboptimal.)#2019-08-1509:32thumbnailI have a working REBL + cursive/nrepl setup. i’ll try to find something#2019-08-1509:35Jakub Holý (HolyJak)I am thankful for any tips 🙂#2019-08-1509:36thumbnailBasically https://github.com/DaveWM/nrepl-rebl#with-leiningen worked for me after switching to a javaFX-enabled JVM.#2019-08-1509:37thumbnailmy ~/.lein/profiles.clj is;
{:user {:plugins [[lein-localrepo "0.5.4"]]
        :repl-options {:nrepl-middleware [nrepl-rebl.core/wrap-rebl]}
        :dependencies [[org.clojure/core.async "0.4.490"]
                       [nrepl-rebl "0.1.1"]
                       [com.cognitect/rebl "0.9.218"]]}}
and rebl just starts after opening a cursive-repl. You can shoot values into it using tap> or cognitect.repl/inspect 🙂
#2019-08-1510:36Jakub Holý (HolyJak)awesome, thanks a lot!#2019-08-1611:08conanIs there any way to prevent cursive from wrapping things in the REPL? I never want my code to wrap because I find it very difficult to navigate up and down when it has done, but I can't find out how to prevent it. Note that I'm referring to the editor area of the REPL, not the output#2019-08-1611:13heliosgood suggestion for a feature 😄#2019-08-1611:14danierouxI don’t type in the editor area, so I’ve never noticed it simple_smile#2019-08-1611:16helios@U9E8C7QRJ so you don't use the REPL in cursive? 😄#2019-08-1611:16danierouxI sent the forms from mostly comment blocks into it#2019-08-1611:29conani type there all the time so i notice it#2019-08-1613:16SgtZdogThere is a Soft-Wrap button that I think defaults to On next to the Debug Mode button (looks like a little green bug) at the top of the REPL window. Turning that off will will disable the line-wrap.#2019-08-1613:21SgtZdog#2019-08-1613:32helios@ULDBA88HY that's for the output, not for the input as @U053032QC asked, right?#2019-08-1613:33SgtZdogah, yes. I misread. I admit, my input doesn't wrap. I typed in a long string and it just kept going.#2019-08-1613:34SgtZdogDon't ask me what I did to achieve such behavior, it has always been such.#2019-08-1613:49joelsanchezmine wraps, the only time it doesn't wrap is when the string has no spaces (obviously)#2019-08-1613:58SgtZdogDo you guys have Wrap on typing turned on in Code Style? Only thing I can think of.#2019-08-1614:00SgtZdogHmm, turning that off didn't change the behavior for me of the REPL input.#2019-08-1618:06bluehutUncheck 'Use soft wraps in console' in settings and that should do it#2019-08-1618:08conanOk I’ll try that, thanks!#2019-08-1700:37cflemingI must admit I actually have no idea about this, let me know if that option helps @U053032QC, otherwise I’ll investigate to figure out how this works.#2019-08-1700:37cflemingI’m surprised the input area ever wraps, I’ve never seen that.#2019-08-1700:39SgtZdogLol, yay unintentional polymorphism?#2019-08-1700:40cflemingHaha, sure looks like it.#2019-08-1618:29robseems like vars I define in repl input don't show up in the autocompletion list. But they do if I send the forms that typed in a file :thinking_face:#2019-08-1700:59cflemingI think they should, but the process of updating the autocomplete list on the client is asynchronous, so it might depend how fast you type.#2019-08-1700:59cflemingBut if you’re seeing them not show up ever, then that would be a bug of some kind.#2019-08-1703:08SgtZdogWould they not show up if the repl ns is set to be the file? Or is that just doing a refer all so it's accessible from the repl user ns?#2019-08-2121:51robthey don't show up ever. Which is not a huge deal, except there's always some fuzzy matches for AnyOleFactoryFooBar so need to manually cancel the auto-complete#2019-08-2121:52robthis was using a socket repl, I'll see if it's the same w/ nREPL.#2019-08-2204:32cflemingOh, yeah, that won’t work with socket repl right now, but I actually have that mostly done for release in a branch. It got shunted temporarily by all the deps malarkey unfortunately, but should be soon (for some actually soon value of soon)#2019-08-1820:20danielcomptonLooks like 2019.2.1 can't be far away, an RC went out on August 15th https://confluence.jetbrains.com/display/IDEADEV/IDEA+2019.2+EAP#2019-08-1820:55cfleming@danielcompton Yeah, unfortunately that probably means that the latest deps issue and the indexing won’t be fixed in it.#2019-08-1823:14danielcomptonGetting pretty close to rolling back to 2018.3#2019-08-1906:55torbjornvatnI tried rolling back (or installing both version rather), but that didn't fix neither the symbols nor the deps issue. Maybe I have to uninstall and reinstall "harder" somehow because of some shared folders or caches or something?#2019-08-1907:47danielcomptonYou might need to invalidate caches (File menu)#2019-08-1923:29cfleming@U06BKCW95 Yes, if you’re still having indexing issues in 2018.3, try invalidating the indexes as Daniel suggests. If that doesn’t work let me know, since you probably have something else going on. The main indexing issue was definitely introduced in 2019.1.#2019-08-2007:17torbjornvatnok I'll try again when I get the time and report back#2019-08-1823:16cflemingI’m hopefully going to have the deps bit fixed soon by re-working the integration to not use their new API, work is progressing nicely on that.#2019-08-1823:16cflemingNot much I can do about the indexing unfortunately.#2019-08-1915:30youvereHi anyone had an issue like this with cursive: cursive version 1.8.2-2019.2 intellij: 11.0.3+12-b304.10 Leiningen 2.9.1 on Java 1.8.0_181 Java HotSpot(TM) 64-Bit Server VM 1) load a test file without any failing tests in the repl 2) add a failing statement in a test inside the namespace (is (= 1 2)) 3) run the test in the repl using : run test under caret in repl or run tests in current ns repl, the test pass with an invalid statement, the number of assertion is invalid when a single test is run 4) Running the test using (clojure.test/run-tests) or (clojure.test/test-vars ['ns/test-var]), the test fail What are the differences between the cursive binding for running tests using the repl?#2019-08-1916:35jrotenbergi'm getting Cannot execute: Clojure command not configured when creating a new deps based project#2019-08-1923:30cfleming@jrotenberg You’ll need to configure deps as described here: https://cursive-ide.com/userguide/deps.html#configuring-deps#2019-08-1923:33jrotenbergthanks, i'll take a look.#2019-08-1923:32cfleming@youvere No, I’ve never seen that. Cursive does indeed do a fair amount of black magic to make the integration work. Do you have anything installed like humane-test-output or anything like that? Things like that also monkeypatch clojure.test, and monkeypatches on top of other monkeypatches never ends well.#2019-08-2003:18sooheonHey I accidentally told cursive not to bother me about clojuredocs, how can I reenable this?#2019-08-2003:19cfleming@sooheon.k Preferences | Languages &amp; Frameworks | Clojure | Documentation options#2019-08-2003:20sooheonThanks!#2019-08-2114:42Ben Hammondany opinions about 2019.2.1?#2019-08-2115:42salamit seems like most of the issues mentioned in https://groups.google.com/d/msg/cursive/ntvsiLAehY0/BZ5bLkUwEwAJ are now fixed in 2019.2.1 (build 192.6262.58). however, https://youtrack.jetbrains.com/issue/IDEA-211736 (Fixed in builds: 192.6455) didn’t seem to make the cut. #2019-08-2116:10Ben HammondI'll give it a week or so#2019-08-2120:44cflemingI’ve updated over on the mailing list thread: https://groups.google.com/d/msg/cursive/ntvsiLAehY0/6LkDZSdyAAAJ#2019-08-2114:42Ben Hammondtoo early to say?#2019-08-2119:19dangercoderany recommended tutorials to get shadow-cljs to work with cursive?#2019-08-2119:49dangercoderah, found it here: https://github.com/thheller/shadow-cljs/wiki/Cursive looks like i'll stick to emacs/cider for the front-end stuff.. 🙂#2019-08-2120:18mssthis isn’t really documented cohesively anywhere as far as I remember, but here’s how I do it: 1) create an nrepl and set it to connect to the .nrepl-port created by shadow by choosing “Use Leiningen REPL port” 2) go to Tools > REPL > Add New REPL Command 3) Select Execute Command and put in (shadow/repl :my-build-id) replaced with the correct build id, obvs 4) start your repl, then navigate again to Tools > REPL > Commands and select your new command#2019-08-2120:19mssthe ns to start your shadow repl in cursive is a little different depending on what version you’re on. I’m on 2.8.40#2019-08-2120:21mssif you’re worried about the deps resolving within cursive, I’d recommend using deps.edn and letting shadow integrate with that. at least that’s what’s working for me 🤷#2019-08-2120:54cflemingFWIW the work I’m doing on migrating Deps right now will also make native support for Shadow easier.#2019-08-2311:50dangercoder@U0567Q30W glad to hear, keep up the good work! 🙂#2019-08-2120:45cflemingPSA: Update on the IntelliJ platform bugs: https://groups.google.com/d/msg/cursive/ntvsiLAehY0/6LkDZSdyAAAJ. tl;dr - 2019.2.1 still doesn’t fix the most important issues. I should have the deps support migrated soon, and the indexing issue will definitely be fixed in 2019.2.2.#2019-08-2201:51caleb.macdonaldblackAnyway to get a stack trace of a execution error with a useful stacktrace when sending code to the REPL instead of a syntax error?
#2019-08-2201:52caleb.macdonaldblackIf I execute the code in the repl I get a reference to the line of the exception#2019-08-2201:52caleb.macdonaldblackWhen I send to the repl I get a reference to the line of the code I sent to the repl#2019-08-2202:06Lone RangerDid you try (pst)?#2019-08-2204:29cfleming@caleb.macdonaldblack There’s a “Print stacktrace” button in the REPL toolwindow#2019-08-2220:16dazldis there any way to get clojure data structures in the debugger? I’m having a hard time parsing all the java 😞#2019-08-2220:19souenzzo@U3ZUC5M0R there is some repl-driven solutions, like https://github.com/vvvvalvalval/scope-capture I usually just place a "inline def " then I inspect it in REPL https://blog.michielborkent.nl/2017/05/25/inline-def-debugging/#2019-08-2220:22dazldthat’s a fun technique! thanks for the hint#2019-08-2220:29dazldI’ve been doing similar things with atoms and conditions.. pushing stuff when some condition appears#2019-08-2220:29dazld(like breakpoint expressions)#2019-08-2220:30dazldit does work.. ish. cursive is a wonderful place to work, but I do look enviously at things like the cider debugger, or the chrome devtools (for example).#2019-08-2220:33dazldoh! https://groups.google.com/forum/#!topic/cursive/v_gqcKmuNk4#2019-08-2304:00jumarI do use cider daily but, on the other hand, the Cursive debugger is much better when you need to jump around in the stacktrace or debug Java code too#2019-08-2220:16dazldlocals etc#2019-08-2302:17caleb.macdonaldblack@cfleming I can do that but the exception is not useful. It tells me the line of the the code i sent to the repl. Not the line that threw the exception.#2019-08-2302:18caleb.macdonaldblackSpecifically I'm having this issue with the send <code> to REPL command.#2019-08-2302:19caleb.macdonaldblackActually sorry I do have the information I need in that exception.#2019-08-2302:20caleb.macdonaldblackThank you for the help#2019-08-2311:37mishais there a (good) way to resolve these in .cljs files?#2019-08-2401:35cflemingI’m going to be working on this shortly. I’m not sure yet how good I can make it, but the first thing I’m going to do is make the inspection less shouty.#2019-08-2311:37misha#2019-08-2323:21kennyIt'd be super awesome if comment forms were a tad smarter. For example, if Cursive sees this
(comment
  (require '[compute.test-components.static-data :as static-data])

  (static-data/create-dunder-mifflin c)
  )
It could provide autocomplete for static-data/....
#2019-08-2401:36cflemingGood idea! That’s probably fairly easy.#2019-08-2402:16cflemingThinking about this a little further, it’s hard to know how far to take it. Would you want def items from comments to show up in project structure, for example?#2019-08-2402:17cflemingPerhaps in project structure they should show up under a comment element there, and perhaps be rendered differently.#2019-08-2402:18kennyOoo def’s would be super cool too!#2019-08-2402:19kennyShowing them under a comment element makes sense. I haven’t really used the project structure thing though. #2019-08-2402:19cflemingI’m just worried about them being confused with proper code defs. For example, would you want them to show up in Go To Symbol…?#2019-08-2402:19kennyNo#2019-08-2402:21kennyMaybe one comment “context” per ns?#2019-08-2402:21kennyOr if that’s too confusing, only within a single comment block. #2019-08-2402:22kennyYou definitely shouldn’t be able to resolve those things outside of the comment block though.#2019-08-2402:23cflemingThat’s what I thought. Unfortunately that’s tricky.#2019-08-2402:23cflemingI’ll think about it.#2019-08-2402:28kennyTricky part is not resolving outside the comment?#2019-08-2402:32cflemingYeah, scoping where those symbols are visible.#2019-08-2406:08steveb8nCould you do it the other way as well? I've noticed that autocomplete inside comments works differently from outside i.e. not at all. I've started embracing the fiddle file idea and this discourages it a bit#2019-08-2411:54cfleming@U0510KXTU Autocomplete should work inside comment blocks. However highlighting is disabled there, because often comment block fragments are invalid code, or rely on a context that doesn’t exist at the time. So if you have some invalid code the autocomplete won’t work correctly there.#2019-08-2412:12steveb8nThanks. I'll watch for that.#2019-08-2419:43kennyI did just encounter an interesting scenario, however. Yesterday I had an active REPL and was writing some stuff in a comment block. Everything was working. Today I opened a fresh REPL, load the ns and get a syntax error. I had code like this:
(comment
  (require '[compute.test-components.static-data :as static-data])

  (def data-comp (component/start (static-data/new-data-component {})))

  (def client (::static-data/client data-comp))
  )
The syntax error was talking about how ::static-data/client could not be resolved. Some more thoughts: - Allowing symbols to be resolved in within a comment block seems okay as long as they are highlighted as a warning saying "not available at runtime" or something like that. - Keywords in a comment block that use the reader shortcut should be highlighted as a error. Perhaps even having an alt+enter suggestion to create an alias in the actual namespace.
#2019-08-2608:35serioga
10:31	Download ClojureDocs
			Your ClojureDocs examples are more than a month out of date. Would you like to download an updated version?
			Download Don't ask me again
How to enable feature back? I've clicked Don't ask me again accidentally...
#2019-08-2608:50pavlosmelissinoshttps://clojurians.slack.com/archives/C0744GXCJ/p1566271187311300#2019-08-2707:45seriogayes, but there is only button Update there. Does “asking” get enabled again implicitly when I use this button?#2019-08-2616:54kwladykaI have this when opening deps.edn project. Just fresh project after use clj -A:new app foo.core. Cursive ver: 1.8.2-2019.2 idea ver: 2019.2 community#2019-08-2616:56kennyCheck out https://groups.google.com/forum/#!topic/cursive/ntvsiLAehY0. There have been numerous issues with Cursive & IntelliJ 2019.x#2019-08-2616:58kwladykaWhat is the solution?#2019-08-2616:59kenny> The tl;dr is that 2018.3 is the most recent version of IntelliJ which doesn't have serious problems with Cursive, and if you don't feel like dealing with issues that is the one to use.#2019-08-2617:00kwladykathanks#2019-08-2617:02kwladykaoh I did update intellij and it works now#2019-08-2617:03kwladykaThey had to make some fresh new ver#2019-08-2715:59kennyCLJC files show up twice in the namespace search box.#2019-08-2718:05Lone Rangeryou sure one of them isn't a compiled directory that wasn't marked as excluded?#2019-08-2718:24kennyYes#2019-08-2721:30cfleming@kenny Thanks, I’ll check that. Cursive is probably showing both the CLJ and CLJS one.#2019-08-2812:56namenuI don't use Clojure for living, but eventually, I've bought the personal Cursive license. If it weren't for Cursive, I would not be able to use Clojure. Thanks, @cfleming 🙇#2019-08-2820:51cfleming@namenu Thanks! And my pleasure - I’m glad Cursive makes Clojure more approachable for you.#2019-08-2900:03wilkerluciohey, does someone here got success trying to use REBL with Cursive? I got the setup running, when I eval an expression it works, but when I load any file (even if its a very simple one) the REPL crashes#2019-08-2902:16shaun-mahood@wilkerlucio Yeah, it’s working for me - what version of IntelliJ are you using?#2019-08-2908:28Empperifacing a bug in Cursive when using https://github.com/s3-wagon-private/s3-wagon-private
10:53	Error resolving dependencies for my-project-name:1.0.0-SNAPSHOT
			java/sql/Timestamp
			java.sql.Timestamp
#2019-08-2919:56cfleming@U7MRZK43B See the last paragraph here: https://groups.google.com/d/topic/cursive/ntvsiLAehY0/discussion#2019-08-3005:07EmpperiThanks! I was kinda guessing you would already be aware of this problem 👍#2019-08-2908:29EmpperiIt gives me the above error and then the whole project is not found anymore as a clojure project (eg. cannot run REPL or anything)#2019-08-2908:30EmpperiThis is... Annoying#2019-08-2908:32Empperilein deps work fine from command line#2019-08-2908:33EmpperiIf I comment out the plugin then Cursive complains it cannot find the dependency which is in my s3 bucket even though it is already available locally#2019-08-2913:31felipethomeHi! I’m trying to import a deps project using intellij 2019.2 and cursive EAP and I’m getting a NullPointerExeception. Does any one knows what might be going wrong?#2019-08-2914:01felipethomeJust needed to update to 2019.2.1#2019-08-2914:04manutter51IntelliJ 2019.2 generally has not been kind to Cursive, although the 2.1 release fixes some of the issues. There’s still some outstanding bugs, so if you want the best possible deps compatibility, your best bet right now is 2018.3.x. The 2019 series is supposed to have a 2.2 release soon that should clean up the remaining issues.#2019-08-2914:50felipethomethanks!#2019-08-2919:56cfleming@UBPKSHB1N https://groups.google.com/d/topic/cursive/ntvsiLAehY0/discussion#2019-08-2922:07felipethomethanks!#2019-08-2914:04wilkerlucio@shaun-mahood intellij on 2019.1.3, the problem doesn't seem related to REBL, if I try to use any REPL with clojure.main and deps, when I load a file the REPL crashes @cfleming#2019-08-2914:36shaun-mahood@wilkerlucio I'm using the same version without any issues, so hopefully you can get it working. Here are the REPL settings I'm using in case that helps#2019-08-2914:37shaun-mahood#2019-08-2914:40wilkerluciomy setup is very similar:#2019-08-2914:40wilkerlucioand this is what happens when I try to load a file:#2019-08-2914:40wilkerlucio
Clojure 1.10.0
user=> (+ 2 4)
6
user=> (load-file "/Users/wilker.lucio/Development/pathom/src/com/wsscode/common/combinatorics.cljc")
Syntax error (FileNotFoundException) compiling at (combinatorics.cljc:1:1).
Could not locate nav__init.class, nav.clj or nav.cljc on classpath.
user=> Error evaluating - class java.net.SocketException: Socket closed

Process finished with exit code 137 (interrupted by signal 9: SIGKILL)
#2019-08-2914:43shaun-mahoodHave you tried it with any other projects? I'm wondering if there's something specific to pathom (or that .cljs file) that is causing you trouble.#2019-08-2914:48shaun-mahoodI'm going to see if I can get a pathom repl working on my machine.#2019-08-2914:50wilkerluciothanks, I'll check other project here, I also tried loading simple clj files from pathom but got the same result#2019-08-2914:52wilkerlucioyeah, I just got that working in a different project, maybe some dep of pathom is causing trouble#2019-08-2914:56wilkerluciothats strange, even if I remove all deps from pathom, when I try to load a file the REPL keeps crashing#2019-08-2914:57shaun-mahoodI think it might be something to do with the way the deps.edn file is set up - when I loaded the project I get the message Error resolving /home/smahood/Documents/pathom: Coordinate type :mvn not loaded for library org.clojure/clojure in coordinate {:mvn/version "1.10.0"}. When I added clojure into the main :deps section I was able to start the REPL without a problem.#2019-08-2914:58wilkerluciohumm, I have different results, even adding clojure to the main section, I still get the same error#2019-08-2914:58shaun-mahoodHere are my project import settings - I always use tools.deps directly as my machine doesn't seem to work when I try to use the CLI tools#2019-08-2914:59wilkerluciodid you tried loading a file from intellij?#2019-08-2915:03shaun-mahoodHere are the steps I followed to open it - not sure if they make a difference or not. File -> Open -> deps.edn -> Open as Project -> enter settings and hit Ok -> Yes to overwrite project file -> Delete Existing Project and Import#2019-08-2915:05wilkerlucioI'm just trying to make sure you can load files with that setup#2019-08-2915:05wilkerluciobecause the REPL opens and works here, until I try to load a file#2019-08-2915:05wilkerluciousing Load file in REPL#2019-08-2915:07shaun-mahoodOh yeah, sorry I misunderstood. I am able to load that combinatrics.cljc file into the repl without any problems. I haven't tried with REBL though.#2019-08-2917:02wilkerlucioI figured I can get around by avoding using Load file in REPL, instead I select the whole file and use send top form, that sends all of then, which works quite the same as loading the file, just one annoying step#2019-08-2917:10shaun-mahoodThat's pretty weird - glad there's a workaround for you but it sure doesn't seem like that should be happening.#2019-08-2917:15wilkerlucioyeah, I wonder if @cfleming has other ideas#2019-08-2919:57cfleming@wilkerlucio I have some family stuff on this morning but will try to look this afternoon.#2019-08-2919:58wilkerlucio@cfleming thanks! just to clarify, to me the bug doesn't seem to be about REBL, but about clojure.main and Load file in REPL. I guess you may be able to reproduce by: 1. Clone pathom 2. Import 3. Run a REPL using deps + clojure.main 4. Try to load a file in REPL using Load file in REPL#2019-08-2919:59wilkerlucioeven without REBL I have consistent REPL crash when I do that#2019-08-3001:26kennyIs there a good way to use the JVM Profiler with Cursive? https://blog.jetbrains.com/idea/2018/09/intellij-idea-2018-3-eap-git-submodules-jvm-profiler-macos-and-linux-and-more/. I can start a REPL with it going but I want to be able to run the profiler while I run a particular function.#2019-08-3007:19jumar@U083D6HK9 I don't really use Cursive but I think it's better to use https://github.com/clojure-goes-fast/clj-async-profiler directly if you want to profile functions separately. Although it's still profiling your whole system, it's easy to use from the REPL and you can start/stop it explicitly#2019-08-3013:47kennyYeah I've used that one before. I've found the IntelliJ UI to be much better though.#2019-08-3018:13dazldI’ve downgraded to 2018.3, tried to remove all caches, logs, library files, and completely reinstalled. When i try to import a leiningen project, nothing happens. Is this a known bug?#2019-08-3018:14dazld2018.3.6#2019-08-3018:15manutter51When you say “remove all caches” does that include the Invalidate Caches And Restart command?#2019-08-3018:16manutter51also what version of Java? Somebody was just saying they were having issues using JDK 12.#2019-08-3018:16dazldyes#2019-08-3018:16dazld1.8#2019-08-3018:17dazldi’ve completely and totally removed all traces of intelliJ that I can find#2019-08-3018:17dazldand then reinstalled from scratch#2019-08-3018:18dazldany ideas?#2019-08-3018:18dazldhttps://intellij-support.jetbrains.com/hc/en-us/articles/206544519 followed guide here#2019-08-3018:18dazldto remove intelliJ#2019-08-3018:22dazldnothing in logs too 😞#2019-08-3018:22dazldtailing the log while trying to open stuff..#2019-08-3018:22dazldadvice welcome!#2019-08-3018:23manutter51Actually, I never use “Import,” I always use New -> Project from Existing Sources#2019-08-3018:24dazldI dont see that option anywhere?#2019-08-3018:26dazldty for help btw#2019-08-3018:26dazldit’s a bit frustrating#2019-08-3018:26dazldI’ve been blocked on working on this machine for a while now, and am terrified of touching my work machine in case it ends up like this#2019-08-3018:27dazldmade the mistake of installing 2019.2, and since then everything has been awful.#2019-08-3018:28dazld(not having a go, but am genuinely at a loss at how to fix all this)#2019-08-3018:29manutter51Under File, select New, then from the pop-up select Project from Existing Sources.#2019-08-3018:29dazldI dont see a file option :I#2019-08-3018:29dazldthis might be a mac thing#2019-08-3018:30manutter51Ah, you’re at the initial screen, I forgot#2019-08-3018:30dazldall i see#2019-08-3018:31manutter51Yeah, do you have any existing projects at all that you can open?#2019-08-3018:31dazldnone atm#2019-08-3018:31dazldi removed everything#2019-08-3018:31dazldlet me try from terminal#2019-08-3018:31manutter51Ok, I would click Create New Project and then pick Empty Project, just to create something that’ll get you to the main UI#2019-08-3018:32manutter51That’ll give you a File menu that has New -> Project From Existing…#2019-08-3018:33dazldsame thing :I#2019-08-3018:33manutter51You say Create New Project and nothing happens?#2019-08-3018:33dazldi opened another project from iterm with idea .#2019-08-3018:33dazldwhen i was in the folder#2019-08-3018:33dazldthen i go file -> new from sources#2019-08-3018:34dazldselect a folder#2019-08-3018:34dazldand nothing happens#2019-08-3018:34dazldwhen i do the idea . trick for this folder, it opens, but i can’t create any modules#2019-08-3018:34dazldthis must be an intelliJ thing#2019-08-3018:35dazldmaybe i’m looking in the wrong place, cursive is probably fine#2019-08-3018:35manutter51Something is very weird, I’ve never heard of this kind of thing happening before.#2019-08-3018:35dazldyep, paying customer, no dodgy business going on#2019-08-3018:35dazldi’ll ask jetbrains#2019-08-3018:36manutter51Yeah, sounds like something is odd, the other possibility would be you’ve got something corrupted in your java installation.#2019-08-3018:36dazldpossible#2019-08-3018:36dazldi use jenv#2019-08-3018:36dazldmaybe it did something odd#2019-08-3018:37manutter51I’d try installing openjdk11 if you haven’t already and try it under that#2019-08-3018:37manutter51though I think IntelliJ ships with its own built-in jdk#2019-08-3018:37manutter51but still#2019-08-3018:37dazldit has its own JVM, yep#2019-08-3018:37dazldnot sure about the JDK#2019-08-3018:37dazldgah, hate this stuff.#2019-08-3018:38dazldthank you anyway#2019-08-3018:40manutter51np, hope you figure it out and get it fixed soon, it sounds like a real pain.#2019-08-3018:58dazld#2019-08-3018:58dazldIt’s a Catalina thing. #2019-08-3018:59dazldMy own dumb fault aka. Guess they fixed it in later versions..? But they don’t work with cursive.#2019-08-3018:59dazldFun! Time to downgrade.#2019-08-3019:01dazldUsing [NSApp runModalForWindow:] for Open/Save panels is deprecated. Please use the [NSSavePanel runModal] API directly. from the idea debug output#2019-08-3019:01dazldthat’ll be it.#2019-08-3019:04manutter51Oy :headache:#2019-08-3019:04manutter51Oh well at least you found out what it was.#2019-08-3019:05dazldtruly!#2019-08-3019:06dazldguess takeaway is old versions of idea won’t work with macOS 10.15#2019-08-3019:56dazldjust to finish this saga - https://intellij-support.jetbrains.com/hc/en-us/community/posts/360004871240-Cannot-import-jar-library-to-the-project is how to fix intelliJ on catalina#2019-08-3019:59manutter51Interesting, thanks for the follow-up, I bet you won’t be the only person to run into this.#2019-08-3020:11dazldwhen more people start using 10.15, for sure.#2019-08-3020:11dazldits actually all versions, as far as i can tell too#2019-08-3022:36cfleming@dazld Thanks for following up there - I had no idea that was a problem. Unfortunately that makes my blanket recommendation to downgrade to 2018.3 subject to yet more caveats 😞. At least Catalina is not fully released yet.#2019-08-3105:06onetomEven with all these caveats, Cursive is great and still a lot more approachable and discoverable than Emacs based tools, so keep up the good work!#2019-08-3108:25cflemingThanks!#2019-08-3104:59onetomis there a shortcut key for showing the diff window for a test failiure? since it's not printed anywhere i keep have to hover and quickly aim the Show difference... link in the popping up bubble it's not very productive 😕 i would rather see the error messages in the repl window, instead of just the test run summary the diff of course can't be shown that intelligently as the IDEs diff window, so i wouldn't expect that in the REPL output, but at least there should be a key shortcut for it. btw, im using cmd-f1 for showing the error popup, so it's not really convenient to reach for the mouse afterwards, just to show the diffs too#2019-08-3108:25cfleming@onetom There isn’t, but you’re right, there should be. The easiest way to show the diff is to click on the gutter icon on the left, but you’re right, it needs a key.#2019-08-3108:33onetomi haven't realized that icon is clickable. that's already one action less, so it helps, thanks! it's easy to misclick it though and place a breakpoint instead, accidentally.#2019-08-3108:36onetomI've just checked and it's even documented on https://cursive-ide.com/userguide/testing.html I should be more thorough reading docs!#2019-08-3108:52onetomNot sure what would be a good shortcut for it. Cmd-D is the default in other tool windows for showing diff, but in the editor it's duplicate line or selection, which is quite important. At least I use it all the time... Cmd-D — Duplicate Line or Selection Cmd-Shift-D — Smart Search Documentation in Dash Cmd-Opt-D — [macOS] Show/Hide Dock Cmd-Ctrl-D — [macOS] Dictionary Lookup I guess Cmd-Shift-D is a good candidate, since it's only taken when the Dash plugin is installed. Shall I make a github issue about this or no point?#2019-08-3109:26cflemingPerhaps it could be an intention - “Show diff for error”, only available when actually on an error marker.#2019-08-3109:26cflemingYes, an issue would be good, thanks.#2019-08-3109:26cflemingThe intention would mean you’d just use alt-enter.#2019-08-3113:13Mark AddlemanThe fewer magic keys I have to remember the better 🙂#2019-08-3120:46cflemingYeah, I like intentions for that, and also for being context-sensitive.#2019-09-0203:11cfleminghttps://twitter.com/CursiveIDE/status/1168360772314877952#2019-09-0203:12cfleming@kenny ^^#2019-09-0211:05mike_ananev@cfleming Just installed new dev version. Everything looks good.#2019-09-0212:35cfleming@mike1452 Oh great, thanks for letting me know.#2019-09-0213:36p-himikNow that https://youtrack.jetbrains.com/issue/IDEA-91607 is closed, what would be the best way to move forward? Maybe a new issue with some Cursive-specific details?#2019-09-0307:04p-himik@cfleming Do you have any thoughts on this?#2019-09-0309:51cflemingSure, similar to that issue, if you file issues for specific problems I’ll look at them. Depending on what they are, I may or may not be able to fix them though.#2019-09-0310:09p-himikAs I mentioned in the next to last comment on that issue - you've mentioned before that you have no control over the order of orderEntry tags.#2019-09-0310:21p-himik@cfleming Just created https://youtrack.jetbrains.com/issue/PY-37812#2019-09-0320:46cflemingRight, that one I don’t think I can control.#2019-09-0606:38p-himik@cfleming Seems like they think otherwise: https://youtrack.jetbrains.com/issue/IDEA-221903#focus=streamItem-27-3681725.0-0#2019-09-0606:38p-himik"So it looks like this problem is caused by code in Cursive plugin which adds entries to com.intellij.openapi.roots.ModifiableRootModel in different order"#2019-09-0620:46cfleming@U2FRKM4TW I actually don’t think that’s correct since I’m using their internal API to do that, but no matter because the new deps integration will be out shortly and I can control these things there. I’ve asked for some clarification on that issue.#2019-09-0703:15p-himikAwesome, thanks!#2019-09-0214:43dazldwhat’s the project.iml file that appears after some actions?#2019-09-0214:43dazldI thought idea kept all the config in the .idea folder#2019-09-0214:44dazldwondering if it’s something that should be checked in, or it should be ignored#2019-09-0215:22kenny@cfleming I have a large multi-module project. I tried updating to that dev build. IntelliJ did the usual restart thing and started loading. It's been stuck at about 75% loading for a solid 5 mins. When I mouse over the IntelliJ loading splash screen, the mouse is the spinner wheel. Will let it sit there for a while to see if it's just slow at resolving this big project.#2019-09-0215:30kennyGotta head out for a while. It's still loading, guessing it's not going to finish.#2019-09-0217:37kennyDoing force quit and opening IntelliJ again let me get past the splash screen.#2019-09-0217:45kennyIt's now stuck on "Reading projects" for ~8 mins.#2019-09-0217:53kennyLooks like it finished after ~15 mins. Perhaps this is caveat #2 where it refreshes every module?#2019-09-0217:58kennyReceived this exception after refreshing deps. It'd be great if it could tell me which project this is coming from.#2019-09-0218:00Alex Miller (Clojure team)clj -Stree should tell you#2019-09-0218:01Alex Miller (Clojure team)that should exist though, so might be a clojars issue#2019-09-0218:01kennyRight but I'm working in a large multi-module repo (20+ libs). Cursive simply reported that error with no info about which project that came from.#2019-09-0218:01Alex Miller (Clojure team)ah#2019-09-0218:03kennyAnother thing with the Clojure Deps REPL. When using "Run with Deps", can Cursive use the .cpcache files? It acts like it needs to calculate the classpath every time I open a REPL.#2019-09-0218:03Alex Miller (Clojure team)it should, but I don't know what Cursive does#2019-09-0223:37cflemingI can’t easily use the .cpcache because I’d have to reproduce everything that the script does in Java/Clojure/Kotlin.#2019-09-0223:37cflemingI did look at that, but I couldn’t find a Java implementation of the hashing command used (cksum).#2019-09-0223:38cflemingAnd I can’t just invoke the script because I can’t get everything I need from the various script commands (I can’t remember off the top of my head what was missing).#2019-09-0300:43kenny@cfleming can you shell out to cksum from Java to use it?#2019-09-0300:44cflemingMaybe. It’s still very brittle though, the script has a lot of non-trivial logic in it. If I reproduce it all, it’s very tied to a particular version of the script.#2019-09-0300:44cflemingOne thing I can do is just use a similar mechanism, but not try to use the same .cpcache that deps does.#2019-09-0300:45cflemingOne thing though, that bit hasn’t changed in this version, it worked the same way in the previous integration (in fact, that code didn’t change at all).#2019-09-0300:48kennySome sort of workaround would be a big win here. REPL restarts can take 30s or more due to the cp calculation. Sounds like the solution is either 1) add the necessary commands to the clj script 2) implement a Cursive specific cache #2019-09-0300:54cfleming@kenny Did the REPL startup take that long previously?#2019-09-0300:54cflemingi.e. with the old deps integration?#2019-09-0301:05kennyYes#2019-09-0301:06kennyPart of it has to do with S3 being slow, I think. Alex made it a bit better with the most recent release. #2019-09-0301:18kennyI remember timing it and Cursive seemed to be about 3-5s slower than resolving via the CLI. This project just takes a while to calculate though. Having to calculate it each repl start even though nothing changed is painful. #2019-09-0301:25cflemingOk, just trying to figure out if that’s a regression or not.#2019-09-0301:26kennyDon’t think so. #2019-09-0304:02Alex Miller (Clojure team)cksum is not at all important, was just picked b/c it's fast, easy, and ubiquitous. you could totally hash it however you like and store it in cpcache anyways#2019-09-0308:34cflemingThen the Cursive caching and the command line caching would stomp each other. I’ll just store the cached version for Cursive elsewhere.#2019-09-0308:35cflemingThe only implementation of cksum I could find in Java is GPL.#2019-09-0308:35cflemingBut caching it independently is a better idea anyway.#2019-09-0312:27Alex Miller (Clojure team)You could use a known prefix or something to separate the cursive files in the cache dir#2019-09-0315:35onetomI would vote for shelling out too, just to minimize the differences in behaviour between cursive and the cli tools.#2019-09-0315:40onetomI just worked on some mobile app reverse engineering recently, so I had to deal with unknown protobuf structures as binary data, so I just wrapped xxd and protoc --decode_raw into functions:
(defn encode [data] (shell/run "xxd" "-g1" :in data))
(defn decode [data] (shell/run "xxd" "-r" "-g1" :in data :out-enc :bytes))

(defn protoc->raw [pb] (shell/run "protoc" "--decode_raw" :in pb))
#2019-09-0315:41onetomwhere shell/run is just a little error handling and direnv support on top of clojure.java.shell/sh:
(defn run
  "Use `direnv exec` to ensure the `.envrc` & `shell.nix` environments are available"
  [& args]
  (let [cwd (.getCanonicalPath (io/file "."))
        {:keys [out err exit] :as res} (apply sh "direnv" "exec" cwd args)]
    (if-not (zero? exit)
      (-> (str "Error running `" args "`\n" out err)
          (ex-info res)
          throw)
      (if (string? out)
        (str/trim-newline out)
        out))))
#2019-09-0315:43onetomit's so bad that direnv support is missing from intellij... makes it a lot harder to use nix under macos 😞#2019-09-0315:45kennyI also wish IntelliJ supported direnv!#2019-09-0320:46cflemingIntelliJ (and specifically Cursive) does support https://github.com/ashald/EnvFile, is that useful?#2019-09-0320:46cfleming(I don’t know exactly what direnv does)#2019-09-0421:41kingmobIt’s a similar idea, but not as extensive. Nor does it work with all direnv setups, if I’m reading it correctly.#2019-09-0421:42kennyYeah. I looked at EnvFile when Cursive added support for it. EnvFile doesn't quite check all the boxes that direnv does.#2019-09-0218:03Alex Miller (Clojure team)http://repo.clojars.org/conormcd/clj-honeycomb/1.0.6.536/ seems to exist and I can download it#2019-09-0218:04kennyYep. Just some feedback from Colin 🙂 Yeah, not sure what's going on with that artifact. Could be a bug in this dev build.#2019-09-0218:04Alex Miller (Clojure team)but clojars has had some weirdness this weekend#2019-09-0222:48caleb.macdonaldblackCan I create my own stubs?#2019-09-0223:34cfleming@kenny I think there must be something else going on there, I have users using 80+ module projects with lein and (although it’s not especially pleasant) it does work ok.#2019-09-0300:43kennyDon’t know either. I’m on a fairly recent MBP so I wouldn’t expect it to be hardware related. #2019-09-0223:34cflemingThis bit from the exception is weird: nodename nor servname provided, or not known#2019-09-0223:53cflemingGoogling that message a bit, it looks like that’s a DNS issue. Perhaps clojars was having issues.#2019-09-0317:50onetomtesting 1.9.0-SNAPSHOT1-2019.2 with intellij 2019.2.2. no problems so far!#2019-09-0320:58cfleming@onetom Great, thanks for letting me know!#2019-09-0502:06danoyoungsame here @U0567Q30W#2019-09-0412:54Leonhey! I've got a problem: I just generated a clojurescript re-frame based project from a template, and tried opening it with cursive. in my code, it says it can't resolve defn and some other basic stuff. when trying to Refresh Leiningen Projects, it errors out with the following message:
Syntax error compiling var at (fipp/ednize.clj:71:13). Unable to resolve var: clojure.instant/thread-local-utc-date-format in this context
after some googling that error should be avoidable by setting an environment variable, but that doesn't seem to work for me. is there some trick needed to get Cursive to respect that variable? or is there maybe another fix for it? (i'd guess that that load error is the reason for it not recognizing defn and such)
#2019-09-0413:01manutter51What JDK version are you using?#2019-09-0413:02Leonas project SDK? 1.8.0_192#2019-09-0413:03manutter51Ok, that sounds good, what about IntelliJ version? There have been a lot of issues with 2019.1#2019-09-0413:04Leon2019.2 Community#2019-09-0413:11manutter51Ok, I’ve used 2019.2, and not had that problem#2019-09-0413:11manutter51Maybe try under File -> Invalidate Caches & Restart?#2019-09-0413:23Leonill try ^^#2019-09-0413:27Leondidnt help 😞#2019-09-0413:28manutter51Ok, maybe your best bet is to downgrade to IntelliJ 2018.3 until they get the bugs fixed in 2019.x#2019-09-0413:29Leonill try, i think i might even have an older version laying around here haha#2019-09-0413:29manutter51I’m on 2018.3.6, it’s working well#2019-09-0413:37danierouxDowngrading to 2018.3.6 greatly increased my calm with IntelliJ#2019-09-0413:39Leonwow now it actually works lol#2019-09-0413:39manutter51woot!#2019-09-0419:00Leonthe "one-space list indent" formatting option is supposed to switch between something like this:
[:div
 [:h1 "foo"]
 [:div "bar]]
[:div "lkjasdf"]
and this:
[:div 
    [:h1 "foo"]
    [:div "bar"]]
[:div "lkajsdf"]
right? because for me, its always one-space indented which throws me off a looot
#2019-09-0420:08cfleming@lkowarschick The one-space setting only affects lists, vectors always get a one-space indent.#2019-09-0511:03Leonis there any way to change that? it's really confusing to have a mix of one and two-space indentation...#2019-09-0913:30serioga@lkowarschick it's not an identation by alignment of vector's elements...#2019-09-0922:00LeonMaybe
[ :div
  [  :span "foo ] 
  [  :div "bar" ]]
?
#2019-09-0922:00LeonSpace padded vectors?#2019-09-0923:02cflemingI mean, it’s possible but honestly I think it’s a tricky solution. To my eye, that looks weirder than just single space vectors.#2019-09-0923:02cflemingI suspect that the one-space indent is just something you’ll get used to, much like parens in general. The IdeaVim issue is trickier though. Is there no way to configure that behaviour?#2019-09-1107:18Leonnot that i know of... I'd say having a space-padded vector open would be a great solution for this problem, as it would also make indentation more regular in general. generally, I'd love to see comma-first style (like elm uses it) in clojure. it would pretty much be a perfect fit (i know commas are just whitespace, but when used as seperators for longer vecs (i.e. in hiccup) that could increase readability. space-padded vecs would be a great thing though, id love if the cursive team considered adding that option#2019-09-0420:09dpsuttonthe downside of hiccup#2019-09-0421:18danielcomptonDoes Cursive support :exclusions in tools.deps?#2019-09-0421:18cfleming@danielcompton It should do, yes.#2019-09-0421:18cflemingIt just delegates all that to deps itself, so if deps supports it, Cursive should too.#2019-09-0421:18danielcomptonI have
tongue {:mvn/version "0.2.6"
                :exclusions [clojure-future-spec]}
but I'm still seeing it show up in symbol resolution and in the Clojure Deps browser
#2019-09-0421:19cflemingDo you see it in clj -Stree?#2019-09-0421:20danielcomptonI do...#2019-09-0421:20danielcomptonAh#2019-09-0421:20danielcomptonThe issue is I needed to specify it like this: [clojure-future-spec/clojure-future-spec]#2019-09-0421:20danielcomptonOoops 😊#2019-09-0421:20cflemingReally? That seems like you could file a bug for that.#2019-09-0421:21danielcomptonYeah, what is the way to file bugs now?#2019-09-0421:21danielcomptonDoes it have to go through Ask Clojure first?#2019-09-0421:21cflemingI think it’s still JIRA.#2019-09-0421:21cflemingThat I don’t know.#2019-09-0421:22Alex Miller (Clojure team)if you have a jira acct, that's fine. otherwise, ask clojure#2019-09-0421:22danielcomptonAh cool, wasn't sure if that was the new path for everyone#2019-09-0421:22Alex Miller (Clojure team)I think you're actually seeing a bug fixed in the last release though#2019-09-0421:22cflemingAlex, do you have an alert set up for “JIRA” or something? 🙂#2019-09-0421:22Alex Miller (Clojure team)which is that exclusions don't get canonicalized#2019-09-0421:22Alex Miller (Clojure team)yes#2019-09-0421:22Alex Miller (Clojure team):)#2019-09-0421:23Alex Miller (Clojure team)try clojure-future-spec/clojure-future-spec above and see if that works#2019-09-0421:23danielcomptonYep, that works
#2019-09-0421:23Alex Miller (Clojure team)oh you said that above already - I'm reading out of order#2019-09-0421:23danielcomptonThanks!#2019-09-0421:23Alex Miller (Clojure team)so that's fixed in latest already#2019-09-0421:24danielcompton👍 https://github.com/clojure/tools.deps.alpha/commit/b56370338d2e9a4f7b6d081adf0016d32e6aa8b8#2019-09-0421:31kennyDoes the Reading project task execute in parallel? If not, could it?#2019-09-0421:37kennyAfter discovering alt+shift+N a few weeks ago and loving it, I was wondering if there was a similar action to let me search for functions.#2019-09-0421:39kennyI've been using ctrl+f but it's not ideal because it will also find things that are not vars.#2019-09-0421:45cfleming@kenny It doesn’t, but it possibly could. It might be tricky, though. What I think will be easier will be to cache the results per module, and only re-read those that have changed. That should work well since normally none of them will have changed, and that’s easier (and probably more reliable) to implement.#2019-09-0421:46kennyThat would definitely be helpful. I only ever want to refresh things that changed, not everything.#2019-09-0421:47cflemingYeah, I’m planning to work on that along with the run classpath caching.#2019-09-0423:06cfleming@kenny What does alt+shift+N bring up for you? It pulls up a task list for me.#2019-09-0423:08kennyOh sorry, I guess that keymap changed from the default somehow. It's Navigate > Namespace#2019-09-0423:09cflemingYou can search for symbols which will find fns - https://cursive-ide.com/userguide/navigation.html#navigate-to-files-symbols-and-namespaces#2019-09-0423:09cflemingSecond in that section#2019-09-0423:10kennyAh. It doesn't show up in my Navigate menu for some reason.#2019-09-0423:11cflemingReally? You don’t see Navigate | Symbol…?#2019-09-0423:11kennyWait nevermind, it's way at the top. I expected it to be next to the other ones: Namespace and Keyword.#2019-09-0423:12cflemingSymbol… is built into IntelliJ, it’s not a Cursive one.#2019-09-0423:13kennyGot it. Can that search be limited to just the ns I'm in?#2019-09-0423:14cflemingThere’s a dropdown on the right of the popup with various scopes#2019-09-0423:15kennyI see a filter icon but that only lets me filter by file type.#2019-09-0423:15cflemingProbably “Open files” would be the closest#2019-09-0423:16cflemingSee where it says Project Files on the right?#2019-09-0423:17cflemingBut I don’t know why “Current file” doesn’t appear there.#2019-09-0423:18kennyIt looks like this for me.#2019-09-0423:20cflemingAh, ok, I’m on 2019.2 Preview, I guess they updated that#2019-09-0423:21cflemingSo you should have that soon.#2019-09-0423:21kennyStill on 2018.3. Actually, I could probably update now that the dev build is working, no?#2019-09-0502:44cfleming@kenny Assuming you’re ok with the dev build, then yes. The 2019.2.2 RC is out now and that should also fix the indexing issue.#2019-09-0512:37Leonis there any way to make vector indentation be two-space in cursive? it not only confuses me, but it also sucks because it doesn't really work well with IdeaVIM: when using < and > keys to indent/unindent, it always does two spaces. because of this i end up needing to manually indent stuff, and i often end up having a lot of wrong bracket placement on accident because of accidentally indenting with two spaces where i only wanted one, and parinfer thinking for me#2019-09-0515:11kennyCould Cursive show which project it's reading below the loading bar? The indexing operation shows what it's indexing.#2019-09-0520:25cflemingProbably, yes - I’ll check that.#2019-09-0600:18cflemingDone.#2019-09-0613:56onetomI would be curious why would you want to see it though. My motivation would be to spot big dependencies which might have been imported accidentally, via transitive dependencies. I have the feeling that there is some other reason too, but I can't really explain it. It makes me anxious if I don't know what is the computer doing for a long time, I guess...#2019-09-0614:30kennyMore info is better 🙂 If a project is taking a long time, maybe there's some dep change I can make to improve it.#2019-09-0600:09cfleming@lkowarschick That would give you weird things like:
[1 2 3
  4 5 6]
#2019-09-0609:34LeonOkay wow havent thought about that.... Maybe add special cases for hiccup? That might be to complex to implement though... But in cases where the list really represents a function call of some sort the one space indent is Hard to read. Or maybe just add an Option to go the parinfer way and "Use one space if the User indents it with one space but dont undo twospace indentation"? I h really have no idea how Hard it would be to implement such a Thing.... Or provide an Option for this:
[ 1 2 3
  4 5 6]
? That would solve the Problem
[ :div
  [ :h1 "foo"]
  [ :div
    [ :p "Bar"]]] 
#2019-09-0620:39cflemingThis is the downside of “everything is data” - obviously it has lots of benefits, but it means that Cursive can’t tell what sort of data it is. For example, there really isn’t a good way to detect if something is hiccup or not. I talked a bit about this on the mailing list, in the context of formatting: https://groups.google.com/d/msg/cursive/4rz-OhdGAr0/ujYlHOaoCAAJ#2019-09-0603:54TrevorHi, is it possible to import a clojurescript npm package using a hotkey combo? (kinda like alt-cmd when importing a library in typescript or java). Use case is using material-ui in a reagent app. Coming from kotlin/typescript I didn't realize how painful it was to not let the ide "just handle" imports.#2019-09-0603:55TrevorI'm pretty sure this works with clojure/java interop, curious if it works for clojurescript/javascript interop and I'm just doing something wrong.#2019-09-0603:56TrevorOh shadow cljs for building and stuff#2019-09-0604:08Trevormaybe using the cljsjs version of material-ui would do the trick? I'll try that too#2019-09-0604:20cjmurphyThings like 'auto importing' just more primitive. Can be a shock I know. Also best to stick with shadow-cljs.#2019-09-0604:24cjmurphyAuto-importing does work fine for me for non cljc importing. I just start with the namespace and it will put the require at the top. So start typing say ui/... . But the first time you create the alias ui, you do have to put the require in manually - you are defining the alias for the first time.#2019-09-0604:26cjmurphy(oh right you were talking about npm).#2019-09-0620:40cflemingUnfortunately NPM won’t auto-import, but I’m planning to improve the NPM support soon so hopefully I can make it work.#2019-09-0703:53TrevorMan that'd be better than thanksgiving dinner! Looking forward to it!#2019-09-0603:55TrevorI'm pretty sure this works with clojure/java interop, curious if it works for clojurescript/javascript interop and I'm just doing something wrong.#2019-09-0603:56TrevorOh shadow cljs for building and stuff#2019-09-0615:05nwjsmithIDEA 2019.2.2 is out! Our long international nightmare is over#2019-09-0620:15Adrian Smithhttps://github.com/Datomic/ion-event-example/issues/1 is this behaviour expected in cursive given that I think com.datomic.ion is a compiled thing?#2019-09-0620:41cfleming@nwjsmith Fingers crossed! The current deps integration is still broken, but the dev build with the new one seems ok so I’ll probably get an EAP out soon.#2019-09-0620:41cflemingThe indexing issue should be fixed there.#2019-09-0620:42cfleming@sfyire Which namespace does ion/ refer to there? I did add stubs support for ions which should handle that, but I might have missed an namespace.#2019-09-0620:44Adrian SmithI think it's
[datomic.ion :as ion]
#2019-09-0620:44Adrian Smithfrom here: https://github.com/Datomic/ion-event-example/blob/master/deps.edn#L12#2019-09-0712:32Adrian Smith@cfleming do you think it's just a missed namespace?#2019-09-0909:17Adrian Smithturns out this was my fault I think there was a prompt to generate stubs, after I clicked it this problem went away#2019-09-0923:01cflemingOh great, thanks for letting me know.#2019-09-0821:53currentoorwhat version of intelliJ does cursive require/recommend?#2019-09-0821:54currentoor> First, if you haven’t already, download IntelliJ here. If you don’t have a licence for the Ultimate Edition, the free Community Edition is fine. IntelliJ is available for Windows, Mac OS X, and Linux. Cursive will work with IntelliJ versions from the last two years, currently 2017.x and 2018.x. I got it#2019-09-0821:55cfleming@currentoor Actually, I need to update that.#2019-09-0821:55currentooroh?#2019-09-0821:55currentoor@cfleming so which one then?#2019-09-0821:56cflemingIt’s been very complicated with 2019.x because of platform bugs affecting Cursive. See here for all the gory details: https://groups.google.com/d/topic/cursive/ntvsiLAehY0/discussion#2019-09-0821:56cflemingThe tl;dr is that 2019.2.2 is ok, except for Deps support. If you’re feeling somewhat brave, you can try a dev build, details here: https://groups.google.com/d/topic/cursive/D4yCqNC6iiM/discussion#2019-09-0821:57cflemingThat dev build will hopefully be in EAP soon.#2019-09-0822:06currentoorOh no I definitely need deps support #2019-09-0822:16cfleming@currentoor Ok, then either 2018.3 for now until I get the new Deps stuff totally stable, or the dev build (and EAP shortly) if you’re feeling brave.#2019-09-0823:13currentoorsounds good thanks#2019-09-0823:13currentoorgreat plugin by the way simple_smile#2019-09-0823:14currentooralso do you know why sometimes macros don’t have the resolve as option when you click the lightbulb next to them?#2019-09-0823:15currentoorlike this#2019-09-0823:16currentoorusually i see a way to configure indentation and how to resolve it (in this case i want def)#2019-09-0900:04currentoorah i figured it out, it was disabled in the preferences#2019-09-0900:05currentoori didn’t know it was something you could turn off, and downgrading my intelliJ disabled it#2019-09-0905:30cflemingPSA: there’s a new dev build out of the updated deps integration, if you’re using the first one check it out here: https://groups.google.com/d/msg/cursive/D4yCqNC6iiM/Bc4-EKbaAQAJ#2019-09-0905:30cfleming@kenny ^^^#2019-09-0917:54kennyI have been getting this message fairly often when using the dev build. I don't remember getting it before switching to the dev build so this may be a regression.#2019-09-0917:57kennyIt usually only happens when I alt+enter to require a ns.#2019-09-0920:15tony.kaySometimes that happens if you accidentally have classes on classpath twice..e.g. if you’ve built an uberjar to target and the classes in there end up on classpath.#2019-09-0920:28kennyPretty sure nothing has changed in these projects besides updating to the Cursive dev build.#2019-09-1000:51cflemingIf you do Navigate | Namespace… and search for clojure.test.check or clojure.test.check.clojure-test, do you see multiple copies of either of them?#2019-09-1000:51cfleming@kenny ˆˆˆ#2019-09-1001:09cflemingIt’s possible that the new integration has some differences around how it handles excluded folders.#2019-09-1001:15kennyWill try this tomorrow.#2019-09-1020:53kennyThis is what shows up#2019-09-1022:07cflemingHmm, it looks like you have a bunch of different test.check versions there.#2019-09-1022:07kennyNo idea why. There can only be one on the classpath.#2019-09-1100:27cflemingThat’s probably the reason for the spurious dependency cycle error. I’ll add some code that logs some debug information when cycles happen so we get a clearer idea of what’s going on.#2019-09-1100:48kennyOk#2019-09-1900:03kennyStill getting this message. Does the latest build have that debug info?#2019-09-1901:08cflemingYes - go to Help | Debug log settings…, then add #cursive.repl.actions to the box there. Then reproduce, and check your log. You should see some debug log at the end showing the dependency cycle and the files which those namespaces are found in.#2019-09-1921:39kennyIt just occurred and I don't see anything obvious in the logs. What should I look for?#2019-09-1922:32cflemingYou should see something like this:
2019-09-20 10:32:24,984 [  74368]  DEBUG -          #cursive.repl.actions - Namespace cycle: clj:dependency-loop-log.core (/Users/colin/dev/cursive-bugs/dependency-loop-log/src/dependency_loop_log/core.clj) -> clj:dependency-loop-log.core2 (/Users/colin/dev/cursive-bugs/dependency-loop-log/src/dependency_loop_log/core2.clj) -> clj:dependency-loop-log.core (/Users/colin/dev/cursive-bugs/dependency-loop-log/src/dependency_loop_log/core.clj) 
#2019-09-1922:33cflemingOh, actually - don’t think you’re getting that message when I thought you were. When is that occurring?#2019-09-1922:34kennyI don't see that. It happens when auto-importing something.#2019-09-1922:35cflemingRight, I see. I’ll add the log in that case too - that error usually appears when trying to load a file in the REPL. One thing you could try is opening the clojure.test.check namespace and trying to load it into your REPL. That should show the current log.#2019-09-1923:32kennyHow would I open that namespace?#2019-09-1923:32kennySimply ctrl+clicking into it and trying to load it in the REPL results in "It is not in scope ... "#2019-09-2000:04cflemingUgh, ok. Sorry, I’ll add that extra logging and it’ll be in the next build.#2019-09-1000:06kennyJust tried opening a REPL in the dev build using Run with Deps and got this printed in an error window:
java/sql/Timestamp
Cloning: 
Checking out:  at c830e77ff9b00f1e27b7e21f2393f83261aec61b
Downloading: com/cerner/clara-rules/0.19.1/clara-rules-0.19.1.pom from 
Downloading: prismatic/schema/1.1.6/schema-1.1.6.pom from 
#2019-09-1201:40cflemingBTW when this happened, did the REPL start ok, or did it fail to start?#2019-09-1201:41cflemingWhen you say this appeared in an error window, do you mean a notification, or in the Event Log?#2019-09-1201:42cflemingAnd it looks like this REPL doesn’t execute a main namespace or anything like that, correct? The aliases are just pulling in extra deps + source paths?#2019-09-1214:28kennyFailed to start. I think it opened in the Run tab. Correct -- no main ns, just extra deps/paths.#2019-09-1222:19cflemingSo I can’t reproduce this, or come up with a plausible explanation for why it might happen. Most of the Clojure bugs related to this were fixed in 1.9.0, but there may be dependencies somewhere provoking this problem. However I can’t see how they could be invoked during the REPL classpath calculation using deps (using lein yes, because of plugins).#2019-09-1222:19cflemingVery long shot: do you for some reason have #inst reader macros in your deps.edn files anywhere?#2019-09-1222:20kennyNo haha. I can try to repro this again if it'd be helpful.#2019-09-1222:20cflemingThat would be great if you could, thanks.#2019-09-1222:22cflemingCould you also check your log (Help | Show log in Explorer/Finder) to see if there’s any mention of Timestamp there?#2019-09-1222:22kennyMy first attempt did not work. It does appear to calculate the classpath each time I open a REPL using Run with Deps.#2019-09-1222:23kennyFound this#2019-09-1222:24kennyThere's a bunch of those. They all look the same.#2019-09-1222:34kennyCan't get the error to occur anymore. Very strange.#2019-09-1223:20cflemingOk, so there’s definitely something in your build somewhere using the s3 wagon. If you can find that and upgrade it, I think that will fix the problem.#2019-09-1223:21cflemingAnd yes, currently it will re-calculate the classpath on each run. I added the caching to project resolution, and I’ll add it to the classpath calculation hopefully in the next build.#2019-09-1300:12kennyNow that the error is gone, I guess something may have updated that dep? I don't explicitly use s3-wagon anywhere. Oh gotcha. I misread the release notes for it.#2019-09-1302:33cflemingThat’s really weird. Could you have an old s3 repo definition kicking around that you don’t use any more? Perhaps in your Maven settings?#2019-09-1302:35cflemingOne thing that is suspicious - that error is actually reported as: ERROR - llij.ide.plugins.PluginManager#2019-09-1302:37cflemingI’m wondering if that’s actually an IntelliJ thing and nothing to do with deps at all. If you go to Preferences | Plugins | &lt;gear icon&gt; | Manage repositories, do you have anything there? You’ll probably have which is the Cursive EAP channel - anything else?#2019-09-1313:08kennyNothing else.#2019-09-1313:10kennyI don't have a settings.xml in my .m2. We used to have the Datomic Ions S3 repo in our :mvn/repos map but got rid of Ions. No :mvn/repos in any of our projects.#2019-09-1321:14cflemingThen that is a total mystery. Something somewhere is trying to use or configure an s3 repo, which is where that error is coming from. I have no idea where it might be though. I guess if things are now working correctly then we can just go with it, and try to figure it out if the problem recurs.#2019-09-1321:14kennySounds good.#2019-09-1000:07kennyI've also now gotten to a place where the Aliases folder in the Clojure Deps dropdown is gone.#2019-09-1000:10kennyI was using 2019.2.2. Switched back to 2018.3.6 and the Aliases box came back.#2019-09-1000:47cfleming@kenny The aliases box will probably not appear if the project can’t resolve, so that might actually be the same problem. Based on the java/sql/Timestamp part of the error, that’s because 2019.2 by default uses JDK11. Some Clojure deps aren’t ready for JDK9+ yet, and since the new deps integration (like the lein one) runs some stuff in-process, that can affect it. Unfortunately these error messages are always really obscure and it’s hard to track them down. Are you using s3-wagon-private, for example? If you upgrade that to 1.3.2 this problem should go away, assume that dep is the issue.#2019-09-1000:48kennyOne thing that was a bit strange about what I was doing is switching between branches where projects had been removed & added. Not using s3-wagon, to my knowledge.#2019-09-1000:49cflemingOk, there are other deps with this problem, but that’s been the one that has bitten most people.#2019-09-1000:50kennyAll our projects run and are deployed with Java 11. That means it's likely coming in from a dev dep, I guess.#2019-09-1000:50cflemingYeah, sounds like it.#2019-09-1000:51cflemingI’ll check to see if I can get a better idea of where those errors come from.#2019-09-1000:51kennyThe disappearing aliases thing was quite confusing though. Is there a way to show an error message instead?#2019-09-1000:52cflemingDid you see an error about the project resolution failing?#2019-09-1000:54kennyMaybe. I'll try to reproduce it again. What would make it harder to notice is when switching between branches that have removed modules. It seems like every time I switch a branch I get 1-3 notification boxes which makes noticing error messages a lot harder.#2019-09-1000:55cflemingWhat are the notification boxes? If they’re from Cursive I can try to reduce that or combine them somehow.#2019-09-1000:55kennyAfter just doing the switch again, I got 2: Refresh deps and Update npm deps#2019-09-1000:55kennyShouldn't modules be branch dependent?#2019-09-1000:56cflemingHow do you mean?#2019-09-1000:56kennyOh, and another one is: > Workspace associated with branch 'platformization' has been restored#2019-09-1000:56cflemingRight, IntelliJ does that - basically that means that it stores things like open files, window layout, breakpoints etc per branch, and when you switch it restores them.#2019-09-1000:57kennyYeah it's useful but adds to the notification noise when switching branches.#2019-09-1000:58cflemingRight, unfortunately I can’t change any of that. The only one I can control is the deps refresh one, that you won’t see when I fix auto-import if you have that enabled, but the others are out of my control#2019-09-1000:58kennyIn master I have modules: a, b In branch1 I have modules: a, c Module a & b seen in Clojure Deps when in master and modules a and c when in branch1.#2019-09-1000:59cflemingIs that not what you’re seeing?#2019-09-1001:00kennyNo. Modules persist across branches. Sometimes I'll get an error about a module disappearing when switching between branches as well. I can't seem to reproduce the latter right now.#2019-09-1001:00cflemingYeah, thinking about it I can see why that might happen. I’ll think about that and try to fix it.#2019-09-1001:01kennyThe actual directory for the module may still exist when switching to a branch without the module (e.g. it contains unversioned files like node_modules) but will not contain a deps.edn.#2019-09-1001:02cflemingOk. I think I can check that and fix it.#2019-09-1001:03kennyAny idea how to figure out the problem dep for that java/sql/Timestamp thing?#2019-09-1001:03kennyIt must have something to do with Cursive since I can open a REPL in the CLI without getting that exception.#2019-09-1001:04cflemingNo, I’m going to think about that and see if I can reproduce it and improve the error message.#2019-09-1001:06kennye.g. I can do this in the CLI
clj -A:dashboard:dev:test
Clojure 1.10.1
user=> 
But if I type dashboard,test,dev in the Run with Deps in Cursive and start I REPL, I get the Timestamp error.
#2019-09-1001:06cflemingYeah, the way this works is that Cursive runs the project resolution in-process in an isolated classloader, which makes it a lot faster for larger projects. The issue is that the JDK used is always the IntelliJ boot JDK, this was almost never a problem previously, but after JDK9 it’s a issue.#2019-09-1001:06kennyEven weirder is it only happens when I use Run with Deps. If I select Run with IntelliJ project classpath with the above aliases selected, it works.#2019-09-1001:07cflemingCan you isolate the dep more by trying those aliases one by one? I guess each one can probably have a lot of deps in it though.#2019-09-1001:07cflemingYeah, run with IntelliJ classpath doesn’t do anything at all to calculate the classpath, because IntelliJ already has it recorded.#2019-09-1001:08kennyI think I know the problem dep because I've had issues with it before - metasoarous/oz#2019-09-1001:08cflemingOk, does upgrading that to latest help?#2019-09-1001:09kennyTrying that now. I can probably override deps to get it to work too.#2019-09-1001:09kennyLatest still has the issue.#2019-09-1001:10cflemingBut actually running your project with that dep on JDK11 doesn’t have the problem, right?#2019-09-1001:10kennyWhat do you mean by "actually running"?#2019-09-1001:11cflemingActually, thinking about this I’m not sure this makes sense for deps. Lein has this problem because the dev deps run arbitrary code during project resolution via plugins - Deps doesn’t do that.#2019-09-1001:12cflemingWell, presumably oz is actually used for something in your project. That project works if you run it e.g. from the command line, right?#2019-09-1001:12kennyIf I use the "Run with IntelliJ project classpath" and load a ns uses Oz, it will work.#2019-09-1001:12cflemingi.e. it doesn’t look like oz has a problem with JDK 11.#2019-09-1001:12cflemingI think there’s something else going on here, and the more I think about it the more I think it might be something in deps itself that Cursive is doing differently.#2019-09-1001:13cflemingI have to step out for a bit, but I’ll be back later and I’ll see if I can repro this issue.#2019-09-1001:14kennyOk. I'm going to head out for the evening. Can look at it more tomorrow. The dashboard does have this dep:
;; explicitly include this dep to fix a jetty version conflict
                                            com.cognitect/http-client {:mvn/version "0.1.99"}
which could also be the problem here.
#2019-09-1001:16cflemingOk. I’ll see if I can come up with a project which repros the problem.#2019-09-1020:50kennyLoaded up an existing project with a module that no longer existed and received:#2019-09-1101:02cfleming@kenny re: your modules-per-branch problem, do you have IntelliJ modules files checked in? i.e. .idea/modules.xml or *.iml files?#2019-09-1101:27kennyNo#2019-09-1107:34rarousHi @cfleming, when I open Cursive project in 2019.2.2 with latest DEV Cursive I get: > ERROR - m.PlatformProjectOpenProcessor - The DialogWrapper can only be used in event dispatch thread. Current thread: Thread[ApplicationImpl pooled thread 1,4,Idea Thread Group] It does only with DEV version of Cursive and on projects with Clojure code only. Editor window never appears.#2019-09-1108:47cfleming@rarous Yes, I’ve seen that too - it’s when it’s trying to migrate a project. However I’ve only seen this when using the Open… link from the welcome screen - is that what you were doing?#2019-09-1108:50rarousYes#2019-09-1108:50cflemingRight - unfortunately I suspect this is an IntelliJ bug I may not be able to fix.#2019-09-1108:51cflemingIf you can open some project which works, or create an empty project or something, and then use File->Open…, that doesn’t provoke the problem.#2019-09-1108:51cflemingA workaround rather than an actual solution obviously, but…#2019-09-1108:54rarousI opened different project without clojure, it warns it can't convert. Then I did File > Open recent project and got the same error#2019-09-1108:55rarousNew window opened but it's frozen nothing else then background is rendered#2019-09-1108:55cflemingCan you send a screenshot of the can’t convert error? I’ve never seen that.#2019-09-1108:55cflemingWhen you say the same error, you mean the can’t convert one, or the DialogWrapper one?#2019-09-1108:56rarous> 2019-09-11 10:50:46,440 [4990346] INFO - lij.impl.ConversionServiceImpl - Cannot check whether conversion of project files is needed or not, conversion won't be performed > com.intellij.conversion.CannotConvertException: /Users/rarous/Projects/topmonks/topmonks-webs/.idea/clojure-deps.xml: /Users/rarous/Projects/topmonks/topmonks-webs/.idea/clojure-deps.xml (No such file or directory)#2019-09-1108:57cflemingCan you paste the whole stacktrace for that error? You should be able to find it via Help | Show log in Finder/Explorer#2019-09-1108:57rarous#2019-09-1108:58rarous#2019-09-1108:59rarousFirst INFO about conversion is from project that is not Clojure one.#2019-09-1108:59rarousERROR is from File > Open recent ... New Window#2019-09-1109:01rarous@cfleming here 🙂#2019-09-1109:02cfleming@rarous Great, thank you!#2019-09-1109:02rarousHope this helps a bit 🙂#2019-09-1118:53kennySomething strange is going on with how Cursive is resolving where a Java class is coming from. For example, the class MDC comes from slf4j-api, not libhoney-java. libhoney-java may depend on slf4j-api but it's not where the source files are located.#2019-09-1120:55cfleming@kenny Hmm, that’s weird. But I’m not sure that’s Cursive doing that - IIRC that’s IntelliJ. I’ll set up a project with those deps and see if I can repro.#2019-09-1123:22cfleming@rarous Sadly, the DialogWrapper error is https://youtrack.jetbrains.com/issue/IDEA-218071. Unfortunately it’s incorrectly marked as fixed, so no-one can vote for it.#2019-09-1123:29cflemingI’ve also fixed the other problem.#2019-09-1201:57cfleming@kenny Simple explanation, libhoney for some reason has the org.slf4j class in its jar:#2019-09-1214:25kennyThat is strange. It seems more recent versions do not have that issue.#2019-09-1205:56onetom
<sourceFolder url="file://$MODULE_DIR$/../../clojure/test" isTestSource="true" />
this isTestSource setting in my module .iml file is getting reset to false after re-importing my deps.edn. the test support in cursive doesn't seem to work without marking the test directories as such. is there a way to get around this? can i somehow specify in my deps.edn file that my test directory is special?
#2019-09-1207:38cfleming@onetom Are you on the dev build, or the old deps integration?#2019-09-1208:26onetomgood point... i thought i was on the latest dev version, but im switching between a laptop and a desktop machine and one was on snapshot1 and the other was on snapshot2 i will try to repro the situation later today and report back#2019-09-1208:36cflemingSo in the old integration, if it came from an alias containing “test”, then the folder would be marked as a test folder. But I actually think I neglected to add that logic in the new integration - I’ll fix that tomorrow.#2019-09-1208:37cflemingRegrettably deps doesn’t distinguish between source and test, so I’m left with something like that. If you have any other suggestions for how to identify test folders, let me know.#2019-09-1208:47onetomunfortunately im still flying a bit blind regarding tools deps, so no idea how should it work really. i don't even know how can i check what is the combined effect of applying multiple aliases. in the cursive Clojure Deps tool window i see a test (system) alias, but i don't know where is it coming from. it's not in some system deps.edn file, because that doesn't exist. there is a :test alias in my ~/.clojure/deps.edn but that's commented out. sounds like it's something hard-coded, just like the default maven and clojars repos.#2019-09-1208:49onetomso im actually not sure whether should i shadow that system :test alias with mine, because i don't even know what does it contain. then i have no idea how cursive is using it. does the test runner rely on it? what's the effect of turning it out in the Clojure Deps tool window? would it affect my Run with Deps REPL run configurations, which don't have any special options specified?#2019-09-1208:50onetomit's all very fuzzy to me. and i don't really expect answers, i just wanted to give you an idea what an average user like me is pondering over 🙂#2019-09-1209:52cflemingThere actually is a system deps file. If you’re on something unixy you can see where it is using -Sdescribe. If you’re on windows, it’s currently bundled with Cursive but is also present in the tools.deps jar, and Cursive will shortly use that one for modern deps versions which contain it.#2019-09-1213:55onetommaybe some metadata extension like this could work and won't collide with future deps.edn keys:
{:paths ^{:cursive/test-paths ["test"]}
        ["src" "test" "../data" "../rules"]
,,,}
#2019-09-1213:59onetomsimilarly :java-source-paths and :resource-paths would be very welcome too. i was missing them on my last project, where i had to use some autogenerated protobuf java sources and the classes folder too#2019-09-1214:27kennyWhy does IntelliJ care if a source file is a test file or not?#2019-09-1215:59onetomit's used for the cmd-shift-t (navigate test) feature#2019-09-1215:59kennyCouldn't you determine that by indexing deftests?#2019-09-1216:00onetomit also highlights the test sources in the project directory tree with a different color and the editor tabs if they are open, so you can distinguish them from the sources easier#2019-09-1216:00onetomand i guess cursive uses it for showing the test result indicators in the gutter too?#2019-09-1216:01kennySeems like that can be done for anything that is a deftest. The highlighting thing is nice, I suppose.#2019-09-1216:02onetomsomething didn't work when the test sources werent marked as test sources... can't remember what was it but i will report here when i can reproduce it#2019-09-1221:40cflemingCursive actually doesn’t care, IIRC - if there are things that don’t work it would be interesting to know so I can look at them. It’s possible that the test navigation uses it, in particular for deciding where to create a new test ns if it doesn’t exist.#2019-09-1304:37onetomI just tried to do Cmd-Shift-T to create a test for a new function I just wrote. 1. the Choose test for... popup window appears 2. I can select the sole Create New Test... menu item in it 3. a Choose destination popup appears with a grey No matches found message in the middle of it#2019-09-1304:39onetombut if I mark my test dir to be Test Sources Root, it actually jumps to the corresponding test file and creates a new deftest form for me, which I really like! Great feature, Colin; thanks!#2019-09-1308:34cflemingOk, thanks, I’ll check that out and see if I can make it work sensibly without test roots, and I’ll also fix the test root import.#2019-09-1207:44stijnis there an option to adhere to the clojure style guide automatically?#2019-09-1207:45stijnI have it almost configured, but have a hard time doing this https://guide.clojure.style/#one-space-indent while still keeping 2 spaces for special forms#2019-09-1208:35cfleming@stijn Do you have Preferences | Editor | Code Style | Clojure | General | One space list indent selected?#2019-09-1208:39stijnah yes, that works#2019-09-1208:41stijncan you have map values aligned only when they are on the same line as the key?#2019-09-1208:42stijn
{:a :b
 :b :c
 :c
 :this}
#2019-09-1208:43stijninstead of
{:a :b
 :b :c
 :c
    :this}
#2019-09-1209:00stijnok, turns out that's not needed for the codebase i'm working on 🙂#2019-09-1209:47cfleming@stijn No, but you should be able to 🙂#2019-09-1306:53thumbnailI don’t have a file DUMMY.clj :thinking_face:#2019-09-1308:38cfleming@jeroen.dejong Yes, I’ve seen that one from time to time, I think it’s to do with the REPL but I’ve not tracked it down yet.#2019-09-1308:38thumbnailIt happens after a refresh, upon which a formatter is run as well.#2019-09-1311:30joelsanchezI could only find an old test that's disabled since 1.5.3 https://github.com/clojure/clojure/commit/fba9b9ac90341e6fc86c59ceaf39f3dd0e224320 and a test in la-clojure https://github.com/JetBrains/la-clojure/blob/e00046ffc1b385429eec57c5f426304517f7bfb1/test/org/jetbrains/plugins/clojure/completion/ClojureBasicCompletionTest.java if the clojure test were enabled, it would be possible to trigger it by running all the tests, but...#2019-09-1311:36cflemingNo, it looks like that file name is used when an AST is created from text, which shouldn’t have parinfer run on it. I’ll see if I can detect that case and fix it.#2019-09-1311:37joelsanchez@U0567Q30W completely off-topic but, re-frame keyword resolution hasn't been working properly lately, is this because of platform bugs as usual?#2019-09-1311:38cflemingNo, shouldn’t be - what’s happening?#2019-09-1311:38joelsanchezI can go to a keyword but I can't go back to the usages#2019-09-1311:38cflemingSo cmd-click works, but alt-f7 doesn’t?#2019-09-1311:39joelsanchezin fact, alt-f7 does work, but CTRL+B doesn't#2019-09-1311:39joelsanchezit used to show a small dialog with the usages#2019-09-1311:40joelsanchezwell, cmd-click used to do the same, and that's the behavior with variables, but it stopped working for namespaced kws#2019-09-1311:41cflemingYeah, that will be since I made this change: https://groups.google.com/d/topic/cursive/LHMQYE8wH7o/discussion#2019-09-1311:41cfleming> A while ago, I made a change to allow keywords to be associated with definitions. Previously keywords had no definition, but simply came into existence on first use. But several frameworks define entities using keyword identifiers - spec and re-frame both do this. So I added the concept of keyword definitions, but the implementation wasn’t entirely successful. Cursive would then treat keywords used in these contexts more like vars, but it wasn’t obvious when that change happened and it was very confusing. It also led to things like Find Usages and Rename behaving differently when keywords were used in the two contexts (as a definition, and as a standard keyword in e.g. destructuring). In this release I’ve modified how this works - keywords now work as they did previously, but you can still navigate to the definitions if they exist and they still show up in the structure view as you would expect.#2019-09-1311:42cflemingCan you file an issue for the differences you’re seeing now and I’ll see if I can fix them?#2019-09-1311:42joelsanchezyes, thank you#2019-09-1311:49joelsanchezhttps://github.com/cursive-ide/cursive/issues/2233 hope it is clear#2019-09-1311:52cfleming@U5LPUJ7AP Thanks. Is alt-cmd-f7 what you want there?#2019-09-1311:53joelsanchezsorry I don't use a mac. it's "Go To -> Declaration or Usages"#2019-09-1311:54joelsanchezI have a feeling that it always goes to the declaration, because it moves the cursor to the beginning of the declaration, instead of going to the usages...#2019-09-1311:54cflemingOh, sorry, check the shortcut under Edit | Find | Show Usages…#2019-09-1311:55cflemingI think it sounds like the problem is that Ctrl-B used to show that, but now doesn’t, is that right?#2019-09-1311:56joelsanchezomg#2019-09-1311:56joelsanchezthat works!#2019-09-1311:56joelsanchezyep, that's what I want then#2019-09-1311:57joelsanchezso this is "show usages" and alt-f7 is "find usages". today I learnt...#2019-09-1311:57cfleminghttps://cursive-ide.com/userguide/navigation.html#show-usages#2019-09-1311:58cflemingI’ll check why Cmd-B doesn’t do that any more.#2019-09-1311:59joelsanchezI have updated the issue, since the problem is much simpler than what I thought https://github.com/cursive-ide/cursive/issues/2233#2019-09-1311:59joelsanchezthank you a lot!#2019-09-1311:59cflemingGreat, thanks!#2019-09-1313:13kennyI also used to rely on this a lot. I could've sworn there was already an issue for it but I can't find it.#2019-09-1308:38cflemingIt’s definitely a virtual file of some kind, i.e. not one you’d have in your project.#2019-09-1318:07kennyOne of the modules in my project has stopped resolving a namespace from a :local/root dep. I'm 100% sure it's actually on the classpath because I can load the namespace without error when using "Run with Deps" REPL option. If I use "Run with IntelliJ project classpath", the namespace is not on the classpath.#2019-09-1318:07kennyI'm fairly certain it's related to changing branches.#2019-09-1318:07kennyAnd manually clicking the refresh button does not update the deps.#2019-09-1323:18kenjI’m trying to connect to an nREPL (shadow-cljs) in Cursive as a remote repl. I am using localhost and the nRepl port specified but get the following error. I thought with a remote repl you would just need a host/port. What am I missing?#2019-09-1323:50kennyIs there a Module selected in the Run Configuration? It's near the bottom under Common options#2019-09-1400:06kenjthere wasn’t - none was available at the time. I’ve since re-created the project which includes a deps.edn and that got the project to show up in the available dropdown#2019-09-1400:06kenjnow I’m just stuck with it not starting for a different reason =/#2019-09-1400:11kenjhah, I got it finally!#2019-09-1400:12kenjit wasn’t clear to me Cursive strictly needed a deps.edn or lein project or whatever to function#2019-09-1509:32mike_ananev@cfleming In old versions of Cursive, I could eval s-exp in scratch files (IDEA: File -> New -> New Scratch file.). In current version (1.9.0-SNAPSHOT1-2019.2) scratch clj files in IDEA are not recoginezed as clj files, so I can't eval any expressions.#2019-09-1509:33mike_ananevIs there any settings to allow eval in scratch files?#2019-09-1509:38Space GuyIn a deps.edn project, files under alias dev {:extra-paths ["dev"]} are saying "is not under a source root" even though I've added the alias under "aliases to enable by default". If I press "add source root", it works temporarily, but the popup comes back after I restart the editor#2019-09-1509:42dazldhm! i’ve seen this problem too. I didn’t figure out how to fix it.#2019-09-1509:43dazlddid the same as you - added the aliases with extra paths to the clojure invocation options#2019-09-1509:58cflemingThis is how you do that: https://cursive-ide.com/userguide/deps.html#working-with-aliases#2019-09-1509:59cfleming“Aliases to enable by default” just chooses which of those should be automatically selected for new projects.#2019-09-1510:27Space GuyGreat, thanks - that one works for me#2019-09-1509:59cfleming@mike1452 I think that should work - I’ll try to repro that tomorrow.#2019-09-1510:20mike_ananev@cfleming ha, it works. for some reason scratch.clj file wasn't recognized as Clojure file. After I delete it and re created everything looks good.#2019-09-1517:33Kari MarttilaI have IntelliJ IDEA v. 2019.1.4. When I tried to upgrade to v. 2019.2.1 a few weeks ago there were some issues with the Cursive plugin. Now there is the new IntelliJ version 2019.2.2. available - is it safe to upgrade to that version with Cursive?#2019-09-1520:43cfleming@mike1452 Yes, when you create the scratch file, you have to explicitly say you want a Clojure one - I don’t think it’s picked up automatically from the extension.#2019-09-1520:53cfleming@kari.marttila There are still problems with deps support. I had hoped to get an EAP out by now with the new support, but I got distracted with a couple of other things - it should be out shortly.#2019-09-1521:56cfleming@rarous Sorry, I forgot to follow up on that issue - the DialogWrapper problem is fixed in 2019.2.3, which is in EAP now.#2019-09-1608:58dazldare there any options for the reformatting code command?#2019-09-1608:58dazldfor example, i’ve copy pasta’d a big error message that’s all one line, and I’d prefer to see it formatted over multiple lines#2019-09-1608:58dazldbut the reformat command leaves it on one#2019-09-1609:23vemvpprint or zprint can help, over the repl#2019-09-1609:38dazldthanks! zprint looks super promising#2019-09-1609:38dazldi’m just trying to set it up in intelliJ now..#2019-09-1609:45dazldthere’s a thing called pipeprofen that looks perfect for zprint#2019-09-1618:26kennyRenaming certain keywords using the Refactor &gt; Rename action can take a really long time. For example, I have a keyword named :point-stabilizer-record/key that I renamed to :unstable-point-record/key. It took a solid minute for Cursive to find all the usages for the keyword even though it was only used in 2 places in all of my projects.#2019-09-1618:28kennyWhen renaming, a popup shows up that is title "Looking for Usages". It says "Searching for key...". It seems like it's search for all usages of "key" which could be pretty big.#2019-09-1623:58cflemingYes, that’s right. Unfortunately that’s the way it has to work. The keyword could appear as ::key, ::alias/key or the FQN, and additionally it could be destructured as key. The key part is the only constant part of all those cases.#2019-09-1704:07cfleminghttps://twitter.com/CursiveIDE/status/1173810309674360832#2019-09-1704:07cfleming@kenny I’m interested whether this helps with the branch switching.#2019-09-1704:08kennyI’ll check it out tomorrow!
#2019-09-1714:27kennyKind of. It seems like the modules should be tied to the branch. Take the following situation: if I have branch A with Module1 and branch B with Module2 and I'm in branch A. When I switch to branch B, Module1 will be removed, as expected. When I switch back to branch A, I need to add Module1 again.#2019-09-1800:13cflemingThat should happen, I think, assuming Module A is managed by Deps/Lein#2019-09-1800:13kennyIt didn't for me. The module stayed removed when switching back to branch A.#2019-09-1800:15cflemingI’ll check that. It should definitely come back after syncing the project.#2019-09-1801:04cflemingJust checking - you have your clojure-deps.xml file checked in, right? So that will be updated when you switch branches?#2019-09-1801:05kennyNo. What is that?#2019-09-1801:05cflemingThat’s .idea/clojure-deps.xml, which is the config file telling deps which projects are registered with the IDE.#2019-09-1801:06kennyOh. Is that supposed to get checked in?#2019-09-1801:06cflemingYes, because otherwise there’s no way for Cursive to know which projects are registered in each branch.#2019-09-1801:07cflemingIf you do that, then I think your modules will be correctly updated when you switch.#2019-09-1801:08cflemingI need to write a section in the doc about this, actually.#2019-09-1801:09kennyHuh, interesting. I’ll add that in tomorrow. #2019-09-1801:09cflemingThere’s a JetBrains article about this here: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839-How-to-manage-projects-under-Version-Control-Systems#2019-09-1801:10cflemingLein/Deps are in the same category as Gradle or Maven in that discussion, and I’d recommend excluding the same files for them too.#2019-09-1801:10kennyGotcha, didn’t know about that. Thanks. #2019-09-1705:01rarous@cfleming I can confirm that latest Cursive DEV with 2019.2.3-EAP fixed that problem.#2019-09-1708:53ikitommiWould it possible to make a different color target for qualified keywords?#2019-09-1708:56ikitommihave a convention in libraries that simple keywords are used by the lib, client-specific keys should be qualified. would help differentiate those.#2019-09-1715:24kennyWhen a module fails to resolve, it removes/disables all modules in the projects. I got the below exception after adding a dependency which caused most of my modules to get removed. It's a bit jarring to have that happen. Changing the dep version to one that actually exists brings the modules back though.#2019-09-1800:14cflemingHmm, I see - I’ll try to fix that.#2019-09-1800:14cflemingAt a minimum the modules that resolve correctly should appear. Unfortunately Deps is a bit all-or-nothing here, I just get a “something didn’t work” exception for a given project.#2019-09-1800:15kennyYeah, the other modules stay. This was a "core" library (e.g., a logger) which basically everything depends on.#2019-09-1800:17cflemingAh, ok. I’m not sure I can do much about that, since if there’s an exception I get no dependency information back from deps at all. What I might be able to do is at least add the modules and its source paths etc, and somehow show the error message against the module in the toolwindow.#2019-09-1800:30kennyWhat about using the last valid resolve until the next one is valid?#2019-09-1800:30kennyAnd marking the module as invalid somehow.#2019-09-1800:37cflemingPossibly, I’d have to check whether that’s possible, but it sounds like the best idea.#2019-09-1801:00cflemingYeah, looking at the code, tools.deps just aborts the whole resolve when it encounters a problem.#2019-09-1801:10kennyThat probably makes sense in general. If something can’t be resolved and you were to continue, you may get a strange result. #2019-09-1809:53cflemingThis is what this looks like now. After resolution you’ll get a single notification with all the resolution errors found (rather than one notification per error as previously). The module will still appear and source dirs etc will be correct, it’ll just have no deps. You’ll be able to see the error in the toolwindow as shown.#2019-09-1813:41kennyThat's great!#2019-09-1719:27dazldI’d like to try out the new intelliJ and cursive builds - can I run them in parallel with my old 2018.3 installation? (macOS)#2019-09-1719:32raroussure#2019-09-1719:33rarous2019.2.3-EAP+Cursive Snaphot3 looks like viable#2019-09-1719:34rarousWhen you drag new version to Applications select Keep Both and you will have side by side Ideas#2019-09-1719:44dazld:thumbsup:#2019-09-1720:09dazldhttps://www.jetbrains.com/idea/nextversion/ 2019.3 is the only EAP I can find - am I missing something?#2019-09-1720:15dazldnm! i found it 🙂 https://confluence.jetbrains.com/display/IDEADEV/IDEA+2019.2+EAP#2019-09-1720:21rarousyes#2019-09-1720:21rarousthey changed it today#2019-09-1720:39dazldI have mixed leiningen and deps modules in my project - I can’t seem to make repl configs for the deps modules, only the leiningen modules appear.#2019-09-1720:45dazldnm! all appeared now!#2019-09-1720:45dazldtook an age to index#2019-09-1809:53cflemingThis is what this looks like now. After resolution you’ll get a single notification with all the resolution errors found (rather than one notification per error as previously). The module will still appear and source dirs etc will be correct, it’ll just have no deps. You’ll be able to see the error in the toolwindow as shown.#2019-09-1817:36sgerguriIs there any way to fold the failure comparison hover window when the window exceeds the border of the screen? I'm using property-based tests with test.chuck and any time I have 8+ failures the popup will flash madly when I hover over the failing assertion, or will stay there but flash the moment I move my cursor over it. It would be great if it could stay there and fold the the other failures, or have a scrollbar so that I can get to them - most often any of the failures will do so I would probably pick one from the top 3, but as it is right now I simply have to decrease the number of test runs and hope the issue manifests itself in sufficiently small number of cases.#2019-09-1822:42emccueIs there a shortcut-ish way in cursive to run all tests in a package?#2019-09-1823:18cfleming@sgerguri Not right now, unfortunately, but I’m planning some fixes to help with this. I’m aware the current solution sucks, sorry….#2019-09-1823:18cfleming@emccue No, unfortunately Cursive only supports running interactively from a single ns right now.#2019-09-1823:20sgerguri@cfleming Really happy to hear that some fixes are coming. If I could have another thing on my wishlist it would be Cursive being able to find protocol implementations in the project, similarly to how IntelliJ gives you click-through to interface implementations via special line icons to the left of the editor window.#2019-09-1823:20cfleming@sgerguri Yes, that’s also definitely on the list.#2019-09-1823:21sgerguri🙇#2019-09-1914:29SgtZdogWhat do you guys use for profilers? It doesn't look like cursive is compatible with intellij ultimates' built in profiler.#2019-09-1914:32Alex Miller (Clojure team)yourkit or clj-async-profiler#2019-09-1915:23jumarYes that's pretty much it for me too. Sometimes also VisualVM#2019-09-1916:44Vincent CantinI don’t understand how to launch the tests on a deps project: in Lein projects there are some green symbols that appear near each test’s source code to launch them but not in the deps projects. Is it normal?#2019-09-1917:08Vincent CantinNever mind, it’s working now.#2019-09-2000:03kennyHow do I figure out which project is causing all the projects to not have the usual drop down arrow?#2019-09-2000:06kennyThere's nothing in Event Log telling me there was an issue.#2019-09-2000:09kennyThis occurred after switching branches.#2019-09-2000:10kennySwitching back to the original branch brings back all the projects to the drop-down-arrow state.#2019-09-2000:11kennyAnd switching back to the problem branch makes the arrow disappear. Weird. After switching to the problem branch, I did notice the Import Deps message balloon appear for half a second and then disappear.#2019-09-2000:12kennyWhen I switch from the problem branch to the non-problem branch, the Import Deps balloon does not appear.#2019-09-2000:14kennyI managed to click the Import button in the half second the balloon was visible and it did not resolve the no drop down arrow problem.#2019-09-2010:27cflemingSorry I wasn’t around, I was travelling today.#2019-09-2010:28cflemingI’m actually not sure what might cause that. For you to get the default view like that, the project resolution must have failed somehow, and you should get some kind of message. is there anything in your IDE log?#2019-09-2014:25kennyNothing shows up in the Event Log. I do, however, see one of these in the IntelliJ log:
2019-09-20 07:24:57,764 [49600723]  ERROR - intellij.openapi.progress.Task - java/sql/Timestamp 
java.lang.NoClassDefFoundError: java/sql/Timestamp
	at com.fasterxml.jackson.databind.ser.BasicSerializerFactory.<clinit>(BasicSerializerFactory.java:88)
	at com.fasterxml.jackson.databind.ObjectMapper.<init>(ObjectMapper.java:484)
	at com.fasterxml.jackson.databind.ObjectMapper.<init>(ObjectMapper.java:393)
	at com.amazonaws.internal.config.InternalConfig.<clinit>(InternalConfig.java:43)
	at com.amazonaws.internal.config.InternalConfig$Factory.<clinit>(InternalConfig.java:304)
	at com.amazonaws.util.VersionInfoUtils.userAgent(VersionInfoUtils.java:142)
	at com.amazonaws.util.VersionInfoUtils.initializeUserAgent(VersionInfoUtils.java:137)
	at com.amazonaws.util.VersionInfoUtils.getUserAgent(VersionInfoUtils.java:100)
	at com.amazonaws.ClientConfiguration.<clinit>(ClientConfiguration.java:65)
	at org.springframework.build.aws.maven.S3Utils.getClientConfiguration(S3Utils.java:44)
	at org.springframework.build.aws.maven.PrivateS3Wagon.connectToRepository(PrivateS3Wagon.java:94)
	at org.springframework.build.aws.maven.AbstractWagon.connect(AbstractWagon.java:146)
	at org.eclipse.aether.transport.wagon.WagonTransporter.connectWagon(WagonTransporter.java:342)
	at org.eclipse.aether.transport.wagon.WagonTransporter.pollWagon(WagonTransporter.java:382)
	at org.eclipse.aether.transport.wagon.WagonTransporter.execute(WagonTransporter.java:431)
	at org.eclipse.aether.transport.wagon.WagonTransporter.get(WagonTransporter.java:412)
	at org.eclipse.aether.connector.basic.BasicRepositoryConnector$GetTaskRunner.runTask(BasicRepositoryConnector.java:453)
	at org.eclipse.aether.connector.basic.BasicRepositoryConnector$TaskRunner.run(BasicRepositoryConnector.java:360)
	at org.eclipse.aether.util.concurrency.RunnableErrorForwarder$1.run(RunnableErrorForwarder.java:75)
	at org.eclipse.aether.connector.basic.BasicRepositoryConnector$DirectExecutor.execute(BasicRepositoryConnector.java:583)
	at org.eclipse.aether.connector.basic.BasicRepositoryConnector.get(BasicRepositoryConnector.java:232)
	at org.eclipse.aether.internal.impl.DefaultMetadataResolver$ResolveTask.run(DefaultMetadataResolver.java:593)
	at org.eclipse.aether.util.concurrency.RunnableErrorForwarder$1.run(RunnableErrorForwarder.java:75)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
	at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: java.lang.ClassNotFoundException: java.sql.Timestamp
	at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:471)
	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:588)
	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
	... 26 more
#2019-09-2014:26kennyI see several of those actually.#2019-09-2017:51kennyI kept removing modules until it fixed itself. There was definitely some module causing an issue.#2019-09-2021:12cflemingThat’s that same error again from the Maven s3 thing, it’s really strange.#2019-09-2015:47kennyIs it possible to have Cursive automatically mark the .cpcache directory as "Excluded"?#2019-09-2021:11cfleming@kenny That’s a good idea, I’ll add that.#2019-09-2103:50onetomI've noticed that if I have the Python plugin installed, they not even just automatically ignore the __pycache__ directory, but they even hide if from the Project files tool window. Maybe Cursive could do that too?#2019-09-2217:38dazldIs adding artifacts broken on current dev build / 2019.2.3?#2019-09-2217:38dazldit’s a deps project, clojars is indexed#2019-09-2221:53emccueIs there any way to make the cursive like memfn?#2019-09-2221:59kennyhttps://github.com/cursive-ide/cursive/issues/1750#2019-09-2311:43miikkaIt used to be so that when you press Cmd+B on a clojure.spec spec name, it'd show all the usage sites, but that's not the case anymore? Or am I missing something?#2019-09-2314:45joelsanchezthat's a weird way to pronounce "issue #2233" https://github.com/cursive-ide/cursive/issues/2233#2019-09-2316:02miikkaGreat, it's not just me then#2019-09-2711:27dmarjenburghI’m trying to mark my test folder as Test Root, but it keeps getting unmarked when I re-open the project. I’m using a maven style project layout. As you can see, the src/test/clojure folder is not a test root which makes me unable to call Load file in REPL from my tests.#2019-09-2711:33manutter51I had something like that once and I’m trying to remember the cause — I think it was the way I had source paths set up in my project.clj file?#2019-09-2711:42dmarjenburghI’m using deps.edn. The test path is added in a :unit-test alias. Maybe the alias must start with test or something#2019-09-2711:48dmarjenburghThat’s actually it. Only if the alias is exactly equal to :test will it mark the added paths as test roots#2019-09-2711:51manutter51:thumbsup:#2019-09-2712:51sooheonCurious if anyone else is seeing this issue with jumping b/w test and impl? https://github.com/cursive-ide/cursive/issues/2235#2019-09-2722:16cfleming@dmarjenburgh Yes, sadly deps doesn’t distinguish between source and test roots, so the only way to identify them is based on the alias name. I could probably do something like “Any alias containing ‘test[s]?’ as one of its segments” (like your :unit-test).#2019-09-2802:06onetomwould that be possible to retain manual directory markings between deps imports? that way the only heuristic would be to look for test[s] alias, but users can correct the initial import's decision manually with the mark directory as... action and subsequent imports should "just" honor those decisions.#2019-09-2806:21dmarjenburghI actually don’t necessarily expect Cursive to know my test dirs. I guess applying a one-off heuristic is fine, but after that I’m ok with manually assigning test roots, as long is it isn’t removed afterwards.#2019-09-2722:19cfleming@sooheon.k No-one else has reported that, I’ll try to reproduce it next week.#2019-09-2810:41dmarjenburghWhat is the minimal setup to get a clojurescript REPL working with Cursive? I’ve tried the following: - Minimal deps: {:deps {org.clojure/clojurescript {:mvn/version "1.10.520"}}} - Start a standard nREPL through the launch configuration. - Run the following:
(require '[cljs.repl.browser :as b]
         '[cljs.repl :as r])
(r/repl (b/repl-env))
This will work, except that the REPL keeps prompting me for standard input with a modal…
#2019-09-2814:32potetm@dmarjenburgh so. cljs repl#2019-09-2814:32potetmAs you know, Cursive works via NRepl really well.#2019-09-2814:32potetmThis is because the IDE can basically talk RPC over a socket.#2019-09-2814:33potetmWith the built-in REPL prompt, the host process is always begging for user input.#2019-09-2814:34potetmWhen you fire up a raw cljs repl, that’s exactly what you’re doing: Starting a process that continually prompts for user input.#2019-09-2814:34potetmI think Colin has been working on a better cljs repl for some time.#2019-09-2814:35potetmBut the fix right now is to use a piggieback repl: https://github.com/nrepl/piggieback#2019-09-2814:35potetmThis creates a faux nrepl that you can talk over.#2019-09-2814:36potetmthe invocation is basically the same:
(pb/cljs-repl (b/repl-env))
#2019-09-2815:48onetom@dmarjenburgh there is also https://github.com/mfikes/tubular#cursive#2019-09-2816:11onetomhere is a full example which you can just copy-paste as is. in 1 shell run a clojure socket repl which will be handled by a clojurescript repl server:
clj -Sdeps '{:deps {org.clojure/clojure {:mvn/version "1.10.1"} org.clojure/clojurescript {:mvn/version "1.10.520"}}}' -J-Dclojure.server.repl="{:port 5555 :accept cljs.server.browser/repl}"
this also drops you into a regular clojure repl which is connected to your terminal's standard i/o. from an other shell, run a tubular socket repl client like this:
clj -Sdeps '{:deps {org.clojure/clojure {:mvn/version "1.10.1"} tubular {:mvn/version "1.3.0"}}}' -m tubular.core -p 5555
this will try to connect to the socket repl server. that incoming connection to the 1st process will trigger it start a new cljs repl environment by opening a browser tab, which tab then connects back to that 1st process websockets. that 1st process then forwards the repl chatter back and forth to the tubular socket repl client in the 2nd process, which displays in on the 2nd terminal's standard i/o
#2019-09-2816:13onetomif you start the tubular client with cursive as a clojure.main repl, then the repl discourse will be handled by the cursive repl tool window, instead of a terminal's stdio#2019-09-2905:39dmarjenburghThanks. I got the piggieback solution working. For tubular, the node server works, but I haven’t been able to get the browser server working correctly. I just changed the socket-server arg to J-Dclojure.server.repl="{:port 5555 :accept cljs.server.browser/repl}"#2019-09-2910:45onetomwhat error did u get?#2019-09-2918:08dmarjenburghThe REPL prompt didn’t show, as if not connecting. But after restarting everything, now it seems to work! Thanks#2019-09-3018:51Jon WalchAnyone seen Error: Could not find or load main class clojure.main when trying to start a local nrepl running with Intellij project classpath? Also seeing Run Configuration Error: No modules containing clojure.main found when trying to create the configuration#2019-09-3019:57cfleming@jonathan.walch That usually means that you don’t have Clojure attached to your project correctly. How did you create the project?#2019-09-3020:12Jon WalchI used intellij/cursive and selected deps#2019-09-3020:12Jon Walchthis fixed it for me#2019-09-3020:12Jon Walchhttps://clojurians-log.clojureverse.org/cursive/2019-02-11
artrmrno03:02:56
Hi, I'm trying to create a deps.edn project and got the error 'Cannot execute: Clojure command not configured'. I installed Clojure using brew on mac and the clojure command is in my PATH. Is there another PATH I have to set up in IntelliJ?

artrmrno04:02:41
Nevermind, I went to the 'Clojure Deps' settings, made a change to use 'toolds.deps' and then back to 'CLI' tools and I didn't get the error anymore.
#2019-09-3020:13cflemingAh, yes - sometimes the first time Cursive needs to know the location of the clojure command. I need the fix the case where it can be defaulted sensibly.#2019-10-0103:21Jon WalchI updated a dependency to my deps.edn file and I have auto-import on, in libraries the dependency isn’t there and if I try to load the file that references the dependency, I get a file not found exception#2019-10-0103:28Jon WalchManually refreshing in the clojure deps tool window worked#2019-10-0104:21cfleminghttps://twitter.com/CursiveIDE/status/1178886118839734274#2019-10-0112:45conanAnybody know how to add maven central to the list of indexed repositories?#2019-10-0114:52p-himikThe issue with orderEntry reordering in iml files has been fixed, right? At least, in the latest dev builds.#2019-10-0120:57carocadis there a way to deactivate clojuredocs examples from showing up ? unfortunately the actual docs of some functions are not shown … only the examples :thinking_face:#2019-10-0121:03cfleming@conan I don’t think there’s a way to do that manually, but central should be added by both build tools. Are you not seeing that? Do you see clojars?#2019-10-0213:41conanYes I have clojars but not maven. I can just add deps manually, the autocomplete is so nice though#2019-10-0121:04cfleming@p-himik Maybe, since I changed how it worked. I’ll check the code and confirm that.#2019-10-0121:04cfleming@carocad Do you have a screenshot of that?#2019-10-0121:16carocadlet me get one#2019-10-0121:18carocadThis is what I get if I try to get the documentation for second. Unfortunately I have not been able to figure when does it work and when not 😕 …. therefore I was trying to deactivate clojuredocs and go back to the “old ways”#2019-10-0122:50cfleming@carocad Is this a cljc file?#2019-10-0122:50cflemingClojureDocs won’t be causing the problem here, it doesn’t affect the actual retrieval of the docs.#2019-10-0208:12carocad> Is this a cljc file? no, this is a clj file#2019-10-0123:32tony.kay@cfleming There has been some code motion in Fulcro. The built-in macro resolution you added for Fulcro 2 works, but the macros are in new namespaces now. Are you willing to add the new ones as well? I can open an issue and list out the mapping#2019-10-0123:46cflemingSure, file an issue and I’ll add them in the new namespaces too.#2019-10-0123:46tony.kaythx#2019-10-0200:07tony.kayhttps://github.com/cursive-ide/cursive/issues/2241#2019-10-0200:09cflemingGreat, thank you.#2019-10-0200:10tony.kayThank you. I appreciate all the work you put into Cursive.#2019-10-0210:57cfleminghttps://twitter.com/CursiveIDE/status/1179349083326210048#2019-10-0211:02Janne SauvalaSilly question, but how do I install an EAP version of Cursive?#2019-10-0211:02cfleming@UJZ6S8YR2 https://cursive-ide.com/userguide/index.html#eap#2019-10-0211:07Janne SauvalaThanks! 🙇:skin-tone-2: I remembered that there is a setting for this somewhere but couldn’t find it yesterday#2019-10-0211:10katox@cfleming Hi! I can't get eap2 to work (eap1 worked):
java.lang.ClassCastException: class com.intellij.idea.IdeaLogger cannot be cast to class org.apache.log4j.Category (com.intellij.idea.IdeaLogger and org.apache.log4j.Category are in unnamed module of loader com.intellij.util.lang.UrlClassLoader @100fc185)
	at cursive.stubs$stubs_required$fn__265.invoke(stubs.clj:374)
	at clojure.core.protocols$fn__8159.invokeStatic(protocols.clj:168)
#2019-10-0211:15cfleming@katox Hmm, that’s very strange, I’ve not seen that and I can’t immediately see what the problem might be looking at the code. The only recent changes to the logging code were also in eap1.#2019-10-0211:16cflemingI’ll have to look at that tomorrow.#2019-10-0211:16cflemingWhich IntelliJ version are you using?#2019-10-0211:17katoxI just tried the latest EAP - IntelliJ IDEA 2019.3 EAP Build #IU-193.3793.14#2019-10-0211:17cflemingOh, so were you on an earlier IntelliJ version when using eap1?#2019-10-0211:18katoxNo, it worked a few minutes ago with the same version.#2019-10-0211:18katoxBut I only updated to to EAP today to try out new Cursive stuff and to see whether some annoying platform bugs are gone.#2019-10-0211:19cflemingIt’s weird, there’s no mention of Category anywhere in any of that code.#2019-10-0211:20cflemingOk, I’ll look at that tomorrow.#2019-10-0211:21katoxI tried to uninstall it completely and restart and do a new install and restart. No joy unfortunately.#2019-10-0211:27katox@cfleming I downgraded to eap1 and it came up normally.#2019-10-0211:28katoxDunno if it could be related to the current open project but I imported and opened Neanderthal https://github.com/uncomplicate/neanderthal - it really streches Cursive to its limits. You might want to try it sometimes.#2019-10-0214:26souenzzoHello I'm trying to create a new clojure REPL, but I get this error on idea.log (no action on screen, no red on bottom) https://gist.github.com/souenzzo/6a7637902db530f10ec6282be533816f#2019-10-0214:51kenny@cfleming I also received that exception after upgrading. I clicked "Report to Cursive." It's #2163.#2019-10-0214:51kennyI'm on 2019.2.2 on Ubuntu.#2019-10-0214:53kennyNot sure if it's related but I'm not able to load anything in a REPL.#2019-10-0214:54kennyAfter starting a REPL, I only see this. I could swear there's usually one more message line.#2019-10-0214:56kennyHitting the X button also seems to leave the REPL running. I see a little green dot by the play button as if the REPL is still running. If I open the Run tab, I am able to stop the REPL there.#2019-10-0214:58kennyI'm also downgrading for now.#2019-10-0215:13danierouxI get the same error, OSX. But my repl interaction works fine#2019-10-0218:52dnolenso is the eap2 compatible w/ latest IntelliJ?#2019-10-0219:02p-himikSNAPSHOT-3 didn't give me any errors, eap2 gives me the above exception.#2019-10-0219:41kennyeap1 is good.#2019-10-0219:52cflemingYes, eap2 seems to be giving people problems, but eap1 is also compatible with 2019.3.#2019-10-0219:30tapHaving the same problem with @kenny. REPL does not successfully start up.#2019-10-0220:24ikitommisame here.#2019-10-0219:31tap#2019-10-0304:48cflemingThanks for the reports everyone, I’ve been trying to reproduce the logging error but haven’t been able to yet.#2019-10-0305:43ikitommiwhat is the last working combo? I have now 2019.2.3 & 190.eap2-2019.2 and the REPL doesn’t start. And how do I rollback to the last working combo?#2019-10-0305:44ikitommisame IdeaLogger thing + No nREPL ack received#2019-10-0306:20cfleming@U055NJ5CC Go to https://plugins.jetbrains.com/plugin/8090-cursive/versions, choose EAP, download 1.9.0-eap1-2019.2 and then install from disk.#2019-10-0306:20cflemingI’m still working on those two issues, so far I can’t reproduce either of them.#2019-10-0306:29EmpperiI have the same problem, REPL doesn't start#2019-10-0306:34ikitommithanks @cfleming, downgraded and works again#2019-10-0306:37EmpperiI downgraded but have the same issue 😞#2019-10-0306:39EmpperiOh damn, I'm wrong. I downloaded the wrong version.#2019-10-0306:42EmpperiYay, downgraded properly and works. 🙏#2019-10-0309:20Ben Hammondanyone else running project SDK java-1.8 have this problem?
openjdk version "1.8.0_222"
OpenJDK Runtime Environment (build 1.8.0_222-8u222-b10-1ubuntu1~18.04.1-b10)
OpenJDK 64-Bit Server VM (build 25.222-b10, mixed mode)
#2019-10-0309:20Ben Hammondmaybe its irrelevant#2019-10-0309:25Ben Hammond#2019-10-0310:47sooheonI see many .jar files once I download an older version. Am I supposed to install all of them one by one?#2019-10-0310:55Ben Hammondthat's strange, I see a single .zip file cursive-1.9.0-eap1-2019.zip#2019-10-0310:55Ben Hammondwith .jar files in it#2019-10-0310:56Ben Hammondmaybe your zip ffile is getting automagically unpacked; you don't want that#2019-10-0310:56sooheonGood call, that might be it#2019-10-0321:41cfleming@UFC2ETW9W Right, you want the original zip, IntelliJ will unpack it during the install process.#2019-10-0310:51Jakub Holý (HolyJak)@cfleming is there a place with an overview with working Cursive x IntelliJ combos? Thanks!#2019-10-0310:54jamescroftHi, I'm trying to use a debug REPL, I can set breakpoints and the debugger opens correctly, however whilst the debugger is paused, I can't evaluate any code in the REPL. I can't evaluate anything until I click continue. Hopefully this screenshot will explain it#2019-10-0311:12p-himikJust a wild guess - what if you make the breakpoint to suspend only the current thread?#2019-10-0311:13p-himikNote that even if that helps, it likely won't help in situations where a breakpoint was hit due to some code executed in the REPL input panel. Simply because it will be the same thread.#2019-10-0311:16jamescroftHow would I make the breakpoint only suspend the current thread?#2019-10-0311:17jamescroftSorry, found it, right clicking on the breakpoint show a menu that allows that.#2019-10-0311:18jamescroft@U2FRKM4TW I made that change but it still seems to have the same behaviour. Thanks for the suggestion though!#2019-10-0315:17katox@U06790Y4E You can fire up another REPL window in a different thread. Or you can use a future to run the command to be stopped in debugger.#2019-10-0315:18jamescroft@U0KD0N5T5 Thanks. If I fire up a different REPL it won't have access to to local variables as they currently are at the breakpoint. I thought this was a flow that I saw @cfleming use in his Debugging with Cursive video.#2019-10-0315:19katoxI use eval (alt-f8) to inspect. You can write clojure code there as well even though it is cumbersome.#2019-10-0321:43cflemingYes, Evaluate Expression is really the only way to do this right now. I have an idea that I should be able to detect if the debugger is paused for a particular REPL session, and if so then I should hopefully be able to use Evaluate Expression automatically, but I haven’t had time to investigate this properly.#2019-10-0715:43joaohgomes@U06790Y4E check scope capture. Nice library to help debugging code: https://github.com/vvvvalvalval/scope-capture#2019-10-0311:50Jakub Holý (HolyJak)Hm, I get Plugin 'Cursive' is incompatible with this installation trying to install cursive-1.9.0-eap1-2019.3.zip from disk into IntelliJ IDEA 2019.2.3 (Ultimate Edition).#2019-10-0315:33onetomyes, because that plugin is for the 2019.3 EAP Intellij, not the 2019.2.3#2019-10-0321:40cflemingRight, you need cursive-1.9.0-eap1-2019.2.zip#2019-10-0316:32grzmI've been bitten by the upgrade/downgrade cycle as the current Cursive/IntelliJ incompatibilities get worked out. When I downgrade, I've been moving the old .idea directory out of the way to prevent version issues in settings. In doing so, (a) I end up losing my run configurations, (b) deps configuration (Cursive no longer recognizes the projects as deps projects) and (c) Cursive loses knowledge of some var resolutions it had before. I understand this is predictable result of reimporting the project. The part that I'm having the most issue with is the var resolution. Is this a stub regeneration issue? If so, how can I force stub regeneration? If not, what else might I need to look into?#2019-10-0403:44cfleminghttps://twitter.com/CursiveIDE/status/1179965290379001856#2019-10-0408:36katoxBoth problems fixed for us, thanks for the fast reaction!#2019-10-0408:47ikitommisame here, big thanks!#2019-10-0409:20cflemingAwesome, thanks for letting me know!#2019-10-0410:01mitchelkuijpersI am running into:
The plugin com.cursiveclojure.cursive failed to save settings and has been disabled. Please restart IntelliJ IDEA
Any idea what could cause this?
#2019-10-0410:08cfleming@mitchelkuijpers A few people have reported this, but I’ve never seen it myself. Could you send me your log (Help-&gt;Show log in Finder/Explorer)?#2019-10-0410:38mitchelkuijpersSure shall I email it#2019-10-0410:40mitchelkuijpersEmailed#2019-10-0410:41cflemingThanks!#2019-10-0410:58cflemingI can see the exception that’s causing it, but I’m not sure what it means - I’ll investigate.#2019-10-0411:29mitchelkuijpersIf you need any other details please let me know, I downgraded intellij temporarely#2019-10-0411:30mitchelkuijpersIt happens after a few minutes each time#2019-10-0411:40cfleming@mitchelkuijpers Which IntelliJ version does this work for you with? Is this a 2018.3 EAP problem?#2019-10-0411:40cflemingIt looks like a platform issue to me, but I’m not sure.#2019-10-0411:41mitchelkuijpersIt fails for me on: 2019.2.3-2#2019-10-0411:41mitchelkuijpersAnd I am now running on 2019.1.4 which does work#2019-10-0411:45cfleminghttps://youtrack.jetbrains.com/issue/IDEA-220508#2019-10-0411:45cflemingIt looks like it’s the SBT plugin causing that.#2019-10-0411:45mitchelkuijpersAh lol#2019-10-0411:45mitchelkuijpersI'll quickly remove that don't use it anyway#2019-10-0411:45mitchelkuijpersLet me try that#2019-10-0411:46cflemingCool, let me know if it continues to happen.#2019-10-0412:28mitchelkuijpersIt seems to be fixed now#2019-10-0414:09mitchelkuijpersDefinitely fixes it thank you so much#2019-10-0413:52Abhinav SharmaHi everyone, I was wondering if someone could point me to good resources for debugging clojure(script) code via cursive and intellij or what’s your own setup for this?#2019-10-0415:21kennyThe latest eap is working well for me. Thanks @cfleming. It seems strange that the namespace you're in is shown twice: once in the tab name and once in the right corner of the REPL window. Would it be possible to change the tab name to the name of your Run Configuration for that REPL? In a multi-module project, I often find myself with many REPLs open, and I'll forget which REPL belongs to which module.#2019-10-0417:08kennyNot sure if this is under Cursive's control but could the file name be a bit smarter? When working on a re-frame application, a lot of the namespaces have the same name. It's really hard to know which file corresponds to which package. In the screenshot below, I have these namespaces: - compute.ui.application.views - compute.ui.sidebar.views - compute.ui.sidebar.control - compute.ui.vm-scaler.views - compute.ui.vm-scaler.control The way the tabs are showing the names now, really all you see is either "views" or "control". It'd be cool if it could be smarter by detecting if there are to namespaces open with the same "last name" part (e.g., compute.ui.application.control and compute.ui.vm-scaler.control). If that case is detected, expand the name to include the next package segment (e.g., c.u.application.control and c.u.vm-scaler.control).#2019-10-0420:22cfleming@kenny Great, thanks for letting me know. Yes, I have a plan to have the REPL name in the tab title as you suggest, this is still a work in progress 🙂#2019-10-0420:23cflemingI’ll check about the name shortening too - I’m not sure that I can take into account the names of other open files.#2019-10-0420:24kennyHmm. Other open files seems ideal. If not, can you take into account the module's packages?#2019-10-0420:25cflemingI’m not sure, I can’t remember how that works. I’ll take a look and see what I can do.#2019-10-0508:46sooheonWhile doing the rollback dance yesterday, I saw that IntelliJ’s default syntax highlighting looked a little different, making things like regex literals and non-clojure.core fns distinct colors. Is there a way to use that while keeping cursive functionality for everything else?#2019-10-0508:49sooheonI see Editor &gt; Color Scheme &gt; Clojure is configable, nice. The only thing I don’t see right now is an entry for regex literals.#2019-10-0508:55sooheonThe color scheme config does not seem to be accurate: it says that the “Head symbol from clojure.core” has no special coloring, when it actually seems to inherit from Keyword.#2019-10-0615:52kulminaatordecided to make @cfleming rich as hell and also bought a license.#2019-10-0620:12cflemingThanks! I’m cracking out the champagne for breakfast right now.#2019-10-0617:16dazldI can’t get any kind of autocomplete for adding a dependency to deps.edn to work - any ideas of something I might be doing wrong?#2019-10-0617:16dazld(2019.2.3 & 1.9 eap4)#2019-10-0617:17dazldmaven appears to know about clojars#2019-10-0620:15cflemingHmm, I’ll try to reproduce this. What is also odd is that you only have clojars and not central, which is something @U053032QC had reported too.#2019-10-0707:04dazldIt’s a project based off this: https://github.com/dazld/shadow-cljs-sass#2019-10-0707:05dazldI’ve lost clojars now too :)#2019-10-0707:05dazldTried cache invalidate etc#2019-10-0617:55dazldit’s a shadow-cljs project, if that makes any difference.#2019-10-0618:16kulminaatorhmm ... i must be missing something when running the repl ...#2019-10-0618:16kulminaatorthere must be a way to send the current statement under the editor cursor into the repl , right ?#2019-10-0619:31dazldCmd shift p does that for me (from memory)#2019-10-0619:37kulminaatorthat seems to send the most outer form found#2019-10-0619:38kulminaatorbut i wanted to just send the current statement that i'm scoped in, not the defn that is logically 2-3 blocks outside 🙂#2019-10-0619:40kulminaatorah seems i can manually add a binding for it ... somewhere 🙂#2019-10-0619:40kulminaatorand i have to be with the cursor by the end of the function name ? o_O#2019-10-0619:43kulminaatorhmm ... that does even something different ... if i just select the whole statement i want to execute then it does what i expect it to do ...#2019-10-0619:48kulminaatoror if i'm just outside the caret ... well that will do, will just have to get used to it#2019-10-0623:54Alex Miller (Clojure team)both exist - just look it up in the key bindings#2019-10-0712:02sooheonAFAICT, there’s Send form before caret to repl and Send top form to repl, but there isn’t Send form around caret to repl#2019-10-0716:37hlshipIs there a matrix of which versions of IntelliJ are stable with which versions of Cursive? I just got the IntelliJ upgrade to 2019.2.3 and I don't know if I dare!#2019-10-0716:43Ben Hammondi've been running eap4 for 2 days with a project that blends deps and leiningen so far so good#2019-10-0716:45Ben HammondI'd held back onto 2019.1.4 until last week when I suffered from the eap2 snafu and figured I might as well upgrade all the way#2019-10-0716:46Ben HammondI've not had any problems with it so far#2019-10-0716:46kulminaatori'm on 2019.2.3 ... the stuff i use seems to work ... but then again i'm not pushing it too much#2019-10-0716:52kulminaatorsomething that is funky (but not due to version) .. if withing a hasty typing i have created a manual mismatch of parenthesis ... i struggle to close one manually (literally, when i type ')' then nothing happens)#2019-10-0716:52kulminaatorwhat's the golden idea behind that ?#2019-10-0716:53kulminaatori seem to be missing it (and have to fix the issue with copy-paste of the character)#2019-10-0716:54kulminaatore.g. ... i type (def foo (list "bar")) ... and then wipe out the last character with shift + arrow backwards followed by ctrl+x ... it seems it's impossible to type ')' at this moment to unbreak the code#2019-10-0716:57Alex Miller (Clojure team)make a comment with ;, then type it, then remove the comment#2019-10-0716:57Alex Miller (Clojure team)or undo#2019-10-0716:58Alex Miller (Clojure team)but really, training yourself to rely on paredit/parinfer and primarily use structural changes rather than textual changes is the best option long term#2019-10-0716:59kulminaatorusually the situation is already the result of some accident 🙂#2019-10-0717:01Alex Miller (Clojure team)yeah, it happens. the comment hack above is pretty useful#2019-10-0717:01Alex Miller (Clojure team)you can also select a hanging left paren and delete#2019-10-0717:10manutter51I usually copy a close-paren from someplace else and paste it in. You can’t type it, but you can paste it.#2019-10-0720:29cfleming@hlship (and others) - this is the state of play of IntelliJ versions: https://groups.google.com/d/topic/cursive/zhkmam87RcU/discussion#2019-10-0720:44hlshipThanks! I might try a backup when I'm next home and can do a full backup first!#2019-10-0723:07isakA good trick sometimes is to just use Ctrl-Backspace:#2019-10-0809:41roklenarcichow do you people use clojurescript repl? When I start it in my normal REPL I get these popups by IDEA which ask for input and they are impossible to cancel#2019-10-0822:52cfleming@U66G3SGP5 This happens when you’re using nREPL to connect to a streaming REPL, i.e. one that’s expecting a clojure.main-style connection.#2019-10-0822:53cflemingSo in Cursive currently you can either use a clojure.main REPL, or use piggieback to use nREPL.#2019-10-0822:53cflemingThe very next thing I’m going to add is better support for this.#2019-10-0811:14Toby ClemsonHi all, is anyone having REPL issues with the latest IntelliJ and Cursive? I'm using IntelliJ 2019.2.3 with Cursive 1.9.0-eap4-12-gf4f89862 and I get:
Starting nREPL server...
/Library/Java/JavaVirtualMachines/jdk1.8.0_192.jdk/Contents/Home/bin/java ...
Connected to the target VM, address: '127.0.0.1:52386', transport: 'socket'
Connecting to local nREPL server...
nREPL server started on port 52389 on host 127.0.0.1 - 
Cannot find completion initialisation file
Clojure 1.10.1
Error updating completions:
Execution error (ClassNotFoundException) at java.net.URLClassLoader/findClass (URLClassLoader.java:382).
cursive.repl.runtime
on starting the REPL and the Error updating completions: every time I evaluate something.
#2019-10-0822:53cflemingNo-one else has reported this, I’ll see if I can reproduce it.#2019-10-0823:55Toby ClemsonDowngrading from the EAP has solved it for me#2019-10-0811:31Toby ClemsonThe errors in that block are Cannot find completion initialisation file and
Error updating completions:
Execution error (ClassNotFoundException) at java.net.URLClassLoader/findClass (URLClassLoader.java:382).
cursive.repl.runtime
#2019-10-0815:28ChrisI'm not having any problems#2019-10-0815:28Chrisbut I don't use the eap#2019-10-0816:40sooheonIs there any reason cursive would complain about invalid privatekey while trying to resolve a deps.edn project?#2019-10-0816:55sooheonOh duh, if I’ve got a :git/url dependency#2019-10-0820:48Vachihi, is there a way to auto switch to the namespace when evaluating a form? like in calva or protorepl?#2019-10-0822:54cflemingWhen evaluating a form from a namespace, Cursive will by default evaluate the form in the correct namespace, not the current REPL namespace.#2019-10-0822:55cflemingThis is controlled by a config switch, Preferences | Languages &amp; Frameworks | Clojure | REPL options | Evaluate forms in REPL namespace#2019-10-0900:42Vachi@U0567Q30W thank you!!!#2019-10-0918:53chris_Hey, could I ask for some troubleshooting help? Has anyone else been having this issue? ###### PROBLEM: Error reading project.clj: Unable to resolve var: clojure.instant/thread-local-utc-date-format in this context Cursive version: 1.9.0-eap4-2019.2 Intellij version: 2019.2.3 (Community Edition) Lein version: Leiningen 2.9.1 on Java 1.8.0_102 Java HotSpot(TM) 64-Bit Server VM
Error reading /Users/concerto/cs/landschaften/project.clj
Syntax error compiling var at (fipp/ednize.clj:71:13).
Unable to resolve var: clojure.instant/thread-local-utc-date-format in this context
fipp is not a direct dependency but per lein deps :tree is present as a dep even for newly created lein projects. That specific error has been discussed several places, e.g. here [Cannot load fipp in Java 9 using bootclasspath](https://github.com/brandonbloom/fipp/issues/60), but not in connection to Intellij or Cursive. I’m able to lein run and lein repl (outside of Intellij) successfully. So I suspect the issue is Intellij and/or Cursive. I noticed this issue after upgrading to Intellij 2019. I did not change any dependencies or settings in my project.clj between then and the error. STEPS TO REPRODUCE: Create a new Lein project: $ lein new app testapp Then import to Intellij following Cursive docs instructions ([Cursive: Working with Leiningen](https://cursive-ide.com/userguide/leiningen.html)) e.g. File -> New -> Project From Existing Sources … etc. Wait until Intellij event log throws the error.
#2019-10-0923:38cflemingI’ll investigate this and follow up over on the issue.#2019-10-0921:38tony.kayI’m no longer seeing auto-import of :local/root when I change deps.edn…is that an intentional change?#2019-10-0921:39tony.kayI seem to be able to manually add it via the deps tab#2019-10-0923:39cfleming@tony.kay Do you mean that when you modify a deps.edn to add a new :local/root dep, you don’t see that module added automatically?#2019-10-1002:45tony.kayYes. I have to press + in the Clj deps tab.#2019-10-1002:47tony.kayI just upgraded to 2019.2 and latest EAP…which “upgraded” the project. Could be that.#2019-10-0923:43Alex Miller (Clojure team)there is a known issue that changes in a local dep do not make the cache stale#2019-10-0923:43Alex Miller (Clojure team)so you need to force a classpath recalculation in that case#2019-10-0923:43Alex Miller (Clojure team)clj -Sforce#2019-10-0923:44cflemingI don’t think that’s the issue, Cursive doesn’t use any of the classpath cache stuff. I added an option when importing deps projects to transitively walk :local/root deps, but I don’t think that logic is present when syncing an existing project. I’ll add that.#2019-10-1018:23tony.kay@cfleming Small thing: Your tool tips on the clj deps tab all say “Leiningen”…
#2019-10-1119:50cflemingWhoops, I’ll fix that, thanks.#2019-10-1114:44TrevorFIX: Include clojurescript itself as a dependency in deps.edn ~I'm getting unresolved symbols (for stuff like ~ ~Cursive version is v1.8.2-2018.3 on the 2018.3.6 IntelliJ~ ~Cursive version is v1.8.2-2019.2 on the 2019.2.3 IntelliJ~ ~I'll post my deps.edn and shadow-cljs.edn in a thread~ ~Total noob here, I'm sure it's something simple I need to do.~#2019-10-1114:44Trevordeps.edn
{:paths ["src"]
 :deps  
 {
         reagent            {:mvn/version "0.9.0-rc1"}
         binaryage/devtools {:mvn/version "0.9.10"}
 }
 :aliases {
         :cljs {
                :extra-deps {
                             thheller/shadow-cljs {:mvn/version "2.8.62"}}}}

 }
#2019-10-1114:45Trevorshadow-cljs.edn
;; shadow-cljs configuration
{:source-paths
 ["src"]

 :deps {:aliases [:cljs]}

 ;; set an nrepl port for connection to a REPL.
 :nrepl        {:port 8777}

 :builds
 {:app {:target :browser
        :output-dir "public/js/compiled"
        :asset-path "/js/compiled"

        :modules
        {:main
         {:entries [minutes-clj.core]}}

        :devtools
        ;; before live-reloading any code call this function
        {:before-load minutes-clj.core/stop
         ;; after live-reloading finishes call this function
         :after-load minutes-clj.core/start
         ;; serve the public directory over http at port 8700
         :http-root    "public"
         :http-port    8700
         :preloads     [devtools.preload]}
        }}}

#2019-10-1117:32flowthingI might remember wrong, but it could be that you need to add an explicit dependency to ClojureScript.#2019-10-1117:43TrevorAH, would that be in deps?#2019-10-1117:47flowthingYep.#2019-10-1117:52TrevorThat did it @U4ZDX466T!#2019-10-1118:00Trevoroh man I'm so excited#2019-10-1122:32MileneHi everybody, I am trying to get an existing project setup in InteliJ/Cursive. I created a Leiningen configuration, I am getting " Run Configuration Error: The Clojure jar is not attached to this module" . Does anybody have direction to help me out ? Any help is greatly appreciated.#2019-10-1203:14salam@mdecagny did you follow intellij idea/cursive's project importing process to create the intellij idea project?#2019-10-1207:45cfleming@mdecagny As @abdusalam has suggested, did you follow the process described here to import your project? https://cursive-ide.com/userguide/leiningen.html#2019-10-1400:03Milenethank you @abdusalam @U0567Q30W I did follow that and I am not able to stop at the break points when I debug. It does run though.#2019-10-1319:09flowthingIs there a way to tell Cursive to use a specific set of nREPL middleware bits when launching a local tools.deps REPL? I think Cursive respects the Leiningen :nrepl-middleware key. I'm looking for the same thing but for tools.deps.#2019-10-1321:16cfleming@flowthing There isn’t yet but will be soon: https://github.com/cursive-ide/cursive/issues/2215#2019-10-1405:48flowthingGreat, thanks!#2019-10-1612:44flowthingI saw this in the release notes for 1.9.0-eap5 — thank you very much!#2019-10-1621:17cflemingNo problem, let me know how it works!#2019-10-1405:31onetomIs there a way to limit the amount of pretty printed info to the cursive repl? I often forget limiting it myself and obviously it takes forever to print hundreds of thousands of hashmaps, so I regularly end up restarting my REPL session instead. I can't even stop the printing process with the Interrupt Current Evaluation button (understandably), though intuitively I was expecting that button to interrupt result printing too.#2019-10-1405:38onetomi also have the feeling that the printing calculation continues in the background even after killing the repl process with the X icon.#2019-10-1414:18souenzzoThere is a solution for this?
java.lang.NoClassDefFoundError: java/sql/Timestamp
	at com.fasterxml.jackson.databind.ser.BasicSerializerFactory.<clinit>(BasicSerializerFactory.java:88)
	at com.fasterxml.jackson.databind.ObjectMapper.<init>(ObjectMapper.java:484)
	at com.fasterxml.jackson.databind.ObjectMapper.<init>(ObjectMapper.java:393)
#2019-10-1414:39Alex Miller (Clojure team)this has been discussed here before and Colin was looking at it, but I don't remember if there was a resolution#2019-10-1416:29ErkinHi, is there a way to specify which logback file to use with Cursive testing? It uses the default logback file which makes reading the actual test output nearly impossible.#2019-10-1417:31p-himikIs it possible to make the code inside docstrings highlighted and/or formatted?#2019-10-1418:16cfleming@souenzzo That’s fixed for the next EAP, hopefully out today#2019-10-1418:18cfleming@onetom That’s https://github.com/cursive-ide/cursive/issues/2100, which I’m hoping to get to soon.#2019-10-1418:19cfleming@erkinun I don’t think so - AFAIK Cursive doesn’t do anything there, it’s not even aware when you’re using logback.#2019-10-1418:20ErkinIs there a way to suppress logback logging then? I’m running it in a big project and logs really get in the way of the repl there#2019-10-1418:22cfleming@p-himik I was sure there was an issue for that but I can’t find it right now. It’s definitely something that has been requested, along with various other enhancements (markdown rendering, better control over folding etc)#2019-10-1418:39p-himikFound these, although none really fit the "highlight Clojure code within docstrings" description. Well, the markdown issue kinda does if there'll be support for triple backticks with the language name after them. https://github.com/cursive-ide/cursive/issues/2022 https://github.com/cursive-ide/cursive/issues/1226 Somewhat related: https://github.com/cursive-ide/cursive/issues/181#2019-10-1418:22cfleming@erkinun Not at the Cursive level, no - that will depend on your logging config.#2019-10-1423:31kennyI've been getting a lot of these error messages. It happens when clicking the refresh Deps button. It seems to be blocking deps refreshing because my REPL keeps complaining about a ns not existing after adding a dep. Restarting IntelliJ fixed it.#2019-10-1501:11cflemingOk, I’ll see if I can figure that out.#2019-10-1506:34stijn@erkinun you can specify JVM Args in the REPL Run command with e.g. -Dlogback.configurationFile=/path/to/your/logback.xml#2019-10-1508:43Erkin@stijn thanks a lot! do you know where do you specify those arguments in cursive repl though?#2019-10-1520:14cflemingIn the run configuration, see here: https://cursive-ide.com/userguide/repl.html#local-repls#2019-10-2201:13d-t-wHey @erkinun dropping into an old thread here so forgive if you found this already. Just drop a logback-test.xml file in your dev-resources.#2019-10-2201:14d-t-wLogback favours logback-text.xml over logback.xml specifically for this reason - expects you to have one on a test path when you're testing.#2019-10-2201:15d-t-wSee: https://stackoverflow.com/questions/50560184/which-takes-priority-logback-xml-or-logback-test-xml#2019-10-2210:44Erkinhey @U051GK36U there’s a logback-test file available which works fine with lein test in resources folder#2019-10-2210:45Erkinbut that does not come into effect when I run the tests from the cursive repl which I started via project.clj file#2019-11-2903:26d-t-wHey Erkin, just checking back in here. Do you have dev-resources set for in your lein profile. For example I have:#2019-11-2903:26d-t-w:profiles {:dev {:resource-paths ["dev-resources"]#2019-11-2903:26d-t-wand my logback-test is under that path#2019-10-1513:25stijnI'm getting this error on a new project without any deps#2019-10-1513:25stijn
15:24	Errors during project resolution
			The following errors were found during project resolve:
			/home/stijn/Documents/code/tryouts/http-connect/deps.edn:
			Could not find artifact aero:aero:jar: in central ()
#2019-10-1513:25stijnanyone seen this before? after invalidate caches and restart still having the same isue#2019-10-1513:27stijncli tools 1.10.1.469#2019-10-1514:10Alex Miller (Clojure team)looks like there is no version in that error message#2019-10-1514:11Alex Miller (Clojure team)do you have {:mvn/version "something"} in your deps.edn?#2019-10-1516:08kwladykaWhen project use local deps with deps.edn
github-kwladyka/form-validator {:local/root "../master"}
then it open 2 projects at once, here doc and master. But the bug is: When click on deps.edn in master it open deps.edn in doc instead. But not always. Sometimes it works, sometimes not. No idea. I was fighting with it about 15 minutes and now it works after open right deps.edn in Visual Studio Code it started to work. Coincident? I don’t know. Just sharing the issue. Don’t know solution and I can’t provide deeper info about bug. Probably it is even not Cursive bug, but Intellij.
#2019-10-1518:18stijn@alexmiller this is my deps.edn {:deps {}}.#2019-10-1518:18Alex Miller (Clojure team)where is aero coming from then?#2019-10-1518:18stijnI've seen it before and invalidating caches seemed to resolve it#2019-10-1518:18stijnThat is a very good question 🙂#2019-10-1518:19Alex Miller (Clojure team)thanks :)#2019-10-1518:19stijnI have it as a dep in some other projects#2019-10-1518:19Alex Miller (Clojure team)well, I'd figure that out and that will answer the question :)#2019-10-1518:19stijnhaha, sounds like a plan!#2019-10-1518:20Alex Miller (Clojure team)if you can supply deps options, you might want to -Sdeps '{:aliases {:v {:verbose true}}}' -A:v#2019-10-1518:24Alex Miller (Clojure team)or -Sdescribe to see what files are in use#2019-10-1518:27stijnI don't think that's currently possible in Cursive#2019-10-1518:27stijnIf I use tools.deps directly (without clj cli) then it works#2019-10-1518:28Alex Miller (Clojure team)yeah, I couldn't remember what was available through cursive#2019-10-1520:08cfleming@stijn No-one else has reported that, and I can’t imagine anything about what Cursive is doing that would cause that.#2019-10-1520:09cflemingHow do you have deps configured? Can you send a screenshot of your Preferences | Build, Execution, Deployment | Build Tools | Clojure Deps page?#2019-10-1521:02kwladyka@stijn I can’t be sure, but I think I had this issue. It was about Cursive version and Intellij version. I updated everything to the newest and it solved the issue.#2019-10-1521:03kwladykaBut I can be wrong, really don’t remember, but I saw it somewhere#2019-10-1521:07cfleming@kwladyka Did you see Deps with Cursive picking up some unrelated artifact?#2019-10-1521:08kwladykaI can’t remember, sorry.#2019-10-1521:09kwladykaIt started after Intellij update if I remember.#2019-10-1521:09kwladykaBut now I have the newest ver. and everything is ok#2019-10-1521:10kwladykaBut really not remember if it was exactly this one issue or I saw it somewhere else#2019-10-1521:12kwladykasorry for confusion#2019-10-1608:27scarytomIs there a way to suppress the "Unused global declaration" warning in a given namespace?#2019-10-1609:46dmarjenburghSettings -> Editor -> Inspections -> Clojure -> Unused Declaration ? I think you can assign scopes and save the config per project#2019-10-1612:43flowthingI had this weird thing happen (on 2019.3 EAP, Cursive 1.9.0-eap5) where a tools.deps local REPL couldn't find classpath resources in my project directory. For example, ( "config.edn") returned nil even though the resources dir was in :paths. Deleting the .idea dir and *.iml fixed the issue for me. Just in case it happens to anyone else.#2019-10-1613:37roklenarcicwith the most recent update cursive started marking clojure.core functions as unresolved in a deps project#2019-10-1613:39roklenarcicI recall this has happened before, but I forget what the fix was#2019-10-1614:29roklenarcicnobody else had this problem?#2019-10-1614:29roklenarcic#2019-10-1614:58Mark AddlemanI've seen a couple of things cause this problem. One, project.clj or deps.edn is not registered as a project. Two, internal files are broken. You can regenerate them by File / Invalidate Caches ...#2019-10-1615:21kennyStrangely, sometimes commenting out one of my requires and then removing the comment fixes this issue for me.#2019-10-1620:04Mark AddlemanOdd. I haven't run into that before#2019-10-1620:22roklenarcichad to invalidate caches#2019-10-1621:15cflemingYes, indexes can get corrupted sometimes, and for some reason upgrades can provoke it.#2019-10-1615:20kennyAfter upgrading to eap5, I get this printed out when starting a REPL. Everything still works like usual. The message in red is new and looks like something incorrect happened.#2019-10-1621:13cflemingYes, I changed the way I invoke nREPL to more easily support the .nrepl.edn file, and unfortunately that message now comes out. I filed https://github.com/nrepl/nrepl/issues/167, feel free to vote over there.#2019-10-1621:39kennyIs that message red because it's written to stderr?#2019-10-1623:49cflemingYes#2019-10-1623:50cfleminghttps://github.com/nrepl/nrepl/blob/master/src/clojure/nrepl/cmdline.clj#L381-L384#2019-10-1623:55kennyWeird. Why would that message make sense to send to stderr?#2019-10-1623:55cflemingIt doesn’t. I think I’m probably the first client to actually use that option.#2019-10-1623:55cflemingI’m going to send a PR.#2019-10-1623:57cflemingThere’s also a bug there - the nil is printed out because the send-ack invocation is indented incorrectly.#2019-10-1623:57cfleming(I assume)#2019-10-1701:25cfleminghttps://github.com/nrepl/nrepl/pull/168#2019-10-1617:35scarytom@dmarjenburgh I want to suppress it in one file, and check that change in for everyone on my team#2019-10-1623:48cfleming@t.denley You should be able to do this by going to Preferences | Editor | Inspections, then selecting Clojure | Unused Declaration, then selecting a scope in the dropdown to the right of Severity. You’ll have to define a custom scope for what you want: https://www.jetbrains.com/help/idea/settings-scopes.html#2019-10-1623:49cflemingYou can ensure that your config is shared by ensuring that the Profile (at the top of the dialog) is a Project one.#2019-10-1703:14sooheonSometimes, Switch NS to Current File does not seem to work. The REPL tab name changes, but the in-ns form isn’t evaluated, and ns shows I’m still on the old ns. It’s sporadic, and seems to happen most often immediately after starting a fresh REPL. Will some kind of log be helpful in finding this?#2019-10-1705:33cfleming@sooheon.k What sort of REPL are you running?#2019-10-1718:51sooheonJust the regular nrepl, run with deps and with test and dev aliases enabled.#2019-10-1707:15emilaasaThanks for making this! Works very well out of the box now I have to say.#2019-10-1707:16cfleming@emilaasa Thanks, I’m glad it’s working well for you!#2019-10-1707:49scarytom@cfleming is there any way to suppress it with a comment in the file?#2019-10-1707:49cflemingSadly, no, but there should be, I think there’s an issue about that.#2019-10-1707:49scarytomOk. Thanks#2019-10-1707:49cflemingLet me take a look, I’ll see if that’s easy to implement.#2019-10-1708:04onetomthe Close REPL Tab doesn't seem to kill the Local nREPL process; is that intentional? i usually use that Close REPL Tab feature, because I have some run-away printing happening. the problem with not killing the process is that when i try to start a new repl, it will report a port binding error:
Syntax error (BindException) compiling at (/private/var/folders/q8/g95tg5x9659bq26pbclr9zyc0000gn/T/form-init11281550920119201408.clj:1:1).
Address already in use (Bind failed)
(because i've started using .nrepl.edn with content {:bind "0.0.0.0" :port 5555}) if i manually kill one of the 2 java processes i usually see in activity monitor, then i can start a new local nREPL, BUT after a few seconds it gets disconnected by a No nREPL ack received message:
Starting nREPL server...
"/Applications/IntelliJ IDEA 2019.3 "...
Connecting to local nREPL server...
ack'ing my port 5555 to other server running on port 51804 nil
nREPL server started on port 5555 on host 0.0.0.0 - 
Clojure 1.10.1
Loading src/repl.clj... 
"Elapsed time: 248.690089 msecs"
"Elapsed time: 327.614331 msecs"
"Elapsed time: 412.424682 msecs"
Loaded
No nREPL ack received
Connecting to local nREPL server...

Process finished with exit code 137 (interrupted by signal 9: SIGKILL)
#2019-10-1708:05onetomthat Loading src/repl.clj... is the result of me pressing Cmd-Shift-L in repl.clj, so the newly started repl seems to work for awhile...#2019-10-1708:08cfleming@onetom Definitely not intentional.#2019-10-1708:08cflemingCould you file an issue for that one?#2019-10-1710:32kwladykaBTW Can cursive work with event variable used in this way in ClojureScript? It is valid and works.#2019-10-1716:56ssdevHi folks, forgive me, I'm an extreme noob to both cursive and clojure. I'm having trouble running a local repl in cursive. For some reason every time I hit start I get the error "Error running 'test': '12' is bad configured". I'm just using the defaults when creating the repl, choosing nREPL and "Run with Leiningen" Am I missing anything? I can connect to a remote repl, but wanted to run a local one in my project#2019-10-1716:57manutter51Is your project named “test”? That might be a bad name to use.#2019-10-1716:58ssdevThat's the name of the repl config. I just tried another one with a different name of "Local Repl" and same results#2019-10-1717:00manutter51Oh, ok. Hmm. Here’s what I have set up for my local REPL. “Which type of REPL to run” - nREPL, “How to run it?” In my case Run with Deps, aliases :local, :nrepl. “Common options” set to default.#2019-10-1717:01manutter51just left at their default values, I mean.#2019-10-1717:04ssdevhrmm. I can't choose run with deps, as it's disabled. This project is a leiningen scaffold. I'm wondering if I'm missing another step. What does the 'profiles' box do?#2019-10-1717:05manutter51Ok, let me switch to a leiningen project, just a sec#2019-10-1717:05ssdevty#2019-10-1717:07manutter51Ok, Which type of REPL: nREPL, How to run it: Run with Leiningen, profiles is blank. Common options left at defaults#2019-10-1717:08manutter51Should be straightforward to just run it.#2019-10-1717:08manutter51The “Profiles” field is a reference to Leiningen profiles — you can have separate “profiles” for building a dev version of your app, a test version, and a production version, etc.#2019-10-1717:09ssdevYeah that's what I have... wondering if there's some path somewhere that maybe got messed up. I did change my jvm not too long ago, I wonder if intellij didn't pick up that change#2019-10-1717:10manutter51Are you able to run your project from the command line? Run a REPL I mean. That would rule out typos in the project.clj file.#2019-10-1717:11manutter51Or confirm them, if you type lein repl and get the same error.#2019-10-1717:11ssdevyeah that is working#2019-10-1717:12manutter51Ok, I’d next check Project Structure under the File menu and look at the JDK settings#2019-10-1717:12manutter51Sorry, SDK, not JDK#2019-10-1717:13ssdevthis looks promising. think that might be it. 🤞#2019-10-1717:14ssdevahhhh yeah#2019-10-1717:14ssdevgreat success#2019-10-1717:14manutter51If you’ve recently upgraded to Java 12, you might want to consider having Java 8 around to use with Clojure until you get everything up and running — some of the older beginner material for Clojure isn’t ready for Java 9 and up yet.#2019-10-1717:15ssdevThank you sir! I was looking all over for that setting#2019-10-1717:15manutter51:thumbsup:#2019-10-1717:15ssdevyeah I had actually switched from 12 to 8 after installing intellij, it apparently did not pick that up#2019-10-1717:15manutter51Cool, glad you got it worked out.#2019-10-1721:21cfleming@ssanders My apologies, that is the worst error message ever. It comes from IntelliJ, I’ve been meaning to catch it and replace it with something that actually indicates where to look.#2019-10-1721:31ssdevha. No worries. I just realized that "12" was in reference to the jvm, so there was I guess a bit of a clue 🙂#2019-10-1721:33cflemingIt makes it sound like there is something fundamentally wrong with the integers.#2019-10-1721:47cflemingOk, I think I’ve caught all places that might be thrown, the message is now: "The JDK for this module is misconfigured, check it under File | Project Structure"#2019-10-1721:48ssdevOh that's much better#2019-10-1722:12cflemingQuick poll for Deps users: currently Deps provides no good way to identify which source roots should be marked as test roots. What Cursive does currently is to mark any source roots in the built-in ‘test’ alias as test roots, and all others as source roots. This isn’t very flexible. Which solution would you prefer? 1. Allow you to manually mark source roots as test roots, and for Cursive to leave them that way when syncing (most flexible, possibly annoying in large projects). 2. Allow you to specify which aliases should have their source roots marked as test roots (probably more repeatable).#2019-10-1722:28kenny1 is more general. We only ever keep our tests in the test directory so it'd be nice to have that default stick around.#2019-10-1800:32cflemingThere is one problem with this though, now that I think about it. That marking as a test root won’t be shared across teams unless you’re checking module files in, which is usually not recommended.#2019-10-1820:42wilkerlucioI like option 2, thinking about teams using it, having only local will require every member to remember#2019-10-1820:42wilkerluciomaybe we could have a key like :cursive/test-paths in the deps config, to set which paths should be considered test paths, what you think?#2019-10-1821:21cfleming@U066U8JQJ I seem to recall @U064X3EF3 saying custom keys in deps.edn were discouraged.#2019-10-1821:26Alex Miller (Clojure team)we are automatically merging multiple deps.edn files there is no way to say how custom keys are combined right now, so I would encourage you to use a different mechanism#2019-10-1821:45wilkerlucioI though about it considering the "open world" nature of maps that Clojure encourages, I mean, if you merge, that's probably something you can ignore in this case, but I guess in this case wouldn't matter, makes sense?#2019-10-1821:47wilkerlucioeven using very specific keys (qualified), you think its a problem?#2019-10-1722:59cflemingOk thanks everyone: https://github.com/cursive-ide/cursive/issues/2253#2019-10-1812:50vikeriI can’t run figwheel REPL through nNREPL anymore and when I change to clojure.main the whole standard lib seems to be undefined. The REPL still works but everything is yellow. Is this a known issue or is my setup faulty somehow?#2019-10-2019:42cflemingI’ll test this to see if I can reproduce.#2019-10-2105:56vikeri👍#2019-10-1815:07mishacan some one remind me how to run custom "setup" code upon cursive (nREPL, with deps) REPL start? and where to put it#2019-10-2019:43cfleminguser.clj is usually the best place to put things like this.#2019-10-2020:33mishayeah, user.clj works, but not for (set! *print-namespace-maps* false) apparently.
Caused by: java.lang.IllegalStateException: Can't change/establish root binding of: *print-namespace-maps* with set
thank you.
#2019-10-2100:24cflemingOh, right, I dimly remember this was complicated. I think it’s because nREPL has to set that as a binding, so it would require some setup code to be sent each time the REPL is started. I’ve been planning to add that to the run configs, but have not done so yet, sorry.#2019-10-1815:08misha(specifically, I want this to be executed (set! *print-namespace-maps* false))#2019-10-1817:01Kari MarttilaI haven't had time to read the Cursive channel lately. I still have IntelliJ IDEA 2019.1.4 and Cursive v1.8.2-2019.1 and this setup is working just fine. So, is it safe to upgrade to latest IntelliJ IDEA 2019.2.3 and upgrade Cursive plugin as well? The reason I'm asking this is that I tried a couple of months ago to upgrade IDEA and there were some issues with Cursive.#2019-10-1817:07kennyI'm on 2019.2.3 & Cursive 1.9.0-eap6-2019.2 and things are working great.#2019-10-1817:09Kari MarttilaIs it a hassle to install that eap6 version?#2019-10-1817:11kennyI just leave the "Check for EAP builds" option checked in the settings. Then it'll just automatically update the plugin for you.#2019-10-1817:13Kari MarttilaOk. No major hassle then. I don't want any extra hassle in my life. 🙂#2019-10-1817:13Kari MarttilaMaybe I rsync my old IDEA installation before the upgrade... just in case...#2019-10-1817:14kennyEAP builds tend to be just as stable as the stable builds. Recently there has been more issues due to all the IntelliJ bugs. It's super easy to downgrade versions if necessary.#2019-10-1817:20Kari MarttilaOk. Thanks for the info!#2019-10-1817:41Kari MarttilaI upgraded IntelliJ IDEA to 2019.2.3 and Cursive plugin got upgraded to 1.8.2-2019.2. I don't see that "Check for EAP builds" option, where is it?#2019-10-1817:41kennySearch for "check for eap" in the settings window. It'll pop up.#2019-10-1817:42Kari MarttilaOk. Thanks.#2019-10-1817:48Kari MarttilaUpgraded IntelliJ IDEA and Cursive plugin (eap6). Just tested REPL - everything seems to be working. Thanks!#2019-10-1817:01kennyI seem to pretty consistently get an error alert when switching branches. This is in the log file.#2019-10-2019:43cflemingThis might be related to the previous stacktrace you posted - I’ll see if I can work out why you’re seeing these.#2019-10-2201:26cflemingI haven’t been able to reproduce either this or your previous stacktrace, but going over the code again I found some inconsistencies in how I was using the API to create libraries, which might be relevant. I’ve fixed those, so let me know if this is improved in the next release.#2019-10-2201:26kennyOk. I can pretty consistently reproduce it on both my Mac and Linux machine. Will let you know if the next release fixes it.#2019-10-2201:27cflemingGreat, thanks.#2019-10-2522:52kennyI updated to 1.9.0-eap7-2019.2 and am still getting the exception when switching branches.#2019-10-2522:54kennyI copied the entire message this time. It all seemed redundant before, perhaps it's not.#2019-10-2822:04cflemingOk, I’ll keep investigating, thanks.#2019-10-2822:27cfleming@U083D6HK9 The message is repetitive because it’s getting the same error for multiple libraries. The first of them is io.netty/netty-transport-native-unix-common:4.1.25.Final - does that exist in both branches (the ones you’re switching from and to)?#2019-10-2822:29kennyI think so. Any idea which project it is for? While this exception does happen when switching branches, I don't think it is caused by branch switching. Simply hitting the Refresh button in the Deps panel will cause it too.#2019-10-2822:29kennyi.e. Deps refreshes produce the exception & branch switching causes the Deps refresh.#2019-10-2822:31cflemingYeah, I saw that in your later message. It’s really strange. What’s also weird is that all of the deps that it’s complaining about are all netty-related.#2019-10-2822:31cflemingI’ll try to reproduce with those exact deps and see if there’s something weird about them#2019-10-2822:31kennyThe one I am getting now is for re-frame-10x.#2019-10-2822:31kenny"Deps: day8.re-frame/re-frame-10x:0.4.4' already disposed"#2019-10-2822:32kennyWell, I didn't open the logs but that's the one that shows up in the error notification after hitting the refresh button.#2019-10-2822:33kennyAnd it happens every single time. I feel like it didn't do that before, can't be sure though.#2019-10-2822:34cflemingI imagine you’d have noticed if it happened every time.#2019-10-2822:35kennyMaybe. I don't click that button that often though.#2019-11-0500:51kenny@U0567Q30W This appears to be fixed in the latest version. Branch switching is also a lot faster.#2019-11-0501:04cfleming@U083D6HK9 Oh great, thanks for letting me know! You should also be able to cancel a resolve in case you need to, which might be useful with a big project like yours. If you just start a new one it will also cancel the previous one first.#2019-10-1913:50nmkipIs someone using rebl with cursive?#2019-10-2009:47misha@cfleming is there a way to add symbols to the list of indentations? Editor > Code Style > Clojure > Form Parameters I want to set indentation for #_ to 0, so that
#_
(defn foo []
would not get re-formatted to
#_(defn foo []
or
#_
  (defn foo []
#2019-10-2019:44cflemingHmm, I’d have to check the code to be sure, but I don’t think that’s possible. The customisation code is all around list-based forms, IIRC.#2019-10-2010:06sogaiu@juan.ignacio848 more or less following the instructions for java 11 at: https://github.com/cognitect-labs/REBL-distro/wiki/REBL-in-IntelliJ-Cursive worked here -- now what i type at the repl shows up in rebl nicely#2019-10-2012:44nmkipthaaaaanks sogaiuuuu#2019-10-2012:44nmkipill try it#2019-10-2012:59nmkip>You're probably using nRepl. In your repl build configuration, make sure you have clojure.main set. THAT MADE THE TRICK 😄#2019-10-2013:00nmkipNow I have rebl 😄#2019-10-2020:47sogaiucongratulations 🙂#2019-10-2012:21dabrazheHi. I am getting a popup with the message all the time in Idea: Error reading /Users/Dropbox/POCs/minimal-shadow-cljs-nodejs/tmp_project.clj: Could not find clojure executable It happens when I load the project or change project.cljs. I am using Idea on MacOS with Shadow-cljs for nodejs target, Cursive#2019-10-2019:47cflemingThat doesn’t seem to be an error from Cursive, as far as I can tell. Which version of Cursive are you running?#2019-10-2021:41dabrazheVersion 1.8.2-2018.2#2019-10-2019:21kwladykait looks like a bug. This ns i ok unless I miss something.#2019-10-2019:22kwladykaviews which is in the same folder and it is ok#2019-10-2019:34kwladykaIt fixed itself after I used cmd+down to jump into source one of the function#2019-10-2019:34kwladykaoh not really… it opened the same file twice#2019-10-2019:34kwladyka#2019-10-2019:34kwladyka#2019-10-2019:35kwladykait could be because there are 2 repositories at once, because of github-kwladyka/form-validator {:local/root "../master"}. At least I didn’t see this error before.#2019-10-2019:48cflemingYes, the layout looks ok to me. Do you mean that you have two copies of the same repo in the same project?#2019-10-2020:15kwladykahttps://github.com/kwladyka/form-validator-cljs/tree/doc#developing#2019-10-2020:15kwladykaI have it exactly like this#2019-10-2020:17kwladykaco I am working on doc and use master as dependency#2019-10-2100:29cflemingOk, so I clone the three repos and then import from the three deps.edn files?#2019-10-2100:35cflemingI just cloned the three branches as described, and imported them into Cursive. I don’t see the utilities namespace there, though.#2019-10-2107:38kwladykaDid you do this part https://github.com/kwladyka/form-validator-cljs/tree/doc#if-you-change-library-code ? Do this in doc repo then open doc repo#2019-10-2107:38kwladykato use local dependencies#2019-10-2107:39kwladykaI think it is connected with my issue openning deps.edn before. I was clicking on dep.edn in master, but Intellij opened deps.edn in doc instead#2019-10-2107:39kwladykaAnd this was random thing#2019-10-2107:39kwladykaThis issue about ns is probably random too#2019-10-2107:39kwladykalike it doesn’t work and next day it works#2019-10-2107:39kwladykathis kind of random#2019-10-2020:37nmkipAny theme recommendation for intellij?#2019-10-2020:38kwladykaI like Darcula#2019-10-2020:41nmkipI like it too (and also use it). Sometimes I want to switch it but I can't find one that feels better... maybe a light theme?#2019-10-2022:06mishamany like https://ethanschoonover.com/solarized/#2019-10-2022:07mishahttp://color-themes.com/?view=index has previews#2019-10-2022:10nmkipI'll try solarized#2019-10-2022:10nmkipthanks#2019-10-2022:14mishaclick the second link anyway, lots of themes, might pick up some colors to customize solarized, as I did#2019-10-2022:24nmkipI clicked it when you sent it before 🙂#2019-10-2100:22cfleming@juan.ignacio848 I like the new IntelliJ Light Theme preview - it’s going to be the new default from 2020.x#2019-10-2108:32dazldgruvbox works well for me#2019-10-2108:32dazldor the oceanic dark themes from material#2019-10-2123:24nmkipI ended up downloading material ui plugin#2019-10-2123:24nmkipand I'm trying GitHub theme#2019-10-2212:12onetomthere are a few solarized themes: 1. https://github.com/4lex4/intellij-platform-solarized 2. https://github.com/snowe2010/solarized-jetbrains 3. https://github.com/jkaving/intellij-colors-solarized i only used their light variants. the contrasts feel a bit off for me in case of #2. i used #1 afterwards for ~4months and quite liked it. on older 2k iMacs it's not the best though. #3 doesn't seem to be published into the jetbrains plugin repo, so no experience with that. about a week ago i switched to the IntelliJ Light Theme preview and so far im quite happy with that even on the 2k iMacs, not just the 5k one.#2019-10-2112:58vikeriI have a problem with (System/getenv) only returning like 9 env vars in the REPL. As opposed to the 30 or something I have set. I have the following setup: Local nREPL Run with Leiningen OSX Catalina fish shell Intellij Community 2019.2 Cursive 1.8.2 - 2019.2#2019-10-2113:00Alex Miller (Clojure team)on mac, I think apps are run without hitting your .bashrc and all that stuff#2019-10-2114:44sooheonI went into a bottomless rabbit hole because of this, when AWS credentials weren’t being picked up. Wonder what the fix is…#2019-10-2218:12tony.kaySo, I use .profile (and bash) as my shell. When I set up a run config I use the “Include system env vars” and it picks them up fine. NOTE: .bashrc is NOT where you should put env vars (ever). I’m not sure how IntelliJ picks up the vars, which is why I mention that I have mine in .profile and use bash.#2019-10-2218:13tony.kayThese are definitely from my .profile…#2019-10-2218:15tony.kayNOTE: I have to restart IntelliJ for it to pick up new changes, but it does pick them up from .profile when I do.#2019-10-2218:16tony.kay@vikeri @U06BE1L6T#2019-10-2218:17tony.kay@U06ANT2JK#2019-10-2218:22Alex Miller (Clojure team)(sorry, I didn't actually mean literally bashrc earlier :)#2019-10-2218:23vikeriI tried adding vars to .profile too with no avail…#2019-10-2218:40tony.kay@vikeri Here are some things to consider: IntelliJ is going to have to run a shell in order to get the env vars. Not sure at what layer. Might require the terminal plugin to work, and it might also require that you’re using bash. Additionally, bash can look at .bash_profile and .profile…but not both…I think it prefers the former#2019-10-2220:22jumarI was talking about GUI apps in general. Perhaps it's a bit different in this case. Sorry if that was confusing#2019-10-2306:53vikeri@U0CKQ19AQ The terminal plugin works fine and reads the env vars correctly. And it has worked previously when I used fish shell. Strangely enough if I open the app from the terminal in the directory: /Applications/IntelliJ IDEA https://CE.app/Contents/MacOS then it works…#2019-10-2315:40tony.kay@vikeri That’s how UNIX processes and env work: the shell passes env vars to the next process. In OSX when you start an app normally, IT is the process that has to pass along the vars…which is why it is an OS-level tweak in general to get the env to change that way….However, IntelliJ must be doing some extra work (forking an addl process so it can add to env vars) because I see my .profile updates when I restart IntelliJ. The actual mechanism is trivial: parent process passes env vars to child process…that’s really all there is to it. So, when you start an app from terminal, the terminal is the parent process and of course it works. When the OS starts it…well, then it is a bit opaque. You have to either find in docs how they’re doing it (unlikely) or derive it by watching what happens…You can use terminal ps to trace through parent processes, look at man pages for those things, etc etc. It isn’t technically challenging to figure out…it’s just opaque as hell once you have GUIs starting GUIs starting processes.#2019-10-2315:41tony.kayWhich is why I have no idea of how IntelliJ is finding my .profile changes….I know how it has to pass them to the child process, but I can find no docs on how it derives them…but since changes to env that OSX recognizes (i.e. it has to put env vars into the GUI parent process…what do they call it? Aqua?) typically require a reboot I do not suspect it is OS level…could be wrong#2019-10-2315:48vikeriYeah it’s opaque for sure… Thanks for the help though!#2019-10-2113:01Alex Miller (Clojure team)there is a way to make that happen, but I do not remember the details#2019-10-2113:05vikeriMust have been a Catalina change then, things that previously worked are not working anymore.#2019-10-2113:06Alex Miller (Clojure team)certainly not the first time that's happened :)#2019-10-2113:07vikeriHaha#2019-10-2113:07vikeriI added a repro repo here: https://github.com/vikeri/repl-issue-cursive#2019-10-2113:44gibbCan I set up a REPL to shadow-cljs and evaluate expressions from a cljs file from Cursive? I get the following error when I tried:#2019-10-2113:45gibbI’m pretty new with how the REPL works and with clj / cljs and the tooling. The way I would like it to work is the way the REPL works when I use it in a lein new project that only uses Java: i.e I can evaluate expressions and load files via the REPL.#2019-10-2113:53gibbAh I was supposed to switch it to cljs mode (shadow.cljs.devtools.api/repl :app)#2019-10-2118:31dazldI’m still having trouble getting autocomplete to work with deps.edn - is this a known issue..?#2019-10-2118:40kwladykadeps.edn works fine for me#2019-10-2118:52dazldmust be something in my local setup.#2019-10-2118:52dazldmaven, or … :mystery:#2019-10-2118:53dazldloving the label telling you which ns you are in bottom right of the repl ❤️#2019-10-2122:08cfleming@dazld Yes, this is still happening to some people, unfortunately I can’t reproduce it to debug it.#2019-10-2122:08cflemingCan you check which repositories you have under Preferences | Build, Execution, Deployment | Build Tools | Maven | Repositories?#2019-10-2202:17tapIt's been happening for me for many months now. This is a leiningen project. I kind of already give up deps autocomplete at this point.#2019-10-2202:48cfleming@U05111TCS Do you get completion for artifacts from Clojars?#2019-10-2202:52tapNo.#2019-10-2202:52cflemingOk, thanks. I’m going to put some debug logging in the next EAP to see if we can figure this out.#2019-10-2202:53tapOk. Thanks.#2019-10-2205:11dazldMy repo list is almost the same, just clojars and datomic.#2019-10-2122:42sogaiu@vikeri not related to zsh being default in catalina by any chance?#2019-10-2205:08vikeri@sogaiu very possible, I didn't do a fresh install of Catalina though, so fish is still my standard shell.#2019-10-2207:02jumarEnv vars on Mac OS X are just a huge mess. As alex said your "bash" env is completely ignored when apps are run#2019-10-2207:03jumarI face this often when dealing with JAVA_HOME#2019-10-2207:03jumarAnd things have changed a lot during the past releases of Mac OS X.#2019-10-2207:05jumarI now use jenv exclusively to maintain JAVA_HOME properly; for other stuff I don't care as much but in case you need it you have to mess with .plist files (hard to say which one is the best)#2019-10-2208:15vikeriIt’s strange though because it works on my colleagues machine with Catalina and it used to work for me before catalina…#2019-10-2208:37flowthingJust curious, is there a way to make e.g. clojure.pprint/pprint use the Cursive pretty-printer?#2019-10-2208:42cfleming@flowthing There isn’t, but I’m planning on allowing pretty printing via Cursive from the REPL via an injected function, something like cursive.repl/pprint or something.#2019-10-2208:42flowthingCool, thanks!#2019-10-2208:43cflemingI’d also like to support diffing data structures in the Cursive GUI and other nice things.#2019-10-2208:44flowthingThat would be fantastic. :thumbsup:#2019-10-2212:18onetomi would use diffing all the time, but nowadays even the idea diff does not work https://www.jetbrains.com/help/idea/command-line-differences-viewer.html#2019-10-2212:21onetomfor now i've resorted to using a bunch of different libraries and a few util functions to concisely inspect intermediary results while building data pipelines and testing them against production data with tens or hundreds of thousand elements.#2019-10-2212:23onetomThese are the most useful libs:
(ns repl
  (:require
    [gini.utils :refer :all]

    [clojure.set :as set]
    [clojure.data :as data]
    [clojure.string :as str]
    
    [debux.core :refer :all]
    [clansi :refer :all]
    [puget.printer :as pug :refer [cprint]]
    [clojure.pprint :as pp :refer [print-table]]
    [zprint.core :as z]
    [lambdaisland.deep-diff :as ddiff]
    [semantic-csv.core :as scsv])
  (:import [lambdaisland.deep_diff.diff Mismatch]))
#2019-10-2212:24onetomthis is a deep-diff printer with color customisations which make it readable in the cursive repl on a light theme:
(defn print-ddiff
  ([ddiff] (print-ddiff 80 ddiff))
  ([width ddiff]
   (->> {:width width}
        ddiff/printer
        (ddiff/pretty-print ddiff)
        (pug/with-options
          {:color-scheme {:number [:blue]
                          :string [:underline :black]}}))))
#2019-10-2212:27onetomuse as
(print-ddiff
  (ddiff/diff
    {:a 132 :B {:c "asd" x: 'y}}
    {:a 999 :bb {x: 'z} :extra "data"}))
#2019-10-2213:00onetomThe other thing I use often is this little sequence sampler fn:
(defn ?? [n] (juxt count (partial take n)))
(def ? (?? 4))
and in combination with clojure.data/diff for example:
(->> [big-seq-1 big-seq-2]
   (map set)
   (apply data/diff)
   (take 2) ; if we don't care about the common elements
   (map ?))
it's very useful, until cursive's pretty printer won't limit the dimensions of the printed expression evaluation results
#2019-10-2213:07onetom(the ansi escapes are garbled sometimes though, but it's usable enough, so i haven't bothered with finding a minimal repro case yet)#2019-10-2208:44flowthingAlso, I got to thinking a while back about whether it would be possible tap> values and have them appear in the Cursive GUI. Something like a built-in clojure.inspector (or mini-REBL).#2019-10-2208:45cflemingYes, once I have the REPL-to-IDE channel established it should allow all sorts of nice things along those lines, similar to a REBL in the Cursive GUI.
#2019-10-2208:48flowthingI don't want to take up much of your time with this, but I'm kinda curious about the approach you've considered for the REPL-to-IDE channel. I toyed with the idea of creating something like that myself, but I wasn't sure how to accomplish just that. My first thought was establishing a pREPL server at the IDE end and sending data that way, but I'm not sure whether that would be a viable option.#2019-10-2209:27cflemingWhat I’m planning is for REPL protocols using framing (nREPL, and what Cursive’s new socket REPL uses, would work for prepl too), I can send messages back as part of an evaluation.#2019-10-2209:28cflemingSo the commands like pprint and diff will just send messages back to the IDE over the standard REPL channel. The challenge is that the mechanism for doing that is REPL specific.#2019-10-2209:29cflemingprepl already has something like this - the REPL client will receive messages from tap>#2019-10-2209:29cflemingBut that’s hard-coded in the prepl impl.#2019-10-2209:30flowthingGotcha, makes sense. :thumbsup:#2019-10-2208:46flowthingAwesome! Very glad to hear it. Something like that would be really helpful for debugging, especially combined with the data structure diffing capability you mentioned.#2019-10-2210:39demusHi! Can I start a lumo repl from Cursive? or just connect to a started one?#2019-10-2211:51flowthingI think you want https://github.com/mfikes/tubular/blob/master/README.md#2019-10-2212:23demusI works 🎉 thanks!#2019-10-2223:55cflemingFor those users who have reported problems with dependency completion (@tap, @dazld and others), it does appear to be extremely funky in IntelliJ 2019.2 and 2019.3. I must have tried to reproduce on 2019.1, my apologies. I’m going to contact JetBrains to figure out what’s going on.#2019-10-2502:08tapUpdated to eap7. Do I have to do anything to provide useful data to the debug logging you added?#2019-10-2507:03cflemingNo thanks - I’ve actually figured out the problem (or at least, reproduced and diagnosed it): https://youtrack.jetbrains.com/issue/IDEA-225412#2019-10-2507:04cflemingSo now I’m just waiting on JetBrains to get back to me.#2019-10-2507:05cflemingeap7 contains no changes for this in the end. Assuming they can help me out hopefully eap8 will contain fixes.#2019-10-2507:26tap👍#2019-10-2308:37Ivar RefsdalWhen I import a deps project, the default name is "Imported from deps", which is not too useful. I believe this was not always the case. I'm using Cursive 1.9.0-eap6-2019.2 and Idea Ultimate 2019.2.3. Is this a regression? Thanks.#2019-10-2321:30skelterI am frequently bitten by issue 2197 .#2019-10-2322:32cfleming@skelter That is fixed in the current EAP, see https://cursive-ide.com/userguide/index.html#eap if you’d like to try it.#2019-10-2407:42akondi know that cursive is not an open source, but my quest is to write a simple plugin for intellij in clojure.#2019-10-2407:43akondi am here for clues#2019-10-2408:28cfleming@akond It’s (mostly) possible, but it’s very annoying and in general in my opinion not worth it.#2019-10-2408:28cflemingThey don’t mix very well.#2019-10-2408:29cflemingIs this for something you would want to release, or for a hobby project?#2019-10-2408:35akond@cfleming a hobby.#2019-10-2408:37akondi was afraid of that. my second choice is kotlin then.#2019-10-2408:37cflemingI highly recommend Kotlin.#2019-10-2408:37cflemingIt’s a nice language, and the whole path to using it for IntelliJ plugins is (unsurprisingly) very smooth.#2019-10-2408:39cflemingBuilding a plugin using Clojure is annoying - you really want to use Gradle since there’s a lot of tooling there, but the Clojure Gradle story is still experimental. I used a plugin I hacked together myself, that later became Clojurephant but I don’t know what the status of that is.#2019-10-2408:39cflemingIt’s also tricky to get your classes loaded correctly, Clojure is inflexible in which classloader it lets you use.#2019-10-2408:41cflemingAnd extending abstract classes in Clojure is really foul. I run a fork just to make that palatable (see https://docs.google.com/document/d/1OcewjSpxmeFRQ3TizcaRRwlV34T8wl4wVED138FHFFE/edit?usp=sharing), and that also helps with the classloader issue.#2019-10-2408:42cflemingAll in all, Kotlin is much easier unless you’re extremely bloody minded 🙂#2019-10-2408:43akondi really like clojure, but i am also practical. thank you for your help.#2019-10-2413:29heliosi thought cursive added support for resolving vas using import-vars from potemkin, but it doesn't seem the case 😞#2019-10-2413:31heliosthis is rewrite-clj.zip namespace from https://github.com/xsc/rewrite-clj/blob/master/src/rewrite_clj/zip.clj#2019-10-2423:30cfleming@helios It should do. What’s the FQN of the import-vars you’re using there?#2019-10-2423:30cflemingIt should be either potemkin/import-vars or potemkin.namespaces/import-vars.#2019-10-2500:36cfleming@helios Ah, I see the problem (after finally opening your link) - it looks like rewrite-clj has vendored potemkin as rewrite-clj.potemkin. You should be able to fix that by using Resolve As… potemkin.namespaces/import-vars (see https://cursive-ide.com/userguide/macros.html#customising-symbol-resolution)#2019-10-2506:57heliosso i need to resolve it as "potemkin/import-vars" ?#2019-10-2507:02cflemingYes, either that or potemkin.namespaces/import-vars#2019-10-2507:02cflemingThey’re just aliases for the same thing IIRC#2019-10-2806:53heliosthank you! 🙂#2019-10-2806:53heliosdid you need to add "manual" support for that or cursive infers it from the defmacro directly?#2019-10-2822:03cflemingI needed to teach Cursive about it.#2019-10-2822:04cflemingThere’s really no good way to automatically determine what arbitrary macros do.#2019-10-2506:26tekacsI have a variation on the resolution issue, I’m guessing/hoping a naïve one — in my shadow-cljs/deps.edn project, I’m finding that nothing based upon the (js/ namespace resolves. I do have a clojurescript dependency explicitly listed and for what it’s worth, trying to ‘Go to definition’ (Cmd+Click) on js leads nowhere (although the hover-box reads alias "js"). These are my shadow-cljs.edn and deps.edn files: https://gist.github.com/tekacs/ddbf8536846c52138d3bbeca6f736ebd Might anyone be able to tell me what I’m missing? 🙂#2019-10-2517:18tekacs@thheller solved this in #shadow-cljs. Thanks! He pointed out that Cursive doesn’t support js/ — that works for me, since I have little use for it and I’ll just keep it to a few places, as nice as it would be to have that function (it works well in Scala.js which has explicit bindings matching MDN, but I understand why it would not here). :)#2019-10-2512:48danierouxHow do I do a “Raise All”? Turn this:
(try
  (fn-1)
  (fn-2))
(catch Exception e
  (println "Oops"))
Into
(fn-1)
(fn-2)
Just Raising (fn-1) deletes the forms following it, and thus kills (fn-2).
#2019-10-2512:50danierouxActually, getting to this is what I want. Raise the two forms out of the try (or do, or let, or …)
(fn-1)
(fn-2)
(catch Exception e
  (println "Oops"))
#2019-10-2512:56Alex Miller (Clojure team)+1 - seems like this is the behavior I got in emacs paredit but don't have in cursive and it still throws me off sometimes#2019-10-2514:06sgerguriNot sure if there is a way to do that - the way I do it is in two strokes - Alt+S to splice the try, then kill the leftover try on that line (I use the Vim plugin so that's DD for me subsequently).#2019-10-2514:09sgerguriOn a somewhat unrelated note, even after so many years editing Clj is such a drug that writing anything other than a Lisp always feels incredibly cumbersome.#2019-10-2514:50onetomi've settled on the alt-s(plice) approach; it feels like unnecessary overhead to learn extra shortcuts for a not so frequent operation when it's quite trivial to compose from simpler primitives#2019-10-2517:18tekacs@thheller solved this in #shadow-cljs. Thanks! He pointed out that Cursive doesn’t support js/ — that works for me, since I have little use for it and I’ll just keep it to a few places, as nice as it would be to have that function (it works well in Scala.js which has explicit bindings matching MDN, but I understand why it would not here). :)#2019-10-2523:03nmkipIs there an evaluate and print in the editor command?#2019-10-2523:25sogaiudo you mean something like (with a connected repl): • put cursor after an expression in the editor • bring up context menu, say by right-clicking • choose the REPL submenu • choose "Send '<code>' to REPL" (here, alt-shift-p shortcuts the process) ?#2019-10-2523:28sogaiuin the case i was testing, there were two menu items that were labeled the same, but it appears the second one is labeled 'Send form before caret to REPL' under other circumstances -- not sure how the two differ.#2019-10-2523:29sogaiumay be the first one detects the top-level form corresponding to where the cursor / caret is -- except if that top-level form happens to be (comment ...), in which case it looks lower, skipping other containing comment forms...or something like that 🙂#2019-10-2523:31sogaiufrom testing it appears to look upwards starting from where one's caret / cursor is#2019-10-2523:42nmkipHi sogaiu 😄#2019-10-2523:43nmkipI want to evaluate a form in the editor and to get the answer also there
(+ 1 1)
;; 2
#2019-10-2523:43nmkipin a comment#2019-10-2523:46sogaiuah, i don't know how to do that ordinarily, but i do see something similar while using the debugger.#2019-10-2600:48cfleming@danie @alexmiller So “Raise all” would raise the current form and all its siblings, right?#2019-10-2600:50cflemingSeems like that would mean that:
(defn x "Some doc" [x y]
  (println "Doing something")
 |(process x y))
would result in:
defn x "Some doc" [x y]
(println "Doing something")
(process x y)
Is that right?
#2019-10-2606:25danierouxIt would result in:
(process x y)
  
And
(try
    (fn-1)
    | (fn-2)
    (fn-3))
  (catch Exception e
    (println "Oops"))
  
In
(fn-2)
  (fn-3)
  (catch Exception e
    (println "Oops"))
  
#2019-10-2608:06p-himikIsn't it "Slice Sexp Killing Backwards" under Edit -> Structural Editing?#2019-10-2608:06p-himikIf so, you can just assign any shortcut you like to it.#2019-10-2613:06danieroux@p-himik it is indeed “Splice Sexp Killing Backwards”! Thank you. /cc @alexmiller @cfleming#2019-10-2600:50cflemingIn your example, why wouldn’t the try symbol also get promoted, since that’s a sibling too?#2019-10-2600:51cfleming(not trying to be combatative, just trying to understand how it should work)#2019-10-2606:37danierouxIt’s the subsequent forms, not the sibling forms. And thank you for trying to understand 🙂#2019-10-2613:06danieroux@p-himik it is indeed “Splice Sexp Killing Backwards”! Thank you. /cc @alexmiller @cfleming#2019-10-2718:42kennyIf I have the keyword ::foo/bar and no alias named foo in my namespace, could ::foo/bar be underlined in red?#2019-10-2719:44cfleming@kenny Yes, definitely. I’ll add that, I’m making a list of useful inspections to add.#2019-10-2719:45kenny@cfleming Do you have the list public anywhere? Happy to comment other items that may be useful.#2019-10-2722:31cfleming@kenny No, I don’t, but I’ll write it up in an issue and post the link here.#2019-10-2800:30nmkipCan someone help me setup intellij to run tests?#2019-10-2801:51salam@juan.ignacio848 did you have a chance to take a look at this? https://cursive-ide.com/userguide/testing.html#2019-10-2801:51nmkipyes#2019-10-2801:52nmkipI couldn't find the "run tests in current NS in REPL" option#2019-10-2801:52nmkipI'm currently running them using clj -Atest:runner#2019-10-2801:52nmkipin a terminal#2019-10-2801:53salamyeah, that's another way of running tests. in fact, if you haven't tried it yet, i highly recommend https://github.com/lambdaisland/kaocha#2019-10-2801:56nmkipThanks 🙂 I'll check it#2019-10-2801:56salamas for "Run tests in current NS in REPL", it's avaiable only when a cursive repl is running (as with any other cursive context menu items.)#2019-10-2801:56nmkipI have a running repl but not nREPL#2019-10-2801:57nmkipI'm using REBL so in my repl run configuration I have the option clojure.main checked#2019-10-2801:58salamah, clojure.main repls don't support running clojure.test tests (yet)...#2019-10-2801:58nmkipCan I have both REPLs at the same time?#2019-10-2801:59nmkip😛#2019-10-2802:00salami can't see why not even tough i've not tried myself. it guess, it's just a matter of running multiple repls in multiple tabs.#2019-10-2802:02salami use nrepl with deps.edn and here's what my alias looks like in my deps.edn:
:aliases {:cider {:extra-deps {cider/cider-nrepl {:mvn/version "0.22.4"}}
                   :main-opts ["--main" "nrepl.cmdline"
                               "--middleware" "[cider.nrepl/cider-middleware]"]}
and on the command line i can start a nrepl with: clojure -A:cider and have cursive connect to it.
#2019-10-2802:04salamyou may also have cursive start a "local" nrepl using that alias, works pretty well.#2019-10-2802:04nmkipIf I run a repl with nREPL option I can run the tests through cursive#2019-10-2802:06nmkipOk, I can have both repls up#2019-10-2802:06nmkip🙂#2019-10-2802:06salamnice, good to know#2019-10-2802:06nmkipNow I need a shortcut to run the tests 😛#2019-10-2802:13salammy key bindings on macos (just for reference): Run a single test (under caret): Ctrl + Shift + ; Rerun Last Test: Ctrl + ; Run All Tests in NS: Ctrl + Alt + ;#2019-10-2802:27nmkipThanks for the reference 😄 I will add keybidings to those actions#2019-10-2815:16onetomI'm just using cmd-shift-a "test" in a repl namespace and pick from the menu, either run all tests in current NS or just the one under the cursor, then i can re-run the latest test with cmd-r if i change the test or the implementation. It works from the implementation namespace too.#2019-10-2815:56nmkipI added key bindings to the three testing actions#2019-10-2816:40kennyCursive isn't updating deps.edn dependencies for me anymore. After I click the refresh button, it will do "Reading projects" for a bit and then produce the 9:39 AM 'Deps: day8.re-frame/re-frame-10x:0.4.4' already disposed: --------------Creation trace: exception. This may have been happening in https://clojurians.slack.com/archives/C0744GXCJ/p1571418088107600 as well. I can notice it this time because I switched a dep from :git/url to :local/root and it isn't changing the classpath -- the dep is stuck on the git version.#2019-10-2822:06cflemingHmm, yeah, this must be related to the other errors you’re seeing. I’ll dig through those stacktraces and see what I can see.#2019-10-2816:43kennyIf I switch the REPL to "Run with Deps", I can at least get the dependency to become a local/root. Cursive won't resolve any new/added symbols from the local/root dep & doesn't do the nice auto-reload changed files for the dep (I need to manually to require :reload)#2019-10-2817:41wilkerlucio@cfleming one question about the debugger, I notice when I add a breakpoint on some line, it seems to stop in that line more times than I expect, for example, I created a line that prints something out, when I run the fn, I see that print happening only once, but the debugger stops in the same line 3 times (when I hit play to keep running), is this expected?#2019-10-2822:07cflemingYes, that can happen. It’s because of macroexpansion - macros expand to a bunch of code that’s all marked as coming from the same line. I’ve been meaning to investigate how to make the debugger handle that but I haven’t gotten around to it.#2019-10-2822:09cfleming@onetom I do something similar using Preferences | Appearance &amp; Behavior | Quick Lists. I have one called Testing which looks like this:#2019-10-2822:10cflemingThen I just bind a single easy shortcut to that (cmd-shift space) and invoke it, and then select the action I want:#2019-10-2822:48tony.kay@cfleming The latest EAP, when using local/root in deps, does not auto-add the module…was that an intentional change?#2019-10-2823:02cfleming@tony.kay Actually, it hasn’t done that since the new integration, but it’s on my list to fix.#2019-10-2823:27tony.kayok, thx#2019-10-2916:03dazldis it safe to update to intelliJ 2019.2.4?#2019-10-2916:03dazld#2019-10-2919:08joaohgomesIs anyone using add-lib successfully in Cursive? http://insideclojure.org/2018/05/04/add-lib/#2019-10-2921:25grzmRecently, I've noticed that the Cursive REPL is no longer automatically in the namespace of the file from which I'm calling Send ... to REPL. I noticed it after updating to 1.90-eap6-2019.2.#2019-10-2921:27grzmThis used to work: until last week or so I didn't even know about the Switch REPL NS to current file command, and I've been using Cursive for well over a year now.#2019-10-2922:31cfleming@grzm Yes, someone mentioned that the other day as well. I haven’t had a chance to investigate it, but it’s strange because that code hasn’t changed in ages.#2019-10-2922:31cfleming@dazld It should be, yes.#2019-10-3005:18jvtriguerosDoes anyone know how to prevent the search history window from opening on the secondary monitor? I think it happens when I have something in history that was really long, like a JSON object.#2019-10-3016:53tanzoniteblackhas anyone had any luck setting up tools.deps on a windows machine using git over ssh dependencies?#2019-10-3016:53tanzoniteblackI'm not sure how to force it/windows/intellij to use an ssh-agent that has my key unlocked#2019-10-3016:56Alex Miller (Clojure team)on windows, I think it will use putty, not ssh-agent#2019-10-3016:56Alex Miller (Clojure team)at least, that is the intent#2019-10-3017:01tanzoniteblackthanks, I'll try setting that up and see if it works#2019-10-3021:16tanzoniteblackN.B. this did in fact fix it#2019-10-3021:16tanzoniteblackso thanks!#2019-10-3021:31Alex Miller (Clojure team):thumbsup:#2019-10-3115:50ssdevHello folks, I'm currently trying to debug a ring webapp and curious if it's possible to use linebreaks in cursive with an http request. I'm fairly new to cursive and clojure, so not sure of a good local dev setup for this. Maybe what I'm hoping for isn't possible, but I was hoping that if I hit the local url with a curl I'd be able to step through the functions. Is that a thing I can do?#2019-10-3116:37salam@ssanders i haven't tried this myself but it seems possible to do that. take a look at this: https://stackoverflow.com/questions/56300204/how-to-debug-a-clojure-web-application-in-intellij#2019-10-3117:04ssdevThanks. That's interesting. So, I'm not using Leiningen, it's a deps.edn setup, so I'm looking at the section about "without leiningen" I actually have it set up like it's described there, but not seeing the linebreaks fire when I hit the localhost.#2019-10-3122:03salamdid you start the cursive repl in debug mode and start your app from within that repl? #2019-10-3118:29joaohgomes@ssanders, if you have the chance, check scope capture. It’s a different debugging experience based on Stuart Halloway REPL debugging post: http://blog.cognitect.com/blog/2017/6/5/repl-debugging-no-stacktrace-required https://github.com/vvvvalvalval/scope-capture#2019-10-3120:49ssdevThis looks promising. Thanks @U4WS1443F#2019-11-0100:11cfleming@ssanders Yes, you can do this. I don’t have much documentation for this yet, but I spoke a couple of years ago about the debugger, and I demo exactly what you’re asking about: https://www.youtube.com/watch?v=ql77RwhcCK0#2019-11-0101:54ssdev@U0567Q30W thanks for this. I actually watched this video (most of it) a few weeks ago and have been loving the use of the debugger in cursive. My particular use case though, hasn't been seeming to work.. if I set up a super simple ring web server and place a linebreak in the editor, then use a curl to hit the server, I can see the response in the terminal where I issued the curl command, but I don't see the linebreaks stopping the code execution. Think I may be missing something super obvious but can't put my finger on it#2019-11-0101:55cflemingDo you see the breakpoint being active in the gutter? If IntelliJ can’t find the corresponding bytecode to the line, it’ll be like a grey crossed out circle.#2019-11-0101:55ssdevIt does look like it's getting greyed out once I start the debugger#2019-11-0101:56ssdevIs there a way to help intellij find the bytecode?#2019-11-0101:56cflemingOne thing to try is setting the breakpoint, then starting your app and then re-loading the file containing the breakpoint.#2019-11-0101:57cflemingThat will cause Clojure to re-compile the file exactly matching what’s in your editor.#2019-11-0101:58cflemingRe-loading the file is also required if you’ve just switched locals clearing off.#2019-11-0102:03ssdevIt's weird. The second I send the file to the repl I see a red message in the repl window and then the line break goes away.
Loading src/clj_ring/core.clj... 2019-10-31 22:00:13.209:INFO::nRepl-session-99305752-ae04-43f3-bf11-5b9398ba6c43: Logging initialized @17709ms to org.eclipse.jetty.util.log.StdErrLog
#2019-11-0102:04cflemingHmm, that’s very strange.#2019-11-0102:05cflemingDebugging can be very strange, and I can’t always explain what I see either, but that sounds stranger than usual.#2019-11-0102:05ssdevI'm actually just trying it with a simple hello world -
(ns clj_ring.core
  (:use ring.adapter.jetty))

(defn handler [request]
  {:status 200}
  :headers {"Content-Type" "text/plain"}
  :body "Hello World")

(run-jetty handler {:port 8080})
#2019-11-0102:06cflemingWhere are you putting the breakpoint? On the map inside the handler?#2019-11-0102:07ssdevyeah, or .. on the defn handler line#2019-11-0102:07cflemingTry doing something like:
(let [result {your map here...}]
  result)
#2019-11-0102:08cflemingAnd then putting the breakpoint on the let line. I’m actually not sure what executable bytecode Clojure generates when just returning a constant map like that.#2019-11-0102:09cflemingThere may not be enough for the debugger to hang off.#2019-11-0102:10cflemingIIRC constant maps are generated just as constants in the class pool, and the code to return that may not be generated with line info.#2019-11-0102:13ssdevblerg. no luck there#2019-11-0102:13cflemingWould you mind uploading your hello world project to GH or somewhere so I can try it out?#2019-11-0102:14ssdevsure thing#2019-11-0102:25ssdevhttps://github.com/scottsandersdev/cursive-ring#2019-11-0102:36cflemingThanks, give me a moment to wrap up what I’m doing.#2019-11-0102:37ssdevAbsolutely. Thanks for your help#2019-11-0102:52cflemingYou’re right, I cannot for the life of me get that to stop in the handler.#2019-11-0102:53cflemingI made a few changes, I put your run-jetty in a comment block like this:
(comment
  (jetty/run-jetty handler {:port 3000 :join? false}))
#2019-11-0102:53cflemingThat then means that it won’t run Jetty and block until it finishes when you load the file.#2019-11-0102:54cflemingSo you can then reload the file, and just use “Run top form” to start the Jetty server. It won’t block when you execute that because of the :join? false so you can then continue to use the REPL.#2019-11-0102:56cflemingOhhh#2019-11-0102:56cflemingI see the problem#2019-11-0102:57cflemingYour namespace is called clj_ring.core - it should be called clj-ring.core.#2019-11-0102:57ssdevoh no#2019-11-0102:58cflemingSo when Clojure compiles, it can’t use - in package names because Java. So it maps them to _. But that’s a lossy transformation, so Cursive (and a lot of other tooling) assumes that when it sees a compiled class with an underscore in the name, that it comes from a namespace/function with a dash in the original name.#2019-11-0102:59cflemingThere’s no way to tell which of the two the original was named.#2019-11-0102:59cflemingI need an inspection to warn about that, clearly.#2019-11-0103:00cflemingYou can just change the name in the ns form, and then everything works. The name of the directory on the filesystem should remain the same (with _)#2019-11-0103:00ssdevno no, that's something I should have seen, I'm just extreme noob. But I've just changed that and still seeing the line break getting greyed out, is that not happening for you?#2019-11-0103:00cflemingDid you re-load the file after changing the name?#2019-11-0103:02cflemingWait a minute, I’m now not seeing it work either.#2019-11-0103:02cflemingI swear that worked a minute ago.#2019-11-0103:02ssdevweird#2019-11-0103:06cflemingOk, if I completely shut down and then re-start the REPL, it works for me.#2019-11-0103:06cflemingThere must have been something a bit funky in the debugger state.#2019-11-0103:09cflemingThere’s still something weird going on, though. It now makes my breakpoint into a circle with a tick, which means that it’s found the bytecode corresponding to the line information. But when I hit the server it doesn’t stop.#2019-11-0103:11cflemingOk, here’s what’s going on. When the server is started, it must be getting the actual function instance of the handler function rather than the var, and caches that. So then when I re-load the namespace, that function object is not updated.#2019-11-0103:11cflemingIf I re-start the server, it then stops correctly.#2019-11-0103:12ssdevIt's weird I still haven't been able to make it stop#2019-11-0103:13ssdevAnd yes, I think I should have been more descriptive, I think that's the same circle logo I'm seeing - with a tick#2019-11-0103:14cflemingThis is what the breakpoint should look like.#2019-11-0103:15cflemingSo I have seen it stop, but I can’t make it do it again.#2019-11-0103:15cflemingThere’s something strange going on, but I don’t know what.#2019-11-0103:16cflemingI thought that by passing the var (`#'handler`) to run-jetty that it would then re-load since it will then look up the function every time it’s invoked.#2019-11-0103:16cflemingSimilarly with what I’m doing there delegating through handler-fn.#2019-11-0103:16cflemingBut neither of those work reliably.#2019-11-0103:19cflemingOk, it’s something to do with the let block, for some reason.#2019-11-0103:19cflemingHere’s what works for me. Make sure you pass the var itself to run-jetty like this:
(comment
  (def server (jetty/run-jetty #'handler {:port 3000 :join? false})))
#2019-11-0103:20cflemingThat will cause the function stored in the handler var to be looked up each time it’s called, which will allow you to re-load the code without restarting the server.#2019-11-0103:20cflemingThen, if I make my handler look like this:
(defn handler [request]
  (println "Hello")
  (let [result {:status  200
                :headers {"Content-Type" "text/plain"}
                :body    "Hello World"}]
    result))
#2019-11-0103:21cflemingThen it will break reliably on the println line.#2019-11-0103:21ssdevoh snap, I see it now.#2019-11-0103:21cflemingI guess the code generated for the let returning a constant map doesn’t generate any line numbers in the bytecode or something.#2019-11-0103:21ssdevBut weird that the let isn't working... yeah#2019-11-0103:22cflemingLet me know if that works for you.#2019-11-0103:22ssdevbut yeah this works for me, I can totally use it in my project. Just need a way to step in.#2019-11-0103:22ssdevThanks a mil!#2019-11-0103:26cflemingNo problem! That was a combination of weird things. Once you have some actual code in your handler, everything should hopefully work.#2019-11-0100:16sogaiuthe debugger is wonderful 🙂#2019-11-0100:19cfleming@sogaiu Thanks, I also like it 🙂#2019-11-0100:19cflemingI use it all the time.#2019-11-0100:19sogaiuit's really great for learning about clojure internals too! it's a gem of the clojure tooling world, imho.#2019-11-0108:40dmarjenburghI have a maybe slighty annoying request. Whenever you paste text that has some html tags, Cursive shows a popup asking to convert it to Hiccup. This seemed like a nice unexpected feature, but I paste HTML multiple times a day, but don’t use hiccup at all, so I have to click away the alert every time. It would be nice to have the option to not show it again or something…#2019-11-0109:53onetomI'm guessing, that is a so called Intention which you can disable in preferences, although when I search for hiccup in preferences, nothing turns up 😕#2019-11-0120:39cflemingNo, it’s not an intention. I’ll add the ability to disable that.#2019-11-0120:40cfleming@U05469DKJ Would you prefer the ability to convert to something other than hiccup? Why are you pasting HTML into Clojure code?#2019-11-0121:39dmarjenburghWe are storing user created content, which is rich formatted text. This is stored as simple HTML (just some <p>,<b>,<i>,etc tags). I often copy and paste an example input in the REPL.#2019-11-0121:39dmarjenburghI don’t need to convert it. An option to disable it would be great#2019-11-0122:56salaminstead of converting html into hiccup automatically (and having an option to enable/disable it), it would be great if cursive offered a context menu item such as "Paste HTML as Hiccup", something like this: https://support.office.com/en-us/article/Paste-Special-e03db6c7-8295-4529-957d-16ac8a778719#2019-11-0203:58cflemingI could do that, but I think it would affect the discoverability. I could perhaps have both, where the explicit “Paste as Hiccup” option wouldn’t prompt, and the prompt for the standard paste could have a “Don’t ask me this again” option.#2019-11-0114:08Ben Hammondis there a way to interrupt the repl from displaying the last form I pressed 'Interrupt Current Evaluation` button and now I'm waiting for e n o r m o u s form to be written to the repl a 'don't bother writing the rest of tthis to the repl` button would be extremely helpful#2019-11-0120:40cflemingYes, that’s https://github.com/cursive-ide/cursive/issues/2100#2019-11-0120:41cflemingWell, rather, no, there isn’t a way to do it, but it’s something I’m going to add 🙂#2019-11-0114:09Ben Hammond(I'm going to kill that repl java process now)#2019-11-0114:12Ben Hammondmaybe I should just auto-set https://clojure.github.io/clojure/clojure.core-api.html#clojure.core/*print-length*#2019-11-0122:07Adrian SmithHow do I get cursive to start understanding some of these symbols?#2019-11-0122:10Adrian Smithoh the pom file from running shadow-cljs pom and then the mavern plugin has helped somewhat#2019-11-0122:15Adrian Smithoh and I think from the sounds of it I need a fake project.clj for cursive to understand what a phaser is?#2019-11-0219:18p-himikI also use shadow-cljs, and I find it much easier to work with Cursive when I use deps.edn and add :deps true to shadow-cljs.edn.#2019-11-0320:31cfleminghttps://twitter.com/CursiveIDE/status/1191090096323219457#2019-11-0320:31cflemingDependency completion is finally fixed in recent IntelliJ versions!#2019-11-0403:56tapThanks!#2019-11-0501:23cflemingNo problem! Sorry that took so long. The underlying API is quite different now, so let me know if you find any problems.#2019-11-0322:48srollerI'd like to apply the keymap for Cursive on Windows in IntelliJ#2019-11-0322:49srollerI can find the menu entry. The documentation on the web might not be in synch with the latest version of IntelliJ?#2019-11-0322:49srolleri can't find#2019-11-0402:48srollerfound it under File->Settings->Keymap->Plug-ins->Cursive#2019-11-0413:19griersonHow do I get Cursive to ignore a deftest? Tried commenting it out but it still gets picked up by Cursive when running 'Run all tests in namespace'#2019-11-0413:25jumarI don't know how cursive is doing that but I guess the problem is that you've evaluated the namespace and didn't restart the repl after commeting out the test definition so it's still present.#2019-11-0413:26jumar[i'm using spacemacs] I normally use remove-ns for this.#2019-11-0413:26jumarbut frankly I don't need it that often#2019-11-0413:29griersonIve tried load file and sync file with REPL but still happending#2019-11-0414:05griersonJust restarted REPL and it worked. But if I uncomment test then comment again I get the same issue.#2019-11-0414:53jumarYep, as I suspected, it keeps the reference to the old test which is expected - not Cursive related I think, just a usual "gotcha" you get with REPL. You actually need to explicitly remove the definition from the running system, for which you can, e.g., use remove-ns (and then "load file" again)#2019-11-0416:37dmarjenburghAs a workaround, I comment out the testing forms using #_s. I guess you could make a repl command that refreshes the ns and bind it to a shortcut.#2019-11-0501:11cfleming@U3G3MBL9H Yes, @U06BE1L6T is correct I think, Cursive uses load-file which doesn’t completely remove the test NS and just loads the new state of the file on top of it. You can use remove-ns manually to do that. There’s an issue somewhere talking about this I think.#2019-11-0501:13cflemingActually, I can’t find one specific to tests, there’s one talking about using it for “Load file in REPL”.#2019-11-0501:13cflemingIt’s definitely been discussed before, perhaps in here or on the mailing list.#2019-11-0413:58borkdudehttps://twitter.com/PetrusTheron/status/1191301704203079680#2019-11-0413:59borkdude^ someone following instructions on how to use clj-kondo (a Clojure linter) in Cursive, but he's not able to get it all working. Maybe some of you could help.#2019-11-0414:13sogaiuhis screenshot doesn't show what he has for working directory btw, your screenshot on your editor-integration.md file has a value for scope (All Places) that appears inconsistent with the text description (Current File). Petrus Theron has the value corresponding to the text. in my tests, that value (Current File) works at least on some flavors of linux.#2019-11-0414:13sogaiuyou did mention the working directory, but he didn't seem to respond to that?#2019-11-0414:15sogaiui didn't try with clojurescript though.#2019-11-0414:16sogaiumay be he got it working?#2019-11-0415:03henrikI’m entirely new to Cursive (trying it out, finally!). What do I do with the unresolved typos?#2019-11-0415:09cjmurphyYou can alt-enter when your cursor is at the typo, then there will be an option to add the word to the project level dictionary. Another option is to turn the checking off.#2019-11-0415:10henrikSo, this dictionary is separate to namespace resolution? I.e., they can be resolved OK, and there’s still a typo because the word itself is unknown?#2019-11-0415:23cjmurphyYes that's it. I can't remember seeing defsc as a typo, and I guess ideally it would not be if you have resolved it to the fulcro namespace. But I assume you've already done that, as described http://book.fulcrologic.com/fulcro3/#_ide_integration.#2019-11-0415:26henrikYeah, indeed, and I’ve verified that the resolutions are set up in preferences. Unfortunately, this doesn’t seem to actually resolve the symbol in question.#2019-11-0416:37cjmurphyYes, doesn't add it to the dictionary at the same time. But it is a minor thing to add words to the dictionary and only takes a few seconds really. But it is quite powerful to have cursive know the special Fulcro symbols. For instance any defsc component can be searched for by name with ctrl-shift-alt-N, just as you would search for any other symbol.#2019-11-0501:17cflemingYes, there are two types of thing that get marked - one is just spell checking, like:#2019-11-0501:17cflemingThose you can just add to IntelliJ’s dictionary assuming you think the spelling is ok.#2019-11-0501:18cflemingThe other is symbol resolution, like this:#2019-11-0501:19cflemingThe fix for those is case-specific, sometimes you can use Resolve as…, sometimes it’s something being misconfigured, and sometimes it’s just something that Cursive doesn’t understand that I still need to fix - CLJS is particularly bad for this last category, I’m planning to work on that soon.#2019-11-0415:11borkdude@sogaiu It seems he was able to fix his problem#2019-11-0415:15henrikThis was fortuitous as it prompted me to set up clj-kondo for Cursive, which works well 🙂 (it goes a bit nuts with all the Fulcro macros, but I love it nonetheless)#2019-11-0415:18borkdude@U06B8J0AJ You can configure it to go less nuts with the macros using configuration: https://github.com/borkdude/clj-kondo/blob/master/doc/config.md#2019-11-0415:18borkdudeThanks#2019-11-0415:30henrikAh, neat. Seeing as more than one person is likely to use Fulcro etc., would you be open to PRs for “templates” of configuration for stuff like Fulcro?#2019-11-0415:31borkdudeVery much so. If you could post the config that works for fulcro here: https://github.com/borkdude/clj-kondo/issues/559#2019-11-0415:32henrikSure, I’ll just work out what that config would be first 🙂#2019-11-0415:19henrikA question regarding running multiple REPLs. I’ve set it up like follows: start an external REPL, courtesy of shadow-cljs, connect two REPLs to it, one in which I run (shadow/repl :client) to target CLJS. The other one is for CLJ. This works well enough, though it requires switching to the correct REPL when jumping between CLJ and CLJS. Is it possible to set this up to target the correct REPL automatically given the current file type?#2019-11-0501:20cflemingCurrently no, but I’m working on some REPL changes which will allow this (i.e. there will be a dual CLJ/CLJS REPL type).#2019-11-0600:01joaohgomes@cfleming, this new 1.9.0-eap8 is awesome. Nice work!#2019-11-0601:59cfleming@joaohgomes Great, thanks for letting me know! I’m glad it’s working well.#2019-11-0617:17Kari MarttilaIs it safe to update to IntelliJ IDEA 2019.2.4 with latest Cursive plugin (1.9.0-eap8)?#2019-11-0617:19souenzzoI'm using 2019.2.4 with eap8 🙂 @kari.marttila#2019-11-0617:20Kari MarttilaNo issues?#2019-11-0617:26Kari MarttilaUpdated... my precious IDEA+Cursive still working... good. 🙂#2019-11-0709:32coltnzis it just me or does the clj-kondo annotations not work with cursive anymore. I see the warnings in the log "warning: redundant let" but nothing on the code.#2019-11-0709:34coltnzon intellij 2019.2.4 and cursive eap8#2019-11-0709:41coltnzah ive found it, filewatchers got somehow disabled in inspections listing, as you were#2019-11-0713:17conanI have a problem indexing a project-local repository. The local repo is defined in my project.clj like this:
:repositories {"local" ~(str (.toURI ( "repo")))}
Intellij identifies the repo as Remote, and fails to index it (see screenshot), with the message Resource nexus-maven-repository-index.properties does not exist. This may not be a Cursive issue, but it used to work and with the latest versions gives the error. Any ideas? When it fails, it creates an empty .index folder in the repo/ directory of the project. As a result of this problem, Cursive doesn't prompt to generate stubs for the dependent library. The dependency is correctly resolved in the Cursive repl, and on the command line with lein repl. Cursive 1.9.0-eap8-2019.2 Intellij 2019.2.4
#2019-11-0721:36cflemingI remember adding support for this case, but I don’t remember the details. This has all changed at the platform level in 2019.2 so it’s probably as a result of that.#2019-11-0721:36cflemingI’ll see what is needed to fix this.#2019-11-0818:00conanThanks, I've tried every different way of installing the jar to the project-local repo, i've tried everything i can think of in terms of specifying the local repo location in the project.clj, but it always comes up as Remote and always fails to index.#2019-11-0714:41griersonAre there any tools like https://wallabyjs.com/ for Cursive? (continuous code coverage indicator within source code buffer)#2019-11-0715:24griersonI've tried downloading the trial version of IDEA Ultimate so I could try the Coverage but it's blank in the dropdown#2019-11-0715:25griersonI've only found this issue but it's from 2013 https://github.com/cursive-ide/cursive/issues/167#2019-11-0716:02griersonOr is there a way to integrate lein-test-refresh + cloverage + built-in Intelij Coverage indicator?#2019-11-0721:34cfleming@grierson No, Cursive doesn’t provide any good coverage integration at the moment, but I would like to provide it. I did a round of investigation a long time ago (also inspired by Wallaby, which is amazing). I think I would probably use a bytecode coverage engine rather than Cloverage since that will then also work for mixed language JVM projects, but it also has some limitations (more line-based than expression based).#2019-11-0810:00grierson@cfleming "Wallaby, which is amazing" it really is astounding. "I would like to provide it" is there a roadmap or do you have a ETA on it being implemented?#2019-11-1120:55cflemingNo, I’m afraid it’s strictly at the “would be lovely” stage at the moment, sorry.#2019-11-1516:10sooheonSorry, slack lost history, what is this wallaby referring to?#2019-11-1520:15cfleminghttps://wallabyjs.com#2019-11-0821:14dvingoNot sure if this is a question for datomic channel or not - but when requiring namespaces from datomic ions: [datomic.ion.cast :as cast] and [datomic.ion.lambda.api-gateway :as apigw], when using vars in those namespaces such as apigw/ionize, cursive highlights the symbol with "cannot be resolved". Anyone know a fix for this?#2019-11-1105:09onetomlooks like not many ppl are using ions here. im also just an on-prem user atm, but everything in datomic.api resolves for me. i was prompted to generate stubs and afterwards everything was resolving, though not instantly. it took about half a minute for the resolution errors to disappear in some of my already opened files.#2019-11-1114:04dvingoThanks for the reply - I figured stubs generation would be the thing, but it wasn't popping up. Do you know a way to trigger stubs generation manually?#2019-11-1120:24dvingolooks like the answer is here#2019-11-1120:24dvingohttps://cursive-ide.com/userguide/macros.html#stub-generation#2019-11-1120:24dvingoCurrently this is only supported for a hard-coded list of namespaces for projects which are known to be problematic.#2019-11-1120:54cfleming@U051V5LLP That’s right, but both namespaces you’re using are on that list. If you refresh your lein/deps project in the relevant toolwindow you should be prompted again to create the stubs.#2019-11-1121:01dvingo@cfleming awesome, thank you!#2019-11-1023:11carocadquick (newbie) question: is this guide still valid ? I followed it (without the template part) to get a cljs repl but although the script works it is stuck in “Prompt will show when Figwheel connects to your application”. How am I suppose to connect to it ? it is a node.js script https://github.com/bhauman/lein-figwheel/wiki/Running-figwheel-in-a-Cursive-Clojure-REPL EDIT: I got it working now with figwheel-main#2019-11-1113:15joelsanchezpsa: looks like the "Refresh Leiningen Projects" menu item has been removed, but you can use the Leiningen view to do that (View -> Tool Windows -> Leiningen)#2019-11-1121:18cflemingYou’re right, that should now be called “Refresh Build System Projects” but for some reason it’s not appearing.#2019-11-1121:20cflemingOh wait, I see what the problem is. For some reason that action is only available when invoking it from a project.clj/deps.edn file. That looks like a bug, I can’t think why that would be a useful restriction.
#2019-11-1209:10joelsanchezwell, I can't see it in the contextual menu for a project.clj file either, but I'm using the Leiningen view in the meanwhile#2019-11-1209:10joelsanchezthis is 1.9.0-eap8-2019.2#2019-11-1209:38cflemingHmm, I think it should be in that menu - I’ll check that tomorrow.#2019-11-1118:09wilkerluciohello, one thing I just realized, is that Cursive can't follow clojure specs that are not defined in the same namespace of the keyword, for example, if I have a file: src/my-proj/core.clj and inside I define (s/def :my-proj.a-different.namespace/something string?), Cursive can't find that definition when I try to jump for it, is this a known issue?#2019-11-1120:57cflemingNo, it’s not - could you file an issue about that?#2019-11-1121:08wilkerluciosure: https://github.com/cursive-ide/cursive/issues/2268#2019-11-1222:49Jakub Holý (HolyJak)It does actually work for me I believe. Though the ns I use doesn't really exist: :employee/id#2019-11-1312:24wilkerluciogood point, I remember those working as well, but when I use this with some long existent namespaces, them cursive is unable to follow#2019-11-1208:48flowthingIs there a way to start a tools.deps REPL from Cursive such that the alias definitions use -R:foo instead of -A:foo? I found this discussion from 2018 on the topic: https://clojurians-log.clojureverse.org/cursive/2018-10-04 I'm just wondering whether anything has changed since then, or whether there are plans to support it?#2019-11-1209:37cfleming@flowthing There’s no way to do it right now, but I’m open to being persuaded that there should be. I’m not sure that the alias separation that deps allows is a good idea in general though and I’d prefer to keep things simple - what’s your use case?#2019-11-1209:41flowthingAll right — it's not a super-big deal for me since I can think of a couple of ways to work around it (running an nREPL server from the command line and connecting to it from Cursive or having :main-opts in separate aliases)... but my use case is that I have aliases like :test and :sass which have both :extra-depsand :main-opts, and when I start a REPL from Cursive, I just want the deps. Having separate aliases is OK, but it feels sort of weird to have these aliases that don't work by themselves — you need to couple them with the dep-declaring alias.#2019-11-1209:41flowthingI wonder whether Cursive should ever take :main-opts in aliases into account when starting a REPL…?#2019-11-1209:43cflemingHmm, I’m not sure about that, I’d have to think about it.#2019-11-1209:43flowthingOne thought that occurred to me is that instead of (or in addition to) alias1,alias2, Cursive could allow just specying the full command line option that gets passed onto tools.deps (like -R:foo -A:bar) or something.#2019-11-1209:44flowthingBut I don't know how Cursive calls tools.deps, of course.#2019-11-1209:44flowthingAlso, I can see how that could be a source of weird errors.#2019-11-1209:44cflemingYes, I could probably do that, and for simplicity if only a bare alias is provided then that would be implicitly -A#2019-11-1209:44flowthingYes, that sounds good.#2019-11-1211:59Janne SauvalaI was also checking a few days ago if Cursive can start a REPL with -A: and -R: options. My use case was using REBL with nREPL middleware (that sends evaluated forms also to REBL, https://github.com/RickMoynihan/nrebl.middleware).#2019-11-1212:00Janne SauvalaIn the end I just started a separate nREPL and connected to it with Cursive#2019-11-1209:50borkdudeHas anyone used LSP with IntelliJ before? It seems to "kinda work", but not completely: https://github.com/gtache/intellij-lsp/issues/118#2019-11-1219:55cfleming@borkdude I haven’t tried it, no. In general the JetBrains guys have opted for not going down the LSP route. They decided against it in their Rust IDE, for example.#2019-11-1219:56cflemingWhile it does have obvious advantages, they felt that it didn’t allow them to give the level of support they wanted.#2019-11-1221:24borkdudethanks#2019-11-1315:37onetomis there a way to make the reporting of https://github.com/metosin/testit work with cursive? there is no Show diff... option in the failure popup neither clicking on the gutter icon shows a diff window#2019-11-1319:08miikkaIf it needs changes in testit, contributions are certainly welcome 😛#2019-11-1321:23cfleming@onetom @miikka I’ll take a look.#2019-11-1403:18onetomHere is an example how it looks like now running from both Cursive and directly from the REPL with (run-tests). If it's not something obvious to fix, then I guess it's less important than many other outstanding issues. My fallback plan is to use https://github.com/juxt/iota I hope that works better with Cursive#2019-11-1407:12caleb.macdonaldblackCan I stop this these warnings from showing up in a cljs repl?#2019-11-1507:58cflemingI’m not sure, I’ll try to reproduce that to see. What sort of REPL are you running?#2019-11-1418:27Lee BarneyI'm trying to split my code across files but when I use the load function at the end of my core.clj file the RPL throws an exception. I've used the in-ns function in the other file. Is there a different way to do this in Cursive?#2019-11-1507:58cflemingWhat’s the exception you’re seeing? That doesn’t sound Cursive-specific, but it might be. Usually you’d use namespaces and require rather than load-file.#2019-11-1507:26flowthingWhen I try opening one of my tools.deps projects, the window flashes on the screen and immediately closes. Stacktrace attached.#2019-11-1507:28flowthingDeleting .idea/workspace.xml is one workaround.#2019-11-1507:42flowthingIDEA 2019.3 BETA#2019-11-1508:00cflemingHmm, I’ll take a look at that and see if I can figure it out.#2019-11-1508:01flowthingThanks! Let me know if you need any additional info.#2019-11-1507:30deasHope, I'm not asking for too much, but I'd like to launch ClojureScript + Clojure repls at once so I can throw forms at them from .clj and .cljs buffers.#2019-11-1507:59cflemingNo, you’re not, but this isn’t easy yet. It’s the next major thing I’m planning to add to Cursive.#2019-11-1516:13sooheonThis along with auto-sending to the right kind of repl would be awesome 🙂#2019-11-1520:15cflemingYes, I’m definitely planning that.#2019-11-1507:33deasRunning a local nREPL with leiningen. Set up :dev :repl-options including piggieback middleware and CLJS repl launched from :init-ns.#2019-11-1508:00deasThis works but I have to wait for the Clojure repl connection to establish before I can start the figwheel repl using start. Once both repls are up. I need to change the dropdown clj/cljs to be able to send from corresponding buffers. Is this normal and expected today?#2019-11-1508:04deasGot one more issue. 😜#2019-11-1508:11deasFixed it myself. Sorry for the noise. 😂#2019-11-1516:21sooheonIs there an issue for addition “Send to repl…” command feature requests? I quite enjoy eval result to comment that lispy offers (see image). Multiple evaluations would overwrite comment. Calva has a display on the right side, cider also has a mode where results show and live update. These would be more difficult, but I think comments to file is a great simple solution.#2019-11-1520:56cflemingI’m planning to extend REPL commands to allow this, so that users can create commands with the behaviour they want.#2019-11-1520:56cflemingOtherwise there’s a combinatorial explosion of <ways to select form>/<what to do with the result>#2019-11-1520:57cflemingI’m also planning the overlay view like Calva, I have a PoC in a branch.#2019-11-1609:56sooheonAwesome, looking forward to it.#2019-11-1520:00dangercoderI have a maven project with the structure: src/main/clojure/example/core.clj the core.clj namespace is called example.core in my core.clj file and cursive warns about it. Is there any way to remove* the warning? 🙂#2019-11-1520:57cflemingWhat’s the warning you’re receiving?#2019-11-1521:09dangercoderthis @U0567Q30W#2019-11-1521:10dangercoderNamespace name does not correspond to file system hierarchy...#2019-11-1521:36cflemingWhat that means is that src/main/clojure isn’t a source root. Does the folder look blue in the project view?#2019-11-1521:37cflemingI seem to recall that the Maven Clojure plugin had a problem with this, and the IntelliJ Maven integration didn’t create source roots for whatever reason.#2019-11-1521:37cflemingYou might have to manually add an extra source folder in your pom.#2019-11-1521:57dangercoderthe src/main/clojure is not blue. but what comes next is. src/main/clojure/myproject#2019-11-1522:01dangercoderI solved it by going into Intellij and selecting the folder. Pressed: "Mark directory as: " 🙂#2019-11-1522:02dangercodernvm#2019-11-1607:57cfleming@UBN9SNVB4 The problem is that that will get reverted the next time you sync your pom.#2019-11-1615:49dangercoderI changed the structure of my project to be /src/clojure/myproject/core.clj instead and the problem went away 🙂#2019-11-1613:40potetmHas anyone seen this message when using a socket REPL?
class java.lang.IllegalArgumentException: No implementation of method: :out of protocol: #'cursive.repl/Handler found for class: nil
#2019-11-1613:41potetmI hit it the other day when working and fell back to using an nrepl. I haven’t taken the time to repro, but I thought it might be a known issue.#2019-11-1702:37cfleming@potetm No, I haven’t seen that, and it hasn’t been reported through the tracker. I’ll see if I can figure that out.#2019-11-1702:51potetmit happened any time I tried to print something out of a go loop#2019-11-1702:52potetmLike I said, I didn’t make a minimal repro, but that’s what I was doing at the time.#2019-11-1702:53potetmbasically something like (go-loop [] (<! (timeout 1000)) (println "foo") (recur))#2019-11-1715:33emccueIs there a way to have the stepper be triggered from the repl?#2019-11-1715:33emccueIf i run a main w/ debug it all works fine#2019-11-1715:33emccuebut clicking the debug icon on the repl doesnt seem to do anything#2019-11-1715:34emccue(im not sure what the intended behaviour is)#2019-11-1720:17cfleming@emccue That icon controls locals clearing: https://cursive-ide.com/userguide/repl.html#starting-a-debug-repl#2019-11-1720:17cflemingYou should be able to just run your REPL in debug mode.#2019-11-1804:13emccueThat literally changes everything - thank you#2019-11-1804:15emccueyeah wow i can't believe i lived without this#2019-11-1809:36cflemingNice, glad it’s helping 🙂#2019-11-1811:45miikkaHey, I have lost track with what's going on with Cursive... I'm still using IDEA 2019.1 and Cursvie 1.8.2-2019.1. Is it already safe to upgrade for deps.edn users?#2019-11-1822:01cfleming@miika Yes, it should be safe to upgrade both to latest versions and EAPs if you prefer. 1.9.0 is still in EAP but should be stable shortly (within a week, I just have a couple of minor bugs to get in the last EAP)#2019-11-1906:22miikkaCool, I’ll give it a go. #2019-11-1822:01cflemingWhoops @miikka ^^#2019-11-1902:38kennyI have a namespace foo.core with a map that looks like this
{::a 1}
In namespace foo.specs I define a spec for ::a:
(alias 'foo 'foo.core)
(s/def ::foo/a int?)
When in foo.core, I can't cmd+click on the ::a keyword to navigate to the spec definition. This seems like something that should be supported, right?
#2019-11-1912:33wilkerluciogot the same issue, reported at: https://github.com/cursive-ide/cursive/issues/2268#2019-11-1913:20flowthingAlmost every time I switch from IDEA/Cursive to some other window and then switch back, I find Cursive indexing the project. I found this pretty old link https://intellij-support.jetbrains.com/hc/en-us/community/posts/206808165-Indexing-on-focus on what seems like the same issue. The URL Colin links to at the end seems to be dead. Has anyone else encountered the same issue and found a fix?#2019-11-1920:32cfleming@U4ZDX466T I think this is probably the message in question: https://groups.google.com/d/msg/cursive/10KU4J6XdNI/9n2bIYytDAAJ#2019-11-1920:32cfleming(links got broken when I migrated to Google groups from my previous mailing list)#2019-11-1921:31flowthingMany thanks! I'll check whether that works in my case.#2019-11-1915:54funkriderHi - I am wondering if there was a way to view variables when debugging as clojure data structures rather than the somewhat confusing Java style variables?#2019-11-1920:33cflemingThere isn’t right now, but I’d love to allow this. It’s somewhat tricky because of the debugger architecture, but I’m hoping it may be possible. I haven’t had time to look into it more closely though.#2019-11-2019:29funkriderThanks for replying - it would be awesome but I can understand that it might be difficult to do 😉 Keep up the great work the plugin is awesome!#2019-11-2106:47onetomwhat was that trick to create some custom menu and assign a shortcut to it?#2019-11-2107:13salamquick lists? https://www.jetbrains.com/help/idea/settings-quick-lists.html#2019-11-2107:38onetomi just wrote a quick slack archive downloader generator in clojure just so i can search the chat logs for this 🙂
(let [days (fn [date] (iterate #(.plusDays % 1) date))
        start-date (LocalDate/parse "2019-11-10")
        slack-archive-base-url ""
        curl-cmd (fn [date]
                   (format "curl -o %s.html %s"
                           date (str slack-archive-base-url date)))]
    (keep (comp println curl-cmd) (take 10 (days start-date))))
#2019-11-2107:40onetomit generates curl commands like this:
curl -o 2019-11-10.html 
curl -o 2019-11-11.html 
curl -o 2019-11-12.html 
curl -o 2019-11-13.html 
#2019-11-2107:41onetomthen i can dump their content as txt with links:
for h in *.html; do links -dump $h > $(basename $h .html).txt; done
(which i just installed with nix-env -iA nixpkgs.links)
#2019-11-2109:28cflemingHaha, nice!#2019-11-2109:29cflemingThe feature is indeed quick lists. I use it for testing, but I could probably use it for a lot more if I thought about it.#2019-11-2204:46sooheonCan anyone confirm that Navigate > Test used work immediately without needing confirmation if a match existed? For the most recent few versions, Cmd-Shift-T always gives me a context menu, where the first choice has no effect. So if hit it in a impl file, I see a menu with two choices, where the first choice leaves me in the impl file, and the second option is what used to be default (Create new test…, etc)#2019-11-2204:51sooheonRelated issue: https://github.com/cursive-ide/cursive/issues/2235#issuecomment-557387736#2019-11-2305:46cflemingI’ll try to reproduce that.#2019-11-2209:50slipsetHo! I've been doing some refactoring work in cursive lately, mainly because Ciders find-usages is b0rken for our project.#2019-11-2209:51slipsetBut while find-usages is great, call-hierarchy (https://github.com/cursive-ide/cursive/issues/475) is really what I'm after.#2019-11-2209:51slipsetFrom a outsiders view, this should be somewhat trivial, as it's basically a recursive call to find-usages and displaying the tree?#2019-11-2307:43cflemingI suspect it might be a bit more than that, but I’m not sure how much more - I’ll take a look.#2019-11-2209:52slipsetAnd it would add much value for me 🙂#2019-11-2219:10Jakub Holý (HolyJak)Can I do something to stop Cursive complain about "cannot be resolved" on java-time's potemkin-imported vars from other jt namespaces? (i.e. there is java-time.seqs/iterate that is imported to be accessible via java-time/iteratebut Cursive doesn't get it, b/c it uses static analysis. See https://github.com/dm3/clojure.java-time/blob/master/src/java_time.clj#L8#2019-11-2219:55borkdudefwiw: https://github.com/borkdude/clj-kondo/releases/tag/v2019.08.21-alpha#2019-11-2220:01borkdudeI meant to say with that link: it is possible with static analysis, it just takes work.#2019-11-2305:44cflemingCursive does support this - the problem is that java-time vendors potemkin as java-time.potemkin.namespaces . I didn’t add support for the vendored version, and instead added stub support for the java-time namespace.#2019-11-2305:45cfleming@U0522TWDA Do you get a notification asking you to create stubs for that namespace? See: https://cursive-ide.com/userguide/macros.html#stub-generation#2019-11-2305:45cflemingIn fact, the example in the doc screenshots is java-time.#2019-11-2307:55borkdudeAh that makes sense. #2019-11-2312:57Jakub Holý (HolyJak)I do not as far I as remember, will look into it. Thanks a lot!#2019-11-2317:52Jakub Holý (HolyJak)@U0567Q30W How do I get Cursive to ask me to generate stubs for java-time? (II 2013.3.EAP of Oct 9th, Cursive 1.9.0-eap8-2019.3)#2019-11-2320:48cfleming@U0522TWDA It will prompt you in a notification. If you missed it you can open the Event Log, or if you refresh your Deps/Lein project it should prompt you again.#2019-11-2510:25Jakub Holý (HolyJak)@U0567Q30W That is perhaps the problem, I use Gradle (via https://github.com/clojurephant/clojurephant) because Clojure is only a small subproject of a bigger existing Gradle project. I have tried to re-import the Gradle project but it did nothing.#2019-11-2520:17cfleming@U0522TWDA It should still prompt you. When you look in the Event Log, do you see a notification there about it?#2019-11-2520:20Jakub Holý (HolyJak)No. I just did "Reimport Gradle project" from the Gradle view and there is nothing new in the event log.#2019-11-2520:31Jakub Holý (HolyJak)I have updated to the latest eap of Cursive and now in the events log there is "Stub generation required" so I initiated this. But if it wasn't for the update I would have to live without it...#2019-11-2520:33cflemingHmm, that’s strange. I’ll set up a Gradle project to test this and see if I can figure it out. I probably need an explicit “Re-check stubs” action.#2019-11-2413:14Philipp SiegmantelHallo, I'm getting a lot of unresolved variables in my ClojureScript project. Examples are js/AudioContext, the react, react-dom and create-react-class libraries. Does anybody know how fix this?#2019-11-2620:14cflemingI’m afraid there isn’t a good way right now, no. I’m planning to fix that soon though.#2019-11-2504:47cfleminghttps://twitter.com/CursiveIDE/status/1198825415436955648#2019-11-2504:54shaun-mahoodThis one looks lije a massive amount of work - thanks for slogging through all of those breaking changes for us!#2019-11-2507:15cflemingI’m definitely hoping not to have to re-do any more build integrations in the future!#2019-11-2520:24sogaiuis it correct that the latest cursive now has some socket repl support?#2019-11-2520:26cflemingYes, see: https://cursive-ide.com/userguide/eap/repl.html#remote-repls#2019-11-2520:26cfleming(the doc is still under EAP, I’ll get it published as the latest stable version today)#2019-11-2520:26sogaiutyvm!#2019-11-2520:28cflemingIt works more or less like prepl, so it’s not just a streaming REPL. So currently it’s only good for Clojure and not for anything that’s expecting a pure streaming REPL (e.g. Lumo, or something like that).#2019-11-2521:40sogaiuworking here so far :thumbsup: i watched the traffic, so i understand the bit about it being clojure-only. thanks for the warning.#2019-11-2521:48cflemingGreat. My plan is to have some more specific REPL types (CLJS etc) using the same mechanism, as well as support a pure streaming one for when it’s really needed.#2019-11-2521:50sogaiui have my fingers crossed for your plan 🤞#2019-11-2607:25flowthingIs there a way to stop sexp-splicing commands from copying spliced content into the clipboard?#2019-11-2620:13cflemingDo you mean the killing forwards/backward variants? No, I don’t think so, sorry.#2019-11-2710:48flowthingYes. exactly. But okay, thanks, good to know.#2019-11-2802:53onetomctrl-k is killing forward though and does insert the killed expression into the clipboard#2019-11-2617:21kennyWhen opening the Clojure Deps panel, Cursive will often think it needs to open all the IntelliJ modules rows. It appears to only expand Maven dependencies and the Tasks folders.#2019-11-2620:14cflemingI’m not sure I understand what you mean, can you clarify?#2019-11-2620:39kennyLike this#2019-11-2620:40kennyIt will do that for all modules. Haven't figured out what causes it to open everything.#2019-11-2620:37cjmurphyI'm using a clojure.main Deps REPL. I've recently started switching between namspaces ("Switch REPL NS to Current File"). I have a keyboard shortcut setup to do a (refresh)that is in the user ns. It doesn't work ('Unable to resolve symbol: refresh in this context') when I'm in a ns other than the user ns. I've set the "Edit REPL Commands" dialog to 'Execute in: Namespace: user'. Wanting to do a global refresh (tools.namespace thing), no matter what the current in-ns is.#2019-11-2620:51cjmurphyI used to have a reasonably efficient workflow just staying in the user ns and issuing commands from there. But that relied on namespace completion, which seems to have gone now (actually it hasn't, just need to "Toggle REPL Editor Type"). Hence this opportunity to get a more mainstream workflow...#2019-11-2712:07Ivar RefsdalHow about editing that shortcut to call (user/refresh) ?#2019-11-2712:08Ivar RefsdalI do a similar thing, except I just hit Ctrl-Alt-E and select (user/reset) or such#2019-11-2718:28cjmurphyGreat thank you @UGJE0MM0W that was it. I tried that before but must have been editing the wrong command.#2019-11-2719:06favilaI’m creating an EditorConfig file out of intellij; Clojure settings is listed as an option but it doesn’t seem to produce any properties. Does cursive support preserving its clojure-specific editor settings this way?#2019-11-2720:31cflemingSo I actually don’t know anything about EditorConfig. My understanding was that that was more for generic formatting details (spaces vs tabs and the like) - does it provide a mechanism to store custom data?#2019-11-2720:34cflemingHmm, yes, looking at the plugin it does provide extension points I could use. Could you file an issue for that support and I’ll look at it?#2019-11-2720:45favilahttps://github.com/cursive-ide/cursive/issues/2278#2019-11-2720:45favilathanks3#2019-11-2720:45cflemingGreat, thanks!#2019-11-2721:15cfleming@U09R86PA4 One thing though - as you note in the issue, these settings will only be read by Cursive, unless Emacs also supports EditorConfig and we can come to an agreement about the properties and their names etc. So you would essentially achieve the same thing by just using a project code style scheme so the files are shared with the project, and checking those files in.#2019-11-2721:15cflemingWhich I see I don’t have documented, but should.#2019-11-2721:17favilaemacs supports it through plugin, but there’s no consensus on useful language-specific declarations#2019-11-2721:17favilait’s another one of those things where all of the challenge is in having a shared taxonomy rather than a shared mechanism#2019-11-2721:18cflemingYes, absolutely.#2019-11-2721:19cflemingI think what I’ll do then is just have generic clojure properties rather than Cursive-specific ones, and go for the fait acompli method, perhaps Emacs can then take it up.#2019-11-2721:19favilabold!#2019-11-2721:19favilaI don’t actually know what their knobs are#2019-11-2721:20cflemingI actually have this issue: https://github.com/cursive-ide/cursive/issues/849#2019-11-2721:20cflemingWhich I’ll try to get to soon, my doc is now much more maintainable but I’m still playing catch up after significant neglect.#2019-11-2721:21favilaAh, great, I didn’t know it was written down#2019-11-2721:21cflemingI think that’s just a cut’n’paste from a ML post.#2019-11-2721:22favilayeah that’s pretty much the cursive settings I ended up with trying to match what my emacs coworkers were doing#2019-11-2721:22favilaI didn’t know they could alter “only indent” behavior#2019-11-2721:22cflemingOk. If you still can’t match it exactly, I’m interested in knowing about the discrepancies so I can support them.#2019-11-2721:22favilaall emacs users seem to have that off by default#2019-11-2721:23cflemingYeah. They actually added an equivalent to the “One space list indent” thing too, after much protest on both sides.#2019-11-2721:23favilathe discrepancy is mostly that the defaults are different and don’t follow the repo around#2019-11-2721:24favilaeditorconfig solves the problem at least of keeping the settings with the repo, even if no editors will agree on the property names for the settings 🙂#2019-11-2721:24cflemingOk. If you still can’t make it match after configuring everything, let me know the cases that don’t work and I’ll see what I can do.#2019-11-2721:24cflemingHaha, yes.#2019-11-2721:25cflemingBut for Clojure, their config options are actually pretty similar to Cursive’s - there’s only so much you can do with Clojure code.#2019-11-2721:25favilagood, maybe there’s hope for shared property settings#2019-11-2721:25cflemingI still don’t support their formatting DSL, which would be a good idea.#2019-11-2800:50cflemingBTW I finally got around to adding that to the doc: http://localhost:3000/userguide/eap/formatting.html#matching-indentation-to-emacs#2019-11-2803:25onetomor for ppl without direct access to your machine: https://cursive-ide.com/userguide/eap/formatting.html#matching-indentation-to-emacs >:-D#2019-11-2803:25cflemingOops, sorry#2019-11-2803:25cflemingThat one 🙂#2019-11-2719:07favilaContext: we’re trying to get our emacs and cursive users to obey (roughly) the same formatting settings within a repository#2019-11-2806:22steveb8nQ: I’ve just started playing with clj-cdk and it’s style of importing interop deps doesn’t play well with Cursive.#2019-11-2807:00cflemingThat’s a little strange. Unfortunately there’s no good way to handle that apart from adding explicit support to Cursive. What is that import actually doing?#2019-11-2822:08steveb8nIt is an interesting combo but super useful. It’s jvm clojure importing some kind of Typescript bridging libs (called jsii in the docs)#2019-11-2822:10steveb8nThe import is pulling in support for constructor fns for various parts of the AWS CDK api. there’s a conj talk about it if you want a better understanding#2019-11-2822:10steveb8nmight be best for @UGM2P65B7 to comment on this#2019-11-2806:23steveb8nAre there any tricks for working with these kinds of imports? My workaround will be to isolate them in another namespace but it hinders the exploratory experience so I thought I’d ask#2019-11-2809:29dmarjenburghI’m not sure why they chose that particular syntax for imports. The equivalent typescript is, I believe:
import { Stack } from '@aws-cdk/core';
import { Bucket } from '@aws-cdk/aws-s3';
Not sure what would be lost if the syntax were something like:
(cdk/require '[aws-cdk/core :refer [Stack]])
(cdk/require '[aws-cdk/aws-s3 :refer [Bucket]])
Then maybe by resolving cdk/require as clojure.core/require, cursive could resolve the symbols? I guess you could try writing such a require macro and see if it works.
#2019-11-2810:07cflemingI don’t speak Typescript (or NPM above a very basic level), but what is that import doing that the standard nodejs requires in CLJS don’t?#2019-11-2811:06dmarjenburghIf the typescript compilation target is nodejs (commonJS), then its identical to var mod_1 = require('@aws-cdk/core'); var Stack = mod_1.Stack;#2019-11-2817:41jeremysHey guys, I was wondering if there is a way to configure the repls I start (using deps) to eval automatically (set! *warn-on-reflection* true) ?#2019-11-2908:11cfleming@U0FR867U1 You should be able to do that using a user.clj, which is not Cursive-specific. I have plans to allow some startup commands to be added to a particular run config, but that’s not possible yet.#2019-11-2909:21jeremysHi @U0567Q30W do you mean create a user.clj namespace? Relying on the fact that it should be loading automatically? That’s clever I didn’t think of that at all. Thanks Colin.#2019-11-2910:06cflemingYes, that’s right. Stuart Sierra has a blog post on it IIRC.#2019-12-0709:53imreI tried this but it didn't work for some reason. I only did a tiny bit of investigation into it and it appears that (set! *warn-on-reflection* true) only applies to the thread it's run on. Repl startup seems to be happening on a different thread than stuff like 'send form to repl'#2019-12-0710:00cflemingHmm, yes, that’s possible. I’ll see about adding that field to the run configs.#2019-12-0710:10imreFor the record IIRC I also tried it with cli repls, and I think it didn't work there either, but I'd have to verify that. It could be a lot of places where this gets decided, including the type of repl you use, whether it's local or remote etc. Another thing I'm unsure about is how this behaves when you start new threads in your code, either manually or by relying on futures, pmap, core.async etc.#2019-12-0714:59imreI created a repo to demonstrate the issue(?)#2019-12-0714:59imrehttps://github.com/imrekoszo/warnonreflection#2019-11-2822:00danielcomptonWhat's the "safest" version of IntelliJ to be on at the moment? I'm currently on 2019.1.4 and am wondering whether to update, or maybe downgrade back to 2018 series?#2019-11-2822:11cflemingActually, I should mail the list about this. AFAIK 2019.3 with 1.9.0 should be fine now.#2019-11-2822:11cflemingI’m using that with no problems.#2019-11-2822:21danielcomptonGreat, thanks!#2019-11-2903:45jumpnbrownweaselHi, I'm having trouble getting the "Resolve ... as ..." prompt to come up with alt-enter. I have def-like macros, for example, this is a simple case:
(defmacro def- [name val]
  `(def ^:private ~name ~val))

(def- xxx "xxx")

(def yyy xxx)
As described in the doc, I try positioning on xxx, yyy or def- above, but the only thing I see when I press alt-enter is "Configure indentation...".
#2019-11-2903:47jumpnbrownweaselThe xxx shows as unresolved.#2019-11-2904:05cflemingCheck that the intention is enabled at Preferences | Editor | Intentions | Clojure | Resolution#2019-11-2904:14jumpnbrownweaselThat was it, thank you!#2019-11-2913:43Ivar RefsdalAfter I upgraded to IntelliJ 2019.3, resolving java-native functions stopped working..?#2019-11-2913:44Ivar Refsdal#2019-11-2919:19cflemingSo Cursive is doing a terrible job of saying what the problem is there, but the issue is that URLEncoder isn’t imported.#2019-11-2919:22cflemingWhat I think has changed in 2019.3 is that the popups for importing classes work differently, and frequently disappear before you’ve had a chance to invoke them.#2019-11-3015:44Ivar RefsdalSomehow URLEncoder isn't resolved, even if it is imported.#2019-11-3015:45Ivar RefsdalI think this is the issue, that Cursive (?) / Idea does not resolve java native stuff since 2019.3. It worked fine in 2019.2.4#2019-11-3015:45Ivar RefsdalLet me know if I can provide more information#2019-11-3015:56Ivar RefsdalI have set the project to use JDK 11 ...#2019-11-3021:08cflemingNo, they definitely resolve in 2019.3 - I use Cursive to develop itself, and it’s basically a big ball of interop, and it’s all working fine for me. There must be something else going on. I’ll try to reproduce exactly your case there.#2019-11-2913:44Ivar RefsdalThanks otherwise for a great editor!#2019-11-2921:36DanEEStarSo IntelliJ in 2019.3 finally has a configurable shortcut to “Focus Editor” from another tool window! See https://blog.jetbrains.com/idea/2019/09/whats-new-in-intellij-idea-2019-3-eap3/ Using IdeaVIM it was driving me nuts that pressing ESC returned automatically to the editor from the REPL. I have immediately configured another key than ESC to “Focus Editor”. But now I see, that pressing ESC in the editor does not exit “Insert mode”. Is this special code in Cursive? I saw this discussion: https://groups.google.com/d/msg/cursive/L1NN6eh2XeA/CxiDJum7DAAJ#2019-11-3022:45ro6I'm trying to set up a Cursive repl that can connect to my web app running on Heroku. Any recommendations?#2019-12-0101:14cflemingI haven’t actually done this myself, no. Can you expose an arbitrary port from Heroku for an nREPL or socket server?#2019-12-0103:42cflemingActually, I should have followed that up - if it does allow you to expose a port, probably the easiest thing is to start a socket server: https://clojure.org/reference/repl_and_main#_launching_a_socket_server#2019-12-0103:42cflemingThat will require you to be using Clojure 1.8+ and Cursive 1.9.0.#2019-12-0103:43cflemingYou should then be able to connect with a remote socket REPL: https://cursive-ide.com/userguide/repl.html#remote-repls#2019-12-0105:49ro6Thanks. I don't think an arbitrary port is possible, so I'm thinking of proxying to Drawbridge on the Heroku box, maybe adapting https://github.com/malyn/lein-catapult Just wanted to see if anyone had a cleaner way before digging in.#2019-12-0120:50cfleming@U8LN9KT2N Unfortunately Cursive doesn’t support Drawbridge right now. I made a serious attempt at it recently, but Drawbridge just totally failed to work for me. I didn’t get any useful nREPL support in time so I parked it - this reminds me, I should file an issue over there.#2019-12-0120:53ro6I did a quick and dirty adaptation of lein-catapult this morning that got me something at least partially working right away. There are some issues/improvements I'd like to work on, but it's a good start.#2019-12-0205:08ro6....or I thought so, definitely hitting some issues now. Every response is :unknown-session. I'm not interested in a yak shave on this one, but I may spend a little time and see if I can get anywhere.#2019-12-0114:57Adrian SmithIs there a easy way to get defn and friends to be resolved when loading a project made by: https://www.npmjs.com/package/create-cljs-app ?#2019-12-0115:12Adrian SmithI should say I don't have a deps.edn or project.clj which is what I think cursive uses to resolve those forms but not sure#2019-12-0117:38Adrian Smithyeah this works with a reframe template that has project.clj already#2019-12-0117:24Adrian Smithoh this looks concerning: https://i.imgur.com/5lBu3Ng.png will cursive be hosed if I upgrade?#2019-12-0117:42dazldif it doesn’t work for you, you can downgrade pretty easily#2019-12-0117:42dazldintelliJ keeps all the previous versions settings etc#2019-12-0117:43dazldyou can even run the different versions side by side#2019-12-0117:43dazldjust have to rename the apps#2019-12-0117:43dazldor put them somewhere else#2019-12-0117:44kennyYou can also use the Toolbox App to manage multiple IntelliJ versions.#2019-12-0117:45Adrian Smithah ok#2019-12-0117:46dazldthat’s a good idea#2019-12-0117:53Adrian Smiththe upgrade went well I lost a plugin called custom title in the end but found a replacement, after a lot of laptop fan spinning#2019-12-0120:58borkdudeThere is a new way to run clj-kondo in IntelliJ now: https://github.com/borkdude/clj-kondo/blob/master/doc/editor-integration.md#lsp-server#2019-12-0208:57Ivar RefsdalI'm having problems resolving java.* imports after upgrading to 2019.3. Any tips? I've tried re-importing the project. Happens with both leiningen and tools.deps#2019-12-0210:46Ivar RefsdalSeems it was something with my java SDK setup ...#2019-12-0210:49Ivar RefsdalI had several SDKs here before. I removed all but 11 and updated the project. This solved the problem for me. The problem also occured in 2019.2.4#2019-12-0214:46jeremysHi is there a way to stop the previous execution sent to the repl ? I am realizing infinite sequences a lot today...#2019-12-0215:35dmarjenburghFrantically hit “Interrupt Current Evaluation”? It’s at the top left of the REPL tab.#2019-12-0216:04jeremys@dmarjenburgh thx mate, for some reason I didn’t see that button. Must be the panick...#2019-12-0216:04jeremysor the shame of making such a basic mistake !#2019-12-0216:07Alex Miller (Clojure team)even in that case, I'm not sure it will actually work - you should try setting *print-length*#2019-12-0216:08Alex Miller (Clojure team)
(set! *print-length* 20)
#2019-12-0216:37nmkipI haven't seen it in the cursive web site. Is there an "EVALUATE INTO EDITOR" option?#2019-12-0221:19cflemingDo you mean into a comment or an overlay or something similar? Unfortunately not, although both are planned.#2019-12-0311:54nmkipyes ! that 🙂#2019-12-0311:55nmkipgreat#2019-12-0309:20gravIs is possible to use figwheel-main, tools.deps and cursive together?#2019-12-0311:54danierouxYes 😊#2019-12-0408:38indyHello, I am facing a problem where cursive/intellij is not able to resolve defn and other core functions/macros#2019-12-0408:39indyCursive error#2019-12-0408:40indyAny ideas how I can resolve this?#2019-12-0412:21Sam WhiteI’ve experienced this before. I never really properly understood the problem but found it was usually resolved by re-importing the project (including resetting the jdk and the pulling dpendencies)#2019-12-1008:04mitchelkuijpersAre you using deps.edn? I alwasy have to tick the system profile in the deps screen.#2019-12-0408:41yonatanelCan functions defined by clojure.core.async/defblockingop be resolved by default?#2019-12-0413:06thhellerI'm testing the remote socket repl support in Cursive. does it mess with read for some reason? or am I just confused?
$ clj
Clojure 1.10.1
user=> (read)
1
1
user=>
with cursive remote socket repl
Connecting to remote Socket REPL...
Clojure 1.10.1
(read)
1
=> {:op :eval, :code "1"}
#2019-12-0413:08thhellerhmm yeah confirmed its cursive.#2019-12-0413:08thheller
$ nc localhost 8204
shadow-cljs - REPL - see (help)
To quit, type: :repl/quit
shadow.user=> (read)
1
1
shadow.user=>
#2019-12-0413:08thhellercan I just get a dumb socket REPL that cursive doesn't mess with at all?#2019-12-0420:34jvtriguerosI too would be interested in this, I think that's what would be necessary to get a REPL working with Joker.#2019-12-0421:01cflemingYes, I’m planning to add this too. The current socket REPL is more like prepl.#2019-12-0506:00deasAm I missing something or is navigation from/to node modules a bit rough? How do you guys explore them? You don't work your way through the node_modules folder, do you?#2019-12-0511:31Adrian SmithI can run my tests in the REPL but I've somehow lost my test markers, any one know what I might have done? I can still add like breakpoints in the gutter#2019-12-0517:30cflemingDo you get errors reported in the IDE when you run the tests?#2019-12-0523:23Adrian SmithThis is in idea.log but nothing comes in the ui to report an error#2019-12-0615:18Adrian SmithSeems like a lot of those logs were from a plugin called simple title, now I've deleted that, the only log is
2019-12-06 15:17:48,960 [ 110057]   WARN - ConfigurableExtensionPointUtil - ignore deprecated groupId: language for id: preferences.language.Kotlin.scripting 
#2019-12-0516:55denik@cfleming I know this the show-docs command not working in cursive is due to a clojure doc bug for cljc files. However, is there a way to hack around this? It's been years and this significantly affects my productivity. One approach I'd be more than happy with is to prefer the clj docstring and fallback to the cljs docstring if none exists.#2019-12-0516:56cflemingUgh, yes, my apologies. I’ll look at this again.#2019-12-0909:45cflemingOk, this was surprisingly tricky (which was why I got distracted last time I was looking at it), but it’s now fixed for the next build.#2019-12-0909:46cflemingIf the doc is identical, then you’ll get a display like this:#2019-12-0909:47cflemingIf the doc is different, you’ll get one followed by the other:#2019-12-0909:48cflemingIt will try to do the right thing in terms of putting the Clojure one before the ClojureScript one, but that’s not always possible - there are a lot of weird edge cases there.#2019-12-0923:23denikthanks A LOT!#2019-12-0516:56deniktrying to get docs from this dropdown doesn't work.#2019-12-0615:18Adrian SmithSeems like a lot of those logs were from a plugin called simple title, now I've deleted that, the only log is
2019-12-06 15:17:48,960 [ 110057]   WARN - ConfigurableExtensionPointUtil - ignore deprecated groupId: language for id: preferences.language.Kotlin.scripting 
#2019-12-0602:11potetmHas anybody else experienced the socket repl swallowing exceptions?#2019-12-0602:11potetmFor instance:
(sequence (comp (take 100)
                  (map (fn [i]
                         (when (= i 99)
                           (throw (RuntimeException.))))))
            (range))
#2019-12-0602:12potetmjust appears to hang#2019-12-0602:12potetmno indication that an exception was thrown#2019-12-0602:12potetm(clojure.repl/pst) shows nothing#2019-12-0603:18Alex Miller (Clojure team)maybe it wasn't thrown :) sequence is lazy#2019-12-0603:19Alex Miller (Clojure team)or I should say "incrementally computed" (it's a bit different than lazy sequences)#2019-12-0615:21potetmCLI REPL says:
(sequence (comp (take 10)
                (map (fn [i]
                       (when (= i 9)
                         (throw (RuntimeException.))))))
          (range))
Error printing return value at user/eval8534$fn (NO_SOURCE_FILE:3).
null
#2019-12-0612:44potetmrepl should be printing it?#2019-12-0612:44potetmi.e. realizing it#2019-12-0615:21Adrian SmithAlso looking at another issue where I can't use quick doc on anything either via f1 or triggering the actions bar and selecting quick doc, but if I enable this setting: https://i.imgur.com/raqxHEQ.png quick docs appear on mouse move#2019-12-0615:21potetmCLI REPL says:
(sequence (comp (take 10)
                (map (fn [i]
                       (when (= i 9)
                         (throw (RuntimeException.))))))
          (range))
Error printing return value at user/eval8534$fn (NO_SOURCE_FILE:3).
null
#2019-12-0615:28Alex Miller (Clojure team)well there you go - that's your exception#2019-12-0615:28Alex Miller (Clojure team)this may be an nrepl thing#2019-12-0615:31potetmUsing the socket repl#2019-12-0615:31potetmseems like cursive is either swallowing or socket repl is silent#2019-12-0615:32Alex Miller (Clojure team)is your connection broken?#2019-12-0615:35Alex Miller (Clojure team)the provided repl function should catch that during printing, and by default print to stderr, which also by default should get sent over the socket out stream to the client
#2019-12-0615:36Alex Miller (Clojure team)I'm not sure if cursive uses that repl, or what it does on the client side#2019-12-0615:38Alex Miller (Clojure team)Just using a socket repl outside Cursive, it seems to work:#2019-12-0615:39Alex Miller (Clojure team)
;; terminal 1
clj -J-Dclojure.server.repl="{:port,5555,:accept,clojure.core.server/repl}"

;; terminal 2
$ nc localhost 5555
user=> (sequence (comp (take 10)
                (map (fn [i]
                       (when (= i 9)
                         (throw (RuntimeException.))))))
          (range))
(Error printing return value at user/eval1$fn (NO_SOURCE_FILE:3).
null
#2019-12-0615:40Alex Miller (Clojure team)*e is properly bound and client still works fine after that#2019-12-0615:41Alex Miller (Clojure team)so, I'm going to put this one on Cursive's socket repl somehow#2019-12-0616:27potetmsubmitting another form evals fine#2019-12-0616:27potetmit’s just radio silence for the form that threw during printing#2019-12-0617:19Alex Miller (Clojure team)so probably something with stderr tunneling if an error happens during print#2019-12-0914:57manutter51I’m having problems with the Leiningen setting. I have an old project that’s been using Leiningen 2.7.1, and I want to start using 2.9.1. I go under Settings -> Build, Execution, Deployment -> Build Tools -> Leiningen, change the Leiningen version to 2.9.1, and click OK. Then I open up the settings dialog again to confirm the change, and it’s back to 2.7.1. I tried Invalidate Caches / Restart in case that might help, but no luck.#2019-12-0914:58manutter51Hmmm, maybe if I delete the idea stuff and re-import the project… :thinking_face:#2019-12-0915:02manutter51That did it.#2019-12-0922:31cfleming@potetm I haven’t seen the socket REPL swallowing exceptions, no - I’ll try your repro case and see what I can see.#2019-12-0923:48cfleming@potetm I can’t reproduce what you’re seeing. I see:
Connecting to remote Socket REPL...
Clojure 1.10.1
(sequence (comp (take 10)
                (map (fn [i]
                       (when (= i 9)
                         (throw (RuntimeException.))))))
          (range))
Execution error at user/eval333$fn (REPL:2).
null
*e
=>
{:via [{:type java.lang.RuntimeException, :at [user$eval333$fn__334 invoke "NO_SOURCE_FILE" 2]}],
 :trace [[user$eval333$fn__334 invoke "NO_SOURCE_FILE" 2]
         [clojure.core$map$fn__5862$fn__5863 invoke "core.clj" 2742]
         [clojure.core$take$fn__5905$fn__5906 invoke "core.clj" 2877]
         [clojure.lang.TransformerIterator step "TransformerIterator.java" 79]
...etc etc...
#2019-12-0923:50cflemingIf you run clj -J-Dclojure.server.repl="{:port,5555,:accept,clojure.core.server/repl}", then create a new empty project and connect to 5555 using a new remote run config, do you still see the same problem?#2019-12-1002:43cfleminghttps://twitter.com/CursiveIDE/status/1204229229606367232#2019-12-1002:43cfleming@denik That has your fix, out now ^^^#2019-12-1014:45potetm@cfleming I’m fairly certain I was seeing that issue with that exact form, but I can only replicate when I do:
{:foo (sequence (comp (take 10)
                      (map (fn [i]
                             (when (= i 9)
                               (throw (RuntimeException.))))))
                (range))}
#2019-12-1014:46potetmthe CLI repl says:
{:foo (sequence (comp (take 10)
                      (map (fn [i]
                             (when (= i 9)
                               (throw (RuntimeException.))))))
                (range))}
Error printing return value at user/eval345$fn (NO_SOURCE_FILE:3).
null
{:foo (user=>
#2019-12-1014:46potetm(the thing that tipped me off was the {:foo ( partial form there at the bottom)#2019-12-1014:49potetmUgh, I think I know what I did. My very first example had take 100 and I threw on the 90th element. It must have started printing. I pruned it down for clarity, and I must not have checked it properly after I did that.#2019-12-1015:28roman01la@cfleming is it safe to update to IDEA 2019.3?#2019-12-1015:29roman01laI’ve seen Cursive release notes with support for 2019.3, but IDEA still warns about Cursive being uncompatible#2019-12-1016:06kennyI updated to 2019.3 yesterday and everything has been working as expected.#2019-12-1016:07imreI'm using 2019.3 with 1.9.0 (well, 1.9.1-eap1 since this morning) and it's grand#2019-12-1016:16roman01laCool, thanks!#2019-12-1018:00kennyI updated to 1.9.1-eap1-2019.3 today and noticed that links in my exceptions now ask me to choose a "target file". This did not happen before and is likely a regression. In the below screenshot you can see Cursive asking me this. The 3 files shown do have a namespace with final portion of the namespace matching "metric-query". Cursive seems to not be taking into account the rest of the namespace though.#2019-12-1119:30cflemingIs that in the REPL or in an execution toolwindow (e.g. after executing a script or something)?#2019-12-1119:33kennyIn the REPL#2019-12-1120:06cflemingHmm, that’s worrying, I’ll see if I can reproduce that.#2019-12-1019:40joshkhafter upgrading to IntelliJ 2019.3 and the latest Cursive build (including EPA), my colleagues and i discovered that running our nREPLs configured with a deps.edn alias does not execute the alias's :main-opts [ ... ] instructions. has anyone else run into this problem?#2019-12-1121:22cflemingI don’t think this has ever worked. The problem is that Cursive starts the REPL and executes a script which starts the REPL server, and :main-opts would probably interfere with that. What do you need to do?#2019-12-1211:01marcusHey Collin, it did work before. :) We used it to start a web server for local development. The project is an ions project..#2019-12-1213:19joshkh^ this. we were providing two comma-separated aliases - the first one to include extra-deps for development in the REPL, and the final alias to fire up a development web server using something like :main-opts ["-m" "server"]. the outcome used to be: • nREPL starts up • web server main function is called from the last alias • REPL is then available with all extra deps#2019-12-1213:20joshkh
Connecting to local nREPL server...
nREPL server started on port 52301 on host localhost - 
Clojure 1.10.1
19-12-12 10:52:49 local INFO [server:12] - Local server started on port 8080
(+ 1 2 3)
=> 6
#2019-12-1218:43cflemingOk, I’ll check this out.#2019-12-1311:04joshkhthanks very much!#2019-12-2004:01cflemingI just looked at this, and I can’t reproduce it. I just added a :main-opts ["-m" "server"] to a test deps project, and I see that added to the command line. You can check whether that’s happening by looking at the command line string which is usually the second line in the REPL output. It’s usually folded, but just copy it and paste it into a text editor to see the whole thing.#2020-01-0714:55marcusHi Collin, it seems it works if we choose the clojure.main option on the Clojure REPL run configuration.. The main difference is that there is a -i form-initxxxxxxxxxxxxxx.clj argument on the command line: • works: java … -classpath … clojure.main -m server • doesn’t work: java … -classpath … clojure.main -i form-initxxxxxxxxxxxxxx.clj -m server#2019-12-1115:11nmkipHi, I'm running a re-frame application with cursive and I started a remote nREPL using the port that appears in the shadows-cljs logs. I changed the dropdown value from cljto cljs and I can evaluate expressions like (+ 1 1)from the editor. However, when I try to evaluate (s/def ::id int?) I get the following error:
Unexpected error (AssertionError) macroexpanding s/def at (/tmp/form-init7788612072615295307.clj:1:1).
Assert failed: (map? env)
any ideas? (I evaluated the (:require [cljs.spec.alpha :as s]) )
#2019-12-1119:29cflemingI’m not sure, no. Do you have reason to think that this is Cursive-specific? If not #clojure might be a better place to ask.#2019-12-1213:34nmkipNo, I don't know if this is Cursive-specific.#2019-12-1121:20favilaIs there a way to set $CLJ_CONFIG on a per-project basis? I’m trying to setup a monorepo style deps.edn project, where one shared deps.edn has :default-deps and then there is a per-module deps.edn with empty version coordinates#2019-12-1121:22cflemingThere isn’t, but there should be and several people have asked about this. I’ll have a look and see if I can get it in the next EAP.#2019-12-1121:56favilaHonestly I’d prefer if deps.edn supported this natively#2019-12-1121:20favilaI’m not sure what utility :default-deps even has if deps.edn doesn’t have an explicit notion of a parent deps.edn#2019-12-1121:28Alex Miller (Clojure team)not much right now#2019-12-1121:54kennyOut of curiosity, why does the Rename var action sometimes pop up a modal for renaming and other times do it inline? I vastly prefer the inline renaming since you can see what it's doing. It seems like there are several cases where the modal could be replaced with the inline rename.#2019-12-1122:51cflemingIt should only pop up the modal for renaming global things, i.e. vars. Locals should always be inline.#2019-12-1122:52kennyRenaming a here opens a modal:
(defn example
  [a]
  (inc a))
Shouldn't that be considered a local?
#2019-12-1122:53cflemingYes, definitely - I’ll check that.#2019-12-1122:53kennySame with renaming b:
(defn example
  [a]
  (let [b ""]
    (inc b)))
#2019-12-1122:54kennya here as well:
(defn example
  []
  (with-open [a ""]
    a))
#2019-12-1122:56kennyOk, I may have found a pattern. It appears to only happen in CLJC files.#2019-12-1122:57kennyYep. All of the above work in clj or cljs, not cljc.#2019-12-1203:12cflemingInteresting, thanks. That should make it easy to reproduce.#2019-12-1122:31kennyFor some reason, certain namespaces appear twice in the namespace search. See the below screenshot where I am searching for "resour" and compute.data-model.resource-price appears twice.#2019-12-1122:52cflemingI think that’s when namespaces are defined in CLJC files - one is a CLJS ns and the other is CLJ. I need to revisit CLJC in general because of problems like this.#2019-12-1122:57kennyAh yes. That ns is cljc.#2019-12-1209:22roman01laEvery time I reopen a project excluded folder in Project Structure gets indexed again and appears in search results. Is there any way to prevent this?#2019-12-1210:04cflemingDo you mean that the folder gets marked as no longer excluded? Or that despite being excluded it’s still indexed?#2019-12-1210:06roman01la> Do you mean that the folder gets marked as no longer excluded? This#2019-12-1210:08cflemingThat’s weird. Is this a folder that you’ve marked as excluded yourself? What sort of project is this?#2019-12-1210:09cflemingi.e. lein or deps?#2019-12-1210:09roman01laYes, every time I open a project I have to mark a folder as excluded. It’s deps project#2019-12-1210:10cflemingHmm. I’ll check that out tomorrow and see if I can reproduce it.#2019-12-1210:11roman01laThanks! If not, I’m happy to jump on a call and show you the issue#2019-12-2004:05cflemingI just tried to reproduce this and I can’t. Is there anything else special about that folder? Is it also marked as a source root or something like that?#2019-12-2007:51cflemingAnother way to ask that would be - when the folder is unmarked as excluded, what is it marked as?#2019-12-1212:45Jakub Holý (HolyJak)Is it possible to connect to a remote nrepl server with Cursive repl if it uses drawbridge? Do I need to add it to my lein :plugins or ...?#2019-12-1320:46cflemingSadly no, I made an attempt to get drawbridge to work but I couldn’t, and I didn’t manage to get much support from the nrepl channel.#2019-12-1308:12maleschIn the debugger's "Evaluate Expression..." I am not automatically in the namespace of the breakpoint (in clojure.core instead) and therefore have to always prefix the namespace to resolve symbols e.g. to call local functions. Earlier I think this worked fine. Is there a setting to control this? I played around e.g. with "Evaluate form in REPL naemspace" but what unfortunately didn't help.#2019-12-1320:55cflemingYes, my apologies, this is annoying and I haven’t had a chance yet to try to figure it out.#2019-12-1309:19p-himikIt seems that it's impossible to use clojure.core/comment as a target of "Resolve %symbol% as..." But that would allow Cursive to not highlight some symbols introduced by macros as unresolved (e.g. if I create a let-like macro that accepts a keyword before the bindings).#2019-12-1309:24p-himikAh, found https://github.com/cursive-ide/cursive/issues/1850#2019-12-1309:27p-himikAnd this: https://github.com/cursive-ide/cursive/issues/147#2019-12-1320:45cfleming@U2FRKM4TW You should be able to do that using the Specify… option, I think? If not, it’s possible that support is hard coded, I’d have to check.#2019-12-1321:18p-himik@U0567Q30W Nope, comment is not there#2019-12-1321:19p-himikThere's a downside to using comment though. If my macro defines something, it will be left unresolved outside of the macro definition.#2019-12-1321:21cflemingOk, I’ll take a look at that.#2019-12-1321:27p-himikAdded a comment at https://github.com/cursive-ide/cursive/issues/147#issuecomment-565614517 Hope it's useful.#2019-12-1321:29cflemingThanks!#2019-12-1321:32p-himik"Language Intentions" is a really great feature - I've added quite a few PostgreSQL fragments there, and sometimes it really helps. It doesn't really matter (for me, at least) that in order to achieve it, I have to write some Java code fragments that use completely undocumented functions. As long as I have the relevant IDEA source code and some examples, it's fine.#2019-12-1321:36cflemingYeah, that’s my intention with the symbol resolution too, except the code would be Clojure and hopefully actually documented.#2019-12-1321:37cflemingI haven’t used that feature though, so I’ll look at how they’ve implemented it.#2019-12-1319:42Drew VerleeWhats the best way to share formatting rules on a per project basis across intelliJ and spacesemacs (Which i understand is governed by clojure mode + cljm format rules). I imagine its a manual effort involving 1. having standard rules 2. having each project kept a configurations (.dir-locals and the cursive equivelent) I think clojure-mode allows for formatting rules to be attached to the clojure vars themeselves (for macros) is cursive utalizing the same thing? I'm very tired of having every small code change in a project massive change 100's of lines!#2019-12-1320:09andy.fingerhutBecause both of those editors reformat every line even if you do not edit those lines? If so, wow. I'd hope they could be configured not to.#2019-12-1320:11andy.fingerhutOr maybe you mean touching one line of a function often leads one to reindent/format that entire function?#2019-12-1320:19Drew VerleeI'm using spacemacs. If I edit a part of a hashmap, it reformates all of it. I can't accurately describe all the interactions, but they certainly aren't per line.#2019-12-1320:23andy.fingerhutI'm pretty vanilla using Clojure-mode in Emacs with almost nothing else turned on. Tab auto-indents if I press it, but modifies no other lines other than where the cursor is.#2019-12-1320:50cfleming@U0DJ4T5U1 I recently documented how to match emacs formatting in IntelliJ: https://cursive-ide.com/userguide/eap/formatting.html#matching-indentation-to-emacs#2019-12-1320:51cflemingIn IntelliJ (which I should also document) the solution to the sharing is to use a Project scheme under Preferences | Editor | Code Style | Clojure.#2019-12-1320:53cflemingCursive doesn’t utilise the formatting spec in the var metadata yet, no, but it should hopefully be possible to match the formatting. If it’s not, I’d like to hear about the cases where you can’t.#2019-12-1320:54cflemingre: how much gets formatted, Cursive will generally only auto-format single forms, and then you can choose to reformat more widely. The exceptions are things like maps and let-bindings if you’ve chosen to align the value.#2019-12-1413:21potetmDoes interrupt work with the socket repl? I’ve not had good luck with it.#2019-12-1421:33cflemingNo, it doesn’t at the moment - I need to customise the available buttons according to the type of REPL.#2019-12-1416:11p-himikIt seems that I cannot rename keywords at all. I always just see this modal dialog.#2019-12-1416:12p-himikWithout me changing anything at all, it worked on the 7th try, for some reason.#2019-12-1421:30Jakub Holý (HolyJak)Same here I got lucky at 2nd :)#2019-12-1421:34cflemingHmm, I’ve never seen that - I’ll see if I can reproduce.#2019-12-2002:59cflemingI can’t reproduce this. Are either of you running other plugins that might be modifying things in the background?#2019-12-2003:00cflemingAlso, at which stage in the process do you see this? Before or after the preview in the toolwindow?#2019-12-2003:17cflemingIf you go to About IntelliJ IDEA and then copy the system information, there’s a section in there called “Non-Bundled Plugins”. What do you both have in that list?#2019-12-2006:34p-himikInteresting - now I cannot reproduce it myself. The only thing that changed is that I stopped using https://github.com/gtache/intellij-lsp Maybe it was the culprit that changed files' modification timestamp.#2019-12-2007:50cflemingYeah, that would be a good candidate for messing with files in the background. @U0522TWDA are you also using that?#2019-12-2007:54Jakub Holý (HolyJak)I don't think I use LSP, at least I haven't added it myself#2019-12-2007:54Jakub Holý (HolyJak)I will try again during the weekend#2019-12-1416:24p-himikAnother thing - Using File | Convert To... menu option to convert a clj file into a cljs file, the symbols become unresolved. I have to remove file and then undo the action to make Cursive reindex the file. Simply refreshing the deps project doesn't help.#2019-12-1423:38cflemingThat is another weird one. I’ve added that to the list.#2019-12-1508:27p-himikAnother small thing - the order to Cursive's tool window buttons on the sidebars is not preserved. E.g. if I move the "REPL" button to the top and restart IDEA, the button appears at the bottom again. Initially I thought that it was a problem in IDEA. But the built-in tool window buttons appear to always stay exactly where I've dragged them.#2019-12-1508:34cflemingI’ll add that to the list 🙂#2019-12-2017:13onetomI've just experienced something similar today. I pressed F1 2-3 times, so the documentation window got anchored to the right top, replacing the repl window. I moved the REPL window too right bottom. After turning on and off the F1 window (and maybe resizing it) it started to replace the REPL tool window again.#2019-12-1521:26thosmosIs there a way to configure how parinfer adds the closing paren? Right now, if I open a paren in front of another s-form, it’s automatically adding on at the end of the other form, and I’d prefer if it defaulted to adding it immediately after my cursor. It’s behaving differently than in Atom, for example, and I’d like to be able to choose that one behavior. There’s already a key combo for adding at the end of the next form, and I’m used to that.#2019-12-1522:09cflemingThere isn’t, but there will be. This drives me nuts too, and is a major contributor to edge cases in parinfer.#2019-12-1522:12cflemingI was actually thinking about just making the behaviour you describe the default, and not allowing the current behaviour since it’s such fertile ground for unexpected behaviour. Would you ever want to switch back to the current behaviour, or would you just turn it off completely?#2019-12-1606:55thosmosIf by current behavior you’re referring only and exclusively to the one particular behavior of how it adds the closing paren when the cursor is currently directly in front of a sibling s-form, then I would never want it how it is, and would ALWAYS have it place the closing paren immediately after my opener, AS LONG AS I can still have the option of doing that intentionally with a key combo (cmd+shift+9) only when I want it to happen.#2019-12-1606:58thosmosI see in the Atom version of parinfer, there’s the option of forcing 100% closing or not, but even in either of those modes it places the closer immediately after the opener. So yeah, let’s have it like that.#2019-12-1607:04thosmosI see why some might like it if they hadn’t already made the habit of cmd-sht-9 from lots of paredit, because it is a very common activity of wanting to enclose an existing s-form, and most of the time it’s fine, but it’s in those difficult and unusual places that it really gets in the way and makes me wonder if there’s a better way.#2019-12-1607:08thosmosmaybe there could be a key combo for having its current behavior so it could be used when it’s appropriate#2019-12-1607:25cflemingI think I’ll make what seems like the sensible behaviour the default, and if people complain about missing the old behaviour I’ll think about a flag or an extra action.#2019-12-1607:28cflemingI’ll make that change in the next major version, rather than in a minor version upgrade.#2019-12-1611:34bortexzHas someone seen this error before?
Module property-manager is managed by Maven and cannot be managed by Leiningen at the same time.
#2019-12-1612:11imrehave you tried re-importing the project?#2019-12-1613:22bortexz^ Yes, that ended up solving it. I was wondering if there would be a way to change that without reimporting#2019-12-1614:36favilais there an issue with relative paths in deps.edn files? I’m getting "manifest type not detected when finding deps for …. in coordinate :local/root "../stuff" or "../myjar.jar". The deps files are one level down from the project root. The clojure tool seems to handle this#2019-12-1614:37favila(this is a monorepo setup with one top-level dir per module, each module has a deps.edn file)#2019-12-1614:38favilamaybe the current working dir is the project root not the dir the deps.edn is in?#2019-12-1614:42imreI have such a project and it is working alright#2019-12-1614:43imreusing IJ 2019.3 and Cursive latest eap#2019-12-1614:44imre1.9.1-eap1-2019.3#2019-12-1614:53favilaok, I’m on 2019.2.4 and not eap#2019-12-1614:53favilaI’ll try that#2019-12-1615:02imreI don't know if the 2019.3 upgrade is necessary, Cursive EAP should be able to work with 2019.2.4#2019-12-1615:03imreColin had to change how deps projects work sometime during the 1.9.0 eaps, so you might need to re-import the project#2019-12-1615:05favilayes but I thought that work was released#2019-12-1615:06imreIt was, in 1.9.0#2019-12-1615:06imreI have been working with this project I mentioned during the 1.9.0eap builds, through 1.9.0 and the latest eap#2019-12-1615:06imreand haven't had any problems#2019-12-1615:19favilatried 2019.3 and eap, didn’t help#2019-12-1615:19favilasame error#2019-12-1615:21imreweird. Have you tried reimporting?#2019-12-1615:22favilayes. remove and readd, invalidate+restart, all that jazz#2019-12-1615:22imredo you have a top-level deps.edn?#2019-12-1615:22imreor just the subprojects?#2019-12-1615:23favilatools-deps/cursive can’t handle that, so I merged everything shared into each deps edn.#2019-12-1615:24imrehmm I have a top-level one#2019-12-1615:24favilahow do you do that?#2019-12-1615:24imrereferencing all sub-projects as its deps#2019-12-1615:24favilaoh, but how do subprojects reference each other?#2019-12-1615:24imre../foo#2019-12-1615:24favilaok, that’s what’s not working#2019-12-1615:25imreperhaps adding a top-level deps edn could help?#2019-12-1615:25favilahow does your TL deps reference the children? :deps directly?#2019-12-1615:26imretop:
{:deps {foo {:local/root "foo"}
        bar {:local/root "bar"}}}
foo:
{:deps {bar {:local/root "../bar"}}}
#2019-12-1615:26imreoops no keywords in dep names tho (fixed)#2019-12-1615:26favilamy deps.edn is generated so it’s gitignored. I wonder if that matters#2019-12-1615:27imrenot sure#2019-12-1615:27favilaseems weird that it would, I’m using “use command line tools-deps” setting, so I assumed cursive is just shelling out#2019-12-1615:27imreI imported this project at the root and ticked the 'search for projects recursively' thing#2019-12-1615:27favilaeverything works fine from a terminal#2019-12-1615:28imreI'm afraid my knowledge only extends this far#2019-12-1615:35favilaah I think I understand now#2019-12-1615:35favilawell, no, actually I don’t fully#2019-12-1615:35favilabut I think it has something to do with aliases not being applied transitively#2019-12-1615:36favilaI need an alias set in order for resolution to work because I use :default-deps#2019-12-1615:36favilathis top-level deps edn I made fails lower down with not being able to find the version of some transitive dependency#2019-12-1615:37favilathat version is only known if the alias is applied to that upstream deps edn too#2019-12-1615:37favilaI guess the command line tool does this#2019-12-1615:38favilaI get the error Coordinate type not loaded for library selmer/selmer in coordinate nil from my top-level deps#2019-12-1615:38favilaI’m not sure if that’s the same problem with my module deps.edn. I would expect the same error if it were#2019-12-1615:41imrehave you tried to require your top project from another one?#2019-12-1615:42imreto see if that works?#2019-12-1615:43imrefor example one folder up from where your top depsedn is:
clojure -Stree -Sdeps '{:deps {your-top-project-name {:local/root "your-project-folder-name"}}}'
#2019-12-1615:44imreI have a test that does something like this to make sure I make the necessary exclusions etc. in my submodule depsedns#2019-12-1615:45imreperhaps that isn't relevant in your case though#2019-12-1615:45favilaactually my top level module fails on cli also#2019-12-1615:46favila😕#2019-12-1615:47favilaeven with my alias#2019-12-1615:55imrebetter sort that out first then#2019-12-1616:39favilaok, that’s because the alias value is only pulled from the initiating root deps.edn#2019-12-1616:39favilaso that makes sense, that’s consistent across cursive and cli#2019-12-1620:54p-himikAre you using the latest version of tools.deps? Because I've seen the same error when I used some old version.#2019-12-1620:59cfleming@U09R86PA4 Yes, my understanding is that aliases are never transitive in deps.#2019-12-1621:00cflemingI’m not quite clear after all that - are you still seeing differences between Cursive and CLI?#2019-12-1621:08favilayes#2019-12-1621:08favilathe original scenario is still different#2019-12-1621:09cflemingThat scenario is a root deps.edn file which references dependencies using relative roots outside that project’s dir, correct?#2019-12-1621:10favilaIt might be via an alias only, I’ll narrow it down#2019-12-1621:10cflemingOk, thanks, I’d appreciate that.#2019-12-1621:12favilabut basically, yes, {:deps {foo {:local/root "../foo"}} -> "Manifest type not detected when finding deps for foo in coordinate {:local/root "../foo"}"#2019-12-1621:13favilaok, the key is an alias#2019-12-1621:14favila{:deps {foo nil} :aliases {:default {foo {:local/root "../foo"}}}}#2019-12-1621:14favilaclojure -A:default -Spath is fine with this#2019-12-1621:15favilacursive is not fine with it, even though this alias is checked in the deps tool window#2019-12-1621:15cflemingIs the problem when importing the project, or when running?#2019-12-1621:15favilaso I think that may just be my expectations#2019-12-1621:15favilano, importing#2019-12-1621:15cflemingOk, thanks, I’ll try that out.#2019-12-1621:16favilathat “manifest type not detected” error is shown when importing#2019-12-1621:16favilathis is less clearly a bug and more an expectation that those aliases are applied at import time#2019-12-1621:16favilawhich is…kinda iffy#2019-12-1621:17cflemingThey definitely should be - that’s what the aliases tree in the deps tool window is for.#2019-12-1621:17favilabut how would you apply the alias before you import it?#2019-12-1621:18favilabasically I’m just encountering sharp edge after sharp edge trying to do monorepo-style setup with a common alias with :default-deps and :override-deps for the whole repo#2019-12-1621:18cflemingSo when importing, I call tools.deps.alpha directly, and I pass it the aliases I want to use for project resolution.#2019-12-1621:18favilabut how would the aliases appear in the tool window if the project isn’t yet imported? the aliases are not known yet#2019-12-1621:19cflemingYes, you have to import once for Cursive to know about the aliases, then you can select them and reimport.#2019-12-1621:19cflemingIs the problem that the project is somehow invalid without those aliases applied?#2019-12-1621:19favilawell, it has unresolveable coordinates#2019-12-1621:20cflemingI see you have {foo nil} in your repro case.#2019-12-1621:20cflemingHmm, I see, perhaps that’s the problem then.#2019-12-1621:20favilathe alias is needed for :default-deps in order to fill that nil in#2019-12-1621:20cflemingIf you can never resolve the project without the aliases, then you can’t set it up correctly in Cursive. Hmm…#2019-12-1621:20favilanow in this case, I do have the alias available in the tool window#2019-12-1621:21favilabecause I happened to have other modules which didn’t depend on any local roots#2019-12-1621:21cflemingActually, wait - IIRC I actually get the aliases by reading the deps.edn directly, not by resolving the project - that should work.#2019-12-1621:21favilabut I do point it out as a UI chicken and eg problem with this approach#2019-12-1621:21favilaah, ok#2019-12-1621:21cflemingI’d have to go back and check that.#2019-12-1621:22cflemingBut I think that’s right.#2019-12-1621:22cflemingPerhaps when importing the project, Cursive should read the deps file, find the aliases, and then allow them to be selected during import.#2019-12-1621:24favilaI guess? I’m not sure how :default-deps can work otherwise, since by definition these deps must be unresolveable unless an alias is applied#2019-12-1621:25favilabut :default-deps is clearly very rarely used; I’m not even sure if it’s appropriate here, I’m just trying to replicate something that worked like this before#2019-12-1621:25favilaactually this will be a problem with any :*-deps#2019-12-1621:25favilaso nevermind there#2019-12-1621:26favilaany “parent” type setup needs an alias to work#2019-12-1621:26favilabecause only aliases can apply default and override deps#2019-12-1621:26cflemingYes I think you’re right about that. It’s true that this will apply to extra and override deps, but generally the project will still import correctly without them, and can then be reimported after the aliases are selected. The problem is default-deps, without which the project is essentially invalid.#2019-12-1621:27favilawith :override-deps you can still use empty-map as a coordinate#2019-12-1621:27favilathat is in fact how Sean Corfield uses it in his monorepo setup#2019-12-1621:27cflemingHmm, ok.#2019-12-1621:28cflemingOk, I’ll fix this.#2019-12-1621:28cflemingI think that presenting the aliases during project import is the only sensible way to handle it.#2019-12-1621:29cflemingI guess however that this might also be a problem if you add a new alias with override or default deps to an existing project.#2019-12-1621:29cflemingI’ll test that too.#2019-12-1621:34favilaGetting the feature set combination of lein/maven parent, managedDependencies, and :local/root is pretty tough#2019-12-1621:34cflemingI’ve filed this: https://github.com/cursive-ide/cursive/issues/2285. I’ll update it once I have repros of the various cases.#2019-12-1621:52favilaOK I have a minimal reproducer#2019-12-1621:53favilainterestingly, depending on whether I have the alias checked, I will get different errors#2019-12-1621:59favilaupdated ticket#2019-12-1621:59favilathanks for your help#2019-12-1622:13cflemingOk, you can work around the Manifest type error by explicitly specifying :deps/manifest :deps.#2019-12-1622:16favilain each :local/root coordinate?#2019-12-1622:16cflemingRight.#2019-12-1622:17cfleming{:override-deps {bar {:local/root "../bar" :deps/manifest :deps}}} - I think this should work.#2019-12-1622:18favilasuccess!#2019-12-1622:18cflemingI suspect that problem is because the CWD is not set correctly in Cursive.#2019-12-1622:18favilaI wish deps.edn were a bit more CWD-independent#2019-12-1622:18cflemingOh, so do I.#2019-12-1622:19cflemingAlthough that’s a failing of many build tools, including lein.#2019-12-1622:19favilayeah, true#2019-12-1622:19favilaI think it’s nearly there though#2019-12-1622:19cflemingI have to do some truly awful things to get lein to work in Cursive.#2019-12-1622:20cflemingDeps does actually have a mechanism now for manually relocating, it’s possible I’m not doing that everywhere.#2019-12-1622:54favila:deps/manifest :jar doesn’t seem to work as a workaround for :local/root "foo.jar"#2019-12-1703:33Joe R. SmithIs it possible to set different symbol colors for macros and special forms (vs other symbols called in the function position)? Some other editors w/ clojure support do this (e.g., Atom + Clojure).#2019-12-1708:45cflemingIt’s not at the moment, no, although it’s not difficult to do. There’s an issue about that, but I can’t find it right now.#2019-12-1703:47potetmnot sure if it’s helpful, but I know you can do a special color for clojure.core symbols#2019-12-1712:01Joe R. SmithI did find that, thanks. I was hoping for just special forms and macros. #2019-12-1708:29torbjornvatn@cfleming what's the status on getting javascript dependency interop to work when coding Clojurescript?#2019-12-1708:48cflemingI’m actually investigating this at the moment, with a plan to do it very soon. I’m still unsure whether I’ll do it by integrating into IntelliJ’s JS interop or trying to extend my own. IntelliJ’s is clearly better, but will only be available in paid IntelliJ editions.#2019-12-1708:48cflemingHopefully Cursive should now be able to be installed in WebStorm, RubyMine etc with some fiddling, but I haven’t sat down and actually tried to do that yet.#2019-12-1810:01torbjornvatnAn integration with IntelliJ’s JS interop would be great, but I understand that you want to support the community edition as well#2019-12-1714:05wilkerluciohello, when doing a namespace that just forwards fn references (eg: (def some-fn other-ns/some-fn) ), is there a way to make cursive keep showing the arglist from other-ns/some-fn when refering to some-fn variable?#2019-12-1716:07vemvclojure.repl/doc doesn't correctly work either with that pattern You'd need potemkin import-vars or an equivalent impl#2019-12-1714:23imre@wilkerlucio correct me if I'm wrong but doesn't that work off var metadata?#2019-12-1714:24imrealthough in that case I'd probably expect a def to carry those over#2019-12-1723:29Jakub Holý (HolyJak)I have experienced repeatedly that Cursive cannot resolve many basic stuff such as defn, here example when I open a ns in a library. Why? How to fix? Thank you!#2019-12-1723:44cflemingThat can have a couple of causes. The most frequent is the indexes becoming corrupted, which can be fixed using File-&gt;Invalidate Caches and Restart.#2019-12-1723:44cflemingLet me know if that doesn’t help.#2019-12-1811:51Jakub Holý (HolyJak)thank you!#2019-12-1920:22cfleming@pavel.klavik Yes, the let-binding selection would be nice. One little advertised feature is that you can move let bindings and map entries up/down by placing the caret at the start of the value. So:
(let [a 10
      |b 11])
#2019-12-1920:22cflemingIf you do a “Move form up” command at that point, the whole b 11 will be moved.#2019-12-1920:25Pavel KlavíkThanks, this is very useful to know 🙂. Will start using.#2019-12-1920:25Pavel KlavíkBut it is still useful when you want to copy/cut the pair, etc., also very useful for map literals.#2019-12-1920:27Pavel KlavíkAnother feature I am missing is a support for HugSQL, missing autocompletion and wrong highlighting of HugSQL functions makes using it much harder.#2019-12-2008:49heliosI'm running a old-ish version of IntelliJ and cursive (2018.3.6 + cursive v1.8.1-eap3-2018.3) with deps.edn (as for some time this version was the most stable with deps.edn). It seems that something is wrong with resolving the vars in cljs files#2019-12-2009:16cflemingIs clojurescript added to the module as a dependency? You can check that under File-&gt;Project Structure-&gt;Modules-&gt;&lt;your module&gt;-&gt;Dependencies#2019-12-2009:51heliosYes, Deps: org.clojure/clojurescript:fc66a5#2019-12-2009:53cflemingI see you’re using a git dep. Do things work if you switch to a standard Maven dep?#2019-12-2010:00heliosyep, that makes it work#2019-12-2010:03cflemingInteresting. Ok, so if you switch back to the git dep, what does the library look like? When you select the library in File-&gt;Project Structure-&gt;Libraries, what do you see in the right hand panel?#2019-12-2010:16heliosnothing to show#2019-12-2010:16heliossorry when taking the screenshot i hovered over another lib, but cljs is selected#2019-12-2020:13cflemingHmm. And does your application work with CLJS from a git lib?#2019-12-2414:36heliosYeah, it seems so#2019-12-2418:15cflemingOk, I’ll take a look at that.#2019-12-2008:50helioseven defn cannot be resolved. Whereas in clj files it all works fine. i tried to invalidate the cache and restart multiple times, to no avail#2019-12-2009:12pez@cfleming: Will b 11 be moved up as in out of the binding box, or up a line, or up as in front of whatever pair is before it? (Or something else? 😃 )#2019-12-2009:17cflemingIt works basically like “Move form up/down”, so if you move it up, you’ll get:
(let [|b 11
      a 10])
Then trying to move it up again will do nothing - it doesn’t work like slurp/barf.
#2019-12-2010:49imreMind if I ask what conversation this thread forked from? I saw your reply to @UFHE11C83 yesterday and I'd be interested in the context.#2019-12-2011:14pez@U08BJGV6E: It's from here (I think): https://clojurians.slack.com/archives/C17JYSA3H/p1576786762006900#2019-12-2011:15imreIndeed, thank you!#2019-12-2020:57pezI’ve filed that this behaviour should be added to Calva as a feature request: https://github.com/BetterThanTomorrow/calva/issues/529#2019-12-2020:58pezIf there are related behaviours that Calva could take inspiration from, please comment on that issue, @cfleming#2019-12-2110:35Ihor HorobetsHow to disable this folding?#2019-12-2119:07cflemingAre you talking about the one? I don’t think that’s Cursive doing that - do you have any other plugins installed that might be folding things?#2019-12-2116:44kennyDoes Cursive support IntelliJ scratch files?#2019-12-2119:08cflemingSort of - they do mostly work but they’re weird internally and I haven’t added any explicit support for them. If you find things that are not working let me know and I’ll look at fixing them.#2019-12-2121:43kennyThe main thing that makes it hard to use is no autocomplete for something like this:
(require '[my-ns.api :as api])

(api/foo)
api/f won't autocomplete to foo and it marks api/foo as "cannot be resolved"
#2019-12-2123:38cflemingOk, I’ll take a look at that.
#2019-12-2200:16kennyGreat! I think that's all it needs. Super useful files for quick tests that may contain confidential info.#2019-12-2605:06Dave MaddenI'm super new to Clojure/Cursive and I'm seeing that I can write code in a file, but in order to have the updated code available in the REPL I have to compile, close the terminal tap my lein repl is running in, open a new tab, and re-initialize the REPL. There's got to be a better way to do this, right?#2019-12-2607:13cfleming@URXC9CNMN Check out this page, hopefully that will explain how things work: https://cursive-ide.com/userguide/repl.html#2019-12-2619:12Dave MaddenThanks @U0567Q30W#2019-12-2615:20Adrian SmithI think I can emulate these Chlorine settings https://i.imgur.com/RPCmSWd.png using "new REPL command", can someone help me clarify the process?#2019-12-2618:48cflemingSure, there’s a section about these in the doc: https://cursive-ide.com/userguide/repl.html#repl-commands#2019-12-2618:48cflemingLet me know if there’s anything you need cleared up still.#2019-12-2817:49sveriHi, I already asked in #tools-deps but got no answer and also I am not sure if it's the right channel. Using leiningen cursive recognized the init-ns option for the repl. I would like to do the same now using deps. When using the clojure.main repl I can provide main-opts that load my namespace. Is something similar possible when using the nREPL within cursive as is advised by the docs?#2020-12-2917:02dangercoderHi, I have a deps.edn project. If im getting warnings such as defn cannot be resolved in clojurescript, what could be the cause? Works great for clojure Resolved - Issue was that I did not have clojurescript under .idea/libraries 🙂#2020-12-2917:03dangercodermy guess is that clojurescript does not exist under .idea/libraries#2020-12-2917:05dangercoderAnd i guessed right. Solved it 🙂#2020-12-2918:19sveriFunny, I had the same thing happening today after updating re-frame and reagent. Anyway, I have an extra alias cljs in my deps project and added clojurescript to it, this solved it for cursive after enabling the configuration.#2020-12-3112:56JoniThe cursive repl history doesn't seem to save data across sessions, I recall it working at some point, but I'm not sure. Is this an issue or working as intended?#2020-12-3112:56JoniSteps to reproduce: 1. Start a project repl 2. enter command 3. restart idea 4. start repl and press Up (or whatever previous repl history hotkey you have) 5. The command you wrote previously should then come in but doesn't#2020-12-3113:01JoniOr this might be an issue with writing new commands to history since there's something there, but not the command you wrote earlier.#2020-12-3113:16vehvisI can elaborate a bit further: the repl history stored in .idea/workspace.xml is read and used, but no new history is ever saved#2020-12-3113:19vehvisFor me the issue appeared after (or around) upgrading to IDEA 2019.3 and the corresponding Cursive version#2020-01-0109:52cflemingThat definitely sounds like a bug, I’ll try to reproduce that.#2020-01-0118:01ScarSame issue here 👆:skin-tone-2:#2020-01-0222:24cflemingI’ve actually just seen a post to the plugin development forum which suggests that this might be an IntelliJ bug.#2020-12-3117:13royalaid@cfleming any word on support for string :requires from CLJS land?#2020-01-0222:25cflemingI talked a bit about this recently: https://clojurians.slack.com/archives/C0744GXCJ/p1576571346055300#2020-12-3121:06kulminaatoris there any way to turn off the parenthesis assist feature ?#2020-12-3121:06kulminaatori am constantly fighting it#2020-12-3121:07kulminaatorjust makes me hate the whole thing 😞#2020-12-3121:10manutter51Look for a popup menu in the lower left of the window.#2020-12-3121:12manutter51Also if you’re using Paredit and don’t like it, you might want to try Parinfer before shutting the whole thing off (or vice versa if you’re already on Parinfer). I prefer paredit myself.#2020-12-3121:12Lennart BuitYeah, I prefer Parinfer, I couldn’t get used to Paredit ^^. It is something that you do have to get used to, but it is so nice when you do#2020-12-3121:19kulminaatoryeah, tested it out, thanks, i prefer parinfer style too, much more natural for me than paredit 🙂#2020-12-3121:28Lennart Buitalso; a bit of a stupid tip; but if cursive lost its way in placing braces, sometimes commenting and uncommenting a piece of code ‘fixes’ the brackets :’)#2020-12-3121:29Lennart Buitit is also a good party trick when pair programming#2020-12-3121:38kulminaatoryeah the commenting and cut-paste sort of works, but that way i just feel i'm fighting the tool#2020-01-0117:50Igor LobanovHi all, happy new year! I'm getting some weird behaviour when using REPL in cursive, both local and remote. I cannot see any characters echoed as they are typed into the REPL pane. They still get sent across as I can blindly type (+ 1 2) and get 3 back. This may be more to do with IDEA than Cursive, but I'm not sure where to start. I'm on Win10, IDEA Community 2019.3 and Cursive 1.9.0-2019.3 individual license. Any ideas?#2020-01-0117:51Igor LobanovCLJ's own repl works just fine, but I need one with my classpath...#2020-01-0121:59cflemingHi Igor, happy new year to you too! That sounds very odd. Can you actually see the REPL input pane? There’s a thing which happens sometimes which is that the REPL input pane gets collapsed so much that it’s basically invisible. If that’s the case, hunt around a bit on the bottom of the output pane, and you’ll find a little handle there you can use to drag the input pane open.#2020-01-0121:59cflemingThis seems to happen more in dark mode, for some reason.#2020-01-0215:06dmarjenburghWhen I set my Project SDK to Java 11, Cursive fails to resolve all Java calls like Long/parseLong or any methods. I don’t have this problem when setting the SDK to 1.8. Is this a sources problem?#2020-01-0215:08Drew VerleeHow does the static analysis Cursive does overlap or complement what clj-kondo does?#2020-01-0307:47ScarIf you’ve integrated kondo with the file watchers plugin then cursive errors will be marked in red and kondo’s yellow#2020-01-0313:30heliosAny idea on how to make Cursive understand https://github.com/weavejester/hashp and not say p cannot be resolved ?#2020-01-0401:52cflemingI would have thought that would have worked out of the box, I’ll take a look and see if I can figure out what’s going on.#2020-01-0401:54cfleming@potetm I forgot to mention, I managed to reproduce your problem with errors during socket REPL printing. I’m going to fix that for the next EAP and also integrate the Clojure 1.10.x improved error stuff.#2020-01-0402:47potetmThanks @cfleming!#2020-01-0409:58DanEEStarI just noticed that the documention pop-up for my ClojureScript project does not show the documentation from ClojureDocs with usage examples. Is there a way to configure it so that it uses ClojureDocs?#2020-01-0410:06cflemingYes, there’s a notification which will ask you whether you want to download the examples, but you wouldn’t be the first to miss it 🙂#2020-01-0410:06cflemingYou can download it manually at Preferences | Languages &amp; Frameworks | Clojure | Documentation options.#2020-01-0410:20DanEEStar@cfleming Thanks for the tips. ClojureDocs works in my Cursive for other Clojure-projects with *.clj files. But it still does not work for my *.cljs files in my ClojureScript-projects where I use shadow-cljs. I imported the project from the pom.xml file like described here: https://shadow-cljs.github.io/docs/UsersGuide.html#_cursive Maybe it has something to do with that?#2020-01-0410:26DanEEStarI also tried to download it manually in the ClojureScript project. Still no luck…#2020-01-0410:31cflemingOh, sorry, I missed the ClojureScript part of your project. The problem is that ClojureDocs has no examples for ClojureScript at all.#2020-01-0410:32cflemingIt’s an open question if I should show the clj equivalent when showing the doc for a cljs built-in - I guess I could show a warning that the examples are actually for Clojure not ClojureScript in that case.#2020-01-0410:33DanEEStarThat would be great! Most of the functions I need help on are basic functions which are the same in normal Clojure.#2020-01-0410:34cflemingYeah, that’s probably the case for a lot of use cases. I’m a little worried about showing examples for functions which actually differ like defrecord, but hopefully the warning would be enough in that case.#2020-01-0410:54cfleminghttps://github.com/cursive-ide/cursive/issues/2292#2020-01-0416:57guy👋 might have been asked before but.. in the emacs keymap there is ctrl+\ to jump to repl editor. Whats the command to jump back to the file you were editing?#2020-01-0418:05guyMaybe this is the way?#2020-01-0418:05guyhttps://github.com/cursive-ide/cursive/issues/607#2020-01-0418:09guythis looks promising! https://github.com/cursive-ide/cursive/issues/174#2020-01-0418:09guyok so#2020-01-0418:10guyI can now do Ctrl+\ to jump to repl from my file. Then i have to do Esc Esc to jump back#2020-01-0606:57DanEEStarSince Intellij 2019.3 (this is very new!) you can assign a new shortcut to the “Focus Editor” action.#2020-01-0608:29guyooooh thats neat, ill check the community edition to see if its the same#2020-01-0608:31guywell that explains it!#2020-01-0608:31guyThats why Esc Esc works for me haha#2020-01-0608:31guyThanks very much @ULAAD3H2P#2020-01-0418:10guyThis is good enough for me! Thanks 😄#2020-01-0423:24KamuelaWhen you do something like say an infinite loop in the built-in Cursive REPL, and things become unresponsive, is there a way to fix this without force quitting the whole IntelliJ app?#2020-01-0423:26cflemingYes, you can try interrupting the execution (second icon on the toolbar, it’s not always obvious it’s enabled), or you can kill and restart the REPL process using the Stop REPL button.#2020-01-0423:53KamuelaAh ok I see what you mean, because it doesn't show up as red or a special color. It does seem to work now and I can't get the whole process to lock-up. I'll at least know to try to find that first next time#2020-01-0501:14thosmosI keep getting an error when Cursive attempts to build stubs. Wondering what I can do to troubleshoot this? I’m guessing it has something to do with datomic-pro …
5:12 PM	Error generating stubs for module riverdb-graphql
				Jan 04, 2020 5:12:18 PM org.hsqldb.persist.Logger logInfoEvent
				INFO: dataFileCache open start
				Disable stub generation for module riverdb-graphql
#2020-01-0501:15cflemingDo you have anything in your log file? Do the namespaces using datomic do anything side-effecting like accessing HSQLDB?#2020-01-0501:16thosmosI don’t use HSQLDB at all anywhere. Which log file?#2020-01-0501:16cflemingIt’s weird that this shows up: org.hsqldb.persist.Logger#2020-01-0501:16cflemingHelp | Show Log in Finder/Explorer…#2020-01-0501:28thosmos
2020-01-04 17:26:38,811 [536402385]   INFO - pl.ProjectRootManagerComponent - project roots have changed 
2020-01-04 17:26:38,837 [536402411]   INFO - .diagnostic.PerformanceWatcher - Pushing properties took 2ms; general responsiveness: ok; EDT responsiveness: ok 
2020-01-04 17:26:39,167 [536402741]   INFO - .diagnostic.PerformanceWatcher - Indexable file iteration took 329ms; general responsiveness: ok; EDT responsiveness: ok 
2020-01-04 17:26:39,175 [536402749]   INFO - indexing.UnindexedFilesUpdater - Unindexed files update started: 3 files to update 
2020-01-04 17:26:39,231 [536402805]   INFO - .diagnostic.PerformanceWatcher - Unindexed files update took 56ms; general responsiveness: ok; EDT responsiveness: ok 
2020-01-04 17:26:39,263 [536402837]  ERROR - pplication.impl.LaterInvocator - null cannot be cast to non-null type com.intellij.ui.treeStructure.SimpleNode 
kotlin.TypeCastException: null cannot be cast to non-null type com.intellij.ui.treeStructure.SimpleNode
	at cursive.deps.navigator.DepsProjectStructure.update(Navigator.kt:55)
	at cursive.build.navigator.BuildSystemToolWindowFactory$scheduleStructureUpdate$1.invoke(Navigator.kt:94)
	at cursive.build.navigator.BuildSystemToolWindowFactory$scheduleStructureUpdate$1.invoke(Navigator.kt:43)
	at cursive.build.BuildSystemUtil$invokeLater$1.run(BuildSystemUtil.kt:67)
	at com.intellij.openapi.application.TransactionGuardImpl$2.run(TransactionGuardImpl.java:309)
	at com.intellij.openapi.application.impl.LaterInvocator$FlushQueue.doRun(LaterInvocator.java:441)
	at com.intellij.openapi.application.impl.LaterInvocator$FlushQueue.runNextEvent(LaterInvocator.java:424)
	at com.intellij.openapi.application.impl.LaterInvocator$FlushQueue.run(LaterInvocator.java:407)
	at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:313)
	at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:776)
	at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:727)
	at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:721)
	at java.base/java.security.AccessController.doPrivileged(Native Method)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
	at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:746)
	at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:908)
	at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:781)
	at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$8(IdeEventQueue.java:424)
	at com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:698)
	at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:423)
	at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
	at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)
2020-01-04 17:26:39,263 [536402837]  ERROR - pplication.impl.LaterInvocator - IntelliJ IDEA 2019.3.1  Build #IC-193.5662.53 
2020-01-04 17:26:39,264 [536402838]  ERROR - pplication.impl.LaterInvocator - JDK: 11.0.5; VM: OpenJDK 64-Bit Server VM; Vendor: JetBrains s.r.o 
2020-01-04 17:26:39,264 [536402838]  ERROR - pplication.impl.LaterInvocator - OS: Mac OS X 
2020-01-04 17:26:39,264 [536402838]  ERROR - pplication.impl.LaterInvocator - Plugin to blame: Cursive version: 1.9.1-eap1-2019.3 
2020-01-04 17:26:39,264 [536402838]  ERROR - pplication.impl.LaterInvocator - Last Action: EditorBackSpace 
2020-01-04 17:27:26,648 [536450222]   INFO - il.indexing.FileBasedIndexImpl - Rebuild requested for index ClojureSymbolMeta 
java.lang.Throwable
	at com.intellij.util.indexing.FileBasedIndex.requestRebuild(FileBasedIndex.java:64)
	at cursive.stubs.ReplStubsNotifications$createNotification$1$whenDone$1.run(Stubs.kt:234)
	at cursive.stubs$generate_stubs$fn__15527$process__15528.invoke(stubs.clj:293)
	at cursive.stubs$generate_stubs$fn__15527.invoke(stubs.clj:362)
	at cursive.task$backgroundable$reify__15437.run(task.clj:12)
	at com.intellij.openapi.progress.impl.CoreProgressManager$TaskRunnable.run(CoreProgressManager.java:888)
	at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$2(CoreProgressManager.java:163)
	at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:585)
	at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:531)
	at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:59)
	at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:150)
	at com.intellij.openapi.progress.impl.CoreProgressManager$4.lambda$run$0(CoreProgressManager.java:402)
	at com.intellij.util.ConcurrencyUtil.runUnderThreadName(ConcurrencyUtil.java:221)
	at com.intellij.openapi.progress.impl.CoreProgressManager$4.run(CoreProgressManager.java:402)
	at com.intellij.openapi.application.impl.ApplicationImpl$1.run(ApplicationImpl.java:238)
	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
	at java.base/java.lang.Thread.run(Thread.java:834)
2020-01-04 17:27:26,698 [536450272]   INFO - il.indexing.FileBasedIndexImpl - scheduleIndexRebuild, reason: checkRebuild 
2020-01-04 17:27:26,723 [536450297]   INFO - .diagnostic.PerformanceWatcher - Pushing properties took 1ms; general responsiveness: ok; EDT responsiveness: ok 
2020-01-04 17:27:27,607 [536451181]   INFO - .diagnostic.PerformanceWatcher - Indexable file iteration took 871ms; general responsiveness: ok; EDT responsiveness: ok 
2020-01-04 17:27:27,612 [536451186]   INFO - indexing.UnindexedFilesUpdater - Unindexed files update started: 1164 files to update 
2020-01-04 17:27:31,837 [536455411]   INFO - .diagnostic.PerformanceWatcher - Unindexed files update took 4225ms; general responsiveness: ok; EDT responsiveness: ok
#2020-01-0501:32cflemingSo I’m not 100% sure, but what I think might be happening is that something the namespace is requiring is causing that logging to appear on stderr, which is weird because it doesn’t look like an error. Cursive will interpret anything coming out on stderr as an error and show that message. Do the stubs seem to generate correctly, i.e. do the symbols resolve correctly once you’ve done this despite the error?#2020-01-0501:51thosmosdatomic.api/q is resolved in the REPL (I can cmd-hover and get arg names), but not in the file editor … it’s colored as an undefined variable and does nothing when I cmd-hover#2020-01-0501:55thosmosoh and it’s not datomic, that depends on h2, rather it’s org.geotools/gt-epsg-hsql I’ll look into updating or removing those deps#2020-01-0501:56thosmosI think I updated those recently#2020-01-0501:57thosmoshow do I trigger stub generation without the prompt to do so?#2020-01-0502:08thosmosI need this dep and it looks like it creates an hsql db at some point. The docs mentions that it creates the DB where temp files get created: http://docs.geotools.org/latest/userguide/library/referencing/hsql.html#2020-01-0502:14thosmosok so I just deleted that temp folder and when I ran the REPL that same info message showed up when it creates the database …. so yeah it has something to do with stub generation getting confused by that dep#2020-01-0502:21thosmosis there any flexibility around telling stub generator to exclude some deps?#2020-01-0502:28thosmosnow it seems to be working, maybe I just needed to close and open after the stubs generation …#2020-01-0502:28thosmosI’m going to ignore that stubs error#2020-01-0510:09vinaiIs there a workaround for clojure.test.check.clojure-test/defspec causing the following errors when executing “Run Tests in current NS in REPL”?
Error handling response - class java.lang.IllegalArgumentException: Argument for @NotNull parameter 'path' of com/intellij/openapi/vfs/impl/local/LocalFileSystemBase.findFileByPath must not be null
Found two github issues, but no resolution.
#2020-01-0523:17cflemingI don’t think there’s a workaround, sorry - I’ll try to look at that soon.#2020-01-0612:29vinaiThank you, much appreciated! My workaround so far is to use clojure.test.check/quick-check in a comment in the REPL session, and run the tests with leiningen (just FYI).#2020-01-0523:54wilkerlucio@cfleming hello, hey, I noticed something did change with the deps auto-complete in this new version, currently if I don't type the namespace of the package it tries to search for namespaces, I remember I talked about this with you before, got fixed, and now seems it got a regression, should I open an issue for it?#2020-01-0523:55cflemingYes please!#2020-01-0703:30wilkerluciostrange, I was writing the issue but now it seems to work normally, maybe was a flacky one :man-shrugging:#2020-01-1013:47wilkerlucio@cfleming actually no, I'm experiencing the problems again, I add as part of this other issue someone already created: https://github.com/cursive-ide/cursive/issues/2295#2020-01-1013:47wilkerlucio@cfleming actually no, I'm experiencing the problems again, I add as part of this other issue someone already created: https://github.com/cursive-ide/cursive/issues/2295#2020-01-0800:12Vachihi, is there a way to print the whole stacktrace in the repl by default?#2020-01-1303:41cflemingNo, not at the moment.#2020-01-0806:40okworiThe direction keys(2,4,6,8) within the Numerical Keypad on Ubuntu(Cursive) doesn't display history of commands on the repl. Same keys works on the terminal(Ubuntu), and also on Windows(Cursive). Has anyone noticed similar something similar maybe?#2020-01-0904:46okworiIDE specific ishh... fix: https://intellij-support.jetbrains.com/hc/en-us/community/posts/206345169-Scrolling-with-keys-on-numeric-keypad-with-num-lock-off#2020-01-0913:39octahedrionhow do I disable all clever auto-formatting, such as when it aligns the raised contents of a form with the parent form ? I want such structural operations to leave the formatting untouched#2020-01-1303:42cflemingThere’s no way to do this at the moment. Is there a particular case which isn’t doing what you want?#2020-01-0915:31VachiHi, it is possible to get this https://github.com/venantius/ultra working with cursive?#2020-01-1303:42cflemingNo, ultra tends to mess with things like the test integration.#2020-01-1303:43cflemingBut I think that Cursive actually offers everything that ultra does out of the box - is there something in particular that you’re missing?#2020-01-0920:07Ivan Koz@octo221 have you checked settings -> editor -> code style -> clojure ?#2020-01-1012:45deasHow do you guys navigate to string requires (node module namespaces) ?#2020-01-1303:44cflemingThere’s no good way to do this at the moment, unfortunately.#2020-01-1210:10Lukas#2020-01-1210:39fmjreyThe animation from the doc shows results were there before any evaluation, therefore I would think there is no feature that emits results within the editor as special comments, results only show in the REPL window. https://cursive-ide.com/userguide/repl.html#using-the-repl#2020-01-1210:41fmjreyIf you right click on a form you'll see menu options REPL/Send ... with keyboard shortcuts for your OS#2020-01-1303:45cflemingRight, I added those manually for the demo. Cursive doesn’t have a command which adds results as comments at the moment, although people ask about it from time to time.#2020-01-1317:24Lukasty all for your replies and time 🙂#2020-01-1320:56kennyThe doc example for async/merge seems to be missing the <!! in the last 2 lines.#2020-01-1320:58cflemingI’ll check that, it’s possible the examples aren’t being escaped properly.#2020-01-1703:35cflemingThis is fixed for the next build: https://github.com/cursive-ide/cursive/issues/2299#2020-01-1703:39kennyWoo! Does that fix the other one that was missing indentation too?#2020-01-1703:51cflemingNo, I’ll answer over there.#2020-01-1517:05kennyCursive seems to be ignoring indentation on doc strings. Makes it quite hard to read.#2020-01-1517:06kennydocstring from source has indentation#2020-01-1517:09kennyPerhaps related to https://clojurians.slack.com/archives/C0744GXCJ/p1578948972015100#2020-01-1520:20cflemingHmm, that’s odd, the doc is HTML but it’s all wrapped in a pre. I’ll look at that one too.#2020-01-1703:52cflemingI remember why I did this now. It’s because the first line of a docstring normally has no indentation, but the others have whatever indentation the string itself has in the source code. So like this:
(defn foo
  "Docstring here.
   And here."
  [x]
  ...)
#2020-01-1703:53cflemingHere, the second line has 3 spaces at the start of the line. I think what I’ll do is check all the lines excluding the first, find the minimum indent of all those lines and then apply that to all of them.#2020-01-1704:10cflemingThat works well:#2020-01-1704:15cfleminghttps://github.com/cursive-ide/cursive/issues/2300#2020-01-1704:15cflemingFixed for the next build too.#2020-01-1704:34kennyAwesome, thanks!#2020-01-1718:00kennyWould this also fix the misalignment seen in the below screenshots? Left is the function's source and right is the quick doc view.#2020-01-1721:24cflemingPossibly, I’ll try that and see.#2020-01-2017:02kennyJust updated and the docstrings look much nicer! Looks like the latest eap did not fix the multiline args alignment.#2020-01-1520:16jeff.terrellI'm asking my students to install Cursive with Clojure CLI/deps, and several of them on Windows are having the same problem, which I don't know how to resolve. The "Working with Deps" documentation [1] says to hit "refresh" in a settings panel to download the list of available options for the tools.deps.alpha library version. But that network request seems to be consistently failing, on various Windows computers. Anybody know what the issue might be? [1] https://cursive-ide.com/userguide/deps.html#2020-01-1520:18jeff.terrellPossibly relatedly, I noticed a one-time popup, maybe after installing the Cursive plugin (though I'm not sure), that said it was unable to download a JAR file, I think from Maven Central. It gave the URL. We gave that URL to a web browser and it told us that http:// was disabled and to try https:// instead. When we manually made that substitution in the browser, we were able to download the JAR file. Not that that helped us with whatever problem IntelliJ and/or Cursive had, though.#2020-01-1520:21cfleming@U056QFNM5 That’s definitely odd. The http:// thing sounds related, but I can’t think what that would be. I thought that everything was downloaded over HTTPS anyway.#2020-01-1520:21cflemingDo you see anything in the log on the failed machines? Help-&gt;Show log in Finder/Explorer.#2020-01-1520:21jeff.terrellI'll ask, thanks.#2020-01-1520:21cflemingAlso, when the request fails, what does that look like?#2020-01-1520:23jeff.terrellIt shows the spinner for a split second is all. <none> is still selected in the list, and no other options are available. No error message or anything.#2020-01-1520:25cflemingOk, so the Maven Central repo is indeed being fetched over HTTP, which seems wrong. I’ll fix that. In the meantime, you could use the “Use private repo” option, give it the id central2 and the address and see if that helps.#2020-01-1520:27jeff.terrellGreat, thanks very much! I'll pass that along. I wonder if Maven Central recently changed their config to block http instead of redirect or something.#2020-01-1520:28cflemingI suspect it’s something in your network environment, since all Cursive users are using HTTP and this is the first time I’ve ever heard of a problem with it.#2020-01-1520:38cfleming(that said, that it uses HTTP by default is definitely a bug - I’ve just fixed that for the next build).#2020-01-1523:40jeff.terrellOne user reports that your 'Use private repo' workaround worked. Thanks for the quick responses! I haven't noticed issues with the network before, but I wouldn't rule it out. We're on a large campus (UNC), so maybe there's some weird security policy or something.#2020-01-1601:04cflemingGreat, thanks for letting me know!#2020-01-1722:03tanzoniteblackhttps://support.sonatype.com/hc/en-us/articles/360041287334-Central-501-HTTPS-Required
Effective January 15, 2020, The Central Repository no longer supports insecure communication over plain HTTP and requires that all requests to the repository are encrypted over HTTPS.
#2020-01-1803:02cflemingOh wow. I’d better get that release out.#2020-01-1803:03cflemingAlthough there is a workaround, that’s going to bite a lot of people.#2020-01-1603:30kennyI'm running the debugger and have a function like this:
(defn foo
  [x]
  (+ x "as"))
When I run (foo 1) in the repl I get a ClassCastException thrown. I have Java Exception Breakpoints > Any exception checked. And a notification for only Uncaught exceptions (the caught exception is unchecked). The debugger does not pause on the ClassCastException with this configuration. Is this expected?
#2020-01-1604:33cflemingNo, that should work. If you switch to catching caught exceptions too does that stop?#2020-01-1604:34kennyYes. It also stops at a bunch of other places. #2020-01-1604:35cflemingHmm, that’s probably because the REPL will catch all exceptions to do error handling, and the debugger knows that.#2020-01-1604:36cflemingCould you file an issue about that? I’m not sure I’ll be able to fix that but I’ll try.#2020-01-1605:02kennyOk. Will do tomorrow. #2020-01-1621:17kennyhttps://github.com/cursive-ide/cursive/issues/2297#2020-01-1621:33cflemingThanks!#2020-01-1622:48kennyDo people typically start their REPL in "debug" mode so you don't need to restart your REPL to activate it when you need it?#2020-01-1623:27cflemingI don’t always start a REPL (depends what I’m working on, it’s not always possible/useful), but I always start my app in debug mode, yes.#2020-01-1623:28cflemingThere’s very little downside. The main problem is that I’ve found that it can greatly increase memory consumption on the launching IDE, but not always.#2020-01-1623:31kennyI think I'll start doing that! I only found myself reaching for the debugger in dire situations because it required a REPL restart, having always started a REPL in "run" mode. For some reason I assumed there was some downside to starting in debug mode.#2020-01-1623:29cfleming@potetm It took a while to get this right, but:
(iterate (fn [_] (throw (RuntimeException.))) 0)
Error printing return value at user/eval349$fn (NO_SOURCE_FILE:2).
null
(with the socket REPL)
#2020-01-1715:07bnstvnhi, the clojuredocs examples doesn’t come with the docs for .cljs — that is intentional, right?#2020-01-1721:23cflemingWell, it’s intentional in that ClojureDocs doesn’t contain examples for CLJS. But see this issue: https://github.com/cursive-ide/cursive/issues/2292#2020-01-1723:51andy.fingerhutThe http://Clojuredocs.org web site might have been created before ClojureScript was created, and the http://Clojuredocs.org maintainers probably have not chosen to try adding ClojureScript-specific distinctions to their web site.#2020-01-1723:52andy.fingerhutIndividual example writers are free to describe their examples as specific to Clojure/Java or ClojureScript, if they choose, but some might not even be aware of the differences.#2020-01-1922:55steveb8nQ: does the test integration (CMD-SHIFT-T) work for cljs tests/repls as well as jvm?#2020-01-1922:58cflemingSadly no, although I’m hoping to fix that soon.#2020-01-1923:04steveb8ngood to know. saves me time discovering that fact#2020-01-1922:56steveb8nI’m using shadow more lately so I’m setting up proper tooling/feedback#2020-01-2022:12shaun-mahood@cfleming Not sure if it's a problem on my end or yours, but I can't view https://groups.google.com/forum/#!forum/cursive-announce (linked from https://cursive-ide.com/mailinglist.html) - I get the error message "This group either doesn't exist, or you don't have permission to access it. If you're sure this group exists, contact the Owner of the group and ask them to give you access."#2020-01-2205:00cflemingIs that better now?#2020-01-2205:11shaun-mahoodYep, thanks!#2020-01-2022:27sogaiudata point: i see a similar message#2020-01-2023:49rbarkeranyone having to constantly click ‘add as leiningen project’ every time they start cursive?#2020-01-2117:21tanzoniteblackyes, I have this issue too#2020-01-2203:23rbarkerI think it is an issue to do with the latest version on intellij as it has only started to occur since I updated#2020-01-2204:56cflemingWhich version did you update to?#2020-01-2403:05rbarker2019.3#2020-01-2403:05rbarkerIntelliJ IDEA 2019.3.2 (Community Edition) Build #IC-193.6015.39, built on January 21, 2020 Runtime version: 11.0.5+10-b520.30 x86_64 VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o macOS 10.14.6 GC: ParNew, ConcurrentMarkSweep Memory: 1979M Cores: 12 Registry: Non-Bundled Plugins: Docker, Leiningen, com.cursiveclojure.cursive, net.ashald.envfile, org.intellij.plugins.hcl#2020-01-2721:08rbarker@cfleming#2020-01-2721:19cflemingBased on the other thread, does this only happen in 2019.3?#2020-01-2721:27tanzoniteblackthis has been happening to me for several months...but it recently stopped happening for me#2020-01-2721:28tanzoniteblackI'm not 100% sure when it stopped being broken. My company's largely switched to using tools-deps instead of lein, so there's only one or two projects still using lein and they're not ones I work on on a daily basis#2020-01-2721:59cflemingOk, thanks. @U0GRS7HB7 can you send me a your log file after reproducing the issue? Probably shutting down IntelliJ and then restarting it would be best, so I can see the log from shutdown and startup. The log is at Help-&gt;Show log in Finder/Explorer. If you’d rather not attach it here feel free to mail it to <mailto:/cdn-cgi/l/email-protection|/cdn-cgi/l/email-protection>.#2020-01-2722:37rbarker#2020-01-2722:40rbarker@cfleming I have emailed you a copy of my logs. Thanks.#2020-01-2722:46cfleming@U0GRS7HB7 It looks like you have the old Leiningen plugin installed. You’ll have to remove that for Cursive to work correctly. Cursive contains everything that plugin has and much much more, you don’t need it.#2020-01-2723:23rbarkerThat seems to have fixed it. Thank you! Actually didn’t even realise I had that plugin installed - IntelliJ must have suggested it one day.#2020-01-2723:26tanzoniteblackYou know, I recently had something muck up my intellij plugin syncing and had to reinstall a number of them manually. I wonder if this "happened" to have occurred around the same time this issue went away for me#2020-01-2800:00cflemingI should actually probably check in Cursive if that plugin is installed, and if it is notify the user and offer the option to uninstall it automatically.#2020-01-2800:02cfleminghttps://github.com/cursive-ide/cursive/issues/2303#2020-01-2101:35kennyWhat does this icon mean when debugging? Can there a be a tooltip on hover saying what it means?#2020-01-2101:41sogaiuis that the same one that appears here: https://www.jetbrains.com/help/img/idea/2019.3/debug_tutorial_tool_overview.png (line 4?) via: https://www.jetbrains.com/help/idea/debugging-your-first-java-application.html#analyzing-state#2020-01-2101:43sogaiuhere's a "table" of sorts: https://www.jetbrains.com/help/idea/using-breakpoints.html#breakpoint-icons#2020-01-2101:43sogaiumay be it's "verified line breakpoint"?#2020-01-2102:48kennyAh yes, that's it!#2020-01-2102:48kennyThat is a very helpful table.#2020-01-2102:50kennyGiven the number of icons that can show, it really seems like there should be a hover tooltip on that. It's quite unlikely I'm going to remember all 30 icons.#2020-01-2103:42sogaiuindeed!#2020-01-2104:46cflemingYes, that would be good. It’s an IntelliJ thing rather than a Cursive thing, though.#2020-01-2204:22shaun-mahoodHave there been any recent developments related to CLJS repls? I’m specifically looking to connect to a figwheel-main repl in a deps.edn project, but general information would be good too.#2020-01-2204:54cflemingSadly no, sorry, I got sidetracked with other things. It’s still near the top of my to-do list.#2020-01-2205:16shaun-mahoodTotally understood - no worries on my end, I was mostly wondering if I missed any news about it. Hopefully things are a little more stable on the Intellij side of things for the next little while.#2020-01-2209:29onetomi have some issues with loading .cljc files. if im trying to load one into a remote nREPL client, cmd-shift-l does nothing, but cmd-shift-p works and it uses the namespace of the cljc file too. if i start a local nREPL client in the same clojure deps project, i can evaluate the same cljc file. i've also noticed, when i start a Cursive nREPL client with the "Use port from nREPL file" option, then i try to edit that run configuration later, the Project field under the "Use port..." radio button goes back to [none] state and a little red x appears over the icon of the run configuration. (im on the latest 1.9.1-eap2-1-g33030cb3 cursive version, jdk8, intellij 2019.3.2)#2020-01-2209:30onetomim using a remote nREPL server to connect to a locally started gorilla nrepl server, btw#2020-01-2220:40Adrian SmithIf I import this project: https://github.com/roman01la/proton-native-cljs how do I get the unresolved messages to go away?#2020-01-2220:45roman01laI think there's no way to do it in Cursive#2020-01-2310:17roman01la@U0567Q30W is there anything Cursive can do with this? Maybe use externs information to resolve JS methods and properties?#2020-01-2310:18roman01laClojureScript is already doing that to provide arglists and docs in REPL#2020-01-2310:18cflemingYes, I’m planning to improve this support, and also make the inspection much less shouty when it doesn’t work. There will always be a lot of cases where it’s basically impossible to tell what’s going on with JS.#2020-01-2310:19roman01laI think type hints could help to resolve values in such cases?#2020-01-2310:20cflemingYes, and I’m planning to add type inference too.#2020-01-2310:21cflemingI’m still debating whether to base the new support on the IntelliJ JS support or not. Obviously that is much more mature and complete than anything I will ever do, but it’s also only available in paid IDE editions.#2020-01-2310:38roman01laI imagine it would be neat if Cursive’s JS resolution mechanism could work the same as ClojureScript’s externs inference, so unresolved highlighted expressions would actually point that an expression should by type hinted or manual externs should be provided.#2020-01-2310:08roklenarcicI’ve got a problem with Parinfer mode… when I have a merge conflict in a file it will move parenthesis around and basically ruin the file when I open it.#2020-01-2310:09cflemingYou mean that you’re opening the file with the merge conflict still present in the IntelliJ editor? i.e. not using the IntelliJ merge dialog?#2020-01-2310:21roklenarcicyeah#2020-01-2310:22roklenarcicI’ve never really used IntelliJ git interface for that#2020-01-2310:24cflemingI recommend it, it’s great, but what you’re doing shouldn’t break things either. Could you file an issue for that so it doesn’t get lost?#2020-01-2310:32roklenarcicok#2020-01-2310:34cflemingI’m not sure how best to handle that, but I’ll see what I can do. Do you have the Git plugin installed and enabled?#2020-01-2310:34roklenarcicI haven’t installed any Git plugins specifically#2020-01-2310:34roklenarcicit says here that it’s bundled#2020-01-2310:35roklenarcicso I’m guessing it’s automatically installed#2020-01-2310:37cflemingYes, it’s installed and enabled by default. Being able to detect merge conflicts quickly enough for parinfer purposes will probably rely on that, since I’m sure they index which files have conflicts.#2020-01-2313:21octahedrionthis has probably been asked before but is there a way to halt printing of accidentally evaluated forms with large results that print in another thread ? can't interrupt current evaluation and even stopping the REPL doesn't work - have to stop and close the REPL tab#2020-01-2313:27Ivar RefsdalNot directly addressing your question, but have you tried if (set! *print-length* 20) (or some other value) avoids the freezing? Edit: Demonstration:
(do (set! *print-length* 20) (println (range 1e9)))
(0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 ...)
=> nil
#2020-01-2313:35octahedrionyes I know that but I always always forget#2020-01-2313:35octahedrionand I feel like in 2020 this shouldn't be so primitive#2020-01-2522:21cflemingI’m planning a fix to allow stopping printing of the last eval result. However if you kick off something in a background thread which prints a lot, there’s really no useful way to stop that.#2020-01-2403:05rbarkerwhat is the latest version of intellij that cursive supports? i seem to have some issues with 2019.3#2020-01-2410:40Ivar RefsdalIs that with 2019.3.2? I have problems with that too. Did not have problems with 2019.3.1#2020-01-2410:49Ivar RefsdalWelp, 2019.3.2 works again. No idea why#2020-01-2522:22cflemingI’m not aware of any issues, I’m interested to know details on what’s not working correctly.#2020-01-2721:09rbarkereverytime i reopen intellij, I have to click my project.clj and ‘add as leiningen project’ - it doesn’t seem to persist when restarting intellij and I have to do this again when restarting intellij#2020-01-2409:02octahedrionwhat setting do I change to ensure that Cursive never reformats code following any kind of refactoring (e.g. renaming) or any other action at all other than tab or shift-tab ? I keep having to sweep my code back into place because some action is randomly linked with reformatting code way to the right or with some random number of spaces instead of 2. I only ever want code to be indented with 2-spaces#2020-01-2409:23cflemingRight now, you can’t stop it reformatting after things like paredit actions. For the two space indent, see the “Only indent” section here: https://cursive-ide.com/userguide/formatting.html#code-style-settings#2020-01-2412:13mbjarlandI have a formatting question. I’m probably missing something fundamental but as I’ve failed to find and answer I figured I would ask. Is there a way in cursive to align the first expression in a threading macro with the expression on the next line. Currently it does as in the image for me. I would like the two (parse-… lines to be aligned.#2020-01-2522:18cflemingYes, see here: https://cursive-ide.com/userguide/formatting.html#code-style-settings#2020-01-2522:19cflemingSetting the parameters to 0 will do what you want, it will treat all params to -> the same.#2020-01-2412:27JoniAny idea why in .cljc when I have try to declare a function in the cljs scope it breaks all the syntax highlighting, but it works well if it's declared as :clj?#2020-01-2417:26rafaelSeems like Cursive 1.9.1 eap2 is not compatible with Idea EAP 2020.1. I got the following error after updating idea:
The Cursive (id=com.cursiveclojure.cursive, path=~/.local/share/JetBrains/IntelliJIdea2020.1/clojure-plugin, version=1.9.1-eap2-2019.3) plugin is incompatible (target build range is 193.0 to 193.*).
#2020-01-2522:18cflemingNo, it’s not - I’ll try to get an EAP out ASAP supporting that.#2020-01-2714:48rafaelThat'd be awesome.#2020-01-2511:39bortexzDoes anyone know if it’s possible to turn indentation to 2 spaces by default on all macros?#2020-01-2522:17cflemingYes: https://cursive-ide.com/userguide/formatting.html#code-style-settings#2020-01-2602:07royalaidHey @cfleming, I am trying setup a project with a lot of submodules (for AWS Amplify). Whenever I try to rename the modules in Intellij and I reimport/update my deps it overwrites the name of the module with the name of the folder that contains the submodule. Is there a way to override this behavior or to tell Cursive that a specific dir should respect a specific name?#2020-01-2606:10cflemingUnfortunately not at the moment. Deps philosophically avoids naming things where possible, and that causes problems with Cursive which needs names for things, in particular modules. Why do you need to rename the modules in IntelliJ, do you have various projects in directories with the same name?#2020-01-2606:11cflemingI guess one possible option would be to use the directory name on project creation, but then not reset it later if someone has renamed the module manually.#2020-01-2621:22royalaidWhy do you need to rename the modules in IntelliJ, do you have various projects in directories with the same name?Yeah, its a bunch of lambda's here is a screenshot of the folder structure. All of the modules end up end src or src-1 with some actually deleting other modules. It's not a huge deal but it is annoying.#2020-01-2621:56royalaidI have asked in #shadow-cljs to see theller has a way to move the deps.edn file up a level#2020-01-2621:57royalaidThat would "magically" fix this issue for me but it probably still stands for others#2020-01-2621:57royalaidI think not overwriting changes to module names would work for me#2020-01-2621:58royalaidbut it might get hairy if it isn't made obvious that renaming is not happening for a reason#2020-01-2709:18cflemingOk, I’ll try to get that fix into the next EAP.#2020-01-3022:22royalaidFor what its worth I have worked around the above by consolidating per Thomas' recommendation and now only have one Shadow-cljs and deps.edn file. That all being said I think this change still have merit and is more in line with expected behavior#2020-01-3023:55cflemingYes, definitely. I’d hoped to get this in the next EAP but updating to support 2020.1 is taking way longer than expected so this might not happen until the following one.#2020-01-2602:08royalaidI would like to avoid renaming the the folders because Amplify's lambda deploy mechanism assume the shape of the code directory#2020-01-2715:35simongrayWhat actually happens when I click the refresh button on a ClojureScript Deps project? I’m trying to figure out what Clojure CLI command Cursive is executing.#2020-01-2716:09kennyI don't know what is actually run but it's something like clojure -A<aliases checked> -Spath. That gets cached for each module.#2020-01-2718:20simongrayThanks @U083D6HK9!#2020-01-2723:13cflemingCursive doesn’t actually run a deps command for that, it uses the tools.deps.alpha library directly.#2020-01-2810:30simongray@cfleming But I guess the code that is ultimately run is the same? BTW thanks for making the awesome tool that is Cursive. Still haven’t found anything better for writing Clojure code.#2020-01-2821:48cflemingYes, clj is essentially a script that invokes tools.deps.alpha, so the underlying code that’s called is the same.#2020-01-2715:36simongrayI’m trying to learn about deps.edn at the moment, only used to leiningen.#2020-01-2723:09tony.kayAny chance you’d be willing to add support to the macros in meander? https://github.com/noprompt/meander It uses a lot of ?x variables…I can declare them to get rid of the syntax warnings, but perhaps that is easy to support @cfleming?#2020-01-2723:12cflemingSure, could you file an issue for that?#2020-01-2723:12tony.kaywill do, thanks!#2020-01-2723:17tony.kayhttps://github.com/cursive-ide/cursive/issues/2302#2020-01-2809:20Vincent Cantin@cfleming I found a subtle bug in Cursive: the param b is shadowed by the function name. A runtime test shows that the opposite is in fact happening.#2020-01-2809:21cflemingThat is definitely subtle! Could you file an issue for that please?#2020-01-2809:23Vincent Cantinok, I found https://github.com/cursive-ide/cursive/issues#2020-01-2809:24cflemingYes, it’s in the header of the Cursive channel.#2020-01-2809:30Vincent Cantinhttps://github.com/cursive-ide/cursive/issues/2305#2020-01-2809:32cflemingThanks!#2020-01-2810:48mbjarlandHi all, is there any way in cursive to get case expressions to align properly? Known issue?#2020-01-2812:11simongrayYou can change the default indentation to “2 spaces” by clicking on the small lightbulb that appears when you put the cursor around (`case`#2020-01-2812:11simongrayNo way to get vertically aligned kvs afaik though#2020-01-2812:16mbjarlandright, my issue isn’t really the number of spaces but the fact that (:a :b) doesn’t align with (:d :e) etc in my example.#2020-01-2812:17mbjarlandI use “reformat code” extensively which essentially disqualifies the use of case for me…can’t stomach looking at that indentation : )#2020-01-2812:21mbjarlandok, solved, with either “indent” or “function” setting for case they do align:
(defn equ
  [a]
  (case a
    (:a b) true
    :c true
    (:d :e) true
    false))
I’m happy and apologies for not finding this sooner
#2020-01-2812:21mbjarlandrtfm#2020-01-2812:40simongraygreat that you managed to solve it 🙂#2020-01-2812:41simongrayAn alternative is to use map lookups instead of a case statement. That way you can also get vertical alignment.#2020-01-3105:53mbjarland@U4P4NREBY how would you do branches with multiple elements in them with map lookups?#2020-01-3105:54mbjarlandI did this with:
(condp get a
  #{:a :b} true
  #{:c} false
....
which kinda works but has extra noise in there
#2020-01-2812:58Joe R. SmithWhy doesn't code completion work for things def'd in comment forms?#2020-01-2821:06cflemingBecause it’s a bit tricky, basically. You’d only want the completion to work within the comment block, not in normal code, and that’s somewhat complicated. That said, it’s possible - if you could file an issue for that I’ll take a look at it.#2020-01-2813:25stijnin the editor color settings, is there a way to color the top level symbols for Clojure (defn foo [a] (bar :x)), coloring foo but not bar? It's not there in the clojure specific settings#2020-01-2821:07cflemingSo a specific colour for vars, basically? Or for var definitions?#2020-01-3012:23stijnFor var definitions#2020-01-3013:03stijnI guess inheriting from Language Defaults > Identifiers > Function declaration or Global variable could work? But yes, I would like to only make it highlight at the definition site, not the usage#2020-01-3022:15cflemingThat’s a good idea about inheriting the style. I’ll check whether that’s doable/easy.#2020-01-3107:44stijnOk, that would be really nice, thanks!#2020-02-0207:10stijnAnd one other thing, would it be possible to make a difference between line comments (with ;) and form comments (with comment or #_)? Line comments usually provide important info and would like to highlight that, but commented forms can be greyed out. For some background, I'm trying to implement https://github.com/tonsky/intellij-alabaster in a dark scheme#2020-01-2815:44maxtIs there a solution for turning of namespace maps? Running (set! *print-namespace-maps* false) in user.clj gives me
java.lang.IllegalStateException: Can't change/establish root binding of: *print-namespace-maps* with set
#2020-01-2821:09cflemingNo, unfortunately. I’m planning to have an init section in REPL run configs, containing commands to be run after the REPL is initialised. That would fix this case and others.#2020-01-2815:45maxtFound some mentions of the problem but no solutions#2020-01-2815:46maxtA hook when cursive is started would be great#2020-01-2815:47Alex Miller (Clojure team)user.clj is read too early#2020-01-2815:47Alex Miller (Clojure team)the repl binding for *print-namespace-maps* hasn't been set yet#2020-01-2816:02maxtRight, I realize that's the problem. It's unfortunate, since I can't find any hook that is run later.#2020-01-2816:04maxtOverriding print-method like suggested here https://groups.google.com/forum/#!topic/clojure/XAP0ENMSUTc does work.#2020-01-2816:05maxtBut it feels a little rough. A post-repl init hook would be nice.#2020-01-2816:19imreThe case is similar if you want to (set! *warn-on-reflection* true) in user.clj for example, won't work
#2020-01-2820:48madstapSometimes cursive seems to indent maps like this:
{[: :]
                      {,,,}

 [: :]
                      {,,,}}
which I'd expect to be indented like:
{[: :]
 {,,,}

 [: :]
 {,,,}}
Is there a setting for this?
#2020-01-2821:08cflemingNo, that looks like a bug to me. Could you file an issue with a reproduction case?#2020-01-2821:34madstapYeah, I'll do it tomorrow as it's a coworker and not me.#2020-01-2905:26dpsuttonI redownloaded cursive and intellij and started relearning. I put in my community license but it expired at the end of 2019. Cursive suggests i can renew this, so i follow that workflow on the site. However, the renewal process tells me that this is a non-commercial license not a personal one but there doesn't seem to be an option to select this. The only two renewal options are personal or commercial. Are non-commercial licenses not eligible to renewed despite the UI inviting me to or have i missed an option in the renewal UI?#2020-01-2907:31cflemingNo, non-commercial licences don’t get renewed, you just get a new one when they expire.#2020-01-2907:31cflemingSince they’re free anyway, this seemed like the easiest option. Was there something in the UI suggesting that it should be renewed?#2020-01-2913:34dpsuttoni just looked at the event log and i must have misread it as saying "renew". I swear i read the verbiage 8 times. yeah you're correct it just says get a new one#2020-01-2913:35dpsuttonthe event log says get a new one. I am almost positive that the popup in the bottom right told me to renew. but maybe not#2020-01-2921:32cflemingNo, what appears in the event log is the same text as the notification.#2020-01-2923:11dpsuttonah sorry about that then 🙂#2020-01-3010:32simongrayI can’t for the life of me get Cursive to connect to the nrepl that shadow-cljs has created. Any help? This is a surprisingly hard problem to google despite the fact that the shadow-cljs dev apparently uses Cursive himself.#2020-01-3010:32thhelleryou likely want to configure a fixed port via https://shadow-cljs.github.io/docs/UsersGuide.html#nREPL#2020-01-3010:33simongrayYou really are everywhere! Thanks, but this is exactly what I’m doing, but Cursive just hangs with Connecting to remote nREPL server...#2020-01-3010:34thhellerdid you restart shadow-cljs? port changes require a restart#2020-01-3010:35thhellerit should print the port it used on startup#2020-01-3010:39simongrayOk, for some reason it wasn’t but now it does seem to work. Now the issue is that the code I put in my starting CLJ namespace doesn’t seem to get run…?#2020-01-3010:40simongray
(ns dev
  (:require [shadow.cljs.devtools.api :as shadow]))

(shadow/watch :app)
(shadow/repl :app)
#2020-01-3010:40simongrayI need to run it myself in the REPL I connect to in cursive#2020-01-3010:42thhellerthis won't work#2020-01-3010:42thhellernREPL doesn't allow it#2020-01-3010:43thhellermake it a (defn [] (shadow/watch ...) ...)) and call that manually once#2020-01-3010:43thhellerbind it to a keyboard shortcut in cursive#2020-01-3010:43simongrayI see. Thank you for the instant support!#2020-01-3010:43simongrayand thank you for making shadow-cljs#2020-01-3010:32thhellerand then use cursive repl -> remote -> localhost:that-port#2020-01-3010:33thheller(and yes I do use Cursive) 🙂#2020-01-3010:34thhellerhttps://github.com/cursive-ide/cursive/issues/2216 should make that easier so Cursive can read the port shadow-cljs used without configured it#2020-01-3015:09Jakub Holý (HolyJak)Hello! Does Cursive understand shadow-cljs npm imports like
(ns mine
  (:require 
    ["@telia/styleguide" :as styleguide]
    ["@telia/styleguide/assets/allicons/AllIcons" :default AllIcons]))
(AllIcons)
? It currently complains that styleguide and AllIcons "cannot be resolved"
#2020-01-3015:11thhellerit does not#2020-02-0614:08frankiesardo@U05224H0W do you use Cursive yourself? Is this something that makes using shadow-cljs cumbersome?#2020-02-0614:10thhellerI do use Cursive yes. I disabled that particular warning so it doesn't bother me.#2020-02-0615:39frankiesardoThank you for your answer! Can you also share how do you disable that warning?#2020-02-0616:51thhellerI actually can't remember. I disabled several years ago. Somewhere in the options you can toggle which warnings to show or how to format them#2020-02-0617:04frankiesardoNp, I'll keep digging 🙂#2020-01-3018:54kennyThe args for a function are misaligned.#2020-01-3022:17cflemingThanks, I’ll check that and see what’s going on.#2020-01-3109:22Jakub Holý (HolyJak)Hello! Is there a way to tell Cursive to not indent arguments based on the previous argument but to always ident them by 2 spaces (for a given macro)? I know about "configure indentation" but this macro has 3 optional arguments and the body so setting a fixed number does not help. This is what I want:
(div
  "Hello"!)
(div {:id "mydiv"}
  "Hello"!)
(div :.red.welcome {:id "mydiv"}
  "Hello"!
  (strong "there!")
#2020-01-3109:47cflemingSee here: https://cursive-ide.com/userguide/formatting.html#code-style-settings - “Only indent” is the option you want.#2020-01-3110:42Jakub Holý (HolyJak)thanks a lot!#2020-01-3119:50Wilson Velezhi, the autocomplete function is not working for me. what can I do to fix it? please#2020-01-3120:00Wilson Veleznor even the documentation pop is working.#2020-01-3121:26Wilson Velezit is related with shadow, I hove another project in lein and it works fine#2020-02-0103:54cflemingDid you follow this and import a POM? https://shadow-cljs.github.io/docs/UsersGuide.html#_cursive#2020-02-0312:46misha@cfleming do you use your own code format implementation or something open source? all I really need is a function to make maps like this:
{:a 1
 :aa 2}
into this:
{:a  1
 :aa 2}
clojure's pprint does not really do this : (
#2020-02-0313:04imre@misha have you checked https://github.com/weavejester/cljfmt ?#2020-02-0317:04jvtriguerosAlso, cljstyle, which is a fork of cljfmt but compiled to GraalVM https://github.com/greglook/cljstyle#2020-02-0319:17mishaI did, but it did not seem to work within time I spent playing with it. and all the docs are conveniently contain let forms with single char binding names, like
(let [x 1]
      y 2])
#2020-02-0313:17manutter51If you just need a function you can use this:#2020-02-0322:33mishathank you. but the use case is arbitrary data structures (e.g. maps with vectors of maps, etc), which has to be pretty-printed, so simplistic implementation will not cut it, (where e.g. cursive's "format selection" seems to be a fit). And 2 pages of custom code not worth it in this case.#2020-02-0401:39manutter51Yeah for arbitrary data structures that's a no-go, I thought you just wanted a simple data dump.#2020-02-0323:10cfleming@misha Well, it’s open source, but probably not what you mean - it’s the IntelliJ code formatter, with extensions for Clojure code from Cursive. As you’ve found, some apparently-simple cases are decidedly non-trivial. I can make your case even more non-trivial by doing this:
{{:a  1
  :aa 2} 3
 :b      4}
#2020-02-0323:12cflemingFor these reasons, IntelliJ’s code formatter uses a constraint algorithm with multiple passes until a solution converges, which is required for this sort of case. Cursive actually never breaks lines, which means that a simpler algorithm might suffice, but I might start breaking lines at some point, and then a naive algorithm gets extremely hard: https://journal.stuffwithstuff.com/2015/09/08/the-hardest-program-ive-ever-written/#2020-02-0323:21kennyThere's no way to use Cursive's test diffing when running CLJS tests, right?#2020-02-0323:22cflemingNo, sadly - that requires Cursive to understand CLJS REPLs better, which I’m struggling to get around to.#2020-02-0323:23kennyWell, in this case I don't really need to know anything CLJS specific. A cljc function returns a large structure that is just regular data. It's hard to eyeball what is different. Since it's regular data, it seems like Cursive's diff UI would "just work"#2020-02-0323:24kennyI guess I could go make a temporary .clj test file, paste the failing test, and then run the test haha#2020-02-0323:49cflemingIt’s not the diff that wouldn’t work, it’s the getting the data back from the test framework via the CLJS REPL. I actually also have plans to allow diffing of arbitrary structures from the REPL (something like (cursive.runtime.repl/diff first-thing second-thing)), but that also requires some jiggery pokery to work.#2020-02-0400:09kennyOh I see haha. That's a cool idea! I support the jiggery pokery 🙂#2020-02-0403:50kennyIt seems my new projects are now all called "Imported From Deps". Can I change this to match the directory name?#2020-02-0403:50kennyI see a .name file that has "Imported From Deps"#2020-02-0403:51kennyChanging that and then reopening the project updated the name. I think Cursive used to set the parent name to the directory name though.#2020-02-0404:09cflemingYeah, that seems to have changed in 2019.3. Are you creating the projects in IntelliJ, or creating using the CLI and then importing?#2020-02-0404:09kennyI usually duplicate an existing project and then import.#2020-02-0404:10cflemingI see, interesting. I can’t always reproduce this, I’ll try that.#2020-02-0404:10kennyI try to always delete the .idea, any .iml and .git before importing.#2020-02-0404:11cflemingOk, thanks.#2020-02-0409:33d-t-wI'm finding Intellij 2019.3.1 and 2019.3.2 painfully slow, anyone else the same? To be clear I don't think it's a Cursive issue (though I guess it's possible). Super laggy scrolling through cljs files in the editor pane, super unresponsive with shortcut keys, seems to take forever to gain focus when switching into app. I'm fairly certain it's since I bumped up to 2019.3.x in early january.#2020-02-0415:00jumpnbrownweaselThat's my experience as well.#2020-02-0415:34jvtriguerosI was noticing that yesterday too, I've disabled almost all plugins too 😞#2020-02-0422:43cflemingI’ve noticed IntelliJ being laggy too, but it’s always difficult to tell on my dev machine since I run multiple instance of IntelliJ and debug a lot.#2020-02-0606:46d-t-wI can imagine that your Intellij setup might be a bit bonkers Colin! I'm putting it down to suuuuper poor performance regression since the 2019.3.1 update.#2020-02-0606:46d-t-wWorst bug report ever, like when I went to the doctor at Uni and said "I'm just like, suuuuuper tired".#2020-02-0410:36imreIs there a bindable command to show expected/actual difference after a failed test run? I would love not having to hover-scroll-click#2020-02-0423:52cflemingNo, but it’s on my list, you’re right that that is very annoying.#2020-02-0609:45onetomi started using F2 for that purpose actually. discovered it accidentally 🙂 it's jumping to other locations too, but includes this use-case too#2020-02-0609:50imreThat would be the "Next nighlighted error" command, wouldn't it?#2020-02-0609:53imreI do have that bound, and it does bring up the hover window, however inside the hover window there's a link at the bottom saying "Show difference". When you click that, it will show the diff in Idea's diff viewer which is quite handy for large diffs. I'm looking for a way to invoke "Show difference" with the keyboard#2020-02-0721:10onetomYeah, that show difference action was not exposed as a bindable function the last time I asked about it a few months ago.#2020-02-0415:37ghadiDoes cursive have infra to support tap> ?#2020-02-0423:52cflemingNot at the moment, no. What would you like to see?#2020-02-0500:15ghadiOne of our customers was asking about debugging a long ->> pipeline, and I suggested to comment out all the steps he didn’t want to run, but a step that called tap> would be more useful#2020-02-0500:16ghadiDunno, the easy thing would be to print the data to the repl but you can already do that today#2020-02-0500:16ghadiMaybe a viz of some sort#2020-02-0500:19cflemingYeah, I’m planning on adding a data inspector so that might be a good candidate. My socket REPL support is sort of prepl-y but also has structured input, so I could potentially do things with tap values on the Cursive side there too#2020-02-0609:47onetomi just use the dbg macro from this library usually: https://github.com/philoskim/debux#debugging-thread-macro-or#2020-02-0417:10DavidIf I (:require [clojure.test :as t]) in a -test.cljs file, Cursive marks 't' as unused--even when t is clearly used. If, instead, I (:require [cljs.test :as t]), then Cursive doesn't complain.#2020-02-0423:53cflemingInteresting, I haven’t seen that. I’ll check that I can reproduce that and fix it.#2020-02-0500:37DavidThanks!#2020-02-0500:37DavidIf you have any problems reproducing, let me know.#2020-02-0417:11DavidIs there something I can do make Cursive recognize the clojure.test usage?#2020-02-0421:48samI’m using tools.deps with Cursive. I have the following alias that I’m trying to use with the cursive repl.
{:repl {:main-opts ["-i" "aot.clj" "-r"]}
#2020-02-0500:02cflemingSomeone mentioned this to me a while back. I thought I had investigated but I can’t find my notes now. I’ll take another look.#2020-02-0521:46samThanks @U0567Q30W, let me know if I should file an issue.#2020-02-0601:42cflemingActually, if you could that would be great, then it won’t get lost again.#2020-02-0421:49samEven though I added :repl to Aliases, it seems that aot.clj is not getting run like I expect it to when starting the repl.#2020-02-0421:54samWhen I use clojure.main instead of nrepl, aot.clj runs as expected. Is main-opts not supported for nrepl? I need to do some AOT compilation every time the repl starts and I’d rather not make devs have to remember to do a separate step. Is there a better way to do this?#2020-02-0609:52onetomis there a way to have the destructuring recognized in the more-of form of the clojure-expectations library? https://clojure-expectations.github.io/templating.html my use-case looks like this:
(more-of {:keys [txn-eid tag-eid]}
                         some-txn-eid txn-eid
                         (entid [:tag/name "tag"]) tag-eid)
can i use the Specify... choice somehow in this case?
#2020-02-0620:34cflemingI can’t think of anything existing that looks like that, sorry.#2020-02-0612:19frankiesardoHello, this may have been asked before but I can't find any resources online. How do I get Cursive to recognise node modules?#2020-02-0615:57frankiesardoYou can't https://clojurians.slack.com/archives/C0744GXCJ/p1580397107063000#2020-02-0620:34cflemingRight, currently it doesn’t but I’m going to fix that soon, for some value of soon.#2020-02-0612:28mhuebertIs there a way to “print” forms to a Cursive REPL such that they will be formatted the same as when one directly sends a form to the repl from the editor? (if I run (pprint some-thing), it ends up printed in a single line)#2020-02-0612:42mhuebertI also tried https://github.com/razum2um/aprint, it too results in a one-line print#2020-02-0612:45mhuebertit prints nicely if I send the form (aprint a-thing) to the repl, but not if (aprint a-thing) is evaluated from my program#2020-02-0613:13mhuebertFurther searching into the wormhole leads me to believe this has more to do with clj logging config than cursive#2020-02-0614:33mhuebertnvrmind got it sorted#2020-02-0616:33onetomi used https://github.com/kkinnear/zprint with some success. i even customized it's color scheme to make it more readable on the light intellij theme. unfortunately the ansi escapes are sometimes leak out in the output, but still pretty usable within cursive.#2020-02-0616:35imreif it's for debugging, https://github.com/weavejester/hashp could also be an option, I'm literally using it right now#2020-02-0616:58onetomthanks, this looks great too!#2020-02-0617:02onetomhow would u use it in a threading macro though?#2020-02-0617:09onetomseems like u can't really do that 😞#2020-02-0617:56imreyeah that won't work sadly#2020-02-0705:29onetomis there a list of the supported symbol resolution forms? i might be able to pick one for the expectations.clojure.test/more-of form, but i can't find the right one without seeing all the options with some example syntax#2020-02-0921:46cflemingThere isn’t, no, although it’s a good idea.#2020-02-0901:52Ivan Kozany ideas what should i do for Core.main to be resolved properly? https://gyazo.com/aba49b0e913aeece5600e594264bec9b.png#2020-02-0921:45cflemingCursive isn’t able to do this at the moment, it only has very limited understanding of gen-class.#2020-02-1009:08Ivan Kozalright ty#2020-02-1101:54kennyIs there a way to def a variable in the debugger?#2020-02-1101:56kennyFor example, say I'm paused here. Can I def the metrics variable, resume the program, and access my def'ed var in the regular REPL?#2020-02-1101:56kennyFWIW, this is useful because working in a regular REPL is far nicer than working in the evaluate expression repl.#2020-02-1101:57kennyOh, maybe I can just def a variable using the evaluate expression repl 😯#2020-02-1101:58kennyThat worked! I think it'd be nice to have a button like REBL has for doing this sort of thing: https://raw.githubusercontent.com/cognitect-labs/REBL-distro/master/screenshot.png#2020-02-1101:59dpsuttoni think tap might work nicely here as well?#2020-02-1102:00kennyMaybe? I haven't quite figured out how I'm supposed to use tap if I don't use REBL.#2020-02-1102:55cflemingYeah, I have some niceties around this planned for the debugger, including this and hopefully also keeping the normal REPL working but switching it to evaluate using the same mechanism as Evaluate Expression.#2020-02-1111:35imreWhy is Resolve ... as... -> Specify... -> clojure.core/comment not an option? There are some complicated macros in the codebase I'm currently working on and would like to disable static analysing the bodies of those.#2020-02-1121:29cflemingUgh, sorry, there was some discussion about this recently. There’s an issue, I’ve just moved this into the current milestone: https://github.com/cursive-ide/cursive/issues/1850#2020-02-1207:05imrenice, thank you#2020-02-1111:36imrewhen I try to enter clojure.core/comment, I get a var not found error#2020-02-1111:42imremanually adding it to options/ClojureResolveSettings.xml doesn't seem to work either 😞#2020-02-1114:07Ivan KozI'm trying to debug shadow-cljs exception, which is being started by lein, and having an issue. Whats going on here? https://gyazo.com/feee3114d099052fe1fedb3522f35771.png https://gyazo.com/f8d7a6222af3087d61b5943ad7072ab6.png#2020-02-1121:25cflemingI think what is going on is that Cursive uses trampoline internally, and you’re explicitly using it there. Does it work without that?#2020-02-1121:25cfleming@UH16CGZC2 ^^#2020-02-1123:20Ivan Koz@U0567Q30W sorry i was sleeping, let me check#2020-02-1123:20cflemingNo worries, I just realised after writing the message that I hadn’t pinged as requested.#2020-02-1123:25Ivan Kozwow no way, i've tried every combination of trampoline arg and a checkbox, neither was working, but now it does as you said#2020-02-1123:26Ivan Kozthank you ^^#2020-02-1123:41cflemingNo problem! The secret is that Cursive always uses trampoline to execute lein stuff.#2020-02-1123:41cflemingWhich I see is only sort-of documented here: https://cursive-ide.com/userguide/repl.html#local-repls#2020-02-1114:13Ivan Kozi'm gonna run it directly for now, tag me if you have anything on that#2020-02-1117:09samI’m trying to “Use tools.deps directly”, but I can’t get it to download any versions of tools.deps. Clicking refresh has no effect. I tried looking in the idea log, but there don’t seem to be any relevant logs. Any idea what I’m doing wrong? Should I file a bug?#2020-02-1117:11samintellij version: 2019.3 Ultimate Cursive version: 1.9.0-2019.3#2020-02-1117:13samAnd I’m on a mac#2020-02-1121:06samI was able to workaround by using “use private repo” and pointing to maven central.#2020-02-1121:27cfleming@UABEM258C This is a bug which is fixed in the latest EAP, there’s some description here: https://groups.google.com/d/topic/cursive/fItctBxneRk/discussion#2020-02-1121:28cflemingI’m hoping to get this into a stable release soon, but 2020.1 threw a bit of a spanner in the works.#2020-02-1123:49samOkay, thanks for the info.#2020-02-1303:39steveb8nQ: some of my projects automatically create modules for deps.edn local roots and others don’t. does anyone know how to force this to happen or to add modules for those that are missing?#2020-02-1307:10cflemingThere’s a bit of doc at the end of this bit talking about that: https://cursive-ide.com/userguide/deps.html#working-with-multi-module-projects#2020-02-1307:11cflemingThey’ll be automatically added if they’re required using :local/root#2020-02-1305:01gibbIf you're a IDEAVIM user this wiki page changed my cursive workflow for the better: https://github.com/cursive-ide/cursive/wiki/Mapping-IdeaVim-actions-to-Cursive-actions#2020-02-1305:41Ivan Kozfor non IDEAVIM users, there is Actions Tree plugin https://plugins.jetbrains.com/plugin/11076-actions-tree#2020-02-1310:16cflemingNice, for a simple version of that that doesn’t require a plugin, there’s also Quick Lists: https://www.jetbrains.com/help/idea/customize-actions-menus-and-toolbars.html##2020-02-1305:47Ivan Kozhttps://pastebin.com/raw/tzWDEBaj my basic config#2020-02-1311:21imreUsing the latest Cursive EAP and idea 2019.3.3 I'm getting a previously unseen error on deps refresh:#2020-02-1311:21imre
2020. 02. 13.
12:19	Errors during project resolution
			The following errors were found during project resolve:
			/Users/redacted/path/deps.edn:
			Destination path "alsoredacted" already exists and is not an empty directory
#2020-02-1311:24imreand also#2020-02-1311:25imre
12:24	Errors during project resolution
			The following errors were found during project resolve:
			/Users/redacted/path/deps.edn:
			unable to find valid certification path to requested target
#2020-02-1311:32imreInvalidate caches/restart was the solution#2020-02-1319:09tanzoniteblackI have a multimodule project that relies on using tools-deps's local paths from the "top" module. When I use Load File in REPL from a clojure file in the src directory of one of the sub-modules, everything works fine, but if I attempt to do the same from a file in the test directory of a sub-module, I get an error that cursive can't load the file because it's not in scope for the module used to start the repl. How can I make it so I can work on tests for submodules via only loading a single repl for the topmost module?#2020-02-1320:04cflemingHmm, this is tricky. With Deps, test code isn’t transitive, because aliases aren’t.#2020-02-1320:06cflemingSo Cursive is technically doing the right thing, because that code wouldn’t be available to your project running outside of Cursive either. Whether that’s a useful thing to enforce is another question.#2020-02-1320:07cflemingThe best solution I can think of would be to have a test-support module containing the shared test code in a src directory, and then depend on that from both modules. You could ask over in #tools-deps if there are any better solutions.#2020-02-1320:09tanzoniteblackis there any reason why adding the code to extra-paths shouldn't work?#2020-02-1320:11cflemingDon’t you get an error when doing that that modules can’t share source paths?#2020-02-1320:11tanzoniteblackI do get an error about that when I try to do it via intellij's module editor, yeah#2020-02-1320:11cflemingI’m pretty sure you should, because they can’t 🙂#2020-02-1320:11cflemingAre you refreshing your project after updating your deps.edn?#2020-02-1320:12tanzoniteblackI was adding that into my deps.edn from the top level project, so that the module actually does include that source path in it#2020-02-1320:12tanzoniteblackyep, I'm refreshing my project after updating the deps.edn#2020-02-1320:12cflemingHmm. IntelliJ should complain about that, because I’m pretty sure that’s not allowed.#2020-02-1320:14cflemingI’m not sure what the best solution is here, honestly. It’s a deps limitation (can’t easily share test code) mixed with an IntelliJ one (can’t have the same source in two modules). Is factoring the shared test code out into a third module an option?#2020-02-1320:17tanzoniteblackfile structure here: API (deps.edn): - src - test - project1 (deps.edn) - src - test - project2 (deps.edn) the entire project here, our monolithic API, is a single project. Some components of it are used in other projects as libraries, which is why it's broken out#2020-02-1320:18tanzoniteblackrealistically, the tests in all of the subprojects are just parts of the entire main project. I'd be perfectly happy to have the entire thing treated as a single project in intellij, but we do have the dependencies defined throughout the various subprojects#2020-02-1320:18tanzoniteblackso "shared test code" in this case just means tests in various sub-folders...which happen to have their own deps.edn#2020-02-1320:21tanzoniteblackI suppose that we can break out the tests into only the top level, instead of keeping them organized with the libraries, but it's going to annoy the rest of my team that we're restructuring our folder to workaround limitations in intellij/cursive, when they don't have these issues in emacs/cider. Also, I'm fairly confident that I had worked around this bug previously using the :extra-paths hack I mentioned earlier. But, that might've broken when upgrading intellij at some point?#2020-02-1320:25tanzoniteblackgranted, just highlighting the whole file and sending that whole thing to the repl is also a valid work around#2020-02-1320:26tanzoniteblackwhich might be a "fix" that could be implemented in cursive? When a file isn't part of the module the repl was created in, just send the entire contents of the file to the repl instead?#2020-02-1320:27tanzoniteblackdoesn't fix the test integration though 😞#2020-02-1400:06cfleming> When a file isn’t part of the module the repl was created in, just send the entire contents of the file to the repl instead? The problem with that is that this is the actually useful validation. I often have multiple REPLs open serving different functions, and I’ve been saved from loading code into the wrong REPL multiple times by that check.#2020-02-1823:51tanzoniteblack@U0567Q30W, I figured out why my original approach (just manually adding the test folder explicitly under :extra-paths in an alias) wasn't working. Despite having the global setting Aliases to enable by default set to dev,test, dev wasn't being loaded as an alias for the project. I manually checked the box for dev in the aliases in the Clojure deps pane for the project and now I can load code & run tests in subproject just fine.#2020-02-1823:52tanzoniteblackI've no idea why it stopped loading that alias for my project. Doesn't seem to be loading dev alias for any of my projects by default, now that I'm looking at it closer#2020-02-1900:12cfleming@U236LQYB0 Oh interesting, thanks for that. I’m still not sure why IntelliJ doesn’t complain about the duplicated content roots, but I’m glad it works!#2020-02-1902:23cflemingThe not selecting dev thing is weird though, I’ll take a look and see if I can see anything going on there.#2020-02-1319:10tanzoniteblackI thought I had fixed this at one point by explicitly adding the test directories in the :extra-paths of the :dev alias for my top deps.edn, but that doesn't seem to be working anymore#2020-02-1401:18d-t-wAnyone else having issues with auto-import in the REPL since upgrading to latest? (https://github.com/cursive-ide/cursive/issues/2254)#2020-02-1408:36Ivar RefsdalYes. I've had that problem before as well ...#2020-02-1408:53Ivar RefsdalAnd I also have this problem after upgrading to 2019.3.3#2020-02-1409:56imrehave you tried 'invalidate caches and restart'?#2020-02-1410:00Ivar RefsdalThanks for the tip @U08BJGV6E. Unfortunately the same error and stacktrace appears (posted in the github-issue)#2020-02-1410:01imrelet me see if I can repro#2020-02-1410:01imreyep#2020-02-1410:02Ivar RefsdalI can only repro on new projects. Old projects work fine (at least most do)#2020-02-1410:02imreinteresting#2020-02-1623:20cflemingThanks for the reproduction case @UGJE0MM0W, I’ll try to reproduce that today.#2020-02-1703:22cflemingOk, the stacktrace is fixed in the next EAP. I think that’s unrelated to the auto-import issue, which I’ve moved to another issue as per the issue comment.#2020-02-1411:18gravThe “Use port from nREPL file” option in remote repl configs seems to be broken in latest EAP versions (tried a 1.9.0 EAP and a the most recent 1.9.1 EAP). If I select a module, click Ok, and then go back to the config, the module selection is gone again (and there’s a “Run Configuration Error: Please select a valid module” error in the bottom of the dialog).#2020-02-1623:21cflemingThanks, I’ll check that.#2020-02-1703:40cflemingThis was a problem when the selected module wasn’t a lein module - I’ve fixed that for the next EAP.#2020-02-1411:20gravhttp://g.recordit.co/SoVwwQHmew.gif#2020-02-1411:21gravIDEA 2019.2.4#2020-02-1415:06ikitommi#2020-02-1415:06ikitommiUpdated to latest Cursive and it… stopped working.#2020-02-1415:07ikitommi2019.2.3#2020-02-1415:26ikitommiupdate idea to 2019.3.3 and it’s working again.#2020-02-1623:21cflemingYes, unfortunately there’s a bad bug affecting only 2019.2, I should have a fix out today.#2020-02-1416:25IsaacHello! Is anyone else unable to switch their lein version due to a greyed out Apply button? https://github.com/cursive-ide/cursive/issues/2307#2020-02-1623:22cflemingSorry about this, I’ll try to get to this today.#2020-02-1420:00Joe R. SmithIs it possible to toggle between aligned and not-aligned values in lets and maps with a keymapping?#2020-02-1623:23cflemingNo, this isn’t possible unfortunately. The issue is that the next time you reformat it will go back to whatever you have configured.#2020-02-1420:01Joe R. Smithabout 70% I want things aligned .. then there are the times I don't#2020-02-1515:04Ivan KozHow to connect\run shadow-cljs, watcher cljs repl from cursive? Can it be simplified?#2020-02-1515:23Ivan KozCurrently there is two Idea tasks; first runs lein -> shadow-cljs watch, and second connects to server's nrepl. The tedious part is to run second task and call (shadow.cljs.devtools.api/repl :app) to access cljs repl.#2020-02-1623:24cflemingI see thheller replied over at #shadow-cljs, but I am planning some init-forms for REPL configs that will be automatically sent once the REPL connects.#2020-02-1516:03Ivan Koz@cfleming can you make it so repl wouldn't NPE if server is offline, but rather retry on a timeout?
Error connecting to localhost:8000 - class .ConnectException: Connection refused (Connection refused)
Exception starting REPL: java.lang.NullPointerException
#2020-02-1623:24cflemingThe NPE is definitely a bug, I’ll fix that. The retrying is trickier, I’ll think about that.#2020-02-1516:59joshkhdoes cursive support shadow-cljs projects where there's no project.clj or a deps.edn? Edit* i can't seem to import a project without either Deps or Lein scaffolding, and i'd like to avoid duplicating my shadow-cljs.edn dependencies in a deps.edn file 🙂#2020-02-1517:28dpsuttoni think the shadow documentation mentions using shadow to create a pom file#2020-02-1517:28dpsuttonhttps://shadow-cljs.github.io/docs/UsersGuide.html#_cursive#2020-02-1614:41joshkhcheers @dpsutton 🙂#2020-02-1623:25cflemingYes, Thomas (shadow dev) uses Cursive and that’s his recommendation until I get native shadow support done.#2020-02-1621:11Janne SauvalaDo you also see Cursive being a little too chatty when using it with REBL? Is there a way to surpass these messages? https://github.com/cursive-ide/cursive/issues/2113#issuecomment-578838307#2020-02-1700:05cflemingAre you using nREPL to connect to REPL?#2020-02-1705:33Janne SauvalaYes. I’m also using nrebl.middleware (https://github.com/RickMoynihan/nrebl.middleware) to capture the data in REBL#2020-02-1621:20kulminaatorhow do you fire up deps.edn style project's repl in cursive ?#2020-02-1623:27cflemingThere’s a quickstart here: https://cursive-ide.com/userguide/first-repl.html#importing-an-existing-project, which includes starting a REPL, or there are full details for deps here: https://cursive-ide.com/userguide/deps.html#2020-02-1710:07imreThere is no bindable action currently to trigger stub generation when the popup appears, is there?#2020-02-1720:58cflemingNo, there isn’t, but that would be nice. I’ll think about that, because it would also be good to have an action to trigger the stub check. Currently you have to refresh your lein/deps project to do that.#2020-02-1813:39onetom@U08BJGV6E i usually just do cmd-shift-a then ref deps i cloud just probably assign some abbreviation to it. i've noticed in recent versions there are spacemacs-style (or cider-style) abbreviations are introduced for the various test operations too. very good idea! it helps bridging the worlds of ppl using different editors 🙂#2020-02-1813:40imrecheers. I am aware about ref deps, have it bound. My question was specificly about stub generation though, so I don't have to hover and click when the notification appears#2020-02-1813:43onetomah, misread it, sorry... im getting tired, i guess#2020-02-1802:56onetomI'm missing newly added dependencies from my repl, even after i do a Refresh Clojure Deps Projects and restart the REPL. There is a suspicious thing going on though, because the classpath i see folded in the repl window, mentions the idea_rt.jar multiple times, just with different values:
Starting nREPL server...
/nix/store/8p4ny5xj4p6363kak2h2nh3xnzk6d09p-zulu1.8.0_121-8.20.0.5/bin/java -Dclojure.libfile=/private/var/folders/dm/bjgtcwgx7nqfh3flbpq7m0qc0000gn/T/libfile4.libs "-javaagent:/Users/onetom/JetBrains/apps/IDEA-U/ch-0/201.5259.13/IntelliJ IDEA 2020.1  IDEA 2020.1 " "-javaagent:/Users/onetom/JetBrains/apps/IDEA-U/ch-0/201.5259.13/IntelliJ IDEA 2020.1  IDEA 2020.1 " "-javaagent:/Users/onetom/JetBrains/apps/IDEA-U/ch-0/201.5259.13/IntelliJ IDEA 2020.1  IDEA 2020.1 " -Dfile.encoding=UTF-8 -classpath "/Users/onetom/JetBrains/apps/IDEA-U/ch-0/201.5259.13/IntelliJ IDEA 2020.1 EAP.app.plugins/clojure-plugin/lib/nrepl-0.6.0.jar:test:src:rsc:/Users/onetom/.m2/repository/com/cognitect/transit-java/0.8.337/transit-java-0.8.337.jar:/Users/onetom/.m2/repository/org/bouncycastle/bcprov-jdk15on/1.62/bcprov-jdk15on-1.62.jar:/Users/onetom/.m2/repository/buddy/buddy-core/1.6.0/buddy-core-1.6.0.jar:/Users/onetom/.m2/repository/org/clojure/data.json/0.2.7/data.json-0.2.7.jar:/Users/onetom/
My run config is: • Local nREPL • Run with Deps ° Aliases: expect,test • Shorten command line: user-local default: none After restarting IntelliJ, the problem went away. Today it cropped up again, but it might be my fault this time, because I'm getting the same error from the command-line too: clj -Aexpect:test -e "(require 'gini.system)" I'm on Cursive 1.9.1-eap4-2020.1, IntelliJ Build #IU-201.5259.13, built on February 13, 2020
#2020-02-1803:13onetomOk, I fixed my fault, but the issue persisted. After restarting IntelliJ, the problem went away and I could require the newly added dependency.#2020-02-1803:48cflemingThat’s very weird - let me know if it recurs.#2020-02-1804:56onetomit has just happened again. i can not even cmd-shift-l a source file from my own code. i've just restarted my REPL session with cmd-r and this is all the classpath i get:
Starting nREPL server...
/nix/store/8p4ny5xj4p6363kak2h2nh3xnzk6d09p-zulu1.8.0_121-8.20.0.5/bin/java -Dclojure.libfile=/private/var/folders/dm/bjgtcwgx7nqfh3flbpq7m0qc0000gn/T/libfile621.libs "-javaagent:/Users/onetom/JetBrains/apps/IDEA-U/ch-0/201.5259.13/IntelliJ IDEA 2020.1  IDEA 2020.1 " "-javaagent:/Users/onetom/JetBrains/apps/IDEA-U/ch-0/201.5259.13/IntelliJ IDEA 2020.1  IDEA 2020.1 " -Dfile.encoding=UTF-8 -classpath /private/var/folders/dm/bjgtcwgx7nqfh3flbpq7m0qc0000gn/T/classpath1820877154.jar clojure.main -i /private/var/folders/dm/bjgtcwgx7nqfh3flbpq7m0qc0000gn/T/form-init1045387347113886493.clj
objc[50359]: Class JavaLaunchHelper is implemented in both /nix/store/8p4ny5xj4p6363kak2h2nh3xnzk6d09p-zulu1.8.0_121-8.20.0.5/bin/java (0x109ed84c0) and /nix/store/8p4ny5xj4p6363kak2h2nh3xnzk6d09p-zulu1.8.0_121-8.20.0.5/jre/lib/libinstrument.dylib (0x109f774e0). One of the two will be used. Which one is undefined.
Connecting to local nREPL server...
nREPL server started on port 61856 on host localhost - 
Clojure 1.10.1
(there is that java error, but that's there for a long time and haven't caused any issues so far)
#2020-02-1805:01onetomah, ive changed to that jar manifest option in the repl command line shortening option, that's why it's so short. i've checked the file and it contains my src dir, so that's not the problem:
$ unzip -c -l /private/var/folders/dm/bjgtcwgx7nqfh3flbpq7m0qc0000gn/T/classpath1780313107.jar META-INF/MANIFEST.MF | rg src
 .jar file:/test file:/src file:/rsc file:/Users/onetom/.m2/repository/c
 3cd336851b9/src/ file:/Users/onetom/.m2/repository/com/google/guava/gua
#2020-02-1805:02onetomi've restarted my nrepl session and when i tried to load a namespace, it was complaining that its dependent namespaces couldn't be found. however, if i load them manually in dependency order, the cmd-shift-l operations succeed:
nREPL server started on port 62569 on host localhost - 
Clojure 1.10.1
Loading src/gini/system.clj... 
Syntax error (FileNotFoundException) compiling at (src/gini/system.clj:1:1).
Could not locate gini/datomic__init.class, gini/datomic.clj or gini/datomic.cljc on classpath.

Loading src/gini/datomic.clj... 
Syntax error (FileNotFoundException) compiling at (src/gini/datomic.clj:1:1).
Could not locate gini/model__init.class, gini/model.clj or gini/model.cljc on classpath.

Loading src/gini/model.cljc... done
Loading src/gini/datomic.clj... done
Loading src/gini/system.clj... done
#2020-02-1805:04onetomwhat i suspect the problem might be is that model.cljc file. i've seen weired resolution issues, when i was mixing cljc files into my project...#2020-02-1805:06onetomokay, the problem has survived an intellij restart too, so it seems reproducible#2020-02-1805:09onetomif i've commented out the dependency on the cljc file, then i could load my namespace, which was indirectly depend on it#2020-02-1805:15onetomseems like the issue might be related to
[hodur-engine.core :as hodur]
which is also a cljc namespace
#2020-02-1805:17onetomwhen i try to navigate to the source of the hodur-engine.core ns with cmd-b, i see 2 entries for it, which are seemingly the same#2020-02-1805:29onetomi've tried to isolate the problem in a minimal project, but it does not occur there, so it's not as trivial as i hoped. i've also upgraded hodur-engine from 0.1.6 to 0.1.7 but that didn't change the situation either#2020-02-1813:33onetomissue persists with cursive 1.9.1-eap5-2020.1 and 1.9.1-eap5-2019.3 downgrading to eap3 now#2020-02-1813:44onetomi cant even start the server, even in clojure.main mode or without any special aliases. im just consistently getting this error:
Error running 'XXX REPL': Deferred parameters have not been cached!
#2020-02-1813:57onetom1.9.1-eap3-2019.3 (on IntelliJ 2019.3.2 though) works in both nREPL and clojure.main modes.#2020-02-1814:23imreI found in EAP 5 that my repl actions don't become available in 'find action...' until I open and close the edit repl actions dialog#2020-02-2110:32cflemingThis is fixed in eap-8, out now.#2020-02-2110:35imrecheers Colin, just saw it came out#2020-02-1815:16rafaelJust updated to 1.9.1-eap5-2020.1 (I'm running IDEA 2020.1 EAP), and editing is almost completely broken. Editor stops accepting keyboard input from time to time, and there is a file it just refuses to open. I think the problems correlate to exceptions being logged to the console. Is anyone else seeing the same issue? Should I open a github issue with the exceptions? I'll try to downgrade and see if the problem goes away.#2020-02-1821:58cfleming@U5FEGMC4D I’d definitely be interested in seeing those exceptions, either here or in an issue - I can’t reproduce that.#2020-02-1821:58cflemingIf you’ve downgraded they should hopefully still be in your log file.#2020-02-1913:43rafaelSorry, had to hunt around for the logs for a while. There are lots of exceptions like: #2020-02-1913:43rafael
2020-02-18 12:04:01,248 [1757753]  ERROR - n.impl.GeneralHighlightingPass - In file: file:///home/rafael/dev/nu/stem/stem-framework/src/stem/kafka/producing.clj 
java.lang.IllegalArgumentException: Argument for @NotNull parameter 'message' of com/intellij/codeInsight/daemon/impl/AnnotationHolderImpl.newAnnotation must not be null
	at com.intellij.codeInsight.daemon.impl.AnnotationHolderImpl.$$$reportNull$$$0(AnnotationHolderImpl.java)
	at com.intellij.codeInsight.daemon.impl.AnnotationHolderImpl.newAnnotation(AnnotationHolderImpl.java)
	at cursive.editor.braceHighlighter.ClojureBraceHighlighter.annotate(ClojureBraceHighlighter.java:59)
	at com.intellij.codeInsight.daemon.impl.DefaultHighlightVisitor.runAnnotators(DefaultHighlightVisitor.java:129)
	at com.intellij.codeInsight.daemon.impl.DefaultHighlightVisitor.visit(DefaultHighlightVisitor.java:110)
	at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.runVisitors(GeneralHighlightingPass.java:349)
	at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.lambda$collectHighlights$5(GeneralHighlightingPass.java:283)
	at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.analyzeByVisitors(GeneralHighlightingPass.java:309)
	at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.lambda$analyzeByVisitors$6(GeneralHighlightingPass.java:312)
	at com.intellij.codeInsight.daemon.impl.DefaultHighlightVisitor.analyze(DefaultHighlightVisitor.java:93)
	at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.analyzeByVisitors(GeneralHighlightingPass.java:312)
	at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.collectHighlights(GeneralHighlightingPass.java:280)
	at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.collectInformationWithProgress(GeneralHighlightingPass.java:225)
	at com.intellij.codeInsight.daemon.impl.ProgressableTextEditorHighlightingPass.doCollectInformation(ProgressableTextEditorHighlightingPass.java:83)
	at com.intellij.codeHighlighting.TextEditorHighlightingPass.collectInformation(TextEditorHighlightingPass.java:52)
	at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.lambda$null$1(PassExecutorService.java:429)
	at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:971)
	at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.lambda$doRun$2(PassExecutorService.java:422)
	at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:577)
	at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:523)
	at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:59)
	at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.doRun(PassExecutorService.java:421)
	at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.lambda$run$0(PassExecutorService.java:397)
	at com.intellij.openapi.application.impl.ReadMostlyRWLock.executeByImpatientReader(ReadMostlyRWLock.java:158)
	at com.intellij.openapi.application.impl.ApplicationImpl.executeByImpatientReader(ApplicationImpl.java:156)
	at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.run(PassExecutorService.java:395)
	at com.intellij.concurrency.JobLauncherImpl$VoidForkJoinTask$1.exec(JobLauncherImpl.java:171)
	at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:290)
	at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1020)
	at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1656)
	at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1594)
	at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:177)
2020-02-18 12:04:01,248 [1757753]  ERROR - n.impl.GeneralHighlightingPass - IntelliJ IDEA 2020.1 EAP  Build #IU-201.3803.71 
2020-02-18 12:04:01,249 [1757754]  ERROR - n.impl.GeneralHighlightingPass - JDK: 11.0.2; VM: OpenJDK 64-Bit Server VM; Vendor: JetBrains s.r.o 
2020-02-18 12:04:01,249 [1757754]  ERROR - n.impl.GeneralHighlightingPass - OS: Linux 
2020-02-18 12:04:01,249 [1757754]  ERROR - n.impl.GeneralHighlightingPass - Plugin to blame: Cursive version: 1.9.1-eap5-2020.1 
2020-02-18 12:04:01,249 [1757754]  ERROR - n.impl.GeneralHighlightingPass - Last Action: EditorPaste 
2020-02-18 12:04:01,252 [1757757]  ERROR - n.impl.GeneralHighlightingPass - In file: file:///home/rafael/dev/nu/stem/stem-framework/test/stem/integration_test.clj 
#2020-02-1913:46rafaelThen lots of: #2020-02-1913:46rafael
2020-02-18 12:08:32,670 [  58896]  ERROR - llij.ide.plugins.PluginManager - IntelliJ IDEA 2020.1 EAP  Build #IU-201.3803.71 
2020-02-18 12:08:32,670 [  58896]  ERROR - llij.ide.plugins.PluginManager - JDK: 11.0.2; VM: OpenJDK 64-Bit Server VM; Vendor: JetBrains s.r.o 
2020-02-18 12:08:32,670 [  58896]  ERROR - llij.ide.plugins.PluginManager - OS: Linux 
2020-02-18 12:08:32,670 [  58896]  ERROR - llij.ide.plugins.PluginManager - Plugin to blame: Cursive version: 1.9.1-eap5-2020.1 
2020-02-18 12:08:32,671 [  58897]  ERROR - llij.ide.plugins.PluginManager - Last Action: Tree-selectNext 
2020-02-18 12:08:33,130 [  59356]  ERROR - mpl.search.PsiSearchHelperImpl - Error during processing of: integration_test.clj 
java.lang.NoSuchMethodError: com.intellij.AbstractBundle.message(Ljava/util/ResourceBundle;Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
	at cursive.ClojureBundle.message(ClojureBundle.java:26)
	at cursive.parser.ClojureParser.parseExpressions(ClojureParser.java:141)
	at cursive.parser.ClojureParser.parseList(ClojureParser.java:405)
	at cursive.parser.ClojureParser.parseExpression(ClojureParser.java:67)
	at cursive.parser.ClojureParser.parseExpressions(ClojureParser.java:136)
	at cursive.parser.ClojureParser.parseList(ClojureParser.java:405)
	at cursive.parser.ClojureParser.parseExpression(ClojureParser.java:67)
	at cursive.parser.ClojureParser.parseExpressions(ClojureParser.java:136)
	at cursive.parser.ClojureParser.parseList(ClojureParser.java:405)
	at cursive.parser.ClojureParser.parseExpression(ClojureParser.java:67)
	at cursive.parser.ClojureParser.parseExpressions(ClojureParser.java:136)
	at cursive.parser.ClojureParser.parseList(ClojureParser.java:405)
	at cursive.parser.ClojureParser.parseExpression(ClojureParser.java:67)
	at cursive.parser.ClojureParser.parseExpressions(ClojureParser.java:136)
	at cursive.parser.ClojureParser.parseList(ClojureParser.java:405)
	at cursive.parser.ClojureParser.parseExpression(ClojureParser.java:67)
	at cursive.parser.ClojureParser.parseExpressions(ClojureParser.java:136)
	at cursive.parser.ClojureParser.parseList(ClojureParser.java:405)
	at cursive.parser.ClojureParser.parseExpression(ClojureParser.java:67)
	at cursive.parser.ClojureParser.parseExpressions(ClojureParser.java:136)
	at cursive.parser.ClojureParser.parseList(ClojureParser.java:405)
	at cursive.parser.ClojureParser.parseExpression(ClojureParser.java:67)
	at cursive.parser.ClojureParser.parse(ClojureParser.java:58)
	at com.intellij.psi.tree.ILazyParseableElementType.doParseContents(ILazyParseableElementType.java:75)
	at com.intellij.psi.tree.IFileElementType.parseContents(IFileElementType.java:53)
	at com.intellij.psi.impl.source.tree.LazyParseableElement.lambda$ensureParsed$0(LazyParseableElement.java:189)
	at com.intellij.psi.impl.DebugUtil.performPsiModification(DebugUtil.java:565)
	at com.intellij.psi.impl.source.tree.LazyParseableElement.ensureParsed(LazyParseableElement.java:188)
	at com.intellij.psi.impl.source.tree.LazyParseableElement.getFirstChildNode(LazyParseableElement.java:237)
	at com.intellij.psi.impl.source.tree.CompositeElement.findLeafElementAt(CompositeElement.java:139)
	at com.intellij.psi.impl.source.tree.CompositeElement.findLeafElementAt(CompositeElement.java:46)
	at com.intellij.psi.impl.search.LowLevelSearchUtil.findNextLeafElementAt(LowLevelSearchUtil.java:122)
	at com.intellij.psi.impl.search.LowLevelSearchUtil.processOffsets(LowLevelSearchUtil.java:196)
	at com.intellij.psi.impl.search.LowLevelSearchUtil.processElementsAtOffsets(LowLevelSearchUtil.java:178)
	at com.intellij.psi.impl.search.PsiSearchHelperImpl$4.execute(PsiSearchHelperImpl.java:841)
	at com.intellij.psi.impl.search.PsiSearchHelperImpl$2.processInReadAction(PsiSearchHelperImpl.java:240)
	at com.intellij.psi.impl.search.PsiSearchHelperImpl$2.processInReadAction(PsiSearchHelperImpl.java:231)
	at com.intellij.openapi.application.ReadActionProcessor.lambda$process$0(ReadActionProcessor.java:28)
	at com.intellij.openapi.application.impl.ApplicationImpl.runReadAction(ApplicationImpl.java:795)
	at com.intellij.openapi.application.ReadAction.compute(ReadAction.java:61)
	at com.intellij.openapi.application.ReadActionProcessor.process(ReadActionProcessor.java:28)
	at com.intellij.psi.impl.search.PsiSearchHelperImpl.lambda$processCandidates$14(PsiSearchHelperImpl.java:801)
	at com.intellij.psi.impl.search.PsiSearchHelperImpl.lambda$processVirtualFile$6(PsiSearchHelperImpl.java:454)
	at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:966)
	at com.intellij.openapi.application.ex.ApplicationUtil.tryRunReadAction(ApplicationUtil.java:25)
	at com.intellij.psi.impl.search.PsiSearchHelperImpl.processVirtualFile(PsiSearchHelperImpl.java:438)
	at com.intellij.psi.impl.search.PsiSearchHelperImpl.lambda$processPsiFileRoots$2(PsiSearchHelperImpl.java:314)
	at com.intellij.psi.impl.search.PsiSearchHelperImpl.lambda$null$3(PsiSearchHelperImpl.java:387)
	at com.intellij.openapi.application.impl.ReadMostlyRWLock.executeByImpatientReader(ReadMostlyRWLock.java:158)
	at com.intellij.openapi.application.impl.ApplicationImpl.executeByImpatientReader(ApplicationImpl.java:156)
	at com.intellij.psi.impl.search.PsiSearchHelperImpl.lambda$processFilesConcurrentlyDespiteWriteActions$4(PsiSearchHelperImpl.java:386)
	at com.intellij.concurrency.ApplierCompleter.execAndForkSubTasks(ApplierCompleter.java:149)
	at com.intellij.concurrency.ApplierCompleter.execAndForkSubTasks(ApplierCompleter.java:162)
	at com.intellij.concurrency.ApplierCompleter.execAndForkSubTasks(ApplierCompleter.java:162)
	at com.intellij.concurrency.ApplierCompleter.execAndForkSubTasks(ApplierCompleter.java:162)
	at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:971)
	at com.intellij.concurrency.ApplierCompleter.lambda$wrapInReadActionAndIndicator$1(ApplierCompleter.java:105)
	at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:577)
	at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:523)
	at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:59)
	at com.intellij.concurrency.ApplierCompleter.wrapInReadActionAndIndicator(ApplierCompleter.java:117)
	at com.intellij.concurrency.ApplierCompleter.lambda$compute$0(ApplierCompleter.java:96)
	at com.intellij.openapi.application.impl.ReadMostlyRWLock.executeByImpatientReader(ReadMostlyRWLock.java:158)
	at com.intellij.openapi.application.impl.ApplicationImpl.executeByImpatientReader(ApplicationImpl.java:156)
	at com.intellij.concurrency.ApplierCompleter.compute(ApplierCompleter.java:96)
	at java.base/java.util.concurrent.CountedCompleter.exec(CountedCompleter.java:746)
	at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:290)
	at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1020)
	at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1656)
	at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1594)
	at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:177)
2020-02-18 12:08:33,131 [  59357]  ERROR - mpl.search.PsiSearchHelperImpl - IntelliJ IDEA 2020.1 EAP  Build #IU-201.3803.71 
2020-02-18 12:08:33,131 [  59357]  ERROR - mpl.search.PsiSearchHelperImpl - JDK: 11.0.2; VM: OpenJDK 64-Bit Server VM; Vendor: JetBrains s.r.o 
2020-02-18 12:08:33,131 [  59357]  ERROR - mpl.search.PsiSearchHelperImpl - OS: Linux 
2020-02-18 12:08:33,132 [  59358]  ERROR - mpl.search.PsiSearchHelperImpl - Plugin to blame: Cursive version: 1.9.1-eap5-2020.1 
2020-02-18 12:08:33,132 [  59358]  ERROR - mpl.search.PsiSearchHelperImpl - Last Action: Tree-selectNext 
#2020-02-1913:48rafaelI'm not sure right now, but I believe this latter one was when I tried to open the file in question and it wouldn't even open (after I downgraded and opened the file, I noticed it had unbalanced parentheses - I'm using paredit - but I failed to capture the contents at the time, sorry)#2020-02-1913:50rafaelUpgraded again to 1.9.1-eap6-2020.1 and editing seems broken in the same way.#2020-02-1913:52rafaelEvery key press generates the following exception:#2020-02-1913:52rafael
2020-02-19 10:51:36,126 [ 821275]  ERROR - aemon.impl.PassExecutorService - Abandoned AnnotationBuilder - its 'create()' method was never called: Builder{message='null', myCurrentElement=PsiElement((), severity=INFORMATION, range=(0,1), enforcedAttributes=[java.awt.Color[r=170,g=170,b=170],null,0,BOXED,null,{},null]} 
java.lang.IllegalStateException: Abandoned AnnotationBuilder - its 'create()' method was never called: Builder{message='null', myCurrentElement=PsiElement((), severity=INFORMATION, range=(0,1), enforcedAttributes=[java.awt.Color[r=170,g=170,b=170],null,0,BOXED,null,{},null]}
	at com.intellij.codeInsight.daemon.impl.B.assertAnnotationCreated(B.java:325)
	at com.intellij.codeInsight.daemon.impl.AnnotationHolderImpl.assertAllAnnotationsCreated(AnnotationHolderImpl.java:219)
	at com.intellij.codeInsight.daemon.impl.DefaultHighlightVisitor.analyze(DefaultHighlightVisitor.java:98)
	at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.analyzeByVisitors(GeneralHighlightingPass.java:312)
	at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.collectHighlights(GeneralHighlightingPass.java:280)
	at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.collectInformationWithProgress(GeneralHighlightingPass.java:225)
	at com.intellij.codeInsight.daemon.impl.ProgressableTextEditorHighlightingPass.doCollectInformation(ProgressableTextEditorHighlightingPass.java:83)
	at com.intellij.codeHighlighting.TextEditorHighlightingPass.collectInformation(TextEditorHighlightingPass.java:52)
	at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.lambda$null$1(PassExecutorService.java:429)
	at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:971)
	at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.lambda$doRun$2(PassExecutorService.java:422)
	at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:577)
	at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:523)
	at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:59)
	at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.doRun(PassExecutorService.java:421)
	at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.lambda$run$0(PassExecutorService.java:397)
	at com.intellij.openapi.application.impl.ReadMostlyRWLock.executeByImpatientReader(ReadMostlyRWLock.java:158)
	at com.intellij.openapi.application.impl.ApplicationImpl.executeByImpatientReader(ApplicationImpl.java:156)
	at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.run(PassExecutorService.java:395)
	at com.intellij.concurrency.JobLauncherImpl$VoidForkJoinTask$1.exec(JobLauncherImpl.java:171)
	at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:290)
	at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1020)
	at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1656)
	at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1594)
	at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:177)
2020-02-19 10:51:36,127 [ 821276]  ERROR - aemon.impl.PassExecutorService - IntelliJ IDEA 2020.1 EAP  Build #IU-201.3803.71 
2020-02-19 10:51:36,127 [ 821276]  ERROR - aemon.impl.PassExecutorService - JDK: 11.0.2; VM: OpenJDK 64-Bit Server VM; Vendor: JetBrains s.r.o 
2020-02-19 10:51:36,127 [ 821276]  ERROR - aemon.impl.PassExecutorService - OS: Linux 
2020-02-19 10:51:36,127 [ 821276]  ERROR - aemon.impl.PassExecutorService - Last Action: EditorUp 
#2020-02-1913:57rafaelMost key presses do work, but I can consistently reproduce one case where the input is ignored.#2020-02-1913:57rafaelIf I input, anywhere in a file, the character # then it doesn't accept further input.#2020-02-1914:02rafaelUploaded here (https://pastebin.com/DwjLr9v0) the logs for one editing session where I reproduced the problem with # on a new file (containing just a bare namespace declaration)#2020-02-1920:16rafaelAfter working for several hours with 1.9.1-eap4, idea completely froze while editing, but it looks like it's a different bug. The logs point to a StackOverflowException: https://pastebin.com/N7TsQG0i#2020-02-1920:17cflemingThanks, I’m going to investigate all that today. Just checking - do you have rainbow parens on?#2020-02-1920:22rafaelYeah, I have rainbow parens on#2020-02-1923:22cflemingOk, thanks for all that. I’ve fixed the rainbow parens issues, but I cannot reproduce or figure out the NoSuchMethodError one. I’ll keep digging.#2020-02-2017:01rafaelThat's great, thanks. I thought it could have something to do with the new JetBrains font with ligatures, but I turned off ligatures and the problem remained.#2020-02-2022:37cflemingSo you’re still seeing the issue with eap7?#2020-02-1815:21rafaelDowngrading to 1.9.1-eap4 appears to have fixed the issue.#2020-02-1816:09dmarjenburghIn 1.9.1-eap5-2019.3, I cannot close the REPL tab by pressing the tab. Trying to start a new REPL gives the following error:
17:09	Error running 'REPL': Receiver class cursive.repl.toolwindow$repl_listener$reify__11844 does not define or inherit an implementation of the resolved method 'abstract void contentAdded(com.intellij.ui.content.ContentManagerEvent)' of interface com.intellij.ui.content.ContentManagerListener.
#2020-02-1816:13dmarjenburgh
java.lang.NullPointerException
	at clojure.core$deref_future.invokeStatic(core.clj:2300)
	at clojure.core$deref.invokeStatic(core.clj:2320)
	at clojure.core$deref.invoke(core.clj:2306)
	at cursive.inspections.symbol$fn__7554.invokeStatic(symbol.clj:161)
	at cursive.inspections.symbol$fn__7554.invoke(symbol.clj:118)
	at cursive.inspections.symbol$fn__7522$G__7517__7529.invoke(symbol.clj:107)
	at cursive.inspections.symbol$deprecated_api.invokeStatic(symbol.clj:175)
	at cursive.inspections.symbol$deprecated_api.invoke(symbol.clj:170)
	at clojure.lang.Var.invoke(Var.java:393)
	at cursive.api.DelayedFn.invoke(DelayedFn.java:41)
	at cursive.inspections.ClInspectionVisitor.visitElement(ClInspectionVisitor.java:29)
	at com.intellij.psi.impl.PsiElementBase.accept(PsiElementBase.java:274)
	at com.intellij.codeInspection.InspectionEngine.acceptElements(InspectionEngine.java:77)
	at com.intellij.codeInsight.daemon.impl.LocalInspectionsPass.lambda$null$6(LocalInspectionsPass.java:332)
	at com.intellij.util.AstLoadingFilter.lambda$toComputable$2(AstLoadingFilter.java:167)
	at com.intellij.util.AstLoadingFilter.disallowTreeLoading(AstLoadingFilter.java:125)
	at com.intellij.util.AstLoadingFilter.disallowTreeLoading(AstLoadingFilter.java:114)
	at com.intellij.util.AstLoadingFilter.disallowTreeLoading(AstLoadingFilter.java:109)
	at com.intellij.codeInsight.daemon.impl.LocalInspectionsPass.lambda$visitRestElementsAndCleanup$7(LocalInspectionsPass.java:331)
	at com.intellij.concurrency.ApplierCompleter.execAndForkSubTasks(ApplierCompleter.java:148)
	at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:997)
	at com.intellij.concurrency.ApplierCompleter.lambda$wrapInReadActionAndIndicator$1(ApplierCompleter.java:105)
	at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:585)
	at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:531)
	at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:59)
	at com.intellij.concurrency.ApplierCompleter.wrapInReadActionAndIndicator(ApplierCompleter.java:116)
	at com.intellij.concurrency.ApplierCompleter.lambda$compute$0(ApplierCompleter.java:96)
	at com.intellij.openapi.application.impl.ReadMostlyRWLock.executeByImpatientReader(ReadMostlyRWLock.java:167)
	at com.intellij.openapi.application.impl.ApplicationImpl.executeByImpatientReader(ApplicationImpl.java:157)
	at com.intellij.concurrency.ApplierCompleter.compute(ApplierCompleter.java:96)
	at java.base/java.util.concurrent.CountedCompleter.exec(CountedCompleter.java:746)
	at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:290)
	at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1020)
	at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1656)
	at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1594)
	at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:177)
#2020-02-1822:04cflemingThanks, I’ve fixed the NPE, and I’m looking at the abstract method problem.#2020-02-1902:32steveb8nI have the same abstract error with my shadow CLJS repl config. I’ll downgrade to unblock#2020-02-1903:10cflemingI can’t reproduce the abstract method error, nor do I have a plausible explanation for how it could happen. Does anyone have a stacktrace for that in their logs?#2020-02-1914:19dmarjenburghSometimes I don’t get the stacktrace, but just a red box in the corner. Here a some minimal steps of what I do and what happens: 1. Create a new empty deps project. Everytime it is opened, the following errors happens:
Cannot create listener

com.intellij.diagnostic.PluginException: Cannot create listener cursive.notifications.LeiningenProjectNotificationProvider$Listener [Plugin: com.cursiveclojure.cursive]
	at com.intellij.serviceContainer.PlatformComponentManagerImpl.createListener(PlatformComponentManagerImpl.kt:559)
	at com.intellij.util.messages.impl.MessageBusImpl.subscribeLazyListeners(MessageBusImpl.java:212)
	at com.intellij.util.messages.impl.MessageBusImpl.syncPublisher(MessageBusImpl.java:193)
	at cursive.build.BuildSystemProjectsManager$onChange$1.run(BuildSystemManager.kt:101)
	at com.intellij.util.ui.update.MergingUpdateQueue.execute(MergingUpdateQueue.java:324)
	at com.intellij.util.ui.update.MergingUpdateQueue.execute(MergingUpdateQueue.java:314)
	at com.intellij.util.ui.update.MergingUpdateQueue.lambda$flush$1(MergingUpdateQueue.java:264)
	at com.intellij.util.ui.EdtInvocationManager.invokeAndWaitIfNeeded(EdtInvocationManager.java:57)
	at com.intellij.util.ui.UIUtil.invokeAndWaitIfNeeded(UIUtil.java:2438)
	at com.intellij.util.ui.update.MergingUpdateQueue.flush(MergingUpdateQueue.java:275)
	at com.intellij.util.ui.update.MergingUpdateQueue.run(MergingUpdateQueue.java:233)
	at com.intellij.util.concurrency.QueueProcessor.runSafely(QueueProcessor.java:231)
	at com.intellij.util.Alarm$Request.runSafely(Alarm.java:371)
	at com.intellij.util.Alarm$Request.run(Alarm.java:358)
	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at com.intellij.util.concurrency.SchedulingWrapper$MyScheduledFutureTask.run(SchedulingWrapper.java:217)
	at com.intellij.openapi.application.impl.LaterInvocator$FlushQueue.doRun(LaterInvocator.java:441)
	at com.intellij.openapi.application.impl.LaterInvocator$FlushQueue.runNextEvent(LaterInvocator.java:424)
	at com.intellij.openapi.application.impl.LaterInvocator$FlushQueue.run(LaterInvocator.java:407)
	at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:313)
	at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:776)
	at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:727)
	at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:721)
	at java.base/java.security.AccessController.doPrivileged(Native Method)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
	at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:746)
	at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:908)
	at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:781)
	at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$8(IdeEventQueue.java:424)
	at com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:698)
	at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:423)
	at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
	at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)
Caused by: java.lang.ClassNotFoundException: cursive.notifications.LeiningenProjectNotificationProvider$Listener PluginClassLoader[com.cursiveclojure.cursive, 1.9.1-eap5-2019.3] 
#2020-02-1914:23dmarjenburgh2. Create a REPL run config (nREPL + run with deps). Start it and then close it by pressing the cross (Close REPL tab). The REPL shuts down, but the tab doesn’t close and the following error happens: #2020-02-1914:23dmarjenburgh
java.lang.AbstractMethodError: Receiver class cursive.repl.toolwindow$repl_listener$reify__11844 does not define or inherit an implementation of the resolved method 'abstract void selectionChanged(com.intellij.ui.content.ContentManagerEvent)' of interface com.intellij.ui.content.ContentManagerListener.
	at jdk.internal.reflect.GeneratedMethodAccessor121.invoke(Unknown Source)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
	at com.intellij.util.EventDispatcher.dispatchVoidMethod(EventDispatcher.java:130)
	at com.intellij.util.EventDispatcher.access$000(EventDispatcher.java:24)
	at com.intellij.util.EventDispatcher$1.invoke(EventDispatcher.java:88)
	at com.sun.proxy.$Proxy117.selectionChanged(Unknown Source)
	at com.intellij.ui.content.impl.ContentManagerImpl.fireSelectionChanged(ContentManagerImpl.java:556)
	at com.intellij.ui.content.impl.ContentManagerImpl.removeFromSelection(ContentManagerImpl.java:391)
	at com.intellij.ui.content.impl.ContentManagerImpl.doRemoveContent(ContentManagerImpl.java:208)
	at com.intellij.ui.content.impl.ContentManagerImpl.removeContent(ContentManagerImpl.java:171)
	at com.intellij.ui.content.impl.ContentManagerImpl.removeContent(ContentManagerImpl.java:164)
	at cursive.repl.toolwindow$close_action$fn__11908.invoke(toolwindow.clj:341)
	at cursive.actions$dumb_aware$fn__167.invoke(actions.clj:88)
	at cursive.actions.proxy$com.intellij.openapi.project.DumbAwareAction$ClojureAction$WithShortcutSet$d4627f96.actionPerformed(Unknown Source)
	at com.intellij.openapi.actionSystem.ex.ActionUtil$1.run(ActionUtil.java:298)
	at com.intellij.openapi.actionSystem.ex.ActionUtil.performActionDumbAware(ActionUtil.java:315)
	at com.intellij.openapi.actionSystem.ex.ActionUtil.performActionDumbAwareWithCallbacks(ActionUtil.java:289)
	at com.intellij.openapi.actionSystem.impl.ActionButton.actionPerformed(ActionButton.java:194)
	at com.intellij.openapi.actionSystem.impl.ActionButton.performAction(ActionButton.java:157)
	at com.intellij.openapi.actionSystem.impl.ActionButton.processMouseEvent(ActionButton.java:447)
	at java.desktop/java.awt.Component.processEvent(Component.java:6416)
	at java.desktop/java.awt.Container.processEvent(Container.java:2263)
	at java.desktop/java.awt.Component.dispatchEventImpl(Component.java:5026)
	at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2321)
	at java.desktop/java.awt.Component.dispatchEvent(Component.java:4858)
	at java.desktop/java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4918)
	at java.desktop/java.awt.LightweightDispatcher.processMouseEvent(Container.java:4547)
	at java.desktop/java.awt.LightweightDispatcher.dispatchEvent(Container.java:4488)
	at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2307)
	at java.desktop/java.awt.Window.dispatchEventImpl(Window.java:2773)
	at java.desktop/java.awt.Component.dispatchEvent(Component.java:4858)
	at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:778)
	at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:727)
	at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:721)
	at java.base/java.security.AccessController.doPrivileged(Native Method)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:95)
	at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:751)
	at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:749)
	at java.base/java.security.AccessController.doPrivileged(Native Method)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
	at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:748)
	at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:908)
	at com.intellij.ide.IdeEventQueue.dispatchMouseEvent(IdeEventQueue.java:846)
	at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:778)
	at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$8(IdeEventQueue.java:424)
	at com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:698)
	at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:423)
	at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
	at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)
#2020-02-1914:24dmarjenburgh3. Subsequent clicks to close the REPL tab do nothing. Trying to restart the REPL shows an error:#2020-02-1919:56tony.kayhaving the same problem when I try to start a second REPL. First one starts fine.#2020-02-1919:57tony.kay#2020-02-1919:58tony.kayno stack trace in logs…in fact, no error in logs#2020-02-2112:40dmarjenburgh@cfleming The issue appears to have been solved in 1.9.1-eap8-2019.3. I don’t receive any errors anymore 😃#2020-02-2121:28cflemingHooray! Thanks for letting me know.#2020-02-2112:40dmarjenburgh@cfleming The issue appears to have been solved in 1.9.1-eap8-2019.3. I don’t receive any errors anymore 😃#2020-02-1904:45fbgavaHi guys, I just installed IntelliJ/Cursive on Windows (latest version), and when trying to "use tools.deps directly", the version is <none>, and after clicking on "Refresh" I'm finding this file inside .m2/repository/org/clojure/tools.deps/alpha, "resolver-status.properties", with the following content: #NOTE: This is an Aether internal implementation file, its format can be changed without prior notice. #Wed Feb 19 01:27:46 BRT 2020 maven-metadata-central.xml/@default-central-http\:<//repo1.maven.org/maven2/.lastUpdated=1582086466312> maven-metadata-central.xml.error=Could not transfer metadata org.clojure\:tools.deps.alpha/maven-metadata.xml from/to central (http\:<//repo1.maven.org/maven2/>)\: status code\: 501, reason phrase\: HTTPS Required (501) Anyone has any ideas on how to fix this? Tried manually adding a profile with https repository in settings.xml without luck. 😞#2020-02-1904:46cflemingHi @U7JCZJR0W, this is a bug which is fixed in the latest EAP build but not in stable releases yet. Oops, I see you just found the solution 🙂#2020-02-1904:47fbgavayup, i just saw the thread you replied above. thanks!#2020-02-1904:46fbgavanvm, just found a thread above with workaround and its fixed on EAP.#2020-02-1905:14emccue#2020-02-1905:14emccueinteresting bug maybe#2020-02-1905:15emccueI disabled the "unknown symbol highlight in orange" setting#2020-02-1905:24emccue(i don't actually want it gone, but i want to figure out a visual indicator that doesn't murder my eyes when im using a library that cursive can't resolve any symbols in)#2020-02-1922:27cflemingJust checking, do you know about customising symbol resolution? https://cursive-ide.com/userguide/macros.html. I know it doesn’t always work, but it might help if you’re not aware of it.#2020-02-1907:40thumbnailIs it possible to render a link (to a project-file) in the cursive terminal, just like the links in stacktrace?#2020-02-1922:30cflemingNot that I’m aware of, but I don’t actually use the terminal much. There may be something that IntelliJ does which allows that.#2020-02-2019:08thumbnailI meant the repl, sorry for the confusion 😅 there's a plug-in for the terminal, haven't tried it yer#2020-02-1908:14katoxI downgraded Cursive to eap4 and most REPL related problems went away. It seems that some UI glue is not quite right in the latest version.#2020-02-1908:45cfleming@U0KD0N5T5 Which REPL related problems were you seeing in the new version?#2020-02-1909:08katoxhttps://github.com/cursive-ide/cursive/issues/2315
#2020-02-1909:11katoxUncloseable REPL window and few other quirks I don't have well documented#2020-02-1909:12katoxI can try to hunt for exceptions but I tried to send most of them via autosend on IDE error. One other frequent is:
idea.log:java.lang.AbstractMethodError: Receiver class cursive.repl.toolwindow$repl_listener$reify__11844 does not define or inherit an implementation of the resolved method 'abstract void selectionChanged(com.intellij.ui.content.ContentManagerEvent)' of interface com.intellij.ui.content.ContentManagerListener.
idea.log:	at cursive.repl.toolwindow$repl_listener$reify__11844.projectClosing(toolwindow.clj:218)
idea.log:	at cursive.repl.ClojureConsole.<init>(ClojureConsole.java:89)
idea.log:	at cursive.repl.toolwindow$create_repl_ui.invokeStatic(toolwindow.clj:593)
idea.log:	at cursive.repl.toolwindow$create_repl_ui.invoke(toolwindow.clj:586)
idea.log:	at cursive.repl.toolwindow$create_new_repl$reify__12085.run(toolwindow.clj:758)
idea.log:	at cursive.repl.toolwindow$create_new_repl.invokeStatic(toolwindow.clj:757)
idea.log:	at cursive.repl.toolwindow$create_new_repl.invoke(toolwindow.clj:745)
idea.log:	at cursive.repl.process_runner$run_clojure_main.invokeStatic(process_runner.clj:205)
idea.log:	at cursive.repl.process_runner$run_clojure_main.invoke(process_runner.clj:193)
idea.log:	at cursive.repl.process_runner$execute.invokeStatic(process_runner.clj:234)
idea.log:	at cursive.repl.process_runner$execute.invoke(process_runner.clj:230)
idea.log:	at cursive.api.DelayedFn.invoke(DelayedFn.java:51)
idea.log:	at cursive.repl.runner.LocalConfiguration$getRunProfileState$2.execute(ReplRunConfigurations.kt:366)
idea.log:	at cursive.runner.DeferredRunner.access$execute$s-282919921(Deferred.kt:58)
idea.log:	at cursive.runner.DeferredRunner$execute$1$run$1.run(Deferred.kt:91)
#2020-02-1909:12katox
idea.log:2020-02-18 14:26:43,007 [   5678]   INFO -    #cursive.repl.IdeReplServer - IDE REPL server bound to localhost/127.0.0.1 on 36941 
idea.log:com.intellij.diagnostic.PluginException: Cannot create listener cursive.notifications.LeiningenProjectNotificationProvider$Listener [Plugin: com.cursiveclojure.cursive]
idea.log:	at cursive.build.BuildSystemProjectsManager$onChange$1.run(BuildSystemManager.kt:101)
#2020-02-1909:13cflemingOk, thanks. Some of those are definitely fixed in the next build, but the AbstractMethodError I can’t reprodce, it’s a really weird one.#2020-02-1909:13cflemingI’ve also gone through the error tracker, thanks for filing those.#2020-02-1909:15katoxI'll try to focus on reproducing some of those problems if they persist. But it looked like most of them are just manifestations of a different error#2020-02-1909:31cflemingNo, they’re mostly manifestations of the fact that I’ve been trying to fix up a lot of uses of deprecated APIs to get 2020.1 working properly, and it’s made the release pretty complicated. But I do wonder if the AbstractMethodError one is some kind of build error since I can’t come up with a plausible explanation for it.#2020-02-1911:39katoxI can't think of the AbstractMethod issue is a standalone thing. It always popped up after a different error. But it could be some kind of code branch that is mostly unused.#2020-02-1920:04tony.kay@cfleming so I’ve most often gotten that error in the JVM when the classpath has two of the “same thing” on it, which can result in an ordering issue: if the right one is found by the classloader first, then it works. Otherwise, it fails because the other version doesn’t have some method that is defined on the interface. Say Interface A is in some updated lib and you have two things that implement the interface, but one was compiled against the old version (where some method in A didn’t exist) and an instance of that gets into the code flow. Some new code based on the new version of A that has the method tries to call it and you get that error.#2020-02-1920:07cfleming@U0CKQ19AQ Thanks, I’d considered something like that, but I can’t come up with a plausible way it could happen. My go-to reason for things like this is some AOT crud lying around, but I always do a clean build as part of my release process. I also can’t figure out why I can never reproduce it.#2020-02-1920:11tony.kay@cfleming I got a stack trace this time: #2020-02-1920:11tony.kay
2020-02-19 12:00:11,864 [ 261079]  ERROR - roject.impl.ProjectManagerImpl - Plugin to blame: Cursive version: 1.9.1-eap6-2019.3 
2020-02-19 12:00:11,964 [ 261179]  ERROR - .impl.MessageBusConnectionImpl - Method cursive/repl/toolwindow$repl_listener$reify__11845.contentRemoved(Lcom/intellij/ui/content/ContentManagerEvent;)V is abstract 
java.lang.AbstractMethodError: Method cursive/repl/toolwindow$repl_listener$reify__11845.contentRemoved(Lcom/intellij/ui/content/ContentManagerEvent;)V is abstract
	at cursive.repl.toolwindow$repl_listener$reify__11845.contentRemoved(toolwindow.clj)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
	at com.intellij.util.EventDispatcher.dispatchVoidMethod(EventDispatcher.java:130)
	at com.intellij.util.EventDispatcher.access$000(EventDispatcher.java:24)
	at com.intellij.util.EventDispatcher$1.invoke(EventDispatcher.java:88)
	at com.sun.proxy.$Proxy105.contentRemoved(Unknown Source)
	at com.intellij.ui.content.impl.ContentManagerImpl.fireContentRemoved(ContentManagerImpl.java:551)
	at com.intellij.ui.content.impl.ContentManagerImpl.doRemoveContent(ContentManagerImpl.java:229)
	at com.intellij.ui.content.impl.ContentManagerImpl.removeContent(ContentManagerImpl.java:171)
	at com.intellij.ui.content.impl.ContentManagerImpl.removeContent(ContentManagerImpl.java:164)
	at cursive.repl.toolwindow$repl_listener$reify__11845.projectClosing(toolwindow.clj:218)
	at com.intellij.openapi.project.impl.ProjectManagerImpl$1.projectClosing(ProjectManagerImpl.java:126)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
	at com.intellij.util.messages.impl.MessageBusImpl.invokeListener(MessageBusImpl.java:513)
	at com.intellij.util.messages.impl.MessageBusConnectionImpl.deliverMessage(MessageBusConnectionImpl.java:138)
	at com.intellij.util.messages.impl.MessageBusImpl.doPumpMessages(MessageBusImpl.java:438)
	at com.intellij.util.messages.impl.MessageBusImpl.pumpWaitingBuses(MessageBusImpl.java:398)
	at com.intellij.util.messages.impl.MessageBusImpl.pumpMessages(MessageBusImpl.java:388)
	at com.intellij.util.messages.impl.MessageBusImpl.sendMessage(MessageBusImpl.java:372)
	at com.intellij.util.messages.impl.MessageBusImpl.lambda$createTopicHandler$1(MessageBusImpl.java:241)
	at com.sun.proxy.$Proxy80.projectClosing(Unknown Source)
	at com.intellij.openapi.project.impl.ProjectManagerImpl.fireProjectClosing(ProjectManagerImpl.java:789)
	at com.intellij.openapi.project.impl.ProjectManagerImpl.closeProject(ProjectManagerImpl.java:748)
	at com.intellij.openapi.project.impl.ProjectManagerImpl.closeAndDisposeAllProjects(ProjectManagerImpl.java:688)
	at com.intellij.openapi.application.impl.ApplicationImpl.disposeSelf(ApplicationImpl.java:170)
	at com.intellij.openapi.application.impl.ApplicationImpl.doExit(ApplicationImpl.java:655)
	at com.intellij.openapi.application.impl.ApplicationImpl.exit(ApplicationImpl.java:628)
	at com.intellij.openapi.application.impl.ApplicationImpl.exit(ApplicationImpl.java:617)
	at com.intellij.openapi.application.impl.ApplicationImpl.exit(ApplicationImpl.java:613)
	at com.intellij.openapi.application.impl.ApplicationImpl.exit(ApplicationImpl.java:584)
	at com.intellij.openapi.application.impl.ApplicationImpl.exit(ApplicationImpl.java:579)
	at com.intellij.ui.mac.MacOSApplicationProvider$Worker.lambda$null$3(MacOSApplicationProvider.java:72)
	at com.intellij.ui.mac.MacOSApplicationProvider$Worker.lambda$submit$7(MacOSApplicationProvider.java:162)
	at com.intellij.openapi.application.TransactionGuardImpl.runSyncTransaction(TransactionGuardImpl.java:83)
	at com.intellij.openapi.application.TransactionGuardImpl.lambda$pollQueueLater$0(TransactionGuardImpl.java:68)
	at com.intellij.openapi.application.impl.LaterInvocator$FlushQueue.doRun(LaterInvocator.java:441)
	at com.intellij.openapi.application.impl.LaterInvocator$FlushQueue.runNextEvent(LaterInvocator.java:424)
	at com.intellij.openapi.application.impl.LaterInvocator$FlushQueue.run(LaterInvocator.java:407)
	at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:313)
	at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:776)
	at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:727)
	at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:721)
	at java.base/java.security.AccessController.doPrivileged(Native Method)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
	at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:746)
	at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:908)
	at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:781)
	at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$8(IdeEventQueue.java:424)
	at com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:698)
	at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:423)
	at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
	at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)
#2020-02-1920:14tony.kayAccording to ps here’s the classpath IntelliJ itself is using:#2020-02-1920:14tony.kay
/Applications/IntelliJ  -Djava.awt.headless=true -Dmaven.defaultProjectBuilder.disableGlobalModelCache=true -Xmx768m -Didea.maven.embedder.version=3.6.1 -Dmaven.ext.class.path=/Applications/IntelliJ  -Dfile.encoding=UTF-8 -classpath /Applications/IntelliJ                                                                org.jetbrains.idea.maven.server.RemoteMavenServer36
#2020-02-1920:14cfleming@U0CKQ19AQ Thanks, I’m going to download the archive of the version you’re using and make sure there’s nothing funky about it.#2020-02-1920:15tony.kayoh, sorry, that CP above is wrong#2020-02-1920:15tony.kayI downgraded the plugin#2020-02-1920:15tony.kaylet me know if I can find any more info for you#2020-02-1920:15cflemingThanks, I will do.#2020-02-2000:53cflemingeap7 is out now, fixing this problem.#2020-02-1920:08royalaid@cfleming Would it be possible to get seperate histories for CLJS and CLJ repls?#2020-02-1922:25cflemingHmm, interesting idea. Cursive mostly knows which REPL is being used as which, so in theory that should be possible. It might change how the history has to be stored though, which might be tricky. I’ll investigate.#2020-02-1920:20shaun-mahoodOn a similar note, is it possible to have separate repls visible at the same time?#2020-02-1922:26cflemingThis is a bit tricky from a UI point of view. I actually investigated using the debugger UI framework for this which might be possible. Apparently there are improvements coming in upcoming IntelliJ versions which might make this much easier.#2020-02-1922:30shaun-mahoodOh good!#2020-02-1922:31cflemingAre you thinking for side-by-side clj/cljs REPLs?#2020-02-1922:31shaun-mahoodYeah, that would be my main use case - I don't think I would ever use 2 of the same kind.#2020-02-1922:33cflemingWhat about an integrated one in the same pane? I was considering one in which you could switch the input pane to go to one or the other, and the output would be marked as coming from one or the other.#2020-02-1922:34cflemingI’m not sure if it would be terribly confusing, though.#2020-02-1922:37shaun-mahoodThat would probably be fine - though it might get weird when looking through the history. My ideal (I think) setup would be to have one monitor with all my CLJ stuff and the other with all the CLJS - so I could have REBL, CLJ editor windows, and the CLJ repl on one side and the browser, CLJS editor windows, and CLJS repl on the other.#2020-02-1922:37cflemingUnfortunately, IntelliJ doesn’t offer that much flexibility in its windowing.#2020-02-1922:40shaun-mahoodYeah, too bad the repl window doesn't work the same as the other ones - everything else works great. Most of the time the only thing I'm checking for on the repl output is to make sure that I'm not getting an error, which would be totally fine with the combined output.#2020-02-1922:40cflemingWhen you say “the other ones”, do you mean standard editor tabs?#2020-02-1922:40shaun-mahoodYes#2020-02-1922:43cflemingSo, I have actually considered allowing that. The issue is what to do when you use “Send x to REPL…” type actions. How do you determine which is the REPL you want to send it to? I guess I could just prompt if it were ambiguous, but that would get annoying pretty quickly.#2020-02-1922:49shaun-mahoodWould it be possible to have .cljs files send to only repl windows defined as cljs? For my workflow it would probably be fine if it sent to all repls at the same time (if that's possible), but I don't know if that would cause massive issues otherwise. Not knowing what is possible in intellij, maybe the prompt could occur when you try to split the repl windows, and then have an active window for each type of file.#2020-02-2102:34onetombut then what to do with .cljc files?#2020-02-2102:39shaun-mahood@U086D6TBN I don’t think I’ve had any situations where it would be an issue if it sent cljc forms to both repls, and it would be great to be able to compare the two at the same time. Maybe have a toggle on the repl window so that it could be turned off?#2020-02-2102:39onetomi tried to use terminal tabs in the editor area, but when i switch to another editor, i can't switch back to the terminal afterwards. all references are just gone to it. (i set Editor Tabs / Tabs limit to 1, though)#2020-02-2102:41onetom@U054BUGT4 i was just exploring how these things are done in emacs/cider. it takes forever to learn that ecosystem, but it also teaches u about the possible workflows. maybe some of those ideas could be funnelled back to cursive too...#2020-02-2102:42shaun-mahoodThat would be great. It definitely seems like there are a lot of intellij specific tricks though.#2020-02-2102:48cflemingYes, I think that CIDER does that, if you have a combined CLJ/CLJS REPL open it will send files and forms to the corresponding REPL, and CLJC to both.#2020-02-2102:49cflemingI’m definitely very open to hearing about good ideas Cursive should take inspiration from.#2020-02-1920:56kingmobDoes anyone have any thoughts on using LSP vs File Watchers for incorporating clj-kondo? https://github.com/borkdude/clj-kondo/blob/master/doc/editor-integration.md#intellij-idea#2020-02-1921:07Janne SauvalaI tried both approaches and LSP might be faster. However, you need to download the kondo LSP-jar release manually to keep kondo updated. File watcher can be used with the one distributed via brew. And the LSP-plugin from Iltellij marketplace was broken and I had to install it from GitHub. So, both are ok options, I settled with LSP 🙂#2020-02-1921:12kingmobThx!#2020-02-1921:00thosmosI just updated to 1.9.1-eap6-2019.3 and now I’m getting this error when I try to run a remote repl that connects to my shadow-cljs server:
12:58 PM	Error running 'nREPL 9000': Receiver class cursive.repl.toolwindow$repl_listener$reify__11845 does not define or inherit an implementation of the resolved method 'abstract void contentAdded(com.intellij.ui.content.ContentManagerEvent)' of interface com.intellij.ui.content.ContentManagerListener.
Downgraded to 1.9.0-2019.3 and it works
#2020-02-1921:14cflemingYes, eap5 and eap6 have this problem, I’m working on it now.#2020-02-2000:53cflemingThis problem is fixed in eap7, out now.#2020-02-2014:06AJ JaroHas anyone experienced problems with reloading records/protocols in the REPL? I periodically have issues with that where it won’t recognize that my var is referencing a record that implements said protocol.#2020-02-2014:20kingmob@ajarosinski are you re-defing the var as well, or just the record?#2020-02-2014:22AJ JaroI think I’m re-defing the var. For example, I’ll fetch data from the DB in the REPL, convert that to a record and then try to reference the protocol functions on that record. This will fail sometimes if I’ve reloaded either the protocol/record in the incorrect order in the REPL#2020-02-2017:07rafaelI think that's expected behavior for records. A record defines an accompanying class, and reloading it generates a new class, so instances that existed before the reload now point to the old class.#2020-02-2017:08rafaeltools.namespace docs offers suggestions for structuring your codebase to be more repl friendly: https://github.com/clojure/tools.namespace#2020-02-2017:10rafaelStuart Sierra blog posts about his workflow are also useful: http://thinkrelevance.com/blog/2013/06/04/clojure-workflow-reloaded#2020-02-2017:10rafaelHe automated some of it in this project https://github.com/stuartsierra/reloaded#2020-02-2017:47tanzoniteblackI generally avoid using records/protocols exactly because they're not very REPL friendly#2020-02-2017:47tanzoniteblack¯\(ツ)/¯#2020-02-2017:58AJ JaroThanks @U5FEGMC4D, I’ll read through those. @U236LQYB0, that’s a bummer that you avoid them for the REPL; I have really enjoyed them otherwise#2020-02-2111:42urbisHello, is there any way to sort namespaces automatically?#2020-02-2114:42AJ Jaro@U84FEKW9J I created an IntelliJ plugin that works ok. There’s a bug with it that it’ll remove any reader conditionals in the require statement. Other than that I’ve been satisfied so far. I totally understand it’s not written optimally so feel free to create a PR on it if you have time to make it better too. https://plugins.jetbrains.com/plugin/13222-clojure-namespace-sort#2020-02-2114:46urbisThank you 🙂#2020-02-2412:50Ivar RefsdalThat's neat. Where would the source code be for this plugin?#2020-02-2412:51Ivar RefsdalAh, here: https://github.com/mustangJaro/antandre#2020-02-2122:22samI’m having an issue with using the Before launch part of my repl config. Specifically, if I add a Run Another Configuration to run a Clojure Application then that other configuration runs, but the REPL never launches. The problem seems specific to Run Another Configuration. If I achieve the same thing by Run External Tool then both the external tool runs and the REPL launches successfully. Wondering if this is known or whether I should file a bug. I also don’t know if this has anything to do with Cursive or whether it’s an intellij issue.#2020-02-2201:29cflemingIf you could file a bug for that that would be great, and I’ll take a look at it.#2020-02-2421:55sam@U0567Q30W Thanks. I filed https://github.com/cursive-ide/cursive/issues/2323 I also filed https://github.com/cursive-ide/cursive/issues/2322 for another REPL issue that I asked about previously.#2020-02-2416:12roklenarcicis there a way to have cursive sort all the map keys in an edn file alphabetically?#2020-02-2508:42cflemingNo, there’s nothing like this at the moment.#2020-02-2508:53roklenarcicIt would be a neat feature because when editing large edn files it can be easier to find things if they are sorted alphabetically. I know it doesn’t impact the actual generated datastructure.#2020-02-2416:44Alex Miller (Clojure team)maps are unordered, so don't expect that doing so will have any impact on what happens when you read/compare.#2020-02-2416:48kulminaatorif you throw it's contents into a treemap then this one is sorted#2020-02-2416:49kulminaatorbut it's a bad idea to build things based on sorted maps, i have only used it for comparison of deep json trees in tests#2020-02-2416:51imreI have a suspicion that the reason in this case is code style/ease of reading/nicer diffs#2020-02-2416:52imrelike when you order requires in your ns form#2020-02-2417:01kennyCursive seems to get confused by an exception I'm throwing
Error printing return value (ExceptionInfo) at compute.data-model.spec-helpers/add2 (spec_helpers.cljc:240).
asd
Expanding the stacktrace shows:
clojure.lang.ExceptionInfo: null #:clojure.error{:phase :print-eval-result}
	at clojure.main$repl$read_eval_print__9086.invoke(main.clj:442)
clojure.lang.ExceptionInfo: compute.data-model.spec-helpers/add2 threw an exception. {:sym compute.data-model.spec-helpers/add2, :spec #object[clojure.spec.alpha$fspec_impl$reify__2524 0x73f4d05a "
#2020-02-2508:47cflemingI’m struggling to follow this - is your exception the asd one?#2020-02-2515:29kennyHaha understandable. I threw an ex-info that had an ex-info as the cause.#2020-02-2515:29kennySo both are "mine"#2020-02-2417:20jumpnbrownweaselThe problems I was having with slowness/unresponsiveness in recent versions of IntelliJ are a little better after increasing the heap size. I got a low memory warning. The slowness was discussed in an earlier thread here that's now gone. I do have a lot of workspaces open at a time, but it's also possible that recent versions are using more memory. FWIW you can increase heap size with the Heap->Change Memory Settings menu item.#2020-02-2419:09kennyWhen switching to a particular branch, the entire IntelliJ UI freezes. It appears to have something to do with reading projects.#2020-02-2422:23kennyWhy does switching branches require Cursive to re-read all the projects? It seems like it should have cached that from the last time I switched to a branch.#2020-02-2508:41cflemingI think so, yes. It should only re-read those which have changed, and I’m not sure why the UI should freeze.#2020-02-2515:29kennyIt would happen quite consistently on both my Mac and Linux computers.#2020-02-2521:22kennyIt is definitely not caching the "read projects" between branches.#2020-02-2521:57cflemingOk. What I’m going to do is add some debug logging to the caching to help diagnose this. That should be in the next build.#2020-02-2507:13thumbnailI am seeing some unexpected behaviour with leiningen in cursive witht the following project.clj. Using lein repl writes java-file.txt and clj-file.txt both with the PWD. Using the cursive repl java-file.txt contains "/Applications/IntelliJ IDEA " , wherease clj-file.txt still contains the PWD. :thinking_face:#2020-02-2508:34vemvit crossed my mind, maybe Cursive has its own String protocol implementation, overriding Clojure's?#2020-02-2508:37cflemingThe short answer here is to use jio/file instead of (File.) because Cursive can do magic to the first to make things like this work.#2020-02-2613:11achikinHow to enable soft wraps on clojure/clojurescript files?#2020-02-2613:14imrepreferences editor general soft wraps soft-wrap files wildcard pattern#2020-02-2613:15imreor just search for soft-wrap in the preferences search box#2020-02-2614:34achikinIt does not work#2020-02-2614:53imrestrange, it does for me#2020-02-2615:13achikin#2020-02-2615:15achikinAh, semicolon separated list.#2020-02-2619:05seriogaHello @cfleming Is it possible to “Find usages” for keyword namespaces (I want to find all keywords with specific namespace)? If not can we file a feature request? 🙂#2020-02-2619:10seriogaAnd related feature is “Rename namespace” along with “Rename keyword”#2020-02-2619:40Lennart Buitthis would be great, I spent hours in my life tracking down namespace qualified keywords with aliases that weren’t required#2020-02-2620:07jumpnbrownweasel@U0HJNJWJH Keyword renaming already works, and you do it the same way you rename symbols. When you rename it you rename the entire thing, including the qualifier. So you can't rename the qualifier separately. Note that keyword qualifiers are not namespaces.#2020-02-2620:13jumpnbrownweaselThat's my experience anyway.#2020-02-2620:22achikinBtw cursive does not suggest to add a namespace for a qualified keyword automatically which is a bit annoying too#2020-02-2620:26serioga@UBRMX7MT7 “Keyword renaming already works, and you do it the same way you rename symbols” I aware. But sometimes I need to rename all keywords with same namespace, and this is a little annoying, at least in part of finding all keywords with this namespace...#2020-02-2620:28serioga@U3A7Z18JZ Btw cursive does not suggest to add a namespace for a qualified keyword automatically What do you mean?#2020-02-2620:41jumpnbrownweaselSorry, I misunderstood. When you said "Rename namespace" along with "Rename keyword" I thought you meant both features were missing.#2020-02-2621:06cfleming@U0HJNJWJH I think what achikin means is that keywords don’t add aliases to the namespace form after copy/paste or on completion like symbols to, which would definitely be nice to have.#2020-02-2621:07cflemingAnd yes, could you file an issue for the find namespace thing as a feature request please? It does sound nice to have.#2020-02-2621:38achikin@U0HJNJWJH I mean when you refer a var with an aliased namespace eg constants/DEFAULT_VALUE cursive figures out the alias and suggests you to require constants namespace. But that does not work for qualified keywords.#2020-02-2811:55serioga@cfleming «And yes, could you file an issue for the find namespace thing as a feature request please?» Where can I do this?#2020-02-2814:28jumpnbrownweasel@U0HJNJWJH see: https://cursive-ide.com/userguide/support.html#2020-02-2814:28jumpnbrownweaselThere is an issue tracker.#2020-02-2814:38seriogaFeature request has been added https://github.com/cursive-ide/cursive/issues/2326#2020-02-2814:38seriogaFeature request has been added https://github.com/cursive-ide/cursive/issues/2326#2020-02-2709:19seriogaHello @cfleming Does an option exists somewhere to keep spaces in manually aligned code when I do Reformat Code ? For example I wrote
[a   b   c]
[aaa bbb ccc]
and want it to be kept intact on reformat?
#2020-02-2709:33cflemingNo, there isn’t. And there’s really no good way that could work except for an annotation like “Never reformat this form” - at the end of the day, reformatting is only moving spaces around.#2020-02-2709:34cflemingSo it would have to be manually annotated in the code somehow.#2020-02-2709:54seriogaMaybe more general way to specify what should be aligned vertically?#2020-02-2710:46cflemingIs that inside any form that a general rule could be made for?#2020-02-2710:53cflemingI’m thinking of something like clojure.test/are where you might want to consistently align the columns.#2020-02-2715:35serioga@cfleming “Is that inside any form that a general rule could be made for?” I would not say that :thinking_face:#2020-02-2715:36serioga(my-form a b c) (my-form aaaa bbbb cccc)#2020-02-2715:40seriogaGenerally for me it would be fine to have checkboxes Don't touch multiple non-trailing spaces , Don't remove newlines so that Cursive only align code and insert missing space between words#2020-02-2721:36cflemingWell, Cursive doesn’t remove newlines when reformatting at the moment.#2020-02-2721:39cflemingI’m not sure how Cursive would determine “multiple non-trailing spaces” - basically, that would mean that Cursive wouldn’t reformat at all, as far as I can tell.#2020-02-2810:54serioga@cfleming «Cursive doesn’t remove newlines when reformatting at the moment.» Not in this case
(xxx)
, (yyy)
leading comma force second line to be collapsed
#2020-02-2811:54serioga@cfleming «I’m not sure how Cursive would determine “multiple non-trailing spaces”» I've meant not leading and trailing spaces.#2020-02-2821:27cflemingAh, IntelliJ has an action for that, “Auto-Indent lines”, which just adjusts the initial indent. Is that what you’re looking for?#2020-02-2908:35seriogaWell, I've tested “Auto-Indent lines”, it's not exactly the what I want. My use-case (using parinfer): • there is a code formatted with “Default to only indent” disabled • I enable “Default to only indent” and want to update indentation • in this case “Auto-Indent lines” does not change indentation in forms but “Reformat Code” does. But “Reformat Code” also breaks all manual alignment Generally I would like to try various ideas to make code more readable but automatic code formatting makes it almost impossible.#2020-02-2714:36katoxIt looks like the cursive error reporting endpoint is down.
cursive.exception.GithubException: 500 Internal Server Error 
	at cursive.exception.ClojureErrorReportSubmitterKt.create(ClojureErrorReportSubmitter.kt:158)
#2020-02-2714:46jffryGitHub is having problems today: https://www.githubstatus.com/incidents/q07bfjh7jf1t#2020-02-2718:23tanzoniteblackIs there a way to rename a namespace and updates all of the requires to it i.e. change hash-map-util to yummly.utils.hash-map-util and update all of the (require [hash-map-util]) to (require [yummly.utils.hash-map-util :as hash-map-util])#2020-02-2718:49imreStandard intellij rename refactoring is what I use#2020-02-2718:50tanzoniteblackwhen I tried rename, it complained that yummly.utils.hash-map-util wasn't a valid identifier#2020-02-2718:57imreInteresting#2020-02-2718:57imrePerhaps the problem is with the folder depth change?#2020-02-2800:01cflemingYes, that’s the problem. Currently Cursive only allows renaming the last namespace segment, because otherwise files have to be moved. I’m planning to fix this soon.#2020-02-2800:01cflemingSorry, I realise this isn’t very useful.#2020-02-2807:37seriogaGenerally I search/replace old name -> new name and then use Cursive's “move file to correct location”. https://clojurians.slack.com/archives/C0744GXCJ/p1582827806029600#2020-02-2808:22katoxMoving the file (within the IDE) doesn't change the namespace either. It would be nice if it did. I search and replace the ns text as a workaround.#2020-02-2809:38cflemingYes, I definitely want to support that too.#2020-02-2815:54tanzoniteblack@U0HJNJWJH, that's what I ended up doing. I was just hoping there might've been a more reliable way to use the refactoring capabilities of cursive/intellij#2020-02-2808:41Timur LatypoffIs there a way to make Cursive's linting work properly with https://github.com/ptaoussanis/encore 's custom if-let/when-let (where multiple binding expressions allowed)?#2020-02-2808:41Timur LatypoffCurrently it highlights local bindings as unknown variables.#2020-02-2809:17cflemingYou should be able to tell cursive to resolve them both as let.#2020-02-2809:17cfleminghttps://cursive-ide.com/userguide/macros.html#customising-symbol-resolution#2020-02-2810:43Timur Latypoff@cfleming worked like charm, thank you! Due to some bug, the symbol resolution context menu was not popping up properly, so I had to go to definition of the symbol, and add the custom resolutions from there!#2020-02-2810:43cflemingHmm, that’s odd. I’m glad you’ve got it working, though!#2020-02-2808:43stijn@cfleming I'm having trouble reopening a project with Cursive after IntelliJ closed. I always get the following exception. The project in question was created with 'Empty Project' and I'm adding a set of deps.edn projects as modules.#2020-02-2809:08cfleming@U0539NJF7 Is that an old project?#2020-02-2809:08stijnno, I created it just yesterday#2020-02-2809:09stijnI will try again with the latest cursive, remove the .idea folder an all .iml files#2020-02-2809:10cflemingThat’s very weird - that code is used for migrating old projects.#2020-02-2809:14stijnok, it works now. I think it was due to some remaining .iml or .idea files#2020-02-2809:15cflemingDid you create a new project in a directory containing an old one, or something like that?#2020-02-2809:15stijnI was moving from a 'one project per deps.edn' to a project that contains more deps.edn files as modules instead#2020-02-2809:15stijnso yes, probably some old config files that were still there in the directories of the old projects#2020-02-2809:16cflemingOk, that makes sense.#2020-02-2809:17stijnI also have the impression that you cannot have these modules imported into 2 different projects#2020-02-2809:18stijnas it creates an .iml in the folder of the module#2020-02-2809:36cflemingYou can specify where the module file should live, but that sounds like a dangerous thing to be doing to me.#2020-02-2911:26agigao@cfleming Hi, in Windows, tools.deps doesn't seem to fetch data upon refresh, version stays <none>#2020-02-2921:52cflemingYes, see here for a workaround: https://groups.google.com/d/msg/cursive/4qamAMxbo00/e-RD39o9HAAJ#2020-03-0212:57agigaoThanks!#2020-03-0213:12conanHi, on startup my keybindings for REPL commands don't work. I have to go into the keymap settings, un-bind and re-bind them for them to work. This has only been true for a couple of weeks, which was around the same time I switch off EAP builds. I can't find a ticket for this issue, has it been fixed or would it be useful to make one?#2020-03-0213:14imrethere was a related fix in a recent EAP#2020-03-0213:14imrecan't remember which one#2020-03-0213:29conanok i'll wait for a stable release, ta#2020-03-0213:30conanseems that the REPL commands actually don't show up in the keymap until I've been into the REPL commands window, then it all works#2020-03-0221:31cfleming@conan That’s https://github.com/cursive-ide/cursive/issues/2319 which is fixed in the current EAPs and should be out in a stable release shortly.#2020-03-0221:45conanAmazing thank you! I forgot to look in closed issues :man-facepalming: #2020-03-0223:43tekacsI believe that helix.dom is an example of a namespace that requires stub generation: https://github.com/Lokeh/helix/blob/6fc96e4ac330daeb1cb3e8372a13819f67570661/src/helix/dom.cljc Is that a request that should go into a Github issue?#2020-03-0300:43cflemingYes please.#2020-03-0300:51tekacshttps://github.com/cursive-ide/cursive/issues/2330#2020-03-0318:49isakis there a shortcut to show autocomplete suggestions in IntelliJ/Cursive? I have the automatic thing turned off. I tried Control-Shift-Space, but that never has any suggestions to show. Maybe that is something else?#2020-03-0319:12isakControl-Alt-Space does what I was asking.#2020-03-0319:09markaddlemanCurrently, Cursive offers to paste HTML as Hiccup. I rarely use this feature but it suggests a related feature: When I paste EDN, I'd like to Cursive to quote the form so the reader won't interpret lists as functions.#2020-03-0319:22dmarjenburghIsn’t that the same as typing a quote and then pasting the form afterwards? Sometimes you might want paste code to eval#2020-03-0320:53markaddlemanYep, it's exactly the same. I just forget the quote quite often.#2020-03-0322:09cflemingYes, the problem is detecting when something is EDN and when it’s code - I don’t think that can be done reliably.#2020-03-0322:15markaddlemanD'oh. Of course.#2020-03-0322:15markaddlemanNot sure if this is possible: Whenever I copy something from the repl, it is almost always edn. Do you know the source of the clipboard data?#2020-03-0406:04gibbHow would you accomodate the use case where someone wants to paste code instead if "auto-quoting" was introduced?#2020-03-0418:45markaddlemanI figure cursive would have to ask how to handle the paste similar to how it handles pasting HTML#2020-03-0422:29cflemingThe problem is that people paste Clojure code all the time, and HTML only occasionally.#2020-03-0422:53markaddlemanEs verdad 🙂#2020-03-0500:04cfleming🙂#2020-03-0416:01favilaIs there a way to get cursive to mark a source directory of a deps.edn project as a test sources route without using the test alias? in this case, the entire project is a test#2020-03-0422:28cflemingYes, you can just mark them as test roots in the IDE and then Cursive will leave them that way.#2020-03-0422:59favilathere’s no zero-config way like with the “test” alias or lein/mvn :test scopes?#2020-03-0423:00favilaI don’t mean to be picky 🙂 I’m thinking of setup for new engineers. The number of projects is very large#2020-03-0423:00favilaI’m considering commiting the misc.xml but that’s been tricky in the past#2020-03-0500:04cflemingAny :extra-paths in the :test alias will be marked as test roots, otherwise it’ll have to be by hand. You can add something into :extra-paths under :test even if it also appears under :paths, I’m pretty sure.#2020-03-0518:25onetomThe deps tool window only shows a test (system) even if i have a test alias in my project's deps.edn. Is that an expected behaviour? Also the :extra-paths within the :test alias in my ~/.clojure/deps.edn seems to be ignored, when I have a :test alias in my project's deps.edn. (I Cmd-F for the extra path in the classpath printed in the REPL)#2020-03-0519:22cflemingYes, the fact that Cursive doesn’t distinguish system from project deps is a known issue.#2020-03-0519:22cflemingI’ll check the :extra-paths thing.#2020-03-0513:53imreAnyone using cursive with ij2020.1 eap? How is it working out for you?#2020-03-0514:46markaddlemanI'm using it without any problems#2020-03-0514:46imrecheers#2020-03-0518:29onetomme too. i've experienced some minor issues, like if i change some extra-paths in my project's deps.edn, i had to close and re-open the project window; simply refreshing the deps is not enough. i was also running 3 repls (from a monorepo) and none of them accepted my cmd-shift-l to load a file, but after re-starting the corresponding repl it started to work again. small things like that might happen, but haven't seen any exceptions since i've installed eap9#2020-03-0523:10cfleming@U086D6TBN The refresh issue is https://github.com/cursive-ide/cursive/issues/2331, which I’ve just fixed for the next EAP.#2020-03-0523:14cflemingI’m also using Cursive with 2020.1 BTW.#2020-03-0608:36imreCheers lads. I started using it yesterday, no issues so far.#2020-03-0516:51kennyWhy would this occur?#2020-03-0521:33cflemingI don’t know, I think that’s an IntelliJ error. Is there anything in the logs?#2020-03-0523:22kennyI don't see anything. It seems to happen somewhat often.#2020-03-0523:24kennyIt may be related to the object being a lazyseq.#2020-03-0920:01kennyI am still hitting this and there is no line in the logs. Is there a way to turn on further logs to try and see what's going on?#2020-03-0920:03kennyI'm tail -F'ing the log while repro'ing the "Internal error, see logs for more details" issue and nothing. Haven't been able to see any pattern other than it only happens when the object is some sort of a list.#2020-03-0519:16markaddlemanCursive does a nice job of suggesting keywords when I type : However, it does not suggest when I'm in a destructing context like {:keys [key1 key2]} . Can Cursive detect that context and suggest keywords without prefixing the destructing with a colon?#2020-03-0519:47petterikSame with {:<namespace>/keys [key1 key2]}#2020-03-0521:33cflemingYes, I have plans to do both of these.#2020-03-0520:26gravSeems remote nrepl with “use port from repl file” is still broken. I just commented on the old issue: https://github.com/cursive-ide/cursive/issues/2311#2020-03-0521:50cflemingHmm, I was just using that yesterday, I’ll try to reproduce that.#2020-03-0604:46cflemingThis is fixed in 1.9.1-eap10, out now.#2020-03-0605:55gravThanks a lot Colin! The error message in eap10 made me realize there was no .nrepl-port file. Found out that shadow-cljs creates it as .shadow-cljs/nrepl-port. Anyway, a ln -s fixed it. https://github.com/thheller/shadow-cljs/issues/524#issuecomment-510365911#2020-03-0607:33dmarjenburghHad the same issue a few days back. Is there a way to tell cursive the location of the nrepl-port file?#2020-03-0608:39cflemingThere isn’t, but there should be: https://github.com/cursive-ide/cursive/issues/2216#2020-03-0606:33gibbCan I evalute an expression (send to REPL) and have the output as a comment in my text file without touching a mouse pointer?#2020-03-0608:47cflemingNot right now, I have a plan to allow users to create configurable commands which will allow this.#2020-03-0608:52gibbAwesome - typical nice to have extension. I already use the custom REPL command stuff extensively and enjoy it a lot!#2020-03-0608:56onetomIs it possible to redefine the REPL prompt I see in Cursive? I've tried the following and it seems to work in a command-line REPL:
(ns user
  (:require clojure.main))

(defn repl-prompt [] (printf "=== %s ===\n=> " (ns-name *ns*)))

(alter-var-root #'clojure.main/repl-prompt (constantly #'repl-prompt))
it works like this:
$ clj
Clojure 1.10.1
=== user ===
=> (defn repl-prompt [] (printf "=== %s === !!!\n=> " (ns-name *ns*)))
#'user/repl-prompt
=== user === !!!
=> 
#2020-03-0609:01cflemingNot at the moment, no - currently Cursive doesn’t actually show a prompt at all. Being able to configure some kind of context information is an interesting idea, though, that might be possible.#2020-03-0609:03onetomYou mean it would already be possible right now?#2020-03-0609:05onetomMy immediate use-case is that I'm connected to an in-memory db while im developing an importer, but then i want to be able to switch to a persisted version, when my importer worked on new data. I would like to provide this for others as "a shell"#2020-03-0609:08cflemingNo, I mean that it would probably be possible without too much work. I was thinking about an expression in the REPL run config which would be evaluated behind the scenes after each REPL eval. The returned value could be shown in the overlay in the bottom right of the editor or something like that.#2020-03-0609:15onetomFor now I think I can just create a REPL command, assign it to some convenient function key and that could just print my current work context... Iike how the namespace is reflected in the REPL tab, though I usually just keep it as user, so my REPLs are indistinguishable. Would be useful if I could see the Deps project root folder name too or something like that. If there would be a REPL prompt hook, we could just program anything there...#2020-03-0609:17onetomI've also experienced something funny around that overlay. Notice how the stdout got interpreted as the current namespace. That gave me the idea that I could somehow control that information programmatically 😉#2020-03-0609:48cflemingThat’s really weird, what sort of REPL is that? clojure.main?#2020-03-0609:48cflemingIt looks more like nREPL, but I don’t see how that could happen.#2020-03-0616:04onetomYes, that's an nREPL with Run with Deps option. I haven't narrowed the phenomena down yet, but it's roughly going thru this pipeline:
(-> "x.tsv" io/resource io/reader
    clojure-csv.core/parse-csv
    semantic-csv.core/mappify
    (on-every 1e4 •)
    (d/transact conn)
    deref)
where on-every is defined as
(defn on-every
  "Wrap s in a lazy sequence that will call f, presumably for side effects,
   on every nth element of s during consumption.
   
   Source: "
  [n f s]
  (let [g (cons (comp first (juxt identity f)) (repeat (dec n) identity))]
    (map #(% %2) (rest (cycle g)) s)))
to provide some visual feedback while the lines of my tsv file are consumed.
#2020-03-0616:06onetombut i suspect that the culprit can be that function, because a, it's printing a non-ascii character b, it's flushing the output
(defn • [& args] (print "•") (flush))
#2020-03-0620:58cflemingWith an nREPL REPL, those values should only be set by the server explicitly sending the current namespace back to the client, it should never come from stdout.#2020-03-0717:03onetomAs I see my nrepl is a bundled one on the latest stable version:
-classpath "/Users/onetom/JetBrains/apps/IDEA-U/ch-0/201.6073.9/IntelliJ IDEA 2020.1 EAP.app.plugins/clojure-plugin/lib/nrepl-0.6.0.jar
Maybe the latest 0.7.0-alpha3 fixes it. They mentioned some fixes around streaming printing in the changelog: https://github.com/nrepl/nrepl/blob/master/CHANGELOG.md
#2020-03-0608:58onetomI'm thinking about creating a Datomic admin interface, where I can dynamically set a session name, user name, which then gets added as some attributes on the "datomic.tx" entity of my operations#2020-03-0608:59onetomit would be also nice to summarize what kind of environment am i currently operating in (as in which database am i connected to and stuff like that#2020-03-0623:15tekacsI've defined a macro which has a form that looks like this: (defmymacro ::namespaced-keyword [args go here] forms go here)#2020-03-0623:15tekacsi.e. akin to defn but with a namespaced keyword instead of a symbol in the second position#2020-03-0623:15tekacswould anyone happen to know if there's something that I could tell Cursive to resolve that as in order to get argument behaviour?#2020-03-0623:16tekacsas it stands my only choice seems to be defn, which requires me to use a symbol in the second position 😞#2020-03-0623:18isak@tekacs I don't think there is a way, but you can easily convert from symbol to keyword inside your macro if you really need that, no?#2020-03-0623:19tekacsI was hoping to use namespaced keyword to get Cursive to autocomplete the keyword for me#2020-03-0623:19tekacsbecause there's actually two macros which need to share that value#2020-03-0623:19tekacsand so if I can write (defsomething ::something) in namespace foo#2020-03-0623:20tekacsand then (defdownstream :foo/something) elsewhere#2020-03-0623:20tekacsthen I get those to line up more easily and for Cursive to realize they're the same definition#2020-03-0623:20tekacsrenaming, etc.#2020-03-0623:20tekacsI could of course import and use something/whatever via :refer :all, etc.#2020-03-0623:20isakah, then I think you'll need to wait until cursive releases the expanded macro recognition thing#2020-03-0623:20tekacsooh#2020-03-0623:20tekacsI haven't heard about that 🙂#2020-03-0623:24isakA few details: https://clojurians-log.clojureverse.org/clojure/2020-01-29/1580261810.383300#2020-03-0623:25tekacsoh interesting, thank you for sharing 🙂#2020-03-0700:03tekacsfor now I've 'solved' this by resolving as fn and changing my argument order, so that it's read: (defsomething [args go here] ::identifier forms go here)#2020-03-0700:03tekacswhich isn't ideal but works out alright in my case, in case anyone else runs into the same issue#2020-03-0702:51cfleming@tekacs Yes, I don’t think Cursive has any patterns matching something like that at the moment. You could get the keyword matching using either s/def from spec or the re-frame equivalent, but neither of those take defn-style params.#2020-03-0816:28jtthdoes anyone know why cursive is folding def and fn expressions? i have code folding turned off everywhere i can think of#2020-03-0821:59cflemingDo you have a screenshot of that? Cursive doesn’t fold fn forms, I’m wondering if you have some other plugin installed that might be doing that?#2020-03-0915:01jtthgood call. it was clojure-pretty-symbols , which i disabled on my main dev machine, but for some reason was still enabled on my laptop. thanks for prompting me to search for it!#2020-03-0920:55seriogaHi @cfleming What does Docstring fill width option do?#2020-03-0921:54cflemingYou can use the Fill Paragraph action on docstrings, and it will fill them to that width.#2020-03-0921:58staypufdI’m using latest plugin version with: IntelliJ IDEA 2019.3 (Ultimate Edition) Build #IU-193.5233.102, built on November 27, 2019 Runtime version: 11.0.4+10-b520.11 x86_64 VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o macOS 10.14.4 GC: ParNew, ConcurrentMarkSweep Memory: 1981M Cores: 8 Registry: debugger.watches.in.variables=false#2020-03-0921:59staypufdand when I try to create a Lein project with the app template I only get the dir and then some intellij files like:#2020-03-0922:00staypufdHave you seen that before?#2020-03-0922:02staypufdLein create new project with app as template#2020-03-0922:02staypufdGives me this…#2020-03-0922:03staypufdLein settings are tese:#2020-03-0922:03staypufd#2020-03-0922:06staypufdLooking at this page of docs:#2020-03-0922:06staypufdhttps://cursive-ide.com/userguide/leiningen.html#2020-03-0922:07staypufdI put ‘app’ in Template field and nothing in the options.. The command line would be: lein new app Demo#2020-03-0922:07staypufdwhich works (I tested it in terminal)#2020-03-0922:09staypufdI also checked that lein was up to date#2020-03-0922:09staypufd2.9.1#2020-03-0922:13staypufdIf I check the ‘Use Snapshots’ option it works. But in docs that checkbox isn’t checked in screenshots or mentioned in verbage at all.#2020-03-0922:16staypufdOk#2020-03-0922:18staypufdSo here’s a summary that may help fix a bug. After I checked that box one time and it made the project, I then removed that project from IntelliJ and did a rm -rf on it in terminal. Then I came back and created a new project with lein, app template set and the Snapshots checkbox unchecked. It worked. So something about the state of that option or the set of options was causing IntelliJ to fail before lein built the project… Hope that helps. Thanks for reading#2020-03-1008:40cflemingInteresting, thanks - I’ll try to reproduce that.#2020-03-0922:18staypufdMaybe it’ll help someone else too#2020-03-1005:19onetomIs the name of a REPL run configuration shown somewhere in a REPL window? I think it would be very useful, because I keep getting lost amongst my REPLs.#2020-03-1008:42cflemingUgh, I keep meaning to fix this - sorry, I’ll get to it soon. I probably won’t show the whole REPL name since they can be very long to be shown in a tab, but the run config will have a “Display name” field or something similar, which will warn if it’s longer than 16 chars or something.#2020-03-1015:04kennyThis would be quite useful to me too.#2020-03-1116:22onetomIs there some hard tab width limit in IntelliJ? Because to be honest, I would rather see the tabs filling out the whole available space than being the same size... The new iTerm2 has this option and it's pretty good. I even maximized the number of editor tabs to 1 (per split), so that would be really helpful it they would fill out the whole width of their panes.#2020-03-1005:21onetomI've started to switch them into some namespaces, so at least not all REPL tabs say Local: user but I still have a lot of similar namespaces across my projects, like <company-name>.util or <company-name>.datomic :/#2020-03-1005:30onetomAaaah... I was wondering why the Re-execute last command REPL command feature has stopped working... When the Add forms sent from editor to REPL history option is off, the last command is whatever has been typed in the REPL window manually, not whatever has been evaluated the last time (from the editor probably). I find this unintuitive 😕 I turned off the Add forms from editor to REPL history because I hardly ever want to edit those within the REPL editor pane. I will just turn that option back on for now and think more about this. I think we - as in the Clojure community - should talk more about how everyone is using the REPL, because it seems there are fundamental differences, depending on what tooling someone uses, which then also depend on how code is organized and named, etc.#2020-03-1008:02seriogaDid it stop working from hotkey or from menu as well?#2020-03-1008:39cfleming@U086D6TBN Interesting case, I hadn’t considered that. As you might have guessed, the “execute last command” uses the REPL history, and indeed with that option enabled those commands will not be added to the history. I wonder if Cursive should maintain a “last executed command” in the REPL state independent of the REPL history. I do wonder if other people would find that behaviour unintuitive, though.#2020-03-1008:45onetomYeah, I agree, I'm not sure if it's only unintuitive for me, because of my workflow...#2020-03-1008:46onetom@U0HJNJWJH i works, just my understanding of the "last command" was different than cursive's understanding 🙂#2020-03-1008:48cflemingI guess I assumed that someone who has Add forms from editor to history disabled thinks of those executions as truly transient.#2020-03-1006:54ikitommidoes anyone know how to configure idea to open a link with file $FILENAME:$ROW:$COL syntax (e.g. clj-condo default output) to the right position (row & col) in the file?
src/cljs/myapp/frontend/navbar.cljs:61:40: warning: unused binding data
#2020-03-1008:40cflemingI’m not sure, IntelliJ might have something like that. Where do you see this output - in the built-in terminal, or in the output of a run config, or in the REPL?#2020-03-1008:40cflemingOr somewhere else?#2020-03-1008:56imreintellij's Go to file... action does support that#2020-03-1008:57imreI used it in the past couple of weeks a lot#2020-03-1008:58imreit's a copy-paste thing that way however#2020-03-1010:03ikitommi@U0567Q30W it’s the default what clj-kondo emits. Integrates nicely via file-watchers, but not via open: https://github.com/borkdude/clj-kondo#command-line#2020-03-1010:23cflemingOk, so you’re executing that command in the terminal within IntelliJ?#2020-03-1010:24ikitommifrom external terminal (iterm2)#2020-03-1010:25cflemingOk, so you want a command you can execute to make IntelliJ open at a position?#2020-03-1010:25ikitommiyes!
#2020-03-1010:25ikitommiworks oob with visual studio for example.#2020-03-1010:25ikitommididn’t find such settings with IDEA.#2020-03-1010:26cfleminghttps://www.jetbrains.com/help/idea/opening-files-from-command-line.html#2020-03-1010:26cflemingI don’t trick my iterm2 out much, but I’m pretty sure it supports this, i.e. supporting text matches as links.#2020-03-1010:27ikitommiit does. I guess I should do a script that changes the format from the default one to IDEA-supported.#2020-03-1010:28cfleminghttps://www.iterm2.com/documentation-smart-selection.html#2020-03-1010:56ikitommididn’t work as expected, need to forget this for now. thanks anyway#2020-03-1006:55ikitommiIdea open the file from the link, but without the position info within the file#2020-03-1121:46Rachel WestmacottDoes anyone here know how best to work with a tools.deps clojurescript project from cursive? I've previously had great success using leiningen + figwheel + cursive, but now I'm trying something similar without leiningen and struggling a bit to get a cljs repl running in Cursive that will talk to the browser.#2020-03-1122:26cflemingIf you’re able to use Shadow CLJS I’ve generally found that to be the easiest option to get going. Otherwise, figwheel main is the best option to use with deps I think, but I’ve not actually set that up myself. Ideally you want to use it with nREPL, which gives a much nicer REPL experience in Cursive.#2020-03-1216:35tony.kayI’m relying very heavily on deps in my fulcro-rad-demo development. The demo uses 4 dependent libraries, and I’m able to use global ~/.clojure/deps.edn with :override-deps to define things like :fulcro-dev that points to local source…then when I want to be able to edit Fulcro in the context of the demo I can just run shadow-cljs -A:fulcro-dev …. Truly excellent experience. With Cursive, I just use the + button in the Clojure Deps tab to add the local project to the list of projects, and I’m off to the races. I use “Remote” nREPL to talk to shadow-cljs, and that works very well, too.#2020-03-1314:43Rachel Westmacottokay, thanks, I'll read up on shadow-cljs#2020-03-1314:28gibbAm I missing something here, why doesn't IDEA / Cursive recognise this import? A possible confounding factor is that commons-codec:1.12 is on the class path which also has a Base64 class in it.#2020-03-1314:30gibbThe code completion looks like this:#2020-03-1315:14imre@gbson what version are you on? There was a similar problem a few weeks ago in one of the eaps wrt recognising java common namespaces#2020-03-1315:16gibbJDK 11.0.4, IDEA 2019.3.3 cursive 1.9.1-eap9-2019.3#2020-03-1315:16gibbI see I can update now, doing that#2020-03-1315:18gibbHm that did not make a difference.#2020-03-1317:47gibbI poked at it some more and switching the JDK to 1.8 solves the problem:#2020-03-1402:32cflemingWhich JDK were you on previously?#2020-03-1402:33cflemingOh sorry, I just saw the details in your previous comment.#2020-03-1402:36cflemingI can’t reproduce that, I’m using 11.0.4 and that works fine for me. If you switch back and you get the problem again, try File | Invalidate Caches and Restart and see if that helps.#2020-03-1414:12gibbI had a broken JDK path, not related to Cursive at all. Sorry!#2020-03-1414:36Daniel SlutskyHello all. Happy to join this channel. Wanted to ask about extending cursive: how hard would it be to add a cursive command that runs some clojure code (f l) at the REPL, where f is some pre-configured clojure function, and l is the current line at the editor?#2020-03-1414:38Daniel SlutskyThe reason I'm asking is that I want to support some basic integration with notespace (https://github.com/scicloj/notespace).#2020-03-1415:05jumpnbrownweaseldid you see the REPL commands section here?: https://cursive-ide.com/userguide/repl.html#2020-03-1415:06jumpnbrownweaselI guess you can't get the current editor line.#2020-03-1415:07Daniel SlutskyThanks @UBRMX7MT7!#2020-03-1415:09Daniel SlutskyIt does allow getting some other information that I might be able to work with. 🙏#2020-03-1502:08cflemingIf there are other things that it would be helpful to have substitutions for, please file an issue and I’ll get them added.#2020-03-1510:51Daniel SlutskyThank you so much @U0567Q30W!#2020-03-1420:38flowthingJust noticed that trying to format a form like this gets pretty wonky:
(defn foo
  [{tx :db/tx {:strs [from until]
               :or   {from 1
                      until 2}} :query-params}])
#2020-03-1420:38flowthingIf you have :strs and :or on the same line, everything's fine.#2020-03-1420:38flowthingNot really a big deal, though — just happened to notice it.#2020-03-1508:02cflemingWhat’s weird there, that the map values are aligned?#2020-03-1605:53flowthingI mean that if I copy-paste that form into Cursive and then run the Reformat code action, it gets a bit wonky#2020-03-1605:54flowthingIt becomes: #2020-03-1605:54flowthing
(defn foo
  [{tx                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      :db/tx {:strs     [from until]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       :or {from  1
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            until 2}} :query-params}])
#2020-03-1605:55flowthingThere's basically many, many spaces between tx and :db/tx.#2020-03-1609:42cflemingAh, ok, thanks, that was what I needed - I’ll try to reproduce that.#2020-03-1513:48NiclasWhat’s the state on shadow-cljs support? I’m trying to send pretty basic things to the repl but it keeps crashing, ex
(ns my.ns
  (:require ["react-native" :as react-native]
            [reagent.core :as reagent]))

(comment

  reagent.core => #js{...}

  (reagent/adapt-react-class react-native/View) => #object[reagent.impl.template.NativeWrapper]

  react-native => Error handling response - class java.lang.ClassCastException: class clojure.lang.PersistentVector cannot be cast to class java.lang.CharSequence (clojure.lang.PersistentVector is in unnamed module of loader .PluginClassLoader @61776d58; java.lang.CharSequence is in module java.base of loader 'bootstrap')
  )
#2020-03-1521:51cflemingYou shouldn’t get an exception there. Just to be clear, it’s the symbol react-native that you’re sending to the REPL, right?#2020-03-1521:52cflemingWhat does your shadow-cljs.edn look like?#2020-03-1521:52cflemingI can try to reproduce that.#2020-03-1612:16Ivar RefsdalI don't know your exact case @U0H9BVB98, but it looks like your REPL evaluation happens in JVM-world (not JS/browser). Have you tried evaluating something like (shadow/repl :client) before loading the statement? Where :client is the profile from :builds in shadow-cljs.edn.#2020-03-1612:18Ivar RefsdalFor my setup the following is shown (in JVM-world):
(shadow/get-build-ids)
=> (:npm :client :devcards :server :test :test-ci)

(shadow/repl :client)
To quit, type: :cljs/quit
=> [:selected :client]
And after this I have my piggiebacked REPL
#2020-03-1612:21Ivar Refsdal
(+ 1 "asdf")
Execution error (ClassCastException) at shadow.user/eval33505 (REPL:1).
class java.lang.String cannot be cast to class java.lang.Number (java.lang.String and java.lang.Number are in module java.base of loader 'bootstrap')

(shadow/repl :client)
To quit, type: :cljs/quit
=> [:selected :client]

(+ 1 "asdf")
------ WARNING - :invalid-arithmetic -------------------------------------------
 Resource: :1:1
 cljs.core/+, all arguments must be numbers, got [number string] instead
--------------------------------------------------------------------------------
=> "1asdf"
I ❤️ JS 😉
#2020-03-1614:23Niclas@U0567Q30W Yes it’s the symbol I’m evaluating
{:paths
 ["src/"]

 :deps
 {reagent              {:mvn/version "0.9.0-rc3"}
  re-frame             {:mvn/version "0.11.0-rc3"}
  thheller/shadow-cljs {:mvn/version "2.8.81"}}

 :aliases
 {:dev {:extra-paths ["src/"]}}}

;; shadow-cljs.edn
{:deps
 {:aliases [:dev]}

 :builds
 {:app
  {:target           :react-native
   :init-fn          my.ns/init
   :output-dir       "out"
   :compiler-options {:infer-externs :auto}
   :devtools         {:autoload true}}}}
#2020-03-1713:32flowthingWould it be possible for Cursive to support navigation from Integrant config keys to the multimethods that implement them? (https://github.com/weavejester/integrant) I realize that might not exactly be a straightforward task, but it would be a really helpful feature.#2020-03-1713:39imre@U4ZDX466T I use intellij's find usages action for those#2020-03-1713:43flowthingOh, I didn't realize that works even with EDN files. That's great, thanks! Now if only Cmd+B still worked for finding usages...#2020-03-1808:18onetomWhat's the criteria for releasing a non-EAP version from Cursive? eap10 feels quite stable lately... on 2020.1 eap intellij at least. just to help installation, it would be good to release a non-eap version.#2020-03-1809:12cflemingYes, the criteria is basically a week or so with no serious issues either reported or in the exception tracker, so I’ll hopefully release this tomorrow.#2020-03-1808:40Ben HammondI am running shadow-cljs. Is there a way to get a repl to use the port from .shadow-cljs/nrepl.port ? or am I forced to use a static port for the repl? I suppose I could create a symbolic-link#2020-03-1808:46thhellerthere is https://github.com/cursive-ide/cursive/issues/2216, hope it gets in someday 🙂#2020-03-1809:12cfleming@ben.hammond Yes, a symlink is the go for now, I’m just about to fix that one, I promise!#2020-03-1814:24imreIs there a way to make cursive stop suggesting namespace imports for custom tagged literals, like #time/date "2020-03-17" (this one is from https://github.com/henryw374/time-literals )#2020-03-1908:55onetomThere is something wrong with the indexing on the latest intellij eap/beta. Im getting that low memory notification and the responsiveness grinds to a halt. Same project, same eap10 cursive on 2019.3.4 has no issue indexing a lot my jars in .m2 in about 10-15 seconds. Has anyone else noticed something similar? I can't even report any errors because I have to force kill the while IDE#2020-03-2109:57cflemingI haven’t experienced this, or received any other reports of it. Does invalidating caches help?#2020-03-2417:29Jakub Holý (HolyJak)I have recently upgraded 8ntelliJ and am also regularly getting indexing pauses, which I didn't before. I suspect it's IntelliJ, not Cursive#2020-03-1911:40imre@cfleming have you ever thought about extending code suggestions from the connected repl? Sometimes a namespace would stuff like potemkin/import-vars to define vars. Static analysis won't be able to resolve that but it would be helpful if the warnings could change to weak warnings when the vars are available at runtime.#2020-03-2109:57cflemingI have, but it’s difficult for a number of reasons. Potemkin actually is supported though.#2020-03-2319:57imreThank you. Trouble is, we wrap the potemkin call in our own macro that imports everything from the other ns. Hope you'll find a solution though 🙂#2020-03-2011:04imreanother one: block comment support using
#_(
(foo 1 2)
(bar 2 3)
)
#2020-03-2412:23AJ JaroI recently upgraded to Cursive 1.9.1-2019.3 and started receiving StackOverflowErrors this morning. Based on the logs, IntellIJ is blaming Cursive for that failure. IntelliJ then freezes and I’m required to restart. This is happening every few minutes this morning and is very reproducible. Attached is the last Exception from IntellIJ for reference. Any help to resolve this would be appreciated.#2020-03-2508:59cflemingIt’s very strange, nothing in that code has changed for ages. Does File | Invalidate caches and Restart help? If not, are you able to share the source code for the file which provokes the problem?#2020-03-2512:33AJ JaroI had this occur probably four times yesterday morning and after I posted this question it didn’t happen anymore. I did have a build failure that I didn’t realize during this time, however, that may have been inducing some abnormal behavior. I’ll work on finding a way to bring this up again and let you know if I can regularly force this to happen.#2020-03-2418:21rtacconiHi, I am new to Clojure and Cursive. I am following this tutorial https://nextjournal.com/crux-tutorial/bitemporality I have that dependency in my deps.edn and when I start a repl, I run (require '[crux.api :as crux]) I get Error: :namespace-not-found#2020-03-2509:00cflemingAre you evaluating that form by sending it from an editor, or typing it directly into the REPL editor? If you’re sending from a file, loading that file before sending should help.#2020-03-2602:51onetom@U067C1A9E that also the only situation when i've seen this error message so far.#2020-03-2713:51rtacconiI think you are right, plus the deps.edn file was messed up. Thanks.#2020-03-2418:22rtacconiIf I try clj from the command line it works#2020-03-2418:22Amy ClarkHello! I'm having an issue where cursive won't recognize a certain name, specifically "idiot.clj," as a clojure namespace. When I make a namespace with other names, I have no issues. I became aware of this problem because the clojure icon doesn't come up to the left of idiot.clj in my project explorer and it doesn't show matching brackets correctly in the code in that file. Anyone have any advice?#2020-03-2509:01cflemingThat’s really weird. I’m pretty sure I have no code referencing idiots in Cursive 🙂#2020-03-2509:02cflemingI’m not sure what might cause that. I don’t think IntelliJ allows you to change the file type for a specific file.#2020-03-2509:02cflemingIf you delete the file and then re-create the namespace, does it happen again?#2020-03-2515:51Amy ClarkYes, it's super strange. I have tried deleting the file completely and restarting Cursive and it still happens. When I refactor and rename it immediately recognizes it as a Clojure file.#2020-03-2602:50onetommaybe the spellchecker checks filenames too and deems idiot an offensive word aaand ... i don't know 🙂#2020-03-2609:57Janne Sauvala@U010A3WT8AE Could you check if you have accidentally added something related to “idiot.clj” to the Text file type. Go to Settings->Editor and check Text from Recognized file types -list and its registered patterns.#2020-03-2713:46rtacconiI right-clicked, add clojure namespace, typed idiot.clj and it looks fine#2020-03-2713:52Amy Clark@UJZ6S8YR2 This fixed my problem! idiot.clj was in the list of registered patterns for text files. Thank you so much!#2020-03-2714:01Janne Sauvala@U010A3WT8AE Awesome! 🎉#2020-03-2720:23cflemingThanks @UJZ6S8YR2, I learned something today too!#2020-03-3120:15Joe R. Smithnow I'm curious what goes in idiot.clj 😄#2020-04-0101:05Amy Clark@U087E7EJW it’s for a school project, making a clone of git called idiot.#2020-04-0101:06Amy ClarkBecause git calls itself the “stupid content tracker”#2020-04-0112:19Joe R. Smithlove it#2020-03-2810:49SchpaaI’m sure this is not an issue with Cursive (but who knows really?) - the rename dialog never receives keyboard focus. Anyone noticed this?#2020-03-2810:50SchpaaAll my rename refactorings forces me to use the damn mouse#2020-03-2810:51SchpaaThere was a build of IntelliJ (or Cursive) where this was no longer an issue, but I cannot recall which#2020-03-2914:58jaimeHello, is it normal to manually trigger load-file (cmd+shift+L) before sending forms to repl? Is there a way to watch file changes and automatically load-file?#2020-03-2914:59jaimeI always find myself in situation where I'm trying out something and my changes are not in sync with the repl.#2020-03-2915:45potetmYeah, that’s a common problem.#2020-03-2915:47potetmThe first thing I would suggest is trying to re-arrange your code so that you can easily load a single form without having to reload the world.#2020-03-2915:47potetmIf that’s too difficult, I would suggest a third party tool: https://github.com/clojure/tools.namespace#2020-03-2915:48potetmCursive does have an option to auto reload dependencies, but I’ve found it to cause problems when working on a prod REPL, so I keep it off.#2020-03-2915:50potetmIME - Auto-loading a file is kind of fraught with problems (e.g. it reloads halfway through a change or it reloads in a bad state)#2020-03-2915:50potetmI find it much easier to reason when I have a “reload now, please” command.#2020-03-2917:20jaimeI see. I'll stick with manually loading the files for now. Thanks for the reference, I found https://github.com/stuartsierra/component which seems like a dependency injection#2020-03-2918:10dmarjenburghHow can you configure cursive to resolve symbols from core.logic run/fresh macros?#2020-03-2919:44dmarjenburghOfcourse, I can resolve it as clojure.core/fn. But that doesn’t work for (run 5 [q] ...)#2020-04-0123:31steveb8nQ: I’ve got a deps.edn project with git deps and then some :override-deps local roots in a local dev alias. I cannot figure out how to add/import a module for these override deps. Is this supported? I don’t really have a choice in this config due to the way Datomic Ion deploys support deps.#2020-04-0123:35steveb8nah: I found that I can manually add a module, choosing the correct dir and undoing the changes made by the IDE after it was created. a bit hacky but it works#2020-04-0210:13cflemingSo you want to add a module from a local deps root, basically? You should be able to right-click it in the project pane and select “Add as deps project”, or use the + icon in the deps toolwindow and select the deps.edn manually.#2020-04-0422:43steveb8nyes: using the + icon from the deps window did work. and, naturally, I found the docs for this after you explained to me. thx#2020-04-0200:24kennyWhat's going on with the documentation here? Is it only showing the docstring under cljs.core.async/alts! because the one for clojure.core.async/alts! is exactly the same?#2020-04-0210:12cflemingYes, Cursive will only show one if they’re identical.#2020-04-0200:56Alex Miller (Clojure team)it's probably actually blank#2020-04-0200:57Alex Miller (Clojure team)no, it isn't. maybe you are seeing some folding, not sure#2020-04-0210:57imreHas anyone else found that cursive sometimes spends minutes on "Calculating Classpath" when launching a repl? Cursive 1.9.1-2020.1, #IC-201.6668.60, but the issue has been present on my system for the last 2 weeks or so#2020-04-0214:20tanzoniteblackWhat option do you have set in the How to run it setting of the REPL config?#2020-04-0214:22imreRun with deps cursive-lite,dev,test where cursive-lite is defined in my global deps, the rest are local#2020-04-0214:22tanzoniteblackI had this, I think, when I had it set to run with deps, because it seems like it would do the classpath calculation without any of the caching everytime#2020-04-0214:23tanzoniteblackI switched to just use run with intellij classpath and made sure that all the deps aliases I need are selected in the clojure deps project settings#2020-04-0214:27imrehmmm, thank you, I will try that#2020-04-0214:28imre@U0567Q30W is this intended behaviour?#2020-04-0214:28tanzoniteblackI was going to add, I'm suggesting a work around that makes my life easier. Not sure if it's intended behavior or not#2020-04-0214:29imreI'm sure for the time being it will be valuable#2020-04-0214:29imreThanks again. I'll try it the next time I run into this#2020-04-0302:52onetomi've also experienced something like this but in a more disruptive way. for me the indexing hasn't finished at all but triggered a low memory warning and slowed down extremely. but then the problem has disappeared somehow as i kept upgrading intellij eap.#2020-04-0321:23cfleming@U08BJGV6E Are you using lein or deps? Do you have snapshot repositories enabled?#2020-04-0321:25imreThis is with deps#2020-04-0321:27imreLet me check the repos#2020-04-0321:28imreI do have :mvn/repos {"sonatype" {:url ""}} in my global deps.edn#2020-04-0321:29imre(forked from @U04V70XH6 's)#2020-04-0400:11cflemingI don’t know how deps handles snapshot repos, actually. The issue with lein is that if you have :snapshots true in a repo description, lein will check the repo on every resolve to see if there’s a new snapshot. That can be really slow depending on the repos.#2020-04-0400:12cflemingAnd the number of snapshot deps you’re pulling from them.#2020-04-0400:12tanzoniteblackyou can manually set that per repository in lein ( https://github.com/technomancy/leiningen/blob/stable/sample.project.clj#L117 ) ; but in deps, it's not currently configurable#2020-04-0400:12tanzoniteblack(or it wasn't last time I looked)#2020-04-0400:13tanzoniteblack"set that" == "how often to check for new snapshot versions"#2020-04-0400:13cflemingRight, that was the setting I was thinking of, thanks.#2020-04-0400:13cflemingI can’t see anything like that in the deps config.#2020-04-0400:13cfleming@U08BJGV6E Are you pulling in any snapshot versions?#2020-04-0400:15cflemingI’ve asked for some clarification over in #tools-deps on its handling of snapshots.#2020-04-0407:24imreThank you Colin. I'll check whether I use snapshot versions when I get to my machine#2020-04-0411:56imre@U0567Q30W I'm not using any snapshot versions of libs. In fact it seems like I can turn that repo off as the only user of it is an alias that I don't use at all. Will try that next week#2020-04-0220:21Jakub Holý (HolyJak)Hello! I cannot remember how to increase the timeout for how long Cursive waits for nrepl to start, does anyone know? Thanks!#2020-04-0220:31rutledgepaulv#2020-04-0221:06cfleming@U0522TWDA It’s here (thanks rutledgepaulv!)#2020-04-0309:43Jakub Holý (HolyJak)thanks a lot!#2020-04-0320:34jaimeHi! I have two running repl. 1. cljs - started by shadow-cljs 2. clj - started using nrepl.cmdline It seems like when you send form to repl, it is being sent to the active repl window. During development I keep on switching between cljs and clj files. However I keep on hitting "cannot load Clojure form into clojurescrip repl" because the active repl is cljs or the other way, sending form from cljs to active clj repl window How do you manage this?#2020-04-0419:01dvingoI think you just have to click the appropriate repl... I think there's no easy way to determine the intention of the user, given you could have more than 2 open repls and for .cljc files it may not be clear which repl to use. Perhaps for the case where you only have 2 repls (clj, cljs) and the file is .clj or .cljs then the ide could switch for you.#2020-04-0420:00jaimeYeah, I was hoping there is a way to auto switch based on file extension. Well, I guess I have to do it manually for now 🙂#2020-04-0416:49David PhamAnyone knows the price of a commercial license?#2020-04-0418:02seriogaPrice per licence $199.00#2020-04-0511:53David PhamThanks!#2020-04-0418:02seriogaPrice per licence $199.00#2020-04-0419:14joshkhit seems i've lost the ability to align -> values, whereas ->> seems okay. any ideas? i'm on Cursive 1.9.1-2019.3#2020-04-0421:14joshkhsolved 🙂 Preferences > Editor > Code Style > Clojure > Form Parameters > clojure.core/-> toggle from indent to function#2020-04-0503:46ataggartAnyone know of a way to tweak the pretty-printing of repl return values, specifically regarding tagged literals? The current behaviour is to display no space between the tag and the value, which usually works fine except sometimes the result is both difficult to read and also literally unreadable, e.g., #time/duration1234 vs #time/duration 1234.#2020-04-0609:19dazldhey, I guess this is a common thing, but I'm getting the following error when trying to run a test via cursive on a shadow setup:
Error in phase :compilation
Calls to `require` must appear at the top-level. at line 1 cljs/user.cljs
#2020-04-0609:32cflemingJust checking, are you trying to use the Cursive test integration? That only works for Clojure at present.#2020-04-0613:19dazldCorrect, and thank you, that saved a lot of time. #2020-04-0613:19dazldHope this can be made to work for cljs sometime! #2020-04-0609:20dazldI can't seem to track down what's causing this#2020-04-0609:20dazldany hints?#2020-04-0609:20dazldlatest shadow, latest cursive#2020-04-0613:36p-himikIs there a way to print exceptions in the REPL in such a way so that stacktrace items are turned into hyperlinks that direct you to the files within your project? I know that throw does that, but I would like to have something else.#2020-04-0905:12p-himik@U0567Q30W Ping.#2020-04-0905:14cflemingMost ways of printing exceptions should be hyperlinked, from .printStackTrace to clojure.stacktrace/print-stack-trace#2020-04-0905:14cflemingAs well as aviso/pretty, clj-stacktrace etc#2020-04-0905:16p-himikNice, thanks! The regular prn does not work or course, and I completely forgot about the built-in .printStackTrace.#2020-04-0905:17cflemingYes, I’m still not sure how best to hyperlink the datafied forms, because they’re not formatted consistently when output.#2020-04-0905:20p-himikWhere does the inconsistency come from? print-throwable seems to write the strings without any leeway.#2020-04-0905:23cflemingYes, that should work. But if you return an exception object, you’ll get the datafied form and that can vary (map items in unpredictable orders etc)#2020-04-0905:24p-himikAh, right, I see. So it's feasible to make (prn e) work but maybe not (prn (Throwable->map e)). Thanks.#2020-04-0807:18vehvisAny ideas as to why Cursive refuses to recognize arity>1 method implementations within deftype definitions in .cljc files, while the same code is fine inside .clj files? (It seems that this does not happen for everyone so maybe there's a setting somewhere)#2020-04-0807:18vehvis(Using the latest mainline versions of both IDEA and Cursive)#2020-04-0807:20vehvisOr more precisely, it's the method implementations inside a deftype that are not recognized as such, instead I get complaints about wrong arities#2020-04-0807:21vehvisThe exact same code works fine if it's in a .clj file#2020-04-0807:48vehvisThe problem actually occurs only when a method's arity is 2 or more. And just for cljc, not for clj. This screenshot is for cljc, and the bar method shows an "incorrect arity 2" error.#2020-04-0812:06potetm#2020-04-0812:07potetmseems to work for me#2020-04-0814:01vehvisI've been able to get confirmation of this issue from a couple of colleagues using the latest Cursive, and one instance of "works for me" from one Cursive 1.8.x user. Which version do you have?#2020-04-0814:02vehvis(And just to be sure, your testing was in a .cljc file?)#2020-04-0814:02potetm1.9.1-2019.3#2020-04-0814:02potetmand no, a clj file#2020-04-0814:03potetmmissed that bit, one sec#2020-04-0814:03vehvisRename to .cljc and see what happens#2020-04-0814:04potetmConfirmed: cljc gets an error.#2020-04-0814:04vehvisAll right, thanks!#2020-04-0814:06potetmfunny, wrapping in a #?(:clj ..) appears to fix it#2020-04-0814:09vehviscljs parsing is suspect, then#2020-04-0814:18vehvisThanks for the help, I submitted an issue about this. Unfortunately there's almost a thousand open ones already...#2020-04-0815:11favilais there a way to change the template used for “create namespace” files of various types? (I want to remove :refer :all on new test namespaces)#2020-04-0815:25kennyYou can do this in Editor &gt; File and Code Templates and change the Clojure Test Namespace template.#2020-04-0815:28favilathere they are! thanks3#2020-04-0815:29favilaI can get rid of the double requires clauses too! amazing#2020-04-0822:40John MacIsaacI am trying to setup REPL in Cursive, for learning Clojure. I’ve got the REPL setup for prompted inputs and outputs, which also receive the output of println commands within a function within a file, but I can’t figure out how to get output the function values of the file to the repl.#2020-04-0822:42John MacIsaacI want to do what this guy is doing at 12:40 minutes in: https://www.youtube.com/watch?v=AmP6rW30wjE#2020-04-0822:43John MacIsaacAny help would be greatly appreciated.#2020-04-0822:46John MacIsaacThe output from the println command is a side affect (akin a console log), not a function value. I want to see the return value of functions in repl.#2020-04-0823:35tanzoniteblackhe's executing that function in the repl via send form to repl command (or Alt+Shift+P if you're on linux)#2020-04-0823:36tanzoniteblackwhich is basically (or perhaps literally): "Cursive, copy and paste the S-Exp I'm in to the repl window"#2020-04-0823:43John MacIsaacThis works for some but not all.
(ns brave.core)

'("hi")         ; ("hi")
(if true 1 2)   ; 1
(+ 1 2)         ; Syntax error compiling at (core.clj:12:1).
                ; Unable to resolve symbol: + in this context

(defn foo
  "I don't do a whole lot."
  [x]
  (println "Hello" x "!"))

(foo "katie")   ; Syntax error compiling at (core.clj:8:1).
                ; Unable to resolve symbol: foo in this context
#2020-04-0823:45John MacIsaacI assume for the + function, I need to import another dependency in the project.clj file:
(defproject brave "0.1.0-SNAPSHOT"
  :description "FIXME: write description"
  :url ""
  :license {:name "EPL-2.0 OR GPL-2.0-or-later WITH Classpath-exception-2.0"
            :url ""}
  :dependencies [[org.clojure/clojure "1.10.0"]]
  :repl-options {:init-ns brave.core})
but I dont know what to add.
#2020-04-0823:45rutledgepaulv+ is part of core. it sounds like you don't have clojure.core referred#2020-04-0823:45cfleming@johnmi You’re hitting this problem: https://cursive-ide.com/userguide/troubleshooting.html#unresolved-symbols-from-clojure-core-when-sending-forms-to-repl#2020-04-0900:00John MacIsaacSo, I needed to run the Sh-Cmd-L before running Sh-Cmd-P in the ~/clojure/brave/src/brave/core.js file. Which works now. Thank you @cfleming and @rutledgepaulv In https://cursive-ide.com/userguide/troubleshooting.html#unresolved-symbols-from-clojure-core-when-sending-forms-to-repl, it says: “This issue is due to the way Clojure creates its namespaces. If you macro expand an ns form (which I recommend you do sometime, it’s interesting to see how it works), you’ll see that it calls in-ns which creates the namespace if it doesn’t exist.” How does one “macro expand an ns form”?#2020-04-0900:17rutledgepaulv(macroexpand '(ns test-ns))#2020-04-0900:18rutledgepaulvOr, (clojure.walk/macroexpand-all '(ns test-ns))#2020-04-0903:51John MacIsaacCan cursive IDE display the repl output after a function call, on the same line, within the file? like Light-Table does?#2020-04-0905:07p-himikIIRC it's in the planned features.#2020-04-0905:11cflemingIt is, but it’s not there yet.#2020-04-0905:05John MacIsaacAnyone know how to turn off the wrap line arrows? I find them annoying and unnecessary. They show when the cursor is inside the paragraph and then disappear when the cursor is moved outside of the paragraph:#2020-04-0905:08p-himikIt's not Cursive, it's the IDEA itself, and I don't think it's configurable.#2020-04-0905:10John MacIsaacYeah, I couldn’t find it. But there’s a lot to look thru and I’m new to using Intellj+Cursive.#2020-04-0905:11p-himikHere's the issue that you can vote on: https://youtrack.jetbrains.com/issue/IDEA-121441#2020-04-0912:40Jakub Holý (HolyJak)Any experiences / tools / tips regarding remote pair programming in Cursive? Thanks!#2020-04-0915:53John MacIsaachttp://zoom.us includes screen sharing & control and works well - I like the browser version, which contains all the components in one frame, better than the app version, which displays the pieces into different frames (which feel fragmented and require more manipulation).#2020-04-0914:07Rachel WestmacottI've used Zerotier and TigerVNC to set up a shared graphical session before and then used Google Meet for communication. This has the advantage that it can be used generically with almost any software.#2020-04-0914:07Rachel WestmacottIt can be a bit laggy depending on your internet.#2020-04-0914:10Rachel Westmacottyou can also vote for: https://youtrack.jetbrains.com/issue/IDEABKL-708#2020-04-0916:32wilkesAnyone seeing this error when upgrading to IntelliJ 2020.1? > Unable to save plugin settings: The plugin com.cursiveclojure.cursive failed to save settings and has been disabled. Please restart IntelliJ IDEA#2020-04-0920:52borisI’m seeing it as well#2020-04-0920:57cflemingIs there anything in the log file about this? Help-&gt;Show log in Finder/Explorer#2020-04-1000:36wilkesI rolled back this afternoon, but I’ll try again tomorrow and post what I find in the log file.#2020-04-1011:02include+1 I've rolled back too.#2020-04-0920:38jtthis there a nice plugin to have selmer templates not look horrible, or should i just turn syntax highlighting off for html in this project? any recommendations would be much appreciated!#2020-04-1008:54seriogaI cannot find Paredit/Parinfer switcher in IDEA 2020.1#2020-04-1009:02cflemingYou’re right, that seems to have disappeared! You should be able to switch using the action or at Preferences | Editor | General | Smart Keys | Clojure#2020-04-1009:02cflemingI’ll figure out what’s going on there with the widget and fix that.#2020-04-1009:06serioga@U0567Q30W «You should be able to switch using the action or at Preferences | Editor | General | Smart Keys | Clojure» yes, search points me there but there is no Clojure section visible 😠#2020-04-1009:07cflemingYeah, it’s hard to see, it’s actually in a sub-item under Smart Keys on the left hand side#2020-04-1009:07cflemingThe search goes to the wrong place, I’ll be fixing that too.#2020-04-1009:08serioga«The search goes to the wrong place, I’ll be fixing that tool.» yepp, indeed...#2020-04-1010:22cfleminghttps://github.com/cursive-ide/cursive/issues/2349#2020-04-1217:13kenjIs there any way to resolve JS interop symbols when editing CLJS files? For instance, browser API symboles are unresolved like js/document.getElementById#2020-04-1221:44cflemingNo unfortunately, but that’s something I’m planning to fix.#2022-08-3009:44defaGo for it, Colin ;-)#2020-04-1307:27sanderHi! Known issue in IntelliJ 2020.1? I see this error when trying to run a Clojure application#2020-04-1307:27sanderI see the same in https://intellij-support.jetbrains.com/hc/en-us/community/posts/360007951959-Error-Running-Leiningen#2020-04-1311:03cflemingYes, that’s been reported as https://github.com/cursive-ide/cursive/issues/2350, but I haven’t managed to reproduce it yet.#2020-04-1409:14sanderThanks, subscribed to the issue. Tell there if you need any concrete input for reproducing it#2020-04-1509:02elahtiI don't know if this is a Cursive issue or not but on the latest IntelliJ IDEA the small menu on the bottom of the IDE from which you can choose to use parinfer or paredit has disappeared. Any idea if it can be restored there somehow?#2020-04-1509:04cflemingThat’s tracked here: https://github.com/cursive-ide/cursive/issues/2349#2020-04-1509:11elahtiThanks!#2020-04-1519:21jtthIn the REPL, if I have softwrap on on input, I can’t move the cursor using keyboard arrow keys beyond the current line’s beginning. Is this intentional?#2020-04-1520:37jaimeHi. I'm interested to know how you are doing your test workflow. Like tools you're using, how you run/re-run tests, (and how you reload chnages). Are you using terminal or running in repl integrated with editor? Thanks for sharing#2020-04-1607:28jaimeMy workflow right now is using the cursive test integration (https://cursive-ide.com/userguide/testing.html). Basically I created shortcut to run/rerun the tests. To reload the changes from multiple namespace, I use the cursive "sync files in repl". If that does not seem to work I reload namespace using (clojure.tools.namespace.repl/refresh) with mount to reset the state. I created a helper method in dev.clj called reset, and created a repl command to assign a keyboard shortcut.
#_dev.clj
(defn reset []
  (stop)
  (toolnamespace/refresh :after 'dev/go))
Things that I don't like about the workflow: 1. If have to go to the test file in order to see the test results information 2. I have inconsistent way of reloading the state (sometimes "sync files" or "reset" the state). I wonder if above can be solved by (will try them soon): 1. Just run the test in terminal 2. Just run reset everytime before I run test (I wonder if it works). In cursive/intellij, you can configure that I believe I've read somewhere also about using rich comment where you write production and test code in comment (in the same namespace), then once you're done writing them, you cut and paste test code to the test namespace. I'm curious to know how that works for you guys.
#2020-04-1811:09onetomI'm just pressing Cmd-R from either the file of the implementation or the test namespace and that syncs the changed files 1st before rerunning the latest tests. I don't think I had to do any customization for this; that's how it works out of the box. To run a test for the 1st time, I haven't bothered to create any shortcuts. I simply press Cmd-Shift-A to evoke the Actions popup, then type "run te". That will bring the 2 actions for running either individual test or all tests to the top of the popup.#2020-04-1811:09onetomLike this#2020-04-1811:10onetomu must be in a test namespace and a repl must be in focus for the project u r editing, otherwise u wont see these menu items#2020-04-1811:13onetomto see the test failures, i often just press F2 to show the 1st failure around the caret. unfortunately it moves the cursor away from the point of editing and the popup explaining the error is not very readable. sometimes that popup have a blue link to show diffs between the actual and expected results, but currently there is no keyboard shortcut which would activate the dialog that link leads to.#2020-04-1811:15onetomim also using expectations.clojure.test so i can write (expect <expected> <actual>) instead of (is (= <expected> <actual>)). in this case, the error failure contains (=? ... which cursive doesn't understand and doesn't even show the Show diff... link.#2020-04-1811:15onetomexample error msg:
Expected: (=? #{:with-update-and-merchantx} (-> txn-descr-merchant-by-human-q (d/q db [:txn.descr/str "txn-descr"]) (idents db)))
Actual: (not (=? #{:with-update-and-merchantx} #{:with-update-and-merchant}))
#2020-04-1811:18onetomif im dealing with bigger data structures in my tests, i just fire up kaocha in the built-in terminal, OR kaocha actually has some REPL integration, so u can just run specific tests or test specific namespaces with a function call. such a function call i just type up in the cursive repl window's input area directly, then i use my custom F12 shortcut to repeatedly execute the last expression in the REPL but first sync the current file im editing.#2020-04-1811:21onetomfor that you have to create a new REPL command with the Add New REPL Command action, like on this screenshot#2020-04-1811:24onetomand then assign it to a keyboard shortcut (like F12) within the keymap. you will find this REPL action there by the name u assigned to it (like Re-execute last command in this example)#2020-04-1817:42jaimeFor your shortcut cmd+r , what is the name of the command in the keymap? Pressing cmd+r on mine restarts the repl.#2020-04-1817:53jaime"to see the test failures, i often just press F2 to show the 1st failure around the caret." Just to confirm, this will only work if your editor is focused in the test file where the error is right? Meaning if I moved to a different file and pressing f2 , then it won't go to the test file where the error is? (that is the case in my machine)#2020-04-1818:05jaimeBtw, there is a command "Error Description" where it will also show the tooltip of test error. Your cursor needs to be in the highlighted error though.#2020-04-1700:23kennyIn IntelliJ 2020.1 Cursive's macroexpand REPL window opens on a different monitor than the monitor that my macro is on. The window that is opened is not scrollable either. This makes the macroexpand feature really tough to use 😞#2020-04-1718:20tanzoniteblackI didn't even know this existed. You just made my day#2020-04-1905:10Oliver GeorgeHi @cfleming#2020-04-1905:10Oliver GeorgeI'm trying out Krell and trying to get a good REPL setup.#2020-04-1905:10Oliver GeorgeThis is Krell: https://github.com/vouch-opensource/krell/wiki/Reagent-Tutorial#2020-04-1905:11Oliver GeorgeHere's my REPL config...#2020-04-1905:11Oliver GeorgeThe problem I have is it starts in "CLJ mode" which means symbols don't resolve and I can't load code from the editor. I can switch over using the dropdown - then it works fine.#2020-04-1905:12Oliver GeorgeIs that something Krell can fix - some kind of handshake which might be missing as the REPL boots?#2020-04-2021:07cflemingYes, Cursive switches between REPL types by scanning for particular output lines. That should be configurable, but isn’t at the moment. The current check looks like:
(or (.contains ^String line "Type `:cljs/quit` to stop the ClojureScript REPL")
    (.contains ^String line "To quit, type: :cljs/quit")
    (re-matches #"ClojureScript [0-9\.]+" line))
#2020-04-2021:07cflemingI’ll look at making that configurable for the next release.#2020-04-2021:16dnolenWouldn't it be possible to just check the prompt?#2020-04-2021:16dnolencljs.user ?#2020-04-2021:18dnolenhrm, though I see that you're probably detecting Clojure by looking for the version string ...#2020-04-2021:20dnolenand that avoids issues w/ starting in a different ns as well#2020-04-2021:20dnolenok can do that#2020-04-2023:32cflemingThanks - although once that’s configurable it should be easier to make work with anything.#2020-04-1905:12Oliver GeorgeOr is it something Cursive can handle#2020-04-1905:13Oliver GeorgeHere's what it looks like when I boot up...#2020-04-2004:32wilkerluciohello, I'm having an issue that cursive is complaining about cycle dependencies ,but there is no cycle#2020-04-2004:32wilkerlucioits a cljc file, with self-require from cljs:
(ns com.wsscode.pathom.connect
  #?(:cljs [:require-macros com.wsscode.pathom.connect])
  (:require [clojure.spec.alpha :as s]
            [clojure.spec.gen.alpha :as gen]
            [com.wsscode.pathom.core :as p]
            [com.wsscode.pathom.parser :as pp]
            [com.wsscode.pathom.trace :as pt]
            [com.wsscode.pathom.misc :as p.misc]
            [com.wsscode.common.combinatorics :as combo]
            [#?(:clj  com.wsscode.common.async-clj
                :cljs com.wsscode.common.async-cljs)
             :as p.async
             :refer [let-chan let-chan* go-promise go-catch <? <?maybe <!maybe]]
            [clojure.set :as set]
            [clojure.core.async :as async :refer [<! >! go put!]]
            [edn-query-language.core :as eql]))
#2020-04-2021:04cflemingI’ll take a look and try to reproduce that.#2020-04-2022:23wilkerluciowith some exclusions I got some files to work#2020-04-2022:24wilkerluciobut if you clone pathom, go to branch query-planner, and try to load the connect-test.clj, I'm having consistent issues in that one#2020-04-2022:24wilkerlucio(note: please load project as deps project, use the aliases: dev,provided,http-drivers,graph-render)#2020-04-2004:32wilkerluciobut cursive complains it has a cycle with itself#2020-04-2007:06miikkaI upgraded to IDEA 2020.1 and it's now really slow and laggy. Anyone else noticed this?#2020-04-2007:31Janne SauvalaI’m running it on mac and I didn’t see big difference compared to the previous version#2020-04-2008:03miikkaHmh. After a restart it seems to be back to normal (which is still slow, but at least it's usable).#2020-04-2008:42Janne SauvalaFunny that this release was supposed to include performance improvements 🙂#2020-04-2009:01miikkaHeh, doesn't seem like that to me. I hope that it became faster for some people at least.#2020-04-2021:08cflemingI haven’t noticed any change, but someone mentioned to me yesterday that 2020.1 was way faster for them. @U1NDXLDUG you could try invalidating indexes in case something has gotten funky there in the update.#2020-04-2503:51onetomI've also just noticed that pane resizing got a looot lot smoother in recent IntelliJs. My bet on @U1NDXLDUG’s problem is that it might be caused by some other plugin....#2020-04-2010:17roklenarcicIs there a way to sort :require imports alphabetically?#2020-04-2010:44elahtiYou can do it like this: select all require/import lines -> open actions menu with cmd+shift+a or double-click left shift -> sort lines.#2020-04-2021:05roklenarcicthanks#2020-04-2021:09cflemingThere isn’t a good built-in way to do this yet, but it’s high on my to-fix list.#2020-04-2021:41AJ Jaro@U66G3SGP5 There is a basic plugin “someone” created that does this in a very rudimentary way. https://plugins.jetbrains.com/plugin/13222-clojure-namespace-sort He’s probably open to PRs on GitHub…probably 😉#2020-04-2010:45Jakub Holý (HolyJak)How to enable a nrepl middleware, for a repl started by Cursive? I see no mention of middleware on https://cursive-ide.com/userguide/repl.html Thanks!#2020-04-2010:48flowthingIs it a Leiningen project or a http://tools.de project?#2020-04-2010:51flowthingWith the former, see this: https://github.com/technomancy/leiningen/blob/145ba54eb0a5fc099380ad6feb04688a2fca9173/sample.project.clj#L396-L406 With the latter, you can use an .nrepl.edn file: https://nrepl.org/nrepl/usage/server.html#_server_configuration#2020-04-2011:54Jakub Holý (HolyJak)The latter. Thanks for a great response!#2020-04-2021:09cflemingYes, thanks flowthing! I’ll add that to the documentation.#2020-04-2014:46rtacconiI am trying to connect to remote (localhost) nREPL from Cursive, I am using shadow-cljs, the port is open when using netcat, but I get
Connecting to remote nREPL server...
Clojure 1.10.1
and it hangs. Any idea why?
#2020-04-2014:47thhellerhangs how? looks like it is ready to go?#2020-04-2014:48rtacconiyes, it works, that’s silly 🙂 thanks#2020-04-2015:37thhellerDid something change in Cursive regarding the REPL? I have (comment (+ 1 | 2)) in a source-file with | being my cursor position#2020-04-2015:37thhellerusually this would send (+ 1 2) to the REPL with the send-form-to-repl command#2020-04-2015:37thhellernot it sends the entire comment?
#2020-04-2015:37thhellerwhy would that be?#2020-04-2015:39thhelleroh nvm ... works now. guess it didn't identify it as clojure.core/comment due to some deps.edn issue#2020-04-2020:15thheller22:14 Error running 'nj': failed to access class com.intellij.execution.impl.ProcessStreamsSynchronizer from class com.intellij.execution.impl.ConsoleViewRunningState (com.intellij.execution.impl.ProcessStreamsSynchronizer is in unnamed module of loader com.intellij.util.lang.UrlClassLoader @7f9a81e8; com.intellij.execution.impl.ConsoleViewRunningState is in unnamed module of loader .PluginClassLoader @2173be8e)#2020-04-2020:15thhellerwhat could this be? trying to run a deps.edn project from cursive? no special config, just run with deps?#2020-04-2021:03cflemingThis is https://github.com/cursive-ide/cursive/issues/2350, I’m hoping to get the fix out today.#2020-04-2021:04thhellerah thx. I have also another crash/deadlock or just veeeeeeeeeery long task running on the ui thread apparantly. can't do anything and the last thing it shows is something about computing the classpath#2020-04-2021:05thhellervery unreliable ... just running it outside cursive for now#2020-04-2021:10cflemingIs that one running a REPL?#2020-04-2021:13thhelleryes, trying to start local clojure.main repl via deps.edn#2020-04-2021:15cflemingHmm, the classpath computation should be off the EDT. I wonder what’s happening there. Is that project anything I can look at, or is it a work one?#2020-04-2021:16thhellerprivate nextjournal repo, pretty large with a whole mess of dependencies#2020-04-2021:16thhellerI got it running outside cursive and connecting remotely now. that works well enough for me.#2020-04-2021:16cflemingAny snapshot dependencies in there? They can delay the project resolution a lot, but again, it should be off the EDT anyway.#2020-04-2021:17thhellerlots of git deps, no snapshot as far as I can tell#2020-04-2021:17cflemingI’ll check that and ensure it’s running off the EDT, and put some debug logging in there that can be turned on to check.#2020-04-2021:17cflemingOk, I’ll do some investigating and see what I can find.#2020-04-2021:17thhellerdunno whats happening either. the entire UI freezes and never returns#2020-04-2021:18thhellerI also have shadow-cljs project open in another window .. kills that too.#2020-04-2021:18cflemingActually, can you check for UI freeze logs and email them to me?#2020-04-2021:18cflemingLet me get the doc, one sec…#2020-04-2021:19cflemingIn fact, if you go Help | Show log in Finder, in that directory there should be some UI freeze logs.#2020-04-2021:21thhelleryes there are. couple of threadDump.txt files#2020-04-2021:21cflemingGreat, could you mail those to me?#2020-04-2021:21thhellerwhere do you want them?#2020-04-2021:21cfleming<mailto:/cdn-cgi/l/email-protection|/cdn-cgi/l/email-protection>#2020-04-2021:23thhellersent#2020-04-2021:27cflemingThanks, I’ll try to look at that today.#2020-04-2021:29thhellerlet me know if I can help somehow. got this in a somewhat reproducible state here. gotta kill everything after so don't want to do it too often but willing in the name of science. 😉#2020-04-2023:09salam@cfleming i keep getting this exception (in the log attached) while importing deps projects. upon the completion of an import, i end up with an empty intellij idea window (without any tool windows.)#2020-04-2101:24shayne.koestlerI'm getting the same exception after installing cursive yesterday and trying to open a leiningen project (luminus template).#2020-04-2120:51Ben HammondI've got a little bugbear I'd like to get off my chest... I eliminate code by commenting it out using #_ then I subsequently delete it using (my key binding for)
StructuralEditing - Kill Sexp
only... that doesn't just kill the thing that I commented out it also kills the first thing after it that is not commented out that I want to keep
#2020-04-2120:55Ben HammondIf Kill Sexp considered a reader-macro comment to be worth killing on its own without the need to kill further Then Cursive would be an even better tool#2020-04-2120:55Ben Hammond(imho, obvs)#2020-04-2120:55Ben HammondDunno, is that just me?#2020-04-2122:17cflemingI’m not sure, no-one else has reported that. Let me think about the implications of considering a reader-macro a form.#2020-04-2219:48Ben Hammondperhaps I just need to pick up some better habits when identifying/stripping out used code though#2020-04-2503:58onetomI only use ^K, Structural Editing / Kill, since it also cares about the expression boundaries. I typically have 1 expression per line, so it works well. If I would want to just delete next form, I would Alt-Up, then Backspace / Delete or just start typing...#2020-04-2122:30favilamy leinigen tool is gone, and right-clicking project.clj files doesn’t show an “import project” option anymore. Halp?#2020-04-2122:35favilanm, you can open the project.clj file itself and it will offer to “add project” at the top of the file#2020-04-2122:34antonmosi dont remember seeing that before… do you have “refresh leiningen projects”?#2020-04-2122:36favilano, everything was gone. I always remember this stuff being there even when there was no lein module in the current project, but maybe that changed?#2020-04-2122:36favilaanyway, I found a workaround#2020-04-2203:09cflemingThe Leiningen toolwindow now only appears when you have a lein project registered, but the right-clicking a project.clj file should work always - I’ll check that.#2020-04-2212:27AJ JaroI have a CLJC namespace that defines both a defprotocol and a defrecord. When I Find Usages on the defrecord the results include data from CLJS and CLJ namespaces. However, when I Find Usages on the namespace it doesn’t show any usages in CLJS files. Is this a known issue that Finding Usages on namespaces doesn’t include CLJS results? Is there something I can do to resolve this issue locally?#2020-04-2321:47cflemingI don’t think so, I’ll try to reproduce that.#2020-04-2306:38Jakub Holý (HolyJak)Hello! I use Copy as Kill to copy whole forms. However it does not work in library files because they are read only. Is there another solution? Perhaps it could be modified to work in these files? Thanks!#2020-04-2309:23imreHah, I never really understood what the use for copy as kill could be, thanks for the idea 🙂 I mostly use expand selection until I get what I want and normal copy#2020-04-2309:38gravSomeone somewhere talked about paredit/parinfer toggle being gone with 2020.1, and that it wasn't possible to find it in prefs either. Can't find the thread now, though. Any solution to this?#2020-04-2320:14Jakub Holý (HolyJak)There is an issue for it in the cursive GH. Workaround is use the menu, under Smart Keys select Clojure therecitbis#2020-04-2321:40cflemingI have this fixed and will hopefully have the fix out today.#2020-04-2406:19gravThanks Colin, updated to 1.9.2-eap and it works again!#2020-04-2410:27cflemingGreat! There’s actually a problem with the setting search due to an IntelliJ bug (I forgot to mention that in the release email) but hopefully no-one will need that if the widget is working again.#2020-04-2314:07helios@cfleming alias doesn't seem to be interpreted correctly. It can't resolve s#2020-04-2314:12imretry (alias 's 'clojure.string)#2020-04-2314:12potetm@helios doesn’t s need to be a symbol?#2020-04-2314:12potetmi.e. 's#2020-04-2314:12potetmsame for 'clojure.string#2020-04-2314:12imreand reverse their order#2020-04-2314:13helioswhoops, thanks guys 🙂 In reality we have a macro that does the quoting automatically and that cursive can't really resolve well#2020-04-2314:13helios
(defmacro ns-alias
  "Set up a custom alias for use with namespace keywords.

  (ns-alias com.nextjournal.journal.system sys)"
  [ns as]
  `(do
     (create-ns '~ns)
     (alias '~as '~ns)))
#2020-04-2321:46cfleming@helios If you swap your args as potetm and imre suggest then you could resolve your macro as alias, which should work. However things may still be funky if that namespace doesn’t actually exist in your source code.#2020-04-2314:14heliosand we use it as (ns-alias foo bar) since the quoting happens in the macro. But bar is unresolved#2020-04-2314:15potetmnow that’s a horse of a different color#2020-04-2314:17potetmYeah, there is a way to do custom resolution, but it needs to mirror clojure constructs.#2020-04-2314:18potetme.g. you can do a custom let-like macro and make it resolve#2020-04-2314:18potetmso my advice would be to make your ns-alias macro take proper symbols#2020-04-2314:18potetmI would find that more idiomatic anyways.#2020-04-2314:19imreyou could also try reversing the order there and tell cursive to interpret it as the ns macro perhaps?#2020-04-2314:19imreyou might get better completions that way?#2020-04-2314:19imrenot sure, haven't tried#2020-04-2314:20potetm@imre yeah doesn’t appear to work#2020-04-2314:20potetmthe first “symbol” is resolved properly, but the second is highlighted#2020-04-2314:21imre:man-shrugging::skin-tone-3:#2020-04-2314:22potetmYeah same. Probably best to just use symbols. Free-floating “symbols” are pretty bizarre in clojureland.#2020-04-2316:27kennyCursive thinks a required namespace is unused when only used in a map with the namespace syntax. In the below example, foo is marked as "Unused alias".
(ns unused
  (:require
    [foo :as foo]))

#::foo{:a "a"}
#2020-04-2321:43cflemingThanks, I’m planning an upgrade to the unused marking, and I’ll fix that there.#2020-04-2318:25denik@cfleming by default the REPL scrolls all the way down on a new result. When the result is long I often find myself scrolling up to where it started being printed. With a long REPL history, I sometimes can't easily find the beginning so I just clear the whole REPL and type *1 or eval again. This is definitely an anti-pattern. Is there a configuration setting to auto-scroll not to the bottom but to the top of the last REPL result?#2020-04-2321:43cflemingThere isn’t, but that’s an interesting idea. Let me think about this and see if I can come up with a general solution.#2020-04-2319:51spellmanIs there a way to rename a symbol to a namspaced symbol? As soon as I type the / I get that error message and the Refactor button disables.#2020-04-2321:47cflemingHmm, interesting case, I’ll take a look at that.#2020-04-2322:44kennyCursive doesn't appear to be indenting docstrings on def or defn correctly in cljs#2020-04-2322:44kennyI'm on 1.9.1-2020.1#2020-04-2403:12cflemingI just tested this, and it doesn’t do that in CLJ either. But that case is because there are only two lines in the docstring.#2020-04-2403:13cflemingThe way this works is that Cursive will find the shortest indent of all lines after the first one, and then trim that indent from all those lines. The first line is ignored because it usually has no indent due to the string itself being indented (like in your example).#2020-04-2403:14cflemingIf you add a third line after the second, indented to match the first one, then it works.#2020-04-2403:14cflemingUnfortunately I think this is just an artifact of docstrings not being a great format for docs.#2020-04-2403:16cflemingI’m actually planning to implement markdown for docstrings shortly, which should hopefully make all this nicer.#2020-04-2414:06kennyHmm I understand the problem. We often will document functions like this:
(defn example
  "Pass in a map of options with the keys: 
    foo: configure foo
    bar: configure bar"
  [opts])
The rendered docstring is a lot harder to read. Perhaps the solution is to always have the first line long enough that you need to indent to the second line 🙂 Empty lines seem to be ignored so it'd need to be a line with actual text. Curious how markdown docstrings would solve this.
#2020-04-2422:24cflemingMarkdown wouldn’t directly help that case, but does allow more control over formatting of docstrings.#2020-04-2412:29heliosI enabled looking up the doc on ClojureDocs, but i think that i want to disable it. is there a way?#2020-04-2500:07cflemingHmm, I don’t think there is at the moment, no.#2020-04-2504:08onetomAlso, why would you want to do that, @U0AD3JSHL?#2020-04-2521:45staypufdIt would be nice to be able to have doc lookup from a ordered set of places. One being local docs that you may have of your own notes etc for function docs. #2020-04-2523:31cflemingThat’s an interesting idea, actually. A few people have collections like this, e.g. https://github.com/jafingerhut/thalia#2020-04-2414:57kennyI'm pretty sure I've seen this mentioned before, but I couldn't find a GH issue for it. Is there a way to get Cursive to stop printing large data structures in the REPL? I've been working with gigantic maps and lists of maps a lot lately, and I find myself tip toeing around out of fear of accidentally printing one. If I do print one, I either have to wait a whole minute (sometimes longer) for it to finish printing or restart the REPL. If I decide to wait, the IDE becomes more and more unresponsive as more data prints. It would be fantastic if Cursive had a button similar to the Interrupt button that would stop it from finishing the print of something.#2020-04-2420:44onetomYou sound very much like me. I had these exact same thoughts and questions a few months ago :) I'm still in the same situation sadly... i keep sprinkling (take 5) around my code. I even have a helper function which is roughly like (def ? (juxt count (partial take 5)))#2020-04-2420:44onetomso I can use it in both thread first and last situations#2020-04-2420:47onetomIm seriously considering adopting other editors for this kind of interactive exploratory work and do the test driven development and learning kind of work within cursive, though the testing integration is subpar in many aspects compared to the alternatives like kaocha#2020-04-2500:07cflemingYes, this is https://github.com/cursive-ide/cursive/issues/2100. I’ll see if I can implement that for this EAP series.#2020-04-2501:11kennyI was already subscribed and :thumbsup::skin-tone-2: to that haha. Somehow it didn't show up in my searches.#2020-04-2501:41cflemingWould it also be useful to have a popup when this happens asking if you want to delete the partially-printed output from the output pane? It can get messy and also probably slows things down if you have a ton of unwanted output there.#2020-04-2501:41kennyProbably. Most certainly the first thing I'd do is click the trash button after it happened.#2020-04-2501:42cflemingActually, I had thought about an action to copy the last REPL output. Perhaps just a “Delete last REPL output” might be more general.#2020-04-2501:42kennySometimes, if I think the text print will not take that long, I'll sit there clicking the trash can while the REPL prints for 30 seconds 😩#2020-04-2501:43cflemingHehe. I have this implemented now so hopefully those days are gone. It’s not perfect, it’s tricky because there are multiple layers of asynchrony involved for performance reasons, but it should mostly work. The action is sometimes not that responsive when printing massive amounts either, but it should respond in less than 30 seconds 🙂#2020-04-2501:46kennyWoooo!!! Could you possibly know that a huge chunk of text was about to be printed?#2020-04-2501:47kennyOr that some amount has already printed and halt/prompt if the user wants it to continue?#2020-04-2501:48cflemingYes, the REPL will print everything to a string, and then the string gets passed over the REPL connection back to me. I then scan that string and pretty-print it. So I can tell if the result is going to be enormous. Would it be useful to have a max limit set and then prompt if the output is over that size?#2020-04-2501:50cflemingSo intervening in the printing process is hard because of the asynchrony, in particular prompting the user and waiting to see if they want to continue is difficult. I could prompt if the string I’m about to print is over, say, 5k chars or something (I’m not sure what a reasonable default for this would be, but as long as it’s configurable).#2020-04-2501:50cflemingInterrupting the printing was already surprisingly tricky, pausing and resuming is well into far-too-difficult territory.#2020-04-2501:51cflemingThe problem with the limit would be that at that point I can’t distinguish if the result is one enormous string or a map with a million small items.#2020-04-2501:55kennyWhat’s the difference from an end user perspective? #2020-04-2501:58cflemingProbably nothing, admittedly.#2020-04-2501:59kennyConfigurable limit makes sense. #2020-04-2502:47onetomThere is already a `print-length` dyn-var (or what was its name) which should be taken in to account. Since it's not on the REPL client side of the process, you can't just easily make use of it, but I would at least expect the same semantics from this setting, so we don't have to deal with another concept and setting name. On that note, would it be possible to just mirror the REPL-server-side's value of this setting on the client? At least on nREPL u could carry it in the response map, along the :ns in something like :env #2020-04-2502:48onetomThen u could pass that along to the async printing process#2020-04-2502:50onetomI also suffer often from the printing being going on in the background, so instead of slapping features on top of the problem, i would rather see ways avoiding it#2020-04-2502:53kennyI quite like the idea of a pop up if I’m trying to print something huge. I don’t want to have to remember to set a dynamic variable in all of my projects. #2020-04-2502:57onetomIn other environments it's common to show a ... at the end of the partial data, which is then clickable to see more of it. If we could do that for the pretty printed string at least, that would be great. I can also imagine having a little x in the bottom-right corner of the evaluation, which would only appear on-mouse-hover and allows to clear the last REPL input. I don't really mind to just clear my complete history; that would be good enough for me. No need to clutter the Cursive actions with yet-another non-shortcut-bound command.#2020-04-2503:02onetomWhat I would find intuitive is that the killing of the pretty printing process being the same action as the interrupt evaluation#2020-04-2503:04onetomBecause often I cant tell what am I waiting for. I try to interrupt the evaluation, but then it turns out that have been finished and Im just waiting for the result being prettified before anything starts printing#2020-04-2503:07kennyFrom what I know, the Cursive REPL output is text only. Not sure if he can add buttons like that in. I’m not opposed to using the interrupt button for this action as well. Not sure if it’d be technically feasible to differentiate which action to execute though. I also wouldn’t mind a second button if it’s necessary. This is such a big problem for me lately, any solution besides REPL restarts would be a huge win. #2020-04-2503:08onetom@U083D6HK9 what's your typical situation when this happens? What kind of data are you looking at ? I typically fall into this trap with data pulled from datomic#2020-04-2503:11onetomI agree very much with you; good UX can come later. Let's just have any solution first.#2020-04-2503:15cflemingI wouldn’t say it’s common to have elidable datastructures (the clickable ...), AFAIK only unrepl supports that and that’s far from widespread. I think the very latest nREPL also has some support for it but I don’t think any clients do yet.#2020-04-2503:17cflemingReplicating the various *print-...* vars locally is something I’ve also been meaning to implement. As @U086D6TBN points out I can’t use these easily, and passing them back from the server to the client is tricky. I think these would probably just end up being config flags in the IDE for client-side use.#2020-04-2503:18cflemingHaving the single interrupt button do both is also a good idea, I can probably do that.#2020-04-2503:18cflemingI’ll fix the stupid icon problem with that button while I’m at it.#2020-04-2503:20onetomI've seen the ... recently in Atom (was it proto-repl or chlorine, I can't remember) Before that I've seen it in CIDER too; tho they have a complete result inspector too#2020-04-2503:23onetomThanks Colin for prioritizing this exceptionally. I can't think of anything else which annoys me. Maybe the ansi escapes being escaping sometimes, when i print something with pug, but that I can totally live with#2020-04-2505:22cfleming@U086D6TBN Is there an issue for the ansi escape thing? I remember discussing it at some point, but I can’t find an issue for it. When you print with pug, does it come out on the process stdout rather than over the REPL? That might explain it. Do you have a simple repro case for that I could try?#2020-04-2505:24onetomI don't remember creating a ticket for it because I couldn't easily create a minimal repro case. It happens on mostly on bigger outputs (stdout, not the result print)#2020-04-2505:25onetomActually I have time now to look into this. I can present a repro case in a few minutes#2020-04-2506:04onetomhttps://github.com/cursive-ide/cursive/issues/2357#2020-04-2506:51cflemingThanks, I’ll take a look that that.#2020-04-2519:07kenny> what's your typical situation when this happens? What kind of data are you looking at ? Sometimes it's from Datomic. Typically the info we pull from Datomic is smaller and would "only" take 30s of printing to get done with. The killer for me is pulling lazy time series data (e.g., metrics) for thousands of items and accidentally printing all of it.#2020-05-0104:08cflemingOk, it was a bit of a battle, but this is now working. Both kinds of interrupt use the same action, since it’s fundamentally a sequential action anyway (command evals in the REPL, REPL prints the value to a string and passes it back, Cursive prints it by which time the eval has usually terminated). So now interrupt will interrupt the eval if it’s still running, and interrupt the printing if it’s got to the printing stage. The action now also has an actually visible icon.#2020-05-0104:09cflemingIn the process, incredibly, I actually found a bug lurking in the Cursive nREPL client code which has been there for ~5 years.#2020-05-0104:26kennyWooooo 🎉 Thank you for fixing this. It will save me so much time! That’s always fun. What was the bug? #2020-05-0110:24cflemingWhen handling responses, I had:
(let [status (set (map keyword (:status item)))]
          (cond
            (status :session-idle)
            (print/print-error state "Session idle - no current executions.\n")

            (status :interrupted)
            (print/print-error state "Evaluation interrupted.\n")
            ...etc etc...
What I hadn’t noticed was that there can be multiple statuses, but cond would only handle the first. Now it looks like:
(doseq [status (set (map keyword (:status item)))]
          (case status
            :session-idle
            (print/print-error state "Session idle - no current executions.\n")

            :interrupted
            (let [{:keys [id]} item]
              (print/print-error state "Evaluation interrupted.\n")
              (swap! state message-done id))
#2020-04-2420:00hlshipI'm moving over to a new, fresh laptop, and rebuilding my environment there. I've hit a snag; I'm trying to import my existing Cursive project, which is an umbrella project (lots of sub-modules). In the past, there was a screen where I could click "recursively search" ... that seems to be gone. I'm not sure how to proceed.#2020-04-2421:12salami noticed the same problem: i can no longer open and work in an umbrella project that has multiple modules in it.#2020-04-2422:25cflemingIs this with leiningen or deps? Although that option should be present for both.#2020-04-2422:27salamin my case, it’s two deps projects.#2020-04-2422:28cflemingIf I do New | Project from existing sources…, select either lein or deps, and then press next I get the Recursively search option:#2020-04-2422:30salamah, i guess there's a behavioral difference between creating new projects from existing sources and importing existing projects.#2020-04-2422:39salamso first of all, there's no "create new project from existing sources" on the welcome window. the only two options (that are relevant here) are "create new project" and "open or import" and the latter doesn't give you the pop-up window above. second, during the import, cursive shows an information bubble saying it found deps build scripts but no deps resolution.#2020-04-2423:50cflemingI see what you mean, yes. “New project from existing sources” should be the same as “open or import”, but for some reason is not. I’ll investigate that and see what I can see.#2020-04-2500:41cflemingBased on this, one workaround if you want to import a huge project would be to create a small dummy project to open, then when that’s open you can use New | Project from existing sources…#2020-04-2420:00hlshipIntelliJ 2020.1 w/ Cursive 1.9.1-2020.1#2020-04-2420:07hlshipI was super-spare in what I installed as plugins; are there perhaps hidden dependencies on other plugins?#2020-04-2420:32manutter51I found the “Recursively search” option by doing File -> New -> Project from Existing Sources. It was on the 2nd screen of the wizard.#2020-04-2420:34manutter51I’m still on IntelliJ 2019.3, so that’s just for comparison#2020-04-2620:25Takis_
Hello , i used Clojure in past and autocomplete in cursive was easy  i wrote  (.  ^ClassName myvar )  in clojurescript how to use autocomplete? for example  (. js/Document "myid") doesn't work
#2020-04-2709:49imreOne of the projects I'm working on recently got its deps.edn made a symlink and it appears Cursive is unable to handle that.#2020-04-2710:40imreAfter a bit more investigation it could be that what confused Cursive is that the target of the symlink is another file named deps.edn somewhere under resources#2020-04-2710:46imreNope, it appears to be the symlink#2020-04-2711:10imrehttps://github.com/cursive-ide/cursive/issues/2360#2020-04-2722:27cflemingThanks for the issue, I’ll take a look at that.#2020-04-2713:06Alex Miller (Clojure team)could be tools.deps not handling that too - does that work outside cursive?#2020-04-2713:22imreIt appears to work fine, thanks for checking.#2020-04-2713:24imreat least in the contexts we use it#2020-04-2716:49denikGetting this error in cursive with the same profiles but not with lein repl...
Error loading nrepl.server: Could not locate nrepl/server__init.class, nrepl/server.clj or nrepl/server.cljc on classpath.
Error loading complete.core: Could not locate complete/core__init.class, complete/core.clj or complete/core.cljc on classpath.
#2020-04-2800:21cflemingDo you get this with all projects, or just with a particular one?#2020-04-2717:50Takis_is it possible to have this kind of autocomplete in Clojurescript?i try to use mongodb nodejs driver,i asked yesterday also but still i cant find the way to do it.#2020-04-2722:28cflemingIt will be, but isn’t right now. Curently Cursive doesn’t do any type inference at all for CLJS.#2020-04-2721:28davewohow do I tell cursive to auto-import deps changes?#2020-04-2721:40davewospecifically, I thought there was an "auto" mode for this notification#2020-04-2722:28cflemingThere used to be with the old deps integration, but I haven’t added it for the new one yet.#2020-04-2721:29roman01la@cfleming This might be a rare feature request, but I'd like to be able to jump from location in CLJS code to a source mapped location in compiled JS output.#2020-04-2721:33kennyI think this would be super useful too!#2020-04-2721:35roman01laYeah, sometimes I want to inspect codegen, when the code is small and self-contained I use http://app.klipse.tech/, but for something in a project I'd like to jump straight to the code w/o rebuilding the whole env Klipse#2020-04-2722:29cflemingHmm, I’m not sure what would be involved in that, could you file an issue so that doesn’t get lost?#2020-04-2800:05roman01laWill do#2020-04-2810:39roman01laDone https://github.com/cursive-ide/cursive/issues/2362#2020-04-2806:46caleb.macdonaldblackAny idea why opening quotes in a cljs file doesn’t close them like it does in a clj file?#2020-04-2809:34cflemingThat sounds like a bug if so - could you file an issue for that?#2020-04-2902:07steveb8nQ: I’m using Specter heavily in my code. I get lots of warnings about not being able to resolve Specter path navigators, even though they are valid Clojure. They are required using something like
[com.rpl.specter :refer [select select-first transform setval
                         ALL LAST FIRST NONE INDEXED-VALS MAP-VALS MAP-KEYS BEGINNING END
                         must pred compact submap collect-one index-nav walker]]
#2020-04-2907:11cflemingHow are they defined? I suspect it’s because they’re defined via a macro rather than how they’re referred.#2020-04-2922:16steveb8nYep https://github.com/redplanetlabs/specter/blob/master/src/clj/com/rpl/specter.cljc#L679#2020-04-2922:17steveb8ndefnav is a macro#2020-04-2922:19steveb8nthis is the result in a 2kloc integration test. is a bit difficult to see test failures#2020-04-2922:19steveb8nany workarounds?#2020-04-3002:11cflemingYep, resolve defnav as def: https://cursive-ide.com/userguide/macros.html#customising-symbol-resolution#2020-04-3002:13cfleming@U0510KXTU ^^#2020-04-3002:15steveb8ncool. I didn’t connect the dots…that I can mark the macro used instead of the symbols created by the macro#2020-04-3002:15steveb8ntrying now…#2020-04-3002:21steveb8nhmm. can’t figure it out. tried resolving ALL as com.rpl.specter/ALL but it won’t accept it#2020-04-3002:21steveb8nalso tried resolving defnav as def. didn’t change either#2020-04-3002:24cflemingResolving defnav as def should definitely do it.#2020-04-3002:25cflemingOne sec, I’m down in the weeds on another problem right now, will take a look in a bit.#2020-04-3002:36steveb8nno probs. this is not urgent. just a nice to have#2020-04-2902:08steveb8nAnyone know how to remove these warnings? I wonder if it is because Specter is a cljc based lib?#2020-04-2903:37dpsuttonlittle newbie help. I'm getting "Error running 'Unnamed:' Unknown error" when trying to run the repl. I don't know how to get more info or expand some pane that has the error in it. Freshly setup cursive and intellij on a mac. does anyone know what window to open to see more info?#2020-04-2904:35dpsuttonseems a restart cleared it whatever it was#2020-04-2906:18kwladykaIs a way to print actual vs expected in more readable way? How do you deal with this? It works great with = but what about other fn to check conditions?#2020-04-2907:10cflemingThere isn’t at the moment but this is something I’m going to fix very soon.#2020-04-2907:12kwladyka👍 will be great#2020-04-2907:12kwladykacursive it totally the best support for clojure coding so far just saying to make you happy 😉#2020-04-2908:56cflemingI am happy 🙂#2020-04-2911:17dpsuttonit seems navigate back and wrap with [] both share the shortcut cmd [. Is there a good way to regain the navigate back which seems pretty paramount? What do others use for this seemingly important keybinding?#2020-04-2921:30cflemingYou can always rebind action keys at Preferences | Keymap - no-one else has mentioned it, I think opinions differ on which actions are essential 🙂#2020-04-2921:31dpsuttonfair point. thanks#2020-04-3002:14salamactually… i filed a bug about this years ago: https://github.com/cursive-ide/cursive/issues/1892#2020-04-3002:14cflemingWhoops, I stand corrected!#2020-04-3002:17cflemingIt’s a problem though - IntelliJ binds nearly all the keys to actions. For a long time Cursive didn’t bind anything by default and allowed users to set it up themselves, but then users complained about that (much more than they have complained about built-in actions being overridden).#2020-04-3002:26salamwere those complaints before cursive introduced parinfer? if that’s the case then i can totally get behind their complaints since back then paredit was the only option and it would make total sense for cursive to offer the default paredit key bindings out of the box. but with parinfer, especially with version 3, i would expect the paredit key bindings to be optional and can be switched on/off with one check box. it happened a few times to me, where i had to manually remove those key bindings one at a time for our new users because they kept getting surprises and didn’t really know what was happening as they just didn’t know such a thing as paredit and its key bindings.#2020-04-3002:30cflemingWell, previously the way it worked was that Cursive didn’t bind any keys at all, and there was a preference pane which users could use to apply different sets of keybindings, i.e. bulk-enable keybindings. It was really confusing for users to understand. The problem with having those bindings be optional is that it involves modifying the keymap, which are immutable by default (if you want to modify some key bindings, you have to create your own keymap based off one of the immutable default ones). Getting users to understand how to configure that when they click a checkbox is tricky.#2020-04-3002:43salamyes, i remember that. i was among those who were confused. truth be told, i still don’t understand how it worked to this day. 😁 yeah, i’m aware that intellij idea key maps are immutable but if a plugin can bind (dynamically) some keys after installation without changing the current key map then, i thought, they should be able to dynamically unbind those keys as well? #2020-04-3002:53salamanyhow, this is just a minor inconvenience (some times.) an ideal experience, IMHO, would be: • having a separate checkbox for toggling structural editing/navigation • parinfer by default (with structural editing/navigation off and enabled) for new installation only • if user switches to paredit, turn structural editing/navigation on and leave it disabled • if user switches back to parinfer, turn structural editing/navigation off but leave it enabled for user to toggle it on, if she/he chooses to#2020-04-3003:01cflemingOk, thanks for the thoughtful feedback. I’ll take another look at this and see if I can make that work. I agree that parinfer should be on by default rather than paredit, I’ve been meaning to change that for a long time.#2020-04-2915:25folconHi, sorry if this isn’t the correct place to bring this up, I’m happy to create github issue if that’s a better thing =)… I’ve been speaking with the Jetbrains support about high memory utilisation of intellij and they’ve told me that I should contact cursive after requesting a memory dump and noting that “Looks like it created several big objects in memory.” My memory utilisation intellij is currently recorded as 9792mb by top, intellij’s own memory meter is reading 2161mb, my -xmx is 3072mb, this is a pretty substantive difference. So what should I do?#2020-04-2921:13cflemingDid they give you any indication of which objects?#2020-04-2921:13cflemingDo you have a copy of the memory dump?#2020-04-2921:57cflemingBTW was the memory dump you sent them a text file, or the actual hprof dump?#2020-04-2922:00cflemingAlso, are you using parinfer?#2020-04-2922:04folconHi @U0567Q30W, sorry for not responding sooner, I didn’t see your prior messages. I am using parinfer yes. I sent them the hprof dump zipped which came out of their memory dump function. I have two such dumps, happy to share them if you have some way you prefer to receive them? They didn’t give me any details no.#2020-04-2922:05cflemingOk, no worries. I have some dumps myself which show a potential problem with the parinfer code, and I’m trying to figure out what the dumps mean.#2020-04-2922:05folconTo be clear, I’m not certain that the issue is coming from parinfer, just that I am using it =)…#2020-04-2922:06cflemingActually, it would be interesting to see yours. I don’t have a preference, can you send them via a file-sharing service of some kind?#2020-04-2922:06cflemingSure, I suspect that it might be though 🙂#2020-04-2922:06folconUm sure, give me a moment…#2020-04-2922:06cflemingIf not I can probably receive them via Keybase#2020-04-2922:13folconOh yea, we can use keybase =)…#2020-04-3021:32kennyAnyone know if there’s something like this in IntelliJ? https://twitter.com/dan_abramov/status/1255692247061929991?s=21#2020-04-3021:36Alex Miller (Clojure team)basically looks like tap>#2020-04-3021:42tanzoniteblackor just log/spy?#2020-04-3021:42tanzoniteblackneither are exactly the same, but can be used with similar purpose#2020-04-3021:42tanzoniteblackinteresting though, I'd not seen that before in the chrome devtools#2020-04-3022:01dpsuttonthere's no source code modification at all though. no accidental commits or commit hooks needed#2020-04-3022:04Alex Miller (Clojure team)good point#2020-04-3022:29cflemingIf you’re working with Clojure rather than CLJS you can use the debugger for this - set a breakpoint, set it to not suspend but instead to evaluate and print an expression.#2020-05-0101:37kennyOh cool! This is it!#2020-05-0101:40kennySometimes the suspend is annoying when working in a list and having everything be printed is way nicer.#2020-05-0101:45kennyIntelliJ's is even cooler since it gives you a useful default of "breakpoint hit" message and/or stack trace. Sweet!#2020-04-3022:30cflemingI’m guessing that the Chrome implementation does the same.#2020-05-0100:10dpsuttonare there any vim emulation and cursive users? seems the navigation gets a little awkward when in normal mode.#2020-05-0100:29cflemingThere are, but since I don’t use it I’m not really sure what the state is. There’s some info in the wiki here: https://github.com/cursive-ide/cursive/wiki/IdeaVim-issues and here: https://github.com/cursive-ide/cursive/wiki/Mapping-IdeaVim-actions-to-Cursive-actions#2020-05-0100:30cflemingThat’s a bit out of date actually, looking at it now. As of IntelliJ 2019.3 the action to return from the toolwindow to the editor can be remapped from ESC.#2020-05-0100:34cfleming@U07S8JGF7 Any comments about the wiki sections there? Anything that would be useful to add, or which is no longer relevant?#2020-05-0100:36potetmWell, before I say anything, keep in mind my cursive bindings were hand-set and they’re very different from the defaults and from emacs mode.#2020-05-0100:36potetmafaik https://github.com/cursive-ide/cursive/issues/384 isn’t a problem (and I don’t even recall whether it actually was)#2020-05-0100:37potetmre: https://github.com/cursive-ide/cursive/issues/1249 I mean, yes, technically. But this is completely intuitive for me. I would be a little mad if it weren’t the case.#2020-05-0100:39potetmAnd, yeah, still highly recommend re-training yourself to do ctrl-[.#2020-05-0100:39potetmYeah for the most part, pretty accurate. I can’t think of anything else.#2020-05-0100:40cflemingYeah, I’m not sure whether it would be worthwhile trying to rebind the built-in IdeaVim commands to sexp-aware alternatives, or add new ones.#2020-05-0100:40cflemingIt seems like parinfer is a good solution for that problem, and Shawn is a vimmer I believe.#2020-05-0100:45potetmYeah, I personally hate two-stroke sexpr movement/editing. So I might not be the target audience for that kind of change.#2020-05-0100:46cflemingFair enough. I guess as long as people can configure things how they want them (which is increasingly the case) then I’m happy.#2020-05-0100:33potetm@dpsutton Any issues in particular? I use ideavim and cursive together all the time.#2020-05-0100:34potetmThere is some weirdness, but most of it’s infrequent enough that I chalk it up to fat fingers#2020-05-0100:39dpsuttonfor instance here. the cursor is at the end of the line and the opening paren is highlighted. but if i hit cmd-left i end up at the opening paren at loop#2020-05-0100:40potetmcmd-left ? what vim mode you using??? troll#2020-05-0100:40dpsuttoni don't know the vim command for beginning of defun or backwards-sexp#2020-05-0100:40dpsuttoni'm gently learning cursive and my hands have 6 years of emacs in them#2020-05-0109:30flowthingSomewhat off-topic, but I was wondering what's driving you from Emacs to Cursive? Just asking because I'm currently headed the other way. 🙂#2020-05-0315:04nmkipI'd like to know that too#2020-05-0315:39dpsuttonI'm not sure driving is the right word. I'm incredibly comfortable in emacs and will use it. I have not needed heavy (or really any) java interop so the lack of the power of Intellij with java hasn't been a hindrance. But there's some polish that intellij has which emacs lacks. I'm also kinda drawn to a simpler repl without nrepl and let static tooling drive the code. Seems nice to crank up a very simple repl and then let cursive do all of its autocomplete and documentation and popups. I'm not sure this is grounded in reality however. I know there's lots of stuff going on under the hood for cursive and to get a good cljs experience it seems like its either nrepl based or tubular based which doesn't really remove any complexity. I think maybe my ideal setup would be cursive's smarts and inf-clojure's simpleness of just running a repl with a bit of font-locking#2020-05-0407:25flowthingThanks! Coming from the other direction, what you said definitely resonates. For me, static analysis is Cursive's biggest strength. Java interop, ease of use, and close(r) integration with the operating system are next on the list. What's pushing me toward Emacs is that at least for me, IDEA is prone to slowdowns and UI freezes. Moreover, it seems that they break their APIs quite often, making every IDEA update a somewhat risky proposition for Cursive users. I guess I also just wanted to see whether the grass is greener on the other side. I think static analysis is going to drive me back to Cursive sooner or later, but I think I'll give Emacs at least a couple of weeks before that. I might even write up an experience report on this topic if I get around to it.#2020-05-0100:41dpsuttonso just learning a few movements and basics for now. but the structural movements and vim don't seem to align here. i can't get the cursor far enough such that the structural movement takes be to the beginning#2020-05-0100:43potetmTry %?#2020-05-0100:44potetmAlternatively, you can use Cursive bindings: Navigate -> structural movement -> move backward (or move backward out of sexp)#2020-05-0100:42potetmAh okay. So, generally speaking, cursive and ideavim are two different control sets. You can map vim actions to cursive (see https://github.com/cursive-ide/cursive/wiki/Mapping-IdeaVim-actions-to-Cursive-actions) if you like, but I highly recommend mapping paredit to single keystrokes.#2020-05-0100:45dpsuttonyeah i figured. i need to learn how to get a vimrc or equivalent set up here. but was trying to learn the basics and navigation. i figure for a bit i'll just learn go to's, return from goto, and structural navigation along with the standard vanilla vim movements (already know these just been a while since i've used them)#2020-05-0100:48potetmYeah, I’ve kinda wired my brain so that for code changes, I’m in cursive-mode. (This is most of the time.) If I’m in vim mode, I’ve fallen back to character-bashing mode.#2020-05-0101:29dpsuttonone question. i seem to get this view where there aren't any windows and it seems to be in an invalid state. am i doing something wrong? I just hit open project and end up in this state.#2020-05-0101:47kennyOmg I've had this happen every once in a while too! I think it's from accidentally hitting some key combo that hides all the windows.#2020-05-0107:23salamit seems related to this issue: https://github.com/cursive-ide/cursive/issues/2355#2020-05-0110:28cflemingYes, that one is very strange. I’ve seen that one myself occasionally recently (only under 2020.1, perhaps?) but I’ve never managed to reproduce it reliably.#2020-05-0110:28cfleming@UDCGPTV9R Does that happen always for you?#2020-05-0119:26salamyep, constantly reproducible.#2020-05-0119:29salamit seems like it’s either cursive or intellij idea that’s doing some work that’s not supposed to be on Swing’s event dispatch thread and an assertion on that is blowing everything up (as can be seen in the log attached to the github issue.)#2020-05-0122:08cflemingOk, I’ll look at that, thanks.#2020-05-0101:31dpsuttoni close the window and then open the project again and everything seems to be back to normal#2020-05-0113:59AJ Jaro@cfleming Thanks for all of your work on Cursive, it’s definitely a great tool! This particular issue, however, is really a struggle for my team. Is there a way to help prioritize this task or a way that we can help resolve it? https://github.com/cursive-ide/cursive/issues/2233 We do appreciate the tool you’ve built and want to continue supporting you as best we can. Let us know how we can help.#2020-05-0122:19cflemingI’ll take a look at this and see if I can figure this out.#2020-05-0204:47cflemingOk, this is fixed for the next EAP. It was surprisingly tricky, keywords are complicated things in Cursive these days. But I think this should now be working correctly, hopefully without affecting anything else.#2020-05-0209:52flowthingFantastic to hear that this will be fixed, thank you very much! This feature is a lifesaver when working on a re-frame project. :thumbsup:#2020-05-0415:38AJ JaroWow! Great! Thanks a bunch @cfleming#2020-05-0610:26cflemingThis is out now in 1.9.2-eap2, let me know if it’s not working as you expect!#2020-05-0712:18AJ Jaro@cfleming This is fantastic! Thanks a ton for expediting this fix. I’m about to tell our whole team it’s so exciting!#2020-05-0119:29salamit seems like it’s either cursive or intellij idea that’s doing some work that’s not supposed to be on Swing’s event dispatch thread and an assertion on that is blowing everything up (as can be seen in the log attached to the github issue.)#2020-05-0121:21Ben GrabowSometimes Cursive will give me autocomplete suggestions when I am adding a dependency to my leiningen project. I love when this happens! It means I don't need to lookup the exact maven group, artifact, and id. However usually this autocomplete suggestion thing doesn't work at all, and I can't figure out why it occasionally works and why it doesn't. Seems like maybe at some point I upgraded version and it stopped working? Does anyone else see this?#2020-05-0121:22Ben GrabowI'm on Intellj IDEA Ultimate 2020.1 and Cursive 1.9.2-eap1-2020.1#2020-05-0121:24Ben GrabowI have maven central, clojars, a couple private corporate nexus repos, and my local m2 in my list of Indexed Maven Repositories and they all have been indexed in the last two weeks.#2020-05-0122:18cflemingDoes it fail consistently now on your current version, or is it intermittent?#2020-05-0123:51Ben GrabowConsistently. I don't often restart the whole ide or restart my computer, but I can't remember it working since I upgraded last.#2020-05-0123:52Ben GrabowI also can't remember the last time it did work, so it might not just be this version.#2020-05-0200:11folconI’ve had this happen to me as well =)… I thought that it might be because my repos were out of date, but I just updated them and no luck.#2020-05-0121:29EddieDoes Cursive + deps.edn have an equivalent of SBT's withSources()?#2020-05-0121:30EddieFor the non-scala folks, here is what I am talking about: https://www.scala-sbt.org/0.13.2/docs/Detailed-Topics/Library-Management.html#download-sources Scala devs using SBT can add withSources() to their dependency declarations to download source JARs. Scala IDE plugins use this to allow you to read the source of your dependencies from right within the editor.#2020-05-0121:46Alex Miller (Clojure team)most clojure deps do not publish a sources jar (because the sources are in the main jar, b/c clojure libs usually aren't compiled)#2020-05-0121:53EddieThanks @alexmiller. That makes sense. I am actually hoping to use this for Java and Scala projects that I am using via interop. I can understand that the community might be less interested in supporting this because most deps are Clojure.#2020-05-0121:55Alex Miller (Clojure team)If you walk into a java lib, it will have a thing at the top of the file to download sources#2020-05-0121:55Alex Miller (Clojure team)I do that all the time with java libs#2020-05-0121:55Alex Miller (Clojure team)Although I guess that’s more IntelliJ than Cursive#2020-05-0122:08EddieI can download the sources jar for Scala and walk through the "Choose Sources..." prompt in IntelliJ and works fine. Maybe this is more of a deps.edn thing, but it would be neat if there was a way to declare the download of the sources in deps.edn and then Cursive could detect its existence and use it.#2020-05-0122:09EddieBut that sounds like it might be a lot of work for something that would go relatively under utilized.#2020-05-0122:10cflemingYes, there’s no way to do this in deps itself, or in lein. Unfortunately the only way right now is to walk through the Choose Sources popup.#2020-05-0122:16EddieAlright, thanks!
#2020-05-0201:08davewoanyone know a trick to switch active REPL tabs with a keyboard shortcut?#2020-05-0219:27tekacsAlt+Shift+Left/Right @davewo #2020-05-0219:27tekacsOr if it’s not the same for you, you can go to Keymap in Settings and look for Previous/Next Tab#2020-05-0408:59Jordan RobinsonHey all, since the last update 1.9.1-2020.1, (or maybe due to 2020.1 as they updated at the same time for me) it seems like I can't put breakpoints in certain files. Instead I get the message: Line 15 in foo$eval15927 (bar)  No executable code found at line 15 in class bar.foo$thing  Suspend: all I can still put breakpoints successfully in some files, and hit them, but not others. I'm unsure if this is related to https://github.com/cursive-ide/cursive/issues/2345 or if I'm missing something, so are there any troubleshooting steps I can take on this one? I've already invalidated caches and restarted from intellij but happy to try any ideas#2020-05-0415:44Jordan RobinsonI think I've pinned this one down, it looks like the debugger won't load the code if the namespace contains a _ instead of a -. Obviously this was a mistake in the code, so easily fixable in my case, but not the easiest to pin down 😅#2020-05-0409:26roman01laCould be interesting if Cursive could leverage ClojureScript's type inference to display types inline in the code https://github.com/cursive-ide/cursive/issues/2365#2020-05-0409:35cflemingYes, I’ve planned that for a while for CLJS, but haven’t done anything on it yet. It’s hard to reuse the analysis environment, I’ll probably reuse a fair amount of the code that’s used for the Clojure analysis.#2020-05-0409:36cflemingDoing this right for CLJS required upgrading Cursive’s knowledge of JS in general first though, which will also help node_modules imports etc.#2020-05-0409:38roman01laDo you plan to propagate JS deps info into ClojureScript to improve inspections?#2020-05-0410:54cflemingYes#2020-05-0410:54cflemingAnd JS deps type info, assuming I can get the information out of the Closure parser.#2020-05-0413:59folconHow do people use the debugger? You need to run the repl in debug mode right? Isn’t that really slow?#2020-05-0414:00Alex Miller (Clojure team)no, it's fine#2020-05-0414:04imrejust out of curiosity, Alex, are you a Cursive user yourself? For some reason I was under the impression all of Cognitect use emacs#2020-05-0414:05imreI noticed you are active in this channel#2020-05-0414:14Alex Miller (Clojure team)I use Cursive#2020-05-0414:14Alex Miller (Clojure team)people use a variety of editors at Cognitect#2020-05-0414:22imreCheers, good to know there's someone in the core team walking in our shoes 🙂#2020-05-0416:05folconHmm, I used to have the impression that it was, I’ll have to give that a whirl then, do you tend to do development in a debug repl then?#2020-05-0416:06Alex Miller (Clojure team)sometimes. if I'm not really doing any interop, I don't usually bother because that's really the only time I use the debugger#2020-05-0417:50kennyI asked Colin about this a while ago. He said that he always starts his REPL up in debug mode. I have started doing the same. It's nice to have the debug features readily available without needing to do a REPL restart. The only hiccup I've had is when working with large lazy seqs (and I mean decently large - to the tune of a 20-30gb csv file). Debug mode disables locals clearing which, depending on your code, can cause a lot of memory usage when working with large lazy seqs.#2020-05-0420:47folconHmm, ok, that’s a downside, but it sounds like it’s well worth giving it a shot =)…#2020-05-0421:25kennyUnless you're working with tons of data, you won't have any issues.#2020-05-0502:47cflemingI also find that running a process in debug mode for a really long time can occasionally cause funkiness and slowdowns, but it’s mostly ok. Generally the benefits far outweigh any disadvantages IMO.#2020-05-0605:06cfleminghttps://twitter.com/CursiveIDE/status/1257897066853920776#2020-05-0608:53imreGreat stuff, thank you Colin#2020-05-0612:36imreI checked (just to see if I got lucky) but unfortunately https://github.com/cursive-ide/cursive/issues/2360 is still an issue with this build, hope it isn't something awfully difficult 🤞:skin-tone-3:#2020-05-0620:47cflemingNo, I didn’t get a chance to look at that one, but I’ll take a look for the current EAP series.#2020-05-0704:12cfleming@U08BJGV6E I’ve taken a look at your issue. I can’t reproduce exactly what you report, but there’s definitely something funky going on. The actual exception that you reported via the tracker should be fixed in the latest EAP, but that’s just a symptom of things getting messed up anyway.#2020-05-0710:33imreThanks a million for looking into this, Colin. I did one more check with practically all plugins but Cursive disabled, going through the repro steps. I'm no longer getting the exception but the project is still unusable. Commented this on the gh issue too.#2020-05-0710:34cflemingOk, thanks. I think I have a fix for this but I didn’t get a chance to test it properly, I hopefully will get that done tomorrow.#2020-05-0616:55AJ JaroThis is the first time I’m trying to install an EAP build, so this might be a basic issue. After I added the Cursive EAP plugin repository I saw an update was available for Cursive. When I click update, I receive the message below. Do I need to use a different procedure? Will this only work on a newer version of IntelliJ? IntelliJ Version Info: > IntelliJ IDEA 2019.3.1 (Community Edition) > Build #IC-193.5662.53, built on December 18, 2019 Cursive version info: > 1.9.1-2019.3 → 1.9.2-eap2-2019.3#2020-05-0620:48cflemingThat’s very strange, it looks like an issue with the plugin repo. If you try again does it continue to happen?#2020-05-0712:11AJ Jaro@U0567Q30W Yes, it was consistently happening until I figured out that it was a user error.#2020-05-0712:15AJ JaroBased on the suggestion from @U08BJGV6E I found that the checkbox he mentioned adds this repository (https://plugins.jetbrains.com/plugins/eap/8090). When I copied the link from http://cursive-ide.com it was this one: https://plugins.jetbrains.com/plugins/list?channel=eap&amp;pluginId=8090 because it forwarded from the previously mentioned one… We’re all good now; sorry for the confusion.#2020-05-0616:58imreI'm on the cursive EAP track and this is how I install it: - install idea - install cursive the "normal way" - preferences->languages&frameworks->clojure - scroll down to Update options and tick Check for EAP builds - OK & tell idea to check for updates#2020-05-0701:51nmkipDo you use test.check with cursive?#2020-05-0704:52royalaid@cfleming have you seen "Error handling response - class java.lang.IllegalArgumentException: No matching clause: :state" anywhere?#2020-05-0704:53cflemingAre you seeing that coming out of Cursive somewhere?#2020-05-0704:53royalaidI think?#2020-05-0704:53royalaidhttps://github.com/mhuebert/shadow-re-frame#2020-05-0704:53royalaidis the project I am running#2020-05-0704:54cflemingWhen are you seeing it?#2020-05-0704:54royalaidand I connect up my repl#2020-05-0704:54royalaid#2020-05-0704:55royalaidI have never seen this from the project before#2020-05-0704:55royalaidand I have run it before via cursive#2020-05-0704:55cflemingYeah, that’s coming from Cursive. Which version are you on?#2020-05-0704:55royalaid1.9.2.-eap2-2020.1#2020-05-0704:56royalaidstrangely the repl works fine#2020-05-0704:57cflemingYes, I think I see the problem. That was introduced in the latest EAP fixing https://github.com/cursive-ide/cursive/issues/2100#2020-05-0704:57royalaidI think#2020-05-0704:58cfleminghttps://github.com/cursive-ide/cursive/issues/2368#2020-05-0704:59royalaidRepro is pretty easy#2020-05-0704:59royalaidthanks for the quick response as always#2020-05-0705:00cflemingNo worries - so you basically clone that project, and then connect a remote REPL to 8777?#2020-05-0705:11cfleming@U0S3YK6HK I’ve started that project and connected to the REPL, is there anything in particular you have to do to provoke the problem?#2020-05-0705:11cflemingLooking at your screenshot above looks like not, but I can eval (+ 1 2) with no problem.#2020-05-0705:13cflemingI basically cloned, imported the project, ran npm install then npm run watch, waited for a while then connected the REPL. Did I miss a step there?#2020-05-0705:15royalaidhmmmmm#2020-05-0705:15royalaidno I don't think so#2020-05-0705:15royalaidLet me "reclone"#2020-05-0705:16royalaidand try it fresh again#2020-05-0705:16cflemingThanks#2020-05-0705:17royalaidConnecting remote repl on port 8777?#2020-05-0705:18cflemingYep#2020-05-0705:18royalaidI am using yarn#2020-05-0705:18royalaidbut again in the past that hasn't been a problem#2020-05-0705:18cflemingI doubt it, this is an nREPL thing.#2020-05-0705:20cflemingBasically, nREPL sends back a :status field, and I changed how I handled that in the latest EAP. The previous version had a bug, but I realised that I no longer handle the default case, which is where that error comes from. I’m pretty sure I can fix that but I can’t easily test it if I can’t repro it. But I can make the fix, and then after the next EAP just let me know if it’s fixed.#2020-05-0705:20cflemingAre you using any nREPL middleware in your user profiles?#2020-05-0705:21cflemingI guess not, since this isn’t lein. Any others in your .nrepl.edn file?#2020-05-0705:21royalaiduhhh#2020-05-0705:21cflemingOr whatever that thing is called#2020-05-0705:21royalaidwait#2020-05-0705:21royalaidproject title to confirm this is the new one#2020-05-0705:22royalaidchecking .edn thing now#2020-05-0705:22cflemingYeah, that looks like it to me.#2020-05-0705:22royalaidwell#2020-05-0705:23royalaidso I have a .shadow-cljs#2020-05-0705:23royalaidand that has cider-snapshots#2020-05-0705:23royalaidmoving it and gonna try again#2020-05-0705:24cfleminghttps://nrepl.org/nrepl/0.7.0/usage/server.html#_server_configuration#2020-05-0705:24cflemingMight be ~/.nrepl/nrepl.edn?#2020-05-0705:24royalaid🙌#2020-05-0705:24cflemingOr in a .nrepl.edn file in the project.#2020-05-0705:25royalaidfor ref#2020-05-0705:25cflemingCIDER was the problem all along 🙂#2020-05-0705:25cflemingAhem#2020-05-0705:25royalaid#2020-05-0705:25royalaidcompletely forgot this was even a thing#2020-05-0705:25royalaid:face_palm:#2020-05-0705:25royalaidty as always#2020-05-0705:25cflemingStill, it’s still a Cursive bug#2020-05-0705:26cflemingCan you paste that here and I’ll use it to repro?#2020-05-0705:26royalaid
{:dependencies
 [[cider/cider-nrepl "0.23.0-SNAPSHOT"]
  [refactor-nrepl "2.5.0-SNAPSHOT"]]}
#2020-05-0705:26royalaidhopefully that triggers it for you 😬#2020-05-0705:26cflemingCIDER always triggers me#2020-05-0705:31cflemingBoom#2020-05-0705:32cflemingThat was it. I had to add the deps manually to the project, for some reason.#2020-05-0705:33cflemingOk, fixed, thanks!#2020-05-0705:33royalaidGlad to help! Thanks for the quick turnaround#2020-05-0716:42Joshua EwuloDear all, I am new to Clojure. I am using Cursive on IntelliJ. I can Build my project but when I try to run it I get this error. Error running 'test (1)': failed to access class com.intellij.execution.impl.ProcessStreamsSynchronizer from class com.intellij.execution.impl.ConsoleViewRunningState (com.intellij.execution.impl.ProcessStreamsSynchronizer is in unnamed module of loader com.intellij.util.lang.UrlClassLoader @7f9a81e8; com.intellij.execution.impl.ConsoleViewRunningState is in unnamed module of loader http://com.intellij.ide.plugins.cl.PluginClassLoader @7b0d6c9c). Does anybody understand what I am doing wrong?#2020-05-0719:56thumbnailA coworker hit the exact same issue today, IIRC he deleted the .idea/-folder in the project he was working in, reimport and stuff started working properly#2020-05-0720:10salamthis appears to be this issue: https://github.com/cursive-ide/cursive/issues/2350 which was fixed in 1.9.2-eap1: https://github.com/cursive-ide/cursive/milestone/156?closed=1#2020-05-0717:59dazldis adding a dependency to deps edn broken atm? IntelliJ ultimate, 2020.1, cursive 1.9.2-eap2-2020.1#2020-05-0717:59dazldhave done the usual invalidate cache dance#2020-05-0723:42cflemingI’m not sure, I’ll check that.#2020-05-0720:01salamit appears that the abbreviation and the description in the live template for clojure.test/is got swapped up.#2020-05-0720:14salamas part of this fix, it would be very helpful to rename first to expected and second to actual as people often get confused by which goes where when they switching among different test libraries.#2020-05-0723:43cflemingTrue, although I think I deliberately didn’t do that in this case because clojure.test doesn’t distinguish between them.#2020-05-0800:06salamah, you're right. i just dived into the code and realized that clojure.test has very different definitions for expected and actual.#2020-05-0807:47tekacsPutting a request in for this issue: https://github.com/cursive-ide/cursive/issues/1079 For multimethods (here being used in React's useReducer), being able to see the dispatch value would be incredibly valuable in a default-folded workflow.#2020-05-1102:37cflemingYes, I need to add some customisation to how different forms are folded (https://github.com/cursive-ide/cursive/issues/2042)#2020-05-1102:41cflemingThere was also a request to show the docstrings of folded defns, but I can’t find an issue for that at the moment.#2020-05-0813:17joshkhi've noticed that map destructured values in lets don't align with the rest:
(let [something-really-long-here :value
      shorter                    :another-value
      {:keys [x]} {:x 1} ; not aligned
      {x :x} {:x 1} ; not aligned
      ])
is this by design? i'm on cursive 1.9.2-eap2-2019.3
#2020-05-1102:42cflemingSee https://github.com/cursive-ide/cursive/issues/949, there’s some discussion there.#2020-05-0815:03ikitommiWhat is a good place in a project to have shadow-cljs write the zillions of js-files in development so that IDEA doesn’t constantly re-index them? The directory can be marked as excluded, but that’s an extra manual step per project. Also, the search is really full of unwanted stuff.#2020-05-0815:24ikitommialso clj-kondo files (generated by file-watcher) also cause this. Excluding more directorys manually.#2020-05-0815:38dazldI add those directories to my global gitignore - and use the ignore plugin.#2020-05-0815:38dazld.cpcache, target,`.shadow-cljs` etc#2020-05-0819:56ikitommithanks, just what I wanted.#2020-05-0909:14ikitommi@dazld found .ignore plugin, but it does not exclude the directories in the sense how mark exluded works. Files still appear on the seach file & indexing.#2020-05-0911:05dazldsorry, i must have done something else then#2020-05-0911:05dazldthought it was that!#2020-05-1102:43cflemingSorry, this is annoying, I know, and there isn’t a very good workaround (apart from manually excluding) until I add shadow as a recognised build type.#2020-05-1105:40ikitommithanks! same applies to deps .cpcache and clj-kondo .clj-kondo, most likely there are (and will be) others. Could there be a cursive-level option to exclude dirs? or should I write a custom plugin (no time, but would solve this) to have global excludes?#2020-05-1105:49cflemingI think having a list of “always exclude these dirs if they exist” probably makes sense.#2020-05-1105:49ikitommi👍#2020-05-0815:17KamuelaI'm trying to setup IntelliJ with cursive and I'm getting this from a CLJS project using Shadow, lots of "cannot be resolved"#2020-05-0815:36kennyIs clojurescript on your classpath?#2020-05-0816:27TrevorThat always trips me up to. You do need to include clojurescript as a dependency. Here's an example project.clj
(defproject app "0.0.0"
  :dependencies
  [
   [thheller/shadow-cljs "2.8.83"]
   [org.clojure/clojure "1.10.0"]
   [org.clojure/clojurescript "1.10.597"]
   [binaryage/devtools "0.9.7"]
   [reagent "0.8.0-alpha2"]
   ]

  :source-paths
  ["src"])
#2020-05-0816:27TrevorNotice that both clojure and clojurescript are in there.#2020-05-0911:19KamuelaI actually only have a single shadow-cljs.edn, can this be managed there?#2020-05-1004:54Cris BI've only just started looking into this myself, but it appears not: https://shadow-cljs.github.io/docs/UsersGuide.html#_cursive#2020-05-1102:44cflemingThat’s correct, Shadow projects need to be set up per the doc over there for the moment.#2020-05-0819:48Sanghyun Lee#2020-05-1102:45cflemingNot right now, sorry, although it’s planned.#2020-05-0822:07teodorluPossibly ignorant question: Does Cursive support Intellij 2020.1? I'm having trouble finding the plugin in the marketplace.#2020-05-0822:09teodorluI updated IntelliJ, and was able to install Cursive. ✔️ Never mind!#2020-05-0909:14ikitommi@dazld found .ignore plugin, but it does not exclude the directories in the sense how mark exluded works. Files still appear on the seach file & indexing.#2020-05-0917:37dpsuttoni imported the tools.deps.alpha project as a deps project. is there a way to reimport/reopen it as a maven project?#2020-05-1105:48cflemingYes, you should be able to just close the project, and then either File-&gt;Open… or “Open or Import” from the Welcome Page and select the pom.xml#2020-05-1004:47tekacs@c-fleming (hyphen in the name so as not to notify when you're offline): Thank you so much for fixing 'Find Usages' for namespaced keywords! It's a huge boon to have it working again! 🙂#2020-05-1102:45cflemingNo problem, glad it’s helping!#2020-05-1110:38mhuebertany ideas as to what can cause this assoc to not resolve to cljs.core/assoc for indentation purposes? indentation cannot be configured in any way - it will create an entry for example.core/assoc in Project.xml but still will not format the form according to any setting (not example.core/assoc nor cljs.core/assoc)#2020-05-1110:38mhuebertif I jump-to-source, it shows options for cljs.core#2020-05-1111:09cfleming@U050RLRRQ I think the problem is that that assoc is actually resolving to two places, but both in the cljs.core namespace. It looks like your viz dep actually contains cljs.core.#2020-05-1111:16cflemingThe indentation behaviour is clearly funky despite that, but I think that’s the problem.#2020-05-1111:16mhuebert@U0567Q30W thanks, that was the issue.#2020-05-1111:16mhuebertappears they shipped their resources/public dir with the whole compile result#2020-05-1111:16cflemingGreat. Tomorrow I’ll fix the indentation weirdness (it shouldn’t matter that it resolves to two places if the FQN is the same)#2020-05-1111:17mhuebertsounds great#2020-05-1111:25thhellerfor extra fun effect there are some libraries that contain multiple versions of cljs.core, not just one 😛#2020-05-1111:25thhellereg. https://clojars.org/markdown-to-hiccup#2020-05-1111:27thhellerclasspath indexing definitely reveals quite a few unclean packages#2020-05-1111:30thhellerthats the new logic I added, maybe cursive should do something along those lines too#2020-05-1111:30thhellerhttps://github.com/thheller/shadow-cljs/blob/master/src/main/shadow/build/classpath.clj#L604#2020-05-1111:31thhellerie. detect a */cljs/core.js file and remove the entire dir that is in if found#2020-05-1111:31thhellerseems to work for most bad jars I have encountered#2020-05-1121:49cflemingThat’s… freaky. Is that mostly misconfigured builds producing those jars? i.e. it’s not intentional for any reason?#2020-05-1122:03thhellera lot of people use resources/ as the output directory so yeah all sorts of crap is accidentally included. can't think of a reason why anyone would want to include a pre-compiled cljs/core.js since nothing will ever use it#2020-05-1122:04thhellerexcept maybe cljs itself of course but thats why I'm looking for */cljs/core.js not cljs/core.js or cljs/core.cljs at the root#2020-05-1122:09cflemingYeah, in this case I suspect that core.cljc was accidentally included since Cursive wouldn’t index cljs/core.js.#2020-05-1122:11thhelleryeah, normal CLJS output always contains something/cljs/core.js in the same dir as something/cljs/core.cljs#2020-05-1122:13thhellerbut there is at least one legit case where /cljs/core.cljs is legit and not accidental, ie. cljs-bean.from.cljs.core#2020-05-1122:13thhellerso can't look for cljs/core.cljs to identify "bad" output#2020-05-1122:14thhellerjust using the */cljs/core.js as an identifier to detect bad directories and quarantine everything in that dir#2020-05-1123:06cflemingOk, thanks - that does sound like something I could check with Cursive and warn about.#2020-05-1113:15Jay ChamberlinHow can I re-configure the indentation for a custom macro after it has been configured once? I'm not getting the option in the alt+enter menu anymore and I don't see it in Settings->Editor->Code Style->Clojure under Form Parameters for the project#2020-05-1123:45folconIs anyone else experiencing an issue using deps.edn where cursive repeatedly keeps losing track of the test folder? I keep having to mark my test sources root…#2020-05-1123:48cflemingWhich Cursive version are you using? I changed this recently (actually, a while ago now, I think) so that it should remember folders that you’ve marked as tests. It will also automatically mark test roots from any :extra-paths in the test alias.#2020-05-1200:15folcon1 sec, just checking: 1.9.2-eap2-2020.1#2020-05-1200:18folconbtw, that memory prob is resurfacing, I think there’s some relation with number of repls started/stopped over time?#2020-05-1200:24cflemingOk, you should definitely have that fix.#2020-05-1200:24cflemingSorry, I haven’t had a chance to look at the memory thing, I’ll try to do that soon.#2020-05-1200:29folconThat’s fine, I’m managing 😃#2020-05-1209:49indyI can’t connect to a REPL running in a remote server when port forwarding it to a localhost port. Does anyone else face this issue?#2020-05-1211:11indyWorks fine in cider#2020-05-1301:06cflemingI can’t think of any reason that shouldn’t work. What happens when you try this?#2020-05-2108:45indy@U0567Q30W I get the following error
Connecting to remote Socket REPL...
EOF while trying to sync input stream.
Disconnected from remote server.
Exception while trying to sync input stream: .SocketException: Socket closed
#2020-05-2108:47indyIf I chose nREPL instead of socket repl it is always stuck with this
Connecting to remote nREPL server...
#2020-05-1213:58kennyI never really use clojure.repl/doc since Cursive has the great built-in quick doc functionality. I did recently learn that clojure.repl/doc shows the function's :args and :ret as defined by a fdef. It would be awesome if Cursive could do the same! Here's an example output of clojure.repl/doc :
(clojure.repl/doc my-add)
-------------------------
user/my-add
([x y])
  Adds x and y together, returning the sum.
Spec
  args: (cat :x int? :y int?)
  ret: int?
#2020-05-1213:58kennyFunction's source:
(defn my-add
  "Adds x and y together, returning the sum."
  [x y]
  )

(s/fdef my-add
  :args (s/cat :x int? :y int?)
  :ret int?)
#2020-05-1215:09danzurawskiHello 🙂 Has anyone tried using Cursive for remote debugging (e.g. via nREPL host/port)? It seems that selecting nREPL effectively disabled/greys out the debug option in . This is for a Dockerised environment I am currently running. Alternatively, I tried using the standard (non REPL) remote debugger on a Java debugger port - the breakpoints seem to work, however, sometimes variables show as null. My understanding is that in order to have the debugger working well, you have to connect to the REPL debugger or is connecting to standard agentlib debugger port (Remote Debug) the same?#2020-05-1215:33danzurawskihttps://groups.google.com/forum/#!msg/cursive/iTri7vvXViA/veDAU6qlDAAJ So e.g. in this user group thread, Colin suggested connecting to 5005 using a standard Remote Debug - so is there any difference between the two in terms of debugger capabilities?#2020-05-1301:09cflemingThat’s actually not my message, the previous one: https://groups.google.com/d/msg/cursive/iTri7vvXViA/SZkyw6GlDAAJ is from me, and explains how to actually make the connection. 5 years on, I should have this properly documented by now.#2020-05-1301:10cflemingBut the critical bit to understand is that the debugger and the REPL are totally separate and use separate connections. The REPL does the evaluation part, and then debugger does the debugging bit.#2020-05-1308:11danzurawski@U0567Q30W Thank you for responding! I am very impressed with the plugin, it's got much better since I used it last time a few years back and I was able to make it all work with the debugger via socket attach as per your post. So do you think it's safe to say that as far as debugging 'working' is concerned, it should work as good as when started via 'Debug "REPL"'"? I assume so, as you said the debugging and repl are totally separate. That would mean I can safely argue that you can wholly run a dev Clojure inside docker and not lose any debugging capabilities 😊#2020-05-1309:04cflemingThanks for the kind words, I’m glad Cursive works well for you! Yes, that’s right, the debugger is totally equivalent when run remotely and when starting the process explicitly.#2020-05-1215:22borisIs there any way to have Cursive format code according to bbatsov’s clojure-style-guide? Specifically, adhering to its https://github.com/bbatsov/clojure-style-guide#body-indentation vs https://github.com/bbatsov/clojure-style-guide#one-space-indent indentation rule where it suggests having only a single space indent when there are no arguments on the same line as the function, but a 2-space indent when dealing with bodies of forms that have body paramaters?#2020-05-1301:11cflemingThat’s at Preferences | Editor | Code Style | Clojure | General | One space list indent#2020-05-1301:11cflemingThat one is contentious, and I maintain that it’s a bad idea propagated by emacs, but that might just be me.#2020-05-1301:15cflemingSee: https://github.com/bbatsov/clojure-style-guide/issues/126#2020-05-1314:48borisIt’s definitely not just you! I think the Cursive defaults are much nicer than what this styleguide suggests. I’m just trying to play well with the team if we stick to this guide.#2020-05-1321:54cflemingSure, hopefully all the options should be there to match e.g. Emacs. If you find you’re missing something, let me know.#2020-05-1409:22roklenarcicthe rule is not even automatically enforcible… plenty of macros have 2 space identation, but not all#2020-05-1215:53dvingoanyone know how to type the diagonal arrows (on mac)?#2020-05-1216:29dazldhave to buy a full size keyboard! 🙂#2020-05-1217:14dvingoshould have just searched for it 🙂 https://apple.stackexchange.com/questions/122514/how-do-i-do-a-diagonal-arrow-keyboard-shortcut#2020-05-1311:24reefersleepWhen I am developing my work project, I’m using both a cljs REPL and a CLJ repl. I was wondering if I could start both with one run configuration. Before launch: Another Configuration only ever seems to run the “Before” part, that is, the first repl. Is there a different way to do this?#2020-05-1321:55cflemingUnfortunately, I don’t think there is at the moment, no. I wasn’t aware of the Before launch option, I’ll test that and see if I can make that work.#2020-05-1412:35reefersleepCool @U0567Q30W! Thanks for Cursive btw, awesome product 🙂#2020-05-1504:57cfleminghttps://twitter.com/CursiveIDE/status/1261157602928373761#2020-05-1509:16roklenarcicI have a project where all the namespaces are loaded on REPL start and it’s getting quite long, to the point of REPL client in IntelliJ giving up saying it didn’t receive a nREPL ack. Is there a way to make that timer longer?#2020-05-1511:53cflemingYes, Preferences | Languages &amp; Frameworks | Clojure | REPL options | REPL startup timeout#2020-05-1509:35roman01la@cfleming Is Cursive able to warn on duplicate values in set literal?#2020-05-1511:55cflemingYes, it’s possible, at least for statically visible cases (i.e. not #{1 2 (+ 1 1) 3}), the same for map keys.#2020-05-1511:55cflemingThe error when executing the code is pretty immediate and obvious so I’ve never got around to it, but it should be a warning, yes.#2020-05-1610:14roman01laI'll create a feature request issue for that on GitHub#2020-05-1610:16roman01ladone https://github.com/cursive-ide/cursive/issues/2372#2020-05-1509:35roman01lafor example #{1 2 4 4}#2020-05-1514:35kennyThe other one that would be nice, and in that same realm, is duplicate map keys.
{::a 1
 ::a 2}
These are caught almost instantly when you actually read load the file in the repl. Still nice to have that static feedback for the times when you don't have a repl open.
#2020-05-1515:00kenny@cfleming I updated to the latest Cursive release. I think there's a memory leak. IntelliJ will soar up to 8gb of memory after 30 mins or so.#2020-05-1515:02kennyI started the IDE, updated Cursive, wrote 1 line of code and have been reading since then. Went back to IntelliJ and the IDE shows a "Low Memory" message and is using 8.9gb of memory, as per system monitor. IntelliJ's memory bar shows less but guessing it's missing something.#2020-05-1519:31manutter51I just updated too, right after I read your post, and I’m not seeing any unusually memory consumption. MacOS Mojave, IntelliJ IDEA 2020.1. FWIW.#2020-05-1519:35kennyI’m on 2020.1 on PopOS. Downgrading Cursive to the last stable release fixes it. #2020-05-1519:37kennyWonder what if that analyze memory usage link would help#2020-05-1521:15folconIt might =)… I have a few memory issues where the ram consumption grows slowly and Colin was interested in the dumps, so might be worth holding onto them until he says otherwise?#2020-05-1521:50cfleming@U083D6HK9 Yes, please click that link and send the result to me - it’ll produce a text report.#2020-05-1521:53kennyUpdating and trying again. It's climbing up. Just need to wait 🙂#2020-05-1521:54kennyGuess I could've started the ide with less memory...#2020-05-1521:55kennyIt's also using a ton of cpu. With the latest Cursive it's idling around 15%#2020-05-1519:47Patryk WilsonHi, I'm trying to do simple addition at the REPL using (+ 40 3) and I keep on getting a syntax error that's pointing me to a file called form-init18086366295139673654.clj in my Local/Temp directory. Kind of confused on what I should do here to fix this#2020-05-1519:53Alex Miller (Clojure team)I think you're seeing some stuff that wraps expressions before evaluating them#2020-05-1519:53Alex Miller (Clojure team)can't say I know how to fix it though#2020-05-1519:56dpsuttoni can recreate that somewhat if i try to evaluate a form in a bad ns
Clojure 1.10.1
user=> (in-ns 'namespace)
#object[clojure.lang.Namespace 0x6aa3a905 "namespace"]
namespace=> (+ 1 1)
Syntax error compiling at (REPL:1:1).
Unable to resolve symbol: + in this context
namespace=>
#2020-05-1519:56dpsuttoni don't have cursive on this computer but that is one way to get syntax errors on otherwise correct forms#2020-05-1519:57dpsuttoncommand shift-N sets the repl namespace and perhaps this was done before loading/requiring?#2020-05-1520:03Patryk WilsonI was changing the namespace to where the addition was located for some reason. I have another question. When I have a namespace that contains my code, do I have to highlight it to send the code the the REPL or is there an easier way to run my code without having to do this everytime#2020-05-1520:04Alex Miller (Clojure team)no, there are key bindings to send the expression prior to the cursor or the top level expression you're in#2020-05-1520:05Patryk WilsonOk thank you that helps a lot more#2020-05-1520:05Alex Miller (Clojure team)"Send form before caret to REPL" or "Send top form to REPL"#2020-05-1521:00markaddlemanCarrying on the "wouldn't it be nice" theme from earlier today: I'd like in-editor feedback when sending anything to the repl results in a compilation error. I often keep the repl output window hidden only opening it after send forms there as I test from comment blocks in the editor. My workflow is write code, then load files in REPL, then evaluate a comment block, then open REPL to review result. If the "load files in REPL" results in a compilation error AND the evaluate comment block is large enough to cause the compilation error to scroll off the top, I am left puzzling why my output doesn't change.#2020-05-1521:20folconI used to do that, but have slowly switched to editing/running smaller forms with the namespace I’m working in being currently loaded in the repl =)… It’s really useful to take a form that’s in the editor, stick it in a comment block and tinker with it. I try not to have a form larger than a few lines at a time… I do agree that in editor feedback would be interesting though.#2020-05-1521:56cflemingYes, in recent versions (2019.3+) IntelliJ has much better functionality for in-editor results and feedback which I’m planning to integrate.#2020-05-1600:06markaddlemanI thought it would be asking too much to have REPL evaluation results displayed inline in the editor 🙂#2020-05-1601:21cflemingHopefully not before too long 🙂#2020-05-1619:07Adrian SmithI'm un-reasonably excited about this feature 😄#2020-05-1602:39dpsuttoncursive doesn't seem to have a default "send '<form>' to repl" shortcut. anyone have a good one or a previous default? still new so don't want to clobber common cursive/intellij keybindings i haven't learned yet#2020-05-1604:19cflemingWhich keymap are you using? Both “Send form before caret to REPL” and “Send top form to REPL” should have bindings I think.#2020-05-1604:53dpsuttonhow would i find out?#2020-05-1604:53dpsutton#2020-05-1604:54dpsuttonnot sure if osx is the answer to which keymap or if there's something more technical#2020-05-1606:41salamhere is a screenshot of my customized keymap for cursive actions on macOS: repl actions:#2020-05-1610:18simongrayI bound "send form to REPL" to a force touch. This flows really well with how I work (all laptop, single screen, lots of touchpad gesture use). Just position the cursor and press a little harder than usual and stuff gets evaluated in the REPL. Obviously doesn't work if you don't have/use a force touchpad.#2020-05-1611:16TemsanI've installed latest version of IntelliJ + Cursive, and found out that parinfer/paredit mode has disappeared from the right bottom corner 😅#2020-05-1611:16Temsan#2020-05-1612:58Adrian SmithWeird, what happens if you press shift shift then type toggle structural editing style?#2020-05-1613:14simongrayJust confirming that it seems to be gone here too (macOS version).#2020-05-1614:00Temsanhttps://clojurians.slack.com/archives/C0744GXCJ/p1589633882489400?thread_ts=1589627811.488700&amp;cid=C0744GXCJ wow, thanks! Only had to click two times on toggle structural editing (first click - Structural editing off, second click - Parinfer mode on )#2020-05-1617:33salamthis was reported and fixed here: https://github.com/cursive-ide/cursive/issues/2349#2020-05-1623:51cflemingYes, this should hopefully be in a stable build soon.#2020-05-1715:29dpsuttonis there a way to reflow docstrings? i'm looking but not finding a way to get cursive to word wrap the docstring of a function#2020-05-1801:49cflemingEdit-&gt;Fill paragraph#2020-05-1802:34dpsuttonthank you so much!#2020-05-1718:03dvingoI have a macro that generates multiple def expressions, when using one of those generated vars is it possible to tell cursive to jump to the macro call site?#2020-05-1823:04cflemingUnfortunately there isn't a good way to do this right now for multiple def expressions from a single form.#2020-05-1914:16dvingoall good, thanks for letting me know#2020-05-1814:04alex-dixonAnyone able to open the diff for failed tests in the IntelliJ diff viewer? I’m on 1.9.2-eap3-2020.1.#2020-05-1819:58thumbnailWorks here, note that it only shows for (is (= … )) constructions#2020-05-1817:34dvingois there a way to add a keyboard shortcut for toggling a form comment? (abcd) -> #_(abcd)#2020-05-1902:39cflemingThere isn't at the moment, no. There's an old issue about this: https://github.com/cursive-ide/cursive/issues/1047#2020-05-1910:52imreAnd an even older one at https://github.com/cursive-ide/cursive/issues/32#2020-05-1914:16dvingothanks, I'll just deal with typing the 2 chars 🙂#2020-05-1914:19imreI previously had an intellij snippet for it but it didn't work properly for some reason.#2020-05-1916:15denik@cfleming looks like cursive doesn't infer arity from arglists? Could also be a CLJC / reader conditionals problem#2020-05-1916:16denikdefinition#2020-05-1916:41Alex Miller (Clojure team)Am I misreading or does that arglist not match the actual function?#2020-05-1916:47denikIt has arities for both lists in arglists, being the 1st and 3rd. The others can be but are not meant to be used.#2020-05-1922:52cflemingCursive doesn't take that information from :arglists, no, because that information isn't very reliable and has no defined format (see e.g. defn)#2020-05-1922:53cflemingIs your callsite there where you're seeing the error cljc?#2020-05-2000:20denikyes#2020-05-2000:21denikthinking about it, it might be correct. I'm calling it from a cljc file and clojurescript is missing this arity#2020-05-2000:22denikOk, I just converted the file to .clj#2020-05-2000:22denikthe same error persists#2020-05-2000:24denikonly arity 4 and 5 (the ones outside reader conditionals) work#2020-05-1920:59JurkoHi. I have a problem with formatting threading macros. https://github.com/clojure-emacs/clojure-mode/issues/265#issuecomment-66925038 many years ago #cursive said I could configured it, but I can't find how. Could someone help me with this setting?#2020-05-1922:58cflemingHi, that's documented here: https://cursive-ide.com/userguide/formatting.html#code-style-settings#2020-05-2710:56JurkoThis not answering my question, unfortunately.#2020-05-2710:58JurkoI want make Cursive format t-macros like that
(-> first
    second
    third)
but it does other way with "2 spaces".
#2020-05-2711:14cflemingYou can do that by configuring the -> form to have an indent of 0.#2020-05-2711:14JurkoWhat I'm doing wrong?#2020-05-2711:18cflemingYour problem is that your project isn't resolving correctly. Your ns form is saying "ns cannot be resolved", right?#2020-05-2711:18cflemingHow did you create this project?#2020-05-2711:26JurkoFile -> New -> project -> Clojure -> Clojure Script Deps.#2020-05-2711:27cflemingIs this file under a source root? A blue or green folder in the project view?#2020-05-2711:31cflemingIf you open the deps toolwindow, do you see your project there?#2020-05-2711:45Jurkook, i found the problem. I did some how turn of Indentation in settings.#2020-05-2711:46Jurko@cfleming Thank you for help!#2020-05-2711:52cflemingNo problem! I'm glad it's working.#2020-05-1923:03tanzoniteblack@cfleming both a colleague and I, while working on the same multi-module deps project, have had intellij complain about low memory issues while running cursive 1.9.2-eap3-2020.1.#2020-05-1923:06cflemingYes, that's https://github.com/cursive-ide/cursive/issues/2371. I have a fix and a new EAP should be out today.#2020-05-1923:06tanzoniteblackthanks#2020-05-2005:11cflemingThis is out now in eap4.#2020-05-2019:49tanzoniteblackthanks#2020-05-1923:04tanzoniteblackI'm running with 16 GB of heap allotted to intellij and didn't have any issues on the previous eap or the latest stable#2020-05-1923:04tanzoniteblack(I had to disable EAP's and downgrade to be able to work again)#2020-05-1923:05tanzoniteblackboth he and I saw intellij say "Synchronizing clojure deps project" shortly before the ide started freezing up#2020-05-2000:32marciolHi @cfleming I’m experienced this error in both versions of Intellij CE: 2019.3.5 and 2020.1.1
Error handling response - class java.lang.ClassCastException: class clojure.lang.Keyword cannot be cast to class clojure.lang.IPersistentSet (clojure.lang.Keyword and clojure.lang.IPersistentSet are in unnamed module of loader .PluginClassLoader @5819ad41)
I’m using the last version of Cursive. Any way to circumvent this
#2020-05-2002:07cflemingDo you get a full stacktrace for that in the log? Help | Show log in Finder/Explorer#2020-05-2023:02marciol@cfleming sorry for the late reply:
java.lang.Throwable: Error handling nREPL response
java.lang.ClassCastException: class clojure.lang.Keyword cannot be cast to class clojure.lang.IPersistentSet (clojure.lang.Keyword and clojure.lang.IPersistentSet are in unnamed module of loader .PluginClassLoader @18512ddd)
 at clojure.core$disj.invokeStatic (core.clj:1525)
    clojure.core$disj.invokeStatic (core.clj:1528)
    clojure.core$disj.doInvoke (core.clj:1518)
    clojure.lang.RestFn.invoke (RestFn.java:442)
    cursive.repl.nrepl$handler.invokeStatic (nrepl.clj:104)
    cursive.repl.nrepl$handler.invoke (nrepl.clj:61)
    cursive.repl.nrepl$start$reify__12142$fn__12150.invoke (nrepl.clj:138)
    cursive.repl.nrepl$start$reify__12142.run (nrepl.clj:137)
    com.intellij.openapi.application.impl.ApplicationImpl$1.run (ApplicationImpl.java:238)
    java.util.concurrent.Executors$RunnableAdapter.call (Executors.java:515)
    java.util.concurrent.FutureTask.run (FutureTask.java:264)
    java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1128)
    java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:628)
    java.lang.Thread.run (Thread.java:834)

	at com.intellij.openapi.diagnostic.Logger.error(Logger.java:145)
	at cursive.logging$do_error.invokeStatic(logging.clj:60)
	at cursive.logging$do_error.invoke(logging.clj:59)
	at cursive.logging$do_log.invokeStatic(logging.clj:45)
	at cursive.logging$do_log.doInvoke(logging.clj:38)
	at clojure.lang.RestFn.invoke(RestFn.java:464)
	at cursive.repl.nrepl$start$reify__12142$fn__12150.invoke(nrepl.clj:141)
	at cursive.repl.nrepl$start$reify__12142.run(nrepl.clj:137)
	at com.intellij.openapi.application.impl.ApplicationImpl$1.run(ApplicationImpl.java:238)
	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
	at java.base/java.lang.Thread.run(Thread.java:834)
#2020-05-2023:30cflemingHmm, yes, thanks - I see what's going on there. I'll fix that for the next build.#2020-05-2023:55cfleminghttps://github.com/cursive-ide/cursive/issues/2374#2020-05-2100:53marciolnice @cfleming, thank you#2020-05-2005:11cfleminghttps://twitter.com/CursiveIDE/status/1262972549203292160#2020-05-2016:24Wilson Velezare there any differences between the license types?#2020-05-2017:57salamno#2020-05-2021:12cflemingNo, there aren't. The only differences are in the licence conditions.#2020-05-2016:25Wilson Veleztalking about functionality#2020-05-2107:06helioswhen using deps.edn, is there a way to have cursive automatically switch to a specific namespace (and load it) for the REPL?#2020-05-2200:12kennyShould protocols extended via metadata be counted as a usage of a protocol? It currently does not but seems like it should. In the below, IFoo is marked as an unused global declaration.
(defprotocol IFoo
  :extend-via-metadata true
  (-do-foo []))

(defn new-foo
  []
  (with-meta {}
             {`-do-foo (fn [])}))
#2020-05-2200:34cflemingProbably yes, although all the protocol inheritance/usage stuff is half-baked in Cursive ATM. Could you file an issue for that and I'll fix that when I fix the rest?#2020-05-2200:35kennyhttps://github.com/cursive-ide/cursive/issues/2376#2020-05-2201:01cflemingThanks!#2020-05-2206:39dpsuttonI'm making an app that has a deps.edn server and shadow-cljs frontend using cursive. cursive seems content on the deps.edn. I'm trying to follow the recommendations for shadow to generate a pom. But i'm not sure how to make cursive aware of the two different project roots. It says to import the project as a pom but i already have it open as a deps.edn project. Is it possible for these two different project styles to live side by side in cursive?#2020-05-2206:57dpsuttonit seems can right click and import as a maven project. sorry for the noise 🙂#2020-05-2309:00cflemingYes, you can either do this or File | New | Module from existing sources. What you're doing is adding a new module to the existing project, so either will work.#2020-05-2408:18tengstrand@cfleming When I stop at a breakpoint, I can evaluate constants like 123, but I can't evaluate variables or expressions with variables. It's like they are invisible to the evaluator. I have a list of variables in IDEA, but they can't be evaluated. I run IntelliJ IDEA 2019.3.4 Community edition, Cursive 1.9.1.2019.3. I have tried both JDK 1.8.0_241 and JDK 11.0.6 but nothing works.#2020-05-2409:36cflemingThat looks like https://github.com/cursive-ide/cursive/issues/2345, which is fixed in the latest EAP series but hasn't made it into a stable build yet. I hope that will be soon.#2020-05-2414:19p-himikCan you share how the "Interrupt Current Evaluation" is implemented?#2020-05-2421:44cflemingSure, currently this only works for nREPL, and it just sends the nREPL interrupt op. On the server side, nREPL starts a new thread for each eval, and uses Thread.stop() to kill them.#2020-05-2507:23p-himikThanks! I was overoptimistically hoping for some solution that didn't involve Thread.stop(). :)#2020-05-2509:50cflemingThe problem is that there is no general solution that doesn't use that.#2020-05-2509:52cflemingI've seen a lot of complaints about its use, and lots of dire warnings, but the simple fact is that there's no alternative except not allowing interrupts at all (or just interrupting the thread, which will not work for runaway evaluations). The main issue with Thread.stop() is that it will leave dangling object monitors, but that's not really an issue for a lot of dev use cases, and I'm sure no-one is REPLing into prod.#2020-05-2509:59p-himikYeah, I wasn't complaining. I was just hoping there was some other mechanism that I didn't know about.#2020-05-2510:36cflemingNo, sadly there is no magic :)#2020-05-2508:48jacklombardIs there a shortcut for convolute-sexp ?#2020-05-2509:50cflemingNo, there's no shortcut for it due to the simple fact that Cursive doesn't implement it :)#2020-05-2512:12jacklombardIt is trivial to search whether there is a shortcut for it. Thought it was understood that I was asking why Cursvie doesn't implement it? 🙂#2020-05-2522:22cflemingMostly, because no-one has ever asked for it, and IIRC back in the day I couldn't find a good explanation of how it should actually work.#2020-05-2606:02jacklombardFound this https://github.com/cursive-ide/cursive/issues/809 and http://clojure-log.n01se.net/date/2014-09-14.html but yeah if you think it doesn't demand much priority now, then alright. But it is a very useful shortcut which one can employ often once they understand what it does.#2020-05-2606:05jacklombardExample, if I want to move the let outside the testing while keeping the internal block the same, I can invoke convolute-sexp from the caret position:
(testing "I am a test"
  (let [some-var 10]<caret>
    (is (= some-var 10))))
#2020-05-2606:06jacklombard
(let [some-var 10]
  (testing "I am a test"
    (is (= some-var 10))))
#2020-05-2715:13imreI just came across a situation where this could be useful#2020-05-2518:08Walt StoneburnerEvery once in a while, I get an Event Log message that looks like this: "Error running 'REPL for projectname': Deferred parameters have not been cached!" ( I don't remember it ever doing that. ) It seems to happen when I restart the REPL (sometimes). Any idea what it's complaining about or what I do to fix it?#2020-05-2522:24cflemingWhich version of Cursive are you using?#2020-05-2523:02Walt StoneburnerLooks like v1.9.2-eap4-2020.1#2020-05-2523:12cflemingHmm, so that's definitely a bug, but I'm not sure what could cause that to happen sporadically. I fixed a bug relating to this a while back, but that one always happened on every run. If you manage to narrow down when this happens that would be helpful in tracking it down.#2020-05-2523:15Walt StoneburnerFrom what I can tell, if my code is running and I do a restart REPL (because I changed some source), I get the message. But, if I have stopped my code and then "restart", there's no error. For a little more context, the application is a Ring server application -- so it's very likely that there are background threads, defers, and unresolved promises hanging about. Any idea what the error message means or where it might be coming from?#2020-05-2523:18cflemingIt comes from Cursive, and the short answer is: it's complicated :)#2020-05-2523:18cflemingIntelliJ normally runs run configs on the swing EDT, which means that if running the config takes a long time, the UI will lock up.#2020-05-2523:19cflemingLein in particular can take a very long time to calculate the classpath if you're using snapshot repos, so I have to do a black magic song and dance behind the scenes to ensure that doesn't happen on the EDT so the UI remains responsive.#2020-05-2523:19Walt StoneburnerI did just note that it wanted exception report #4170 sent to Cursive... java.lang.AssertionError: Assert failed: port at nrepl.core$connect.invokeStatic(core.clj:168) at nrepl.core$connect.doInvoke(core.clj:168) at clojure.lang.RestFn.invoke(RestFn.java:457) at cursive.repl.nrepl$start$fn__12069.invoke(nrepl.clj:121) at cursive.repl.nrepl$start.invokeStatic(nrepl.clj:120) at cursive.repl.nrepl$start.invoke(nrepl.clj:116) at cursive.repl.process_runner$run_nrepl_server$fn__15263.invoke(process_runner.clj:155) at cursive.repl$start.invokeStatic(repl.clj:55) at cursive.repl$start.invoke(repl.clj:51) at cursive.repl.toolwindow$create_new_repl$fn__12021.invoke(toolwindow.clj:753) at cursive.repl$submit$reify__4203.run(repl.clj:176) at com.intellij.util.RunnableCallable.call(RunnableCallable.java:20) at com.intellij.util.RunnableCallable.call(RunnableCallable.java:11) at com.intellij.openapi.application.impl.ApplicationImpl$1.call(ApplicationImpl.java:255) at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) at java.base/java.lang.Thread.run(Thread.java:834)#2020-05-2523:19cflemingThat error message basically means that that step didn't work properly.#2020-05-2523:20cflemingWhat sort of project (deps, lein etc) is this?#2020-05-2523:21Walt StoneburnerIt was started as a fairly bland Lein project, actually.#2020-05-2523:21cflemingBTW you don't generally have to restart your REPL when you change sources either, you should just be able to load the new sources live into the REPL.#2020-05-2523:22cflemingWhat sort of REPL config are you using? That exception usually happens with remote REPLs.#2020-05-2523:23cflemingI have to step away for a bit, sorry - I'll be back in an hour or so if you're still around.#2020-05-2523:24Walt StoneburnerThis is where you're starting to dance on the edge of my knowledge, so pardon me if none of this is helpful. I just basically followed the how to install Cursive directions off the web page, right click the project.clj file and slect Run 'REPLY for project'. At that point I have a REPL window in IntelliJ. I'm running everything locally at my workstation, and the REPL tab is prefixed with "Local:" .... any of that useful?#2020-05-2523:25cflemingYes, thanks, I'll try to reproduce based off that info.#2020-05-2523:25Walt Stoneburner( I will be, suspect I may be afk during dinner or so... but I'll leave this open. )#2020-05-2609:09imreFor the record, I also encountered this on repl restart sporadically on deps projects.#2020-05-2609:32imreLooks like I can reproduce it#2020-05-2611:02cflemingIs that just using the restart button?#2020-05-2611:03cflemingBTW imre, you're talking about the Deferred parameters error or the Assert failed: port one? Or do you get both messages?#2020-05-2611:11imreSorry, I did not notice there were 2 errors discussed. It is the deferred parameters error, whenever I try to restart a repl using the restart button.#2020-05-2611:12imreIt isn't something I use too often, but sometimes it comes in handy when I feel my running app is too polluted for further work. I quickly got used to stopping and starting it after the first few times I saw the problem.#2020-05-2614:36Walt Stoneburner@U0567Q30W -- this was just the restart (but I can't say that I've done a lot of exploratory work beyond that; happy to conduct experiments). @U08BJGV6E -- did you reproduce it the same way? I didn't know if the Assert failed: port was related or not, but I see that every so often; have not figured out what triggers it. Usually there's just a small red exclamation mark from IntelliJ that I happen to notice much later, so it's hard to correlate what action is causing this.#2020-05-2614:37imreI reprod by starting a repl, waiting for it to initialise, then hitting the restart button#2020-05-2622:30cflemingI just tried to reproduce this and I can't. I created a new deps project, ran the repl, then used the restart button, and it all worked. Does this happen consistently for you both on all projects?#2020-05-2707:26imreI'll check that later today#2020-05-2712:59imre@U0567Q30W in my case it looks like this is something to do with 'Run with deps' and an alias. See the attached file, it's a pretty much empty deps.edn. When I run the repl with deps, I cannot restart it. If I run it with the intellij classpath, I can. As I was playing with it, changing deps etc, sometimes, after running with the IJ classpath, the issue went away even for the deps repl, but it came back when I changed my deps#2020-05-2722:15cflemingThanks imre, I'll try to repro with that.#2020-05-2610:40Rachel WestmacottIs it just me that finds the behaviour of Ctrl + Left/Right within a string to be counter-intuitive?#2020-05-2614:56kennyI agree!#2020-05-2618:27tanzoniteblackhttps://github.com/cursive-ide/cursive/issues/2097#2020-05-2618:28tanzoniteblack@U0FR9C8RZ , you should give this a thumbs up vote so Colin knows that other people are having issues with this 🙂#2020-05-2622:03scarytom#2020-05-2622:11folconIs anyone else getting an issue with remote repls where if you get a REPL command timeout the repl just seems to timeout in general?#2020-05-2622:30Walt StoneburnerI've noticed that this statement produces an inspection warning that VERSION cannot be resolved:
(defonce ^:const VERSION "0.0.1")
However this statement has no issue:
(def ^:const VERSION "0.0.1")
Is this a Cursive issue?
#2020-05-2622:35cflemingYes, that's https://github.com/cursive-ide/cursive/issues/1069. I just took a look at this, I'll fix it for the next EAP.#2020-05-2622:38Walt StoneburnerGotcha. I'm still learning what's IntelliJ and what's Cursive, the integration is so nice it's hard to tell where one end and the other begins. I found that I'm getting lots of the same "cannot resolve" when I use manifold.deferred/let-flow, which is a macro that behaves like let.#2020-05-2622:39cflemingYeah, you can fix that using this: https://cursive-ide.com/userguide/macros.html#customising-symbol-resolution#2020-05-2622:42Walt StoneburnerBEST TIP EVER!!! That just fixed so many non-problems from being flagged. Thank you!!#2020-05-2623:36cflemingGreat, glad it helped!#2020-05-2701:25cfleminghttps://twitter.com/CursiveIDE/status/1265452296084713472#2020-05-2705:04Wilson VelezI’m trying to run the next test from cursive using the context menu REPL-> Run ‘init-test’ in REPL
(ns cljs-wew.core-test
  (:require [clojure.test :refer-macros [deftest is]]))

(deftest init-test
  (is (= 1 1)))
but I’m getting this message
#2020-05-2705:05cflemingUnfortunately, the Cursive test integration currently only works with Clojure, not CLJS.#2020-05-2714:13Wilson Velez@U0567Q30W, oh, I see, is this something you are planning to add in the near future?#2020-05-2722:16cflemingWell, in the future yes, no promises about when though.#2022-03-2115:22Rachel WestmacottAny idea when this might be addressed (cljs test integration)? Or any workarounds? It seems we can call the tests as functions in the REPL (which is nice) but obviously without the integration it's harder to grok the differences.#2022-03-2120:17cflemingI don’t have an ETA on that, sorry. CLJS REPLs are much more complicated than CLJS ones. However, one thing that might help a bit is that you can now invoke the Cursive differ from the REPL. So it would be manual in the case of a test failure, but it might help: https://groups.google.com/g/cursive/c/lOyPXEbt2ME/m/bB31WqS4AAAJ#2020-05-2705:04Wilson Velez
------ REPL Error while processing ---------------------------------------------
(clojure.core/with-redefs [clojure.test/do-report (clojure.core/fn [report__14957__auto__] (clojure.core/let [trace-info__14958__auto__ (clojure.core/fn [s__14959__auto__] {:file (.getFileName s__14959__auto__), :line (.getLineNumber s__14959__auto__), :class (.getClassName s__14959__auto__)}) file-info__14960__auto__ (clojure.core/fn [exception__14961__auto__ depth__14962__auto__] (trace-info__14958__auto__ (clojure.core/nth (.getStackTrace exception__14961__auto__) depth__14962__auto__))) test-file-info__14963__auto__ (clojure.core/fn [exception__14961__auto__] (trace-info__14958__auto__ (clojure.core/last (clojure.core/take-while (fn* [p1__14956__14964__auto__] (clojure.core/not (.startsWith (.getClassName p1__14956__14964__auto__) "clojure.test$"))) (.getStackTrace exception__14961__auto__))))) report__14957__auto__ (clojure.core/if-let [ns__14965__auto__ (:ns report__14957__auto__)] (clojure.core/assoc report__14957__auto__ :ns (clojure.core/ns-name ns__14965__auto__)) report__14957__auto__) report__14957__auto__ (clojure.core/case (:type report__14957__auto__) :pass (clojure.core/merge (file-info__14960__auto__ (java.lang.Throwable.) 1) report__14957__auto__) :fail (clojure.core/merge (file-info__14960__auto__ (java.lang.Throwable.) 1) report__14957__auto__) :error (clojure.core/merge (test-file-info__14963__auto__ (:actual report__14957__auto__)) report__14957__auto__) report__14957__auto__) report__14957__auto__ (clojure.core/if-let [var__14966__auto__ (:var report__14957__auto__)] (clojure.core/assoc (clojure.core/dissoc report__14957__auto__ :var) :ns (clojure.core/ns-name (:ns (clojure.core/meta var__14966__auto__))) :name (:name (clojure.core/meta var__14966__auto__)) :file (:file (clojure.core/meta var__14966__auto__)) :line (:line (clojure.core/meta var__14966__auto__)) :column (:column (clojure.core/meta var__14966__auto__))) report__14957__auto__) report__14957__auto__ (if (clojure.core/= :pass (:type report__14957__auto__)) (clojure.core/dissoc report__14957__auto__ :actual) report__14957__auto__) report__14957__auto__ (if (clojure.core/contains? report__14957__auto__ :actual) (clojure.core/let [actual__14967__auto__ (:actual report__14957__auto__) val__14968__auto__ (clojure.core/cond (clojure.core/class? actual__14967__auto__) (.getName actual__14967__auto__) (clojure.core/instance? java.lang.Throwable actual__14967__auto__) (do (clojure.core/require (quote clojure.stacktrace) (quote clojure.string)) (clojure.core/cond (clojure.core/find-ns (quote io.aviso.exception)) ((clojure.core/find-var (quote io.aviso.exception/write-exception)) actual__14967__auto__) (clojure.core/find-ns (quote clj-stacktrace.repl)) ((clojure.core/find-var (quote clj-stacktrace.repl/pst)) actual__14967__auto__) :else ((clojure.core/find-var (quote clojure.stacktrace/print-stack-trace)) actual__14967__auto__)) (clojure.core/-> (clojure.core/with-out-str (clojure.stacktrace/print-stack-trace (clojure.stacktrace/root-cause actual__14967__auto__) 5)) (clojure.string/replace "\n at " "\n") (clojure.string/replace "\n    " "\n"))) :else (clojure.core/pr-str actual__14967__auto__))] (clojure.core/assoc report__14957__auto__ :actual val__14968__auto__)) report__14957__auto__) report__14957__auto__ (if (clojure.core/contains? report__14957__auto__ :expected) (clojure.core/let [expected__14969__auto__ (:expected report__14957__auto__)] (clojure.core/assoc report__14957__auto__ :expected (clojure.core/pr-str expected__14969__auto__))) report__14957__auto__)] (clojure.core/when (clojure.core/and (clojure.core/= :fail (:type report__14957__auto__)) (clojure.core/contains? report__14957__auto__ :diffs) (clojure.core/find-ns (quote pjstadig.humane-test-output)) (clojure.core/not (java.lang.System/getenv "INHUMANE_TEST_OUTPUT")) (clojure.core/not (clojure.core/find-var (quote pjstadig.humane-test-output/cursive-warning)))) (clojure.core/binding [clojure.core/*out* clojure.core/*err*] (clojure.core/println "\nWARNING: pjstadig/humane-test-output appears to be active.") (clojure.core/println "This library interferes with Cursive's test functionality, in particular test result") (clojure.core/println "diffs. To fix this you can either disable it entirely, or set the INHUMANE_TEST_OUTPUT") (clojure.core/println "environment variable either in your lein/boot project or in your run configuration.\n") (clojure.core/intern (quote pjstadig.humane-test-output) (quote cursive-warning) true))) (clojure.test/with-test-out (clojure.core/print "@#Cursive#TestSupport#@" (clojure.core/pr-str report__14957__auto__)) (.flush clojure.test/*test-out*) (clojure.core/if-let [type__14970__auto__ (:type report__14957__auto__)] (clojure.test/inc-report-counter type__14970__auto__)))))] (clojure.test/run-tests (quote cljs-wew.core-test)))
Error in phase :compilation
Calls to `require` must appear at the top-level. at line 1 cljs_wew/core.cljs
#2020-05-2705:04Wilson VelezMy project is a re-frame application, I’m using shadow-cljs to start my app and I’m using an nREPL from cursive to connect to it. I defined the environmental variable INHUMANE_TEST_OUTPUT that appears in the trace but it didn’t work. Is my setup the root of the problem or what I can do?#2020-05-2708:27thheller@wvelezva that looks like cursive is sending CLJ code into the CLJS session. not sure why it would do that. which shadow-cljs version do you use? there were a couple versions where the session managed was messed up and broke the REPL.#2020-05-2709:06cflemingThat code probably doesn't have the CLJ/CLJS check, it should. Eval does, but I guess the test eval doesn't. That code probably predates the REPL knowing the difference.#2020-05-2714:10Wilson Velez@U05224H0W I’m using shadow-cljs 2.9.10#2020-05-2714:11Wilson Velez@U0567Q30W what do you mean by CLJ/CLJS check?#2020-05-2722:18cflemingCursive will check when sending forms that you're sending them to a REPL of the right type. Otherwise you get a message like this: https://twitter.com/yfjolne/status/1265569961038286848#2020-05-2722:18cflemingBut it looks like I don't have that check for the test integration - I'll add that.#2022-03-2115:22Rachel WestmacottAny idea when this might be addressed (cljs test integration)? Or any workarounds? It seems we can call the tests as functions in the REPL (which is nice) but obviously without the integration it's harder to grok the differences.#2020-05-2900:50folconSince updating to eap5 I can’t connect to a repl using the run config, anyone else seeing this =)…
Starting nREPL server...
<long classpath> clojure.main -i /private/var/folders/xl/rkkw077j4xxf827wn82mcp_c0000gn/T/form-init15182512464198811612.clj
No nREPL ack received
Connecting to local nREPL server...
Syntax error (ConnectException) compiling at (/private/var/folders/xl/rkkw077j4xxf827wn82mcp_c0000gn/T/form-init15182512464198811612.clj:1:1).
Connection refused

Full report at:
/var/folders/xl/rkkw077j4xxf827wn82mcp_c0000gn/T/clojure-13856084906054891137.edn

Process finished with exit code 1
#2020-05-2906:07cflemingNo-one else has reported it, and I'd have expected that to be reported pretty quickly. The error seems to be "Connection refused", which normally means there's nothing listening on that port. It could be that the inital ack problem is the real problem? I'm not sure. Does this happen on all projects?#2020-05-2910:01folconYea, I was expecting the same =)… I’m working around it by booting up a repl in term and connecting to it with nrepl… Not had time to properly debug it yet…#2020-05-2910:19cflemingOk, I'll check it when I get a chance. Are you running this with lein/deps? Are you using aliases or profiles or any other special config?#2020-05-2911:05manutter51It seems to me I had a similar problem a while back and cleared it up with File -> Invalidate Caches / Restart…#2020-05-2911:31folconI’ve not tried to invalidate caches, let me give that a go =)…#2020-05-2911:31folconI’ve got a big dev profile… Will try and disable that and see if that’s causing it…#2020-05-2911:37folconBtw @U0567Q30W I don’t know if this is something you effect or it’s just Intellij’s internal logic, but indexing happens a lot….#2020-05-2912:08folconI’ve done a cache invalidation and that hasn’t helped, disabling my :dev alias did, but thinking about it, the no repl ack has happened in the past, what’s different now is that Connecting to local nREPL server now leads to connection refused, whereas previously it would just connect… Not sure what’s causing that currently, am disabling bits to see if I can figure out the cause… Ok, disabling it down seems to work, which is frustrating as it messes with mount’s workflow, but perhaps it can’t be helped…#2020-05-2912:57mhuebertis there any possibility of an eval-and-insert or pprint-eval-and-insert command, ie. eval a form and insert the (formatted) result into the file?#2020-05-3004:53cflemingYes, the problem is that there is a combinatorial explosion of things you might want to do: take form before point/top form/surrounding sexp and evaluate/evaluate and add commented result/evaluate and replace original with formatted output/and on and on...#2020-05-3004:54cflemingSo what I'm planning to do is extend REPL commands (https://cursive-ide.com/userguide/repl.html#repl-commands) to allow you to create whichever commands you happen to want.#2020-06-0717:40mhuebertThat sounds superb#2020-06-0807:59Rachel Westmacottthat kind of REPL command extension would be AMAZING#2020-05-2915:26bahulneel@here does anyone know how to install the clojuredocs after you've already said no?#2020-05-2915:29imrepref -> lang & fw -> clojure -> bottom of page#2020-05-2915:31bahulneelthanks, just found it as you replied 🙂#2020-05-2915:32imre👍:skin-tone-3:#2020-05-3119:13royalaidI was wondering if Cursive has something like the HTML -> Convert for Lein styled deps, [cheshire "5.10.0"] , to deps.edn style, cheshire {:mvn/version "5.10.0"}#2020-05-3121:15cflemingThere isn’t, but that’s a great idea.#2020-05-3121:18cfleminghttps://github.com/cursive-ide/cursive/issues/2382#2020-05-3121:32royalaiddepending on how hard it is, might benefit from going both ways#2020-05-3121:32royalaidso in project.clj -> lein and deps.edn -> deps#2020-05-3121:39cflemingYeah, the tricky bit is ensuring the user is in a place which makes sense to paste. In particular the deps one is tricky because it’s not a single complete form.#2020-05-3119:14royalaidI find myself rewriting that a ton and it would be great to just be able to paste it and go#2020-06-0200:05kennyOn this page in the Cursive docs https://cursive-ide.com/userguide/deps.html I cannot seem to be able to click the copy link button next to "Create a new project with Deps". Same goes for a lot of the other headers. I'm only able to click the first two: "Configuring Deps" and "macOS and Linux"#2020-06-0201:41cflemingWhich browser are you using? I’ve just tested that with FF, Chrome and Safari on OSX and it works fine.#2020-06-0215:10kenny81.0.4044.138 on Ubuntu#2020-06-0215:11kennyUpdated to 83.0.4103.61 and same issue.#2020-06-0210:08joelsanchezjust a heads up - if you use the "Load File in REPL" action while the index is being updated you'll get Error evaluating - class com.intellij.openapi.project.IndexNotReadyException: Please change caller according to com.intellij.openapi.project.IndexNotReadyException documentation in the repl I guess most of us can interpret the error anyway#2020-06-0212:49katoxIs there a way how to hint Cursive types of paths added through deps.edn? It seems to choose a type using some heuristics but the result is less than optimal.#2020-06-0305:22cflemingI’d have to go back to the code to check, but IIRC, anything in the test alias becomes a test root, and everything else becomes a source root. However, since this is a bit crap and there really isn’t a better way to do that with deps, you can manually mark particular roots as test roots and Cursive will leave that when syncing later.#2020-06-0407:30katoxThanks, it seems that everything in test paths ends up being marked as test sources. If I manually mark them as regular sources this info is reset on re-import. I will try to rework the deps structure so I can mark sources as test manually instead of regular. But maybe it'd be better if it didn't reset anything manually set.#2020-06-0411:08cflemingOne question is: why would you want something under the test alias not marked as a test source?#2020-06-0411:40katoxRight now the reason is there is an overlap between aliases. But now that I know what is the system for marking some paths as test sources I can rework it. Basically there were aliases for many little things but tests ran just with clj -A:test ... instead of combining all those.#2020-06-0412:09katoxIt works! It needed a manual mark-as source dirs for the first time but then it no longer changes it to test sources. Thank you.#2020-06-0212:52katoximported paths from deps.edn profiles#2020-06-0214:04jaimeWhen I'm using Intellij 2019, I can get autocompletion of the available version for the library {:mvn/version ""} in deps.edn file. After upgrading to Intellij 2020.1, I don't get autocompletion anymore. How to enable it back?#2020-06-0216:03isakI think I remember hearing about some kind of java-like dot notation completion in Cursive for methods/props. Is that a thing? How do I use it?#2020-06-0219:15Alex Miller (Clojure team)if you type (. and optionally some more chars, then hit ctrl-space it will give you autocomplete options#2020-06-0219:16Alex Miller (Clojure team)If you have an object whose type can be determined in the first arg position, then it will be contextual to that#2020-06-0219:16Alex Miller (Clojure team)so if cursor after . in (. (java.util.Date.)) - will give you method completions from Date#2020-06-0220:10isakThanks, I use that one, but I heard there was a faster option that lets you type the subject first and then tab (without threading too). Maybe I'm wrong.#2020-06-0305:23cflemingActually, Cursive does lots of magic here but not for the dot form - that’s on my to-do list.#2020-06-0305:23cflemingAll examples assuming Cursive knows the type of my-obj:#2020-06-0305:24cfleming(.| my-obj) completing here will give you the context sensitive completions.#2020-06-0305:25cflemingYou can also do (my-obj .|) and you’ll get the context-sensitive method/field completions, and when you auto complete the method and receiver will be switched.#2020-06-0305:26cflemingThis also works with other forms where Cursive knows the type, like (-> my-obj .|)#2020-06-0305:39salaminteresting, i’ve been using cursive for years but never known it supports the 2nd from of code completion.#2020-06-0309:13cflemingYes, I really need to document this, it’s one of the coolest features in Cursive and I’ve talked about it on the mailing list etc but have never properly put it in the doc.#2020-06-0314:25isak@U0567Q30W Nice! That second one is what I was thinking of#2020-06-0216:07isakBy the way, the Clojuredocs integration is really cool#2020-06-0217:29folconDo you mean .., (class. ) and .- interop forms?#2020-06-0217:37isak@folcon I'm not sure - I think there is supposed to be something where you type with dot notation like you would in Java, then press tab when done, and it is converted to the normal clojure interop notation (have tried, but doesn't work, I think I'm missing something)#2020-06-0220:41salami think what you're describing is called Postfix Completion in intellij idea. as you can see from the screenshot attached, cursive doesn't seem to provide any postfix completion template for clojure.#2020-06-0220:48salamthat said, cursive does provide a bunch of live templates for clojure.#2020-06-0220:53isakAh, neat. Maybe that's it, thanks @UDCGPTV9R :thumbsup::skin-tone-2:#2020-06-0305:27cflemingI talked about this over here: https://clojurians.slack.com/archives/C0744GXCJ/p1591161803088400?thread_ts=1591113838.079600&amp;cid=C0744GXCJ#2020-06-0217:39folconNope, sorry, not seen anything like that :(…#2020-06-0217:41tengstrandI can't see all variables when I stop at a break point. The most current frame is selected, but I can only see variables that belongs to the namespace where I started the execution. Very strange and annoying, because now I can't evaluate variables in the function that I put the break point either. I run Cursive 1.9.1.-2019.3, Java 1.8.0_241 and IDEA Community 2019.3,5.#2020-06-0219:14tengstrandI upgraded to IDEA 2020.1 and Cursive 1.9.1-2020.1 and now it works!#2020-06-0305:27cflemingGreat! Although very weird that that didn’t work previously…#2020-06-0309:16tengstrandI agree, computers are weird sometimes!#2020-06-0705:04tengstrandThe old problem still exists though, that I can't evaluate anything when I'm at a breakpoint, except numbers like 123 but not expressions or anything with a variable, e.g.: (+ 1 2 3) - I get the error message: Invalid expression : ). I have clojure selected as language in the evaluation window popup.#2020-06-0905:21cflemingThat’s https://github.com/cursive-ide/cursive/issues/2345, which is fixed in the latest EAP series but is not in a stable release yet.#2020-06-0322:07llsouderI am playing with a luminus project. I am using figwheel with cursive as described here: https://github.com/bhauman/lein-figwheel/wiki/Running-figwheel-in-a-Cursive-Clojure-REPL When I go to switch back to a clj repl the repl hangs. How do I jump back and forth between the cljs and clj repls. This is really bugging me!#2020-06-0415:04katoxI just start two REPLs, side by side. One for clj and one for cljs. The caveat in Cursive is that you need to wait until the first REPL is loaded before you can start another because for Cursive they are just two Local REPLs (even if they aren't because one of them switches to cljs later on).#2020-06-0415:05katoxThe upside is that Figwheel doesn't print anything to your development clj REPL.#2020-06-0412:26katoxHmm, TIL that if you make a mistake in deps.edn - such as duplicate keys in a map - it doesn't parse an the project is forever dead. It won't see Deps again, restart, invalidate-and-restart all futile. The only way out was to delete the whole project (.idea and *.iml) and importing it again... losing all Run configurations.#2020-06-0611:03cflemingThat should definitely not be the case. Could you file an issue with a repro case?#2020-06-0719:08katoxI'll try to create a minimal repo example.#2020-06-0810:18katoxHmm, this one is tricky. It probably depends on some accumulated state in the project files of IDEA. Here is kind of repro, not very good but it still might show something: https://github.com/katox/cursive-deps-edn-repro The "repro" github repo works around the project state by having a restart IDEA step in the middle which causes the Deps tab to disappear. But it wasn't needed when I hit the issue. Re-importing was sufficient.#2020-06-0905:27cflemingOk, I’ll see what I can do with that.#2020-06-0422:13Ertugrul CetinDid anyone have that issue before?: https://stackoverflow.com/questions/62193057/what-is-equivalent-of-leiningen-repl-options-init-ns-user-for-tools-deps-in#2020-06-0500:55salamit looks like Sean beat us to it (once again 🙂)#2020-06-0506:25Ertugrul Cetin@U0567Q30W how does Cursive work on this one?#2020-06-0611:02cflemingCursive should use the moral equivalent of -A#2020-06-0615:41dpsuttoni'm opening clojurescript in cursive. what's the best way to import it? maven, lein, or deps?#2020-06-0615:50Alex Miller (Clojure team)My guess would be maven#2020-06-0702:57dpsuttonI'm playing around in the clojurescript repo with cursive. I'm getting a repl up and running. To do so, I configured a clojure.main repl and then call (cli/main browser/repl-env) from the prompt there to get a cljs repl. I'm typing in some defrecords and cursive will auto import classes that will break my cljs repl. I've seen (import org.checkerframework.framework.qual.ImplicitFor) and (import cljs.externs_infer_tests.IFoo) pop up now and it destroys the state. Is there a way to turn these otherwise helpful imports and requires off or perhaps mark this more thoroughly as a cljs repl so that it doesn't attempt this?#2020-06-0718:57okwori#2020-06-0719:31Janne SauvalaIs that notebook support for Jupyter notebooks that you referring to? My guess is that only Python would work there#2020-06-0719:51okworiAm not sure I understand the question clearly, but it has Jupyter server configured to run on a Clojure kernel (in my case conda-clojupyter)#2020-06-0806:27Janne SauvalaDidn’t know that conda-clojupyter existed, it looks cool! I’m not familiar with this setup so I don’t know if IDEA supports this. My assumption was that Jupyter notebooks would work only for Python code. 🙂#2020-06-0802:50wilkerlucio@cfleming idea, I just wanted to have a list of all indexed keywords in the project, have you consider having some UI to just list all keywords indexed in the project? I'm thinking this could be a nice way to explore then#2020-06-0810:25scarytomNoticed the following error in the console after launching IntelliJ @cfleming -- anything to worry about? #2020-06-0908:06cflemingIt’s something for me to worry about, but not for you. Currently my symbol resolution code uses thread-bound locals, and apparently that’s not allowed. 2020.1 started outputting those warnings. I’m not sure how I’m going to fix that yet.#2020-06-0810:25scarytom
2020-06-08 11:22:47,586 [  40898]  ERROR - tellij.util.IdempotenceChecker - Non-idempotent computation: it returns different results when invoked multiple times or on different threads:
  class cursive.psi.impl.synthetic.ClNamespace != class cursive.psi.impl.synthetic.ClNamespaceAlias
  which is class of Namespace: server-dev and Namespace alias server-dev (server-dev)
  which is element of 
#2020-06-0810:27scarytomHmm, I see you have raised this question here: https://intellij-support.jetbrains.com/hc/en-us/community/posts/360007579760-Idempotency-errors-under-2020-1#2020-06-0901:39salamyep, i've seen this error pop up a few times as well.#2020-06-0901:49salamthe following is another exception that obscured the underlying problem with my code that calls cognitect's aws-api s3 api. in my case, the problem was simply a missing bucket name.#2020-06-0905:39steveb8n@cfleming I’ve started using https://github.com/amperity/greenlight and have found it to be a great addition to my toolset#2020-06-0905:40steveb8nusing it in cursive has been good but there’s a couple of test integration quirks. do you have any interest in knowing about these?#2020-06-0908:07cflemingSure, feel free to file an issue and I’ll take a look.#2020-06-0907:29thumbnailHey! I’m using the debugger (cool stuff btw!), but i can’t seem to evaluate expressions (am inside a java library). :thinking_face:#2020-06-0908:05cflemingThat’s https://github.com/cursive-ide/cursive/issues/2345, which is fixed in the latest EAP but not the latest stable build yet. If you’d like to try the EAP builds see here: https://cursive-ide.com/userguide/index.html#eap#2020-06-0908:18reefersleepIs there some smart way to start two REPLs in Cursive without having to wait for one to get the prompt before you start the other? In my work project, I mostly work with a CLJS REPL for the frontend and a CLJ repl for the backend. If I start them immediately after each other, they’ll occupy the same window, which is unusable. Therefore, I have to wait until one gets a prompt before I can start the other.#2020-06-0908:19cflemingUnfortunately, not easily, no. That’s top of my large-things-to-fix list, along with a lot of other REPL experience improvements.#2020-06-0909:38reefersleepCheers @cfleming, looking forward to it 🙂#2020-06-0914:39Vachihi everyone, it is possible to wrap the forms sent to the repl to be evaluated with a function? like tap> , so any form that we send to the repl would be evaluated as (tap> form)#2020-06-0914:46imreYou could create a repl command that does this, see https://cursive-ide.com/userguide/repl.html#repl-commands#2020-06-0914:47imreThere is one caveat though: https://github.com/cursive-ide/cursive/issues/1756#2020-06-0915:09Vachimany thanks! that was exactly what I needed#2020-06-0915:10Vachi(tab> ~top-level-form) did the job#2020-06-0919:16salami'm curious how everybody's experience with using a remote socket repl with cursive is. we've been having problems with this set-up. one particular problem that we had today was that the cursive repl client wouldn't show the output from expound. that is if you evaluate (expound/expound string? 42), all you get in the repl client output is nil. am i missing something?#2020-06-0920:06salamhere's extra context. it seems like a flushing issue with the output stream?#2020-06-0921:31salamwe had to evaluate (prn) to "force" cursive to flush the output stream. this also applyes to clojure.spec.alpha/explain.#2020-06-0922:43cflemingOk, I’ll look at that, thanks.#2020-06-0920:42thhellerhow come the "execute in original ns" is always grayed out? how do I get that to be available?#2020-06-0922:42cflemingSo that “execute in original namespace” is when you’re repeating a previous command. There actually isn’t an option for “execute in file namespace”, but I will add one.#2020-06-1007:34thhellerah ok. the in-ns trick works fine for my purposes too.#2020-06-1013:09seriogain-ns works... but when I change REPL ns via command the indicator of current ns remains unchanged 😞#2020-06-0920:52thhellerah nvm. just using (in-ns '~file-namespace) (tap> ~top-level-form) also works.#2020-06-1001:19adamCursive doesn't recognize my functions once I rename them like this:
[myns.account.sign-in :refer [handler] :rename {handler sign-in-handler}]
Is this a known issue?
#2020-06-1002:46cflemingYes, that’s https://github.com/cursive-ide/cursive/issues/394. I’ll see if I can look at that shortly.#2020-06-1001:19adam{handler sign-in-handler} shows in yellow and don't become clickable#2020-06-1018:07hlshipOne thing I miss in Cursive is an intention for fully qualified names to create an :require entry (and let me customize the alias).#2020-06-1018:14hlshipOh, hey, I've noticed this before: https://github.com/cursive-ide/cursive/issues/1965#2020-06-1109:06cflemingI’ve put this in the next release cycle so I’ll try to look at it soon.#2020-06-1019:57pseudHey. I seem to remember that you can somehow configure a repl via cursive such that some commands/forms are automatically evaluated on startup. The reason I ask I that I have to run (shadow.cljs.devtools.api/nrepl-select :app) when connecting to a remote clojure nREPL to get a cljs repl and I’d like to do this automatically.#2020-06-1020:20pseudThe best I’ve been able to manage so far is to
shadow-cljs
  {:nrepl {:port 7002
           :init-ns cljs-user}
… and then have a (defn start [] …) function which I can run.
#2020-06-1109:07cflemingYes, there’s no way to automatically send forms at startup with Cursive, although I’m planning to add that soon. You can use user.clj for some use cases, which is a Clojure thing. I’m not sure if that would work for what you need though.#2020-06-1020:56Vachihi everyone, not related to cursive itself but since we are all using intelliJ idea in this channel, it is possible to customize the font size for the named functions? like the picture#2020-06-1020:56Vachi#2020-06-1021:03imreo_O#2020-06-1021:03imreWow. While I don't know if that's possible, I wonder what benefit you think that would bring?#2020-06-1021:21Vachinot sure, just saw this in twitter, but it looks that it highlights in which namespace you are and what functions it has at a glance.#2020-06-1021:26imreyou could use intellij's File structure action for that (under navigate if you want to go through the menu)#2020-06-1021:26imreI have it bound to a chord and use it frequently#2020-06-1021:27Vachiyeah, that's what I use most of the time ctrl+f12#2020-06-1109:08cflemingI echo the “why?” sentiment, but AFAIK there’s no way to do this. I think IntelliJ requires lines of text to all use a single font size.#2020-06-1023:52polymerisLately been noticing that when I hit ctrl-shift-T to create a new test ns it generates:
(ns my-ns-test
  (:require [clojure.test :refer :all])
  (:require [my-ns :refer :all]))
i.e. multiple requires. Not sure if that even works, but a single require would probably more idiomatic
#2020-06-1109:20cflemingThat does look a little odd, but works fine. It’s controlled by a template at Preferences | Editor | File and Code Templates | Clojure Test Namespace so you can modify it, but you’re right, I should update that.#2020-06-1104:49dpsuttonwould it be possible for cmd-\ to take you to the repl input buffer and the same shortcut take you back to the previous buffer when in the repl input?#2020-06-1110:51cflemingIntelliJ has had a strict UI rule for a long time that ESC goes back to the editor from any toolwindow. In recent versions (2019.3+ IIRC) that’s now configurable, but it’s that way by default.#2020-06-1104:49dpsuttonseems to be no shortcut out of there#2020-06-1105:27cfleminghttps://twitter.com/CursiveIDE/status/1270949448688922624#2020-06-1117:37hlshipSo I just got called out in my team meeting because I've been converting test helper functions that call clojure.test/is into macros ... just so that Cursive labels the correct line with the failure. This has been noted previously as https://github.com/cursive-ide/cursive/issues/1945. This is something I would dearly like to see addressed.#2020-06-1118:27tanzoniteblackas a note, this isn't just a cursive issue. the same thing happens with cider & calva :man-shrugging:#2020-06-1118:29hlshipThis could partially be addressed by capturing the test name (from deftest) and additional context (from clojure.test/testing) when reporting the assertion failure.#2020-06-1118:46hlshipI just added https://github.com/cursive-ide/cursive/issues/2387 as one option to address 1945.#2020-06-1213:32gibbLest you forget cfleming, this project is awesome, I use it every day and I love it.#2020-06-1219:04tekacs@cfleming I'm finding that in 2020.2 EAP + 1.9.2-eap6-2020.2 my Ctrl+Click/MiddleClick has stopped working entirely for anything that is defined through Symbol Resolution. If I set up a symbol to be an alias of defn or def, prior to this version I could Ctrl+Click to go to its definition point (IIRC) -- now it only works on things natively defn'd. I've tried Invalidate Caches + Restart, this is a deps.edn project, not sure what else I should share to ensure that it can be replicated. I'm going to try downgrading both for now if I can, but I do need to find a way to fix this to keep on going. :) I'm also discovering finding more things for which I can't Go to Definition, which I'll add to the Github Issue. Would love to understand if this is just a misconfiguration or needs a reset, somehow.#2020-06-1219:05tekacshttps://github.com/cursive-ide/cursive/issues/2389#2020-06-1219:24tekacs I also tried deleting the .idea directory and app.iml and re-importing the Clojure Deps project from scratch -- also to no avail.#2020-06-1219:51tekacswould anyone happen to know if it's possible to revert to an older eap version of Cursive?#2020-06-1220:50tekacsokay, downgrading to 2020.1.2 immediately fixed the issue for me (whilst staying on eap6), in case anyone else runs into this#2020-06-1222:12cfleming@tekacs Yes, this seems to be an IntelliJ bug (or at least a change in expectations): https://youtrack.jetbrains.com/issue/IDEA-243212 - I’m waiting on feedback from JetBrains.#2020-06-1222:34tekacsThank you for clarifying!#2020-06-1517:16staypufdBit me too. Thanks for update Colin#2020-06-1222:34tekacsThank you for clarifying!#2020-06-1307:40armedHello, does someone anyone have such issue? More than 1 second pause after tab/enter on autocomplete menu (idea 2020.1, macos 10.15.5)#2020-06-1308:14armedhttps://youtrack.jetbrains.com/issue/JBR-2475 seems this bug was introduced in latest update. #2020-06-1313:05Jakub Holý (HolyJak)Hello! Does anyone know whether it is possible to enable code folding at the level of forms? Currently when I invoke the Code | Folding | Collapse command, it collapses the whole defn... 😞 Thank you!#2020-06-1618:46adamCursive annoyingly override some key default IntelliJ shortcuts, like pushing to repo via Shift+CMD+K#2020-06-1619:02salamhttps://github.com/cursive-ide/cursive/issues/1892#2020-06-1716:03dpsutton@cfleming your ssl cert is invalid on http://cursive-ide.com (if not already reported. apologies if so)#2020-06-1722:55cflemingThat’s really strange, thanks, I’ll check that.#2020-06-1722:55cflemingAmazon should be renewing that automatically.#2020-06-1723:25cflemingThat’s fixed, thanks!#2020-06-1716:03dpsutton#2020-06-1716:07dpsuttonalso, it seems clojuredoc in the ^-J window is not working#2020-06-1805:02dangercoderI'm trying to get cursive working together with leiningen on windows. Cursive is trying to download leiningen from the internet even though I have it installed Locally. Anyone knows how Cursive looks for lein?#2020-06-1805:08cflemingIt looks in ~/.lein/self-installs, which is where lein usually downloads to.#2020-06-1805:18dangercoderThanks! I think I can solve it. The problem is probably that I have 2.9.3 in there and cursive is trying to download 2.9.1.#2020-06-1805:19cflemingYou should be able to configure that at Preferences | Build, Execution, Deployment | Build Tools | Leiningen#2020-06-1805:19cflemingWhich Cursive version are you using?#2020-06-1805:53dangercoder1.9.1-2020.1#2020-06-1809:10cflemingUgh, sorry, support for more recent versions of lein was added to the first EAP in the 1.9.2 series, I thought it would be in a stable build by now but 2020.2 threw a spanner in that. If you don’t mind switching to EAP builds that will fix your problem, otherwise I hope 1.9.2 should be out soon.#2020-06-1809:57dangercoderNo worries, I don't need the latest version of Lein 🙂#2020-06-1819:24thosmosvery minor thing, but I used to be able to cmd-space in a deps.edn dep version and it would look up the most recent version. did this get removed or ?#2020-06-1822:08cflemingNo, that should still work, but that API has an annoying tendency to change in recent versions, they’re actively working on it. Which Cursive and IntelliJ versions are you on?#2020-06-1914:51thosmosIntellij 2020.1.2 . Cursive 1.9.1-2020.1#2020-06-1821:23hlshipIs there a known issue with macro expansion? I don't use it often, but lately it behaves strangely.#2020-06-1822:07cflemingI don’t use it often either and I haven’t tried it recently - I’ll check that out.#2020-06-1822:11kennyYes, this happens to me too!#2020-06-1822:11kennyhttps://clojurians-log.clojureverse.org/cursive/2020-04-17#2020-06-1822:12cflemingI get a cert error from that link.#2020-06-1822:13cflemingBut I can look it up in IRCCloud from the date.#2020-06-1822:13kennyJust updated it. Somehow google popped up a link with the clojurians-log-internal subdomain.#2020-06-1822:14kennyRemoving the "internal" suffix from the subdomain fixes it. Guessing he didn't mean for that internal stuff to get indexed.#2020-06-1822:21cflemingThanks!#2020-06-1821:23hlship#2020-06-1821:24hlshipThe dialog is docked to the upper-left of my window, can't be undocked, none of the buttons work. Something odd is afoot.#2020-06-1910:44reefersleepI love Clojuredocs, the site. After clicking “Update Clojuredocs” in Cursive for the nth time, I finally got to wondering what it produces for me. I’ve never used the ^J shortcut before, but know that I read about it and know about it, I’d certainly like to! However, the Clojuredocs examples aren’t shown to me. I can’t find out where to configure it, perhaps I’ve done something to turn it off (or not turn it on), but I don’t know where. Anyone know where I should look?#2020-06-1910:50cflemingIn Preferences | Languages &amp; Frameworks | Clojure under Documentation Options, do you see something like: ClojureDocs archive is x days old?#2020-06-1910:52cflemingSomeone did report to me the other day that the examples weren’t showing for them. I just tested it now, and they’re showing for me in CLJ but not in CLJS, I’ll investigate that.#2020-06-1910:55reefersleepIt says ClojureDocs archive is 0 days old. And right you are, it works in CLJ, and not CLJS. (I didn’t think about discerning 🙂 )#2020-06-1910:56cflemingOk, I’ll check that. ClojureDocs doesn’t support CLJS, but I did add code to look up the CLJ equivalents when showing doc for CLJS, if they exist. I’ll check why that’s not working.#2020-06-1911:00reefersleepThat sounds preferable! I bet there are cases where confusion could follow, e.g. when examples use clojure-only fns, so I’m curious to see if you are making it visible to the user that the request for documentation was made in CLJS, and that the found documentation is a best-guess that originally applies to CLJ.#2020-06-1911:00cflemingHonestly, I can’t remember 🙂. I did plan to. I don’t have the code in front of me right now.#2020-06-1911:01reefersleepI’m patiently curious, I should have said 😄 No worries, I’ll wait and see.#2020-06-1912:56AJ JaroIs there a specific configuration I need to ensure that CLJS files are always under the source root? Everytime I start IntelliJ and open a CLJS file for the first time I get this error/warning at the top of the file: > File .cljs is not under a source root . Add source root It resolved easily by clicking the Add source root link, but it seems like I shouldn’t have to do that. However, I’m also not sure it’s related to Cursive. :man-shrugging:#2020-06-1916:40tanzoniteblackwhat does your deps.edn / project.clj look like on your CLJS project?#2020-06-1916:40tanzoniteblackgenerally when I see this, it's because I don't have the file in the source root according to whatever deps/lein profiles were being indexed with, so I have to go update that#2020-06-1921:27cflemingYes, this usually means that you don’t have the source root defined in your build tool, or that you have it defined in an alias and don’t have that synced. @UGMAVSMUM Can you give us more details about your project?#2020-06-2012:21AJ JaroIn project.clj I have this:
:source-paths ["shared-src" "src"]
and in shadow-cljs.edn I have this:
{:source-paths
        ["resources/public/js/vendor"
         "shared-src"
         "ui-src"
         "ui-test"
         "test"
         "src"
         "dev"] 
Do I also need ui-src in project.clj?
#2020-06-2023:45cflemingYes, your project.clj isn’t reflecting what’s in your shadow project.#2020-06-2119:06AJ Jarough, thanks @U0567Q30W. That’s a noob mistake right there…#2020-06-2121:40cflemingNo worries, I’m planning to support Shadow as a project type soon, which will stop all this messing around.#2020-06-2202:41AJ JaroAnd that’s why you’re the best @U0567Q30W!! I appreciate your active support out on the line!#2020-06-2202:58cflemingI’m going to have to quote Bozhidar here: “I’m not the best, but I’m pretty good” 🙂#2020-06-1918:22borisDoes anyone have any pointers for setting up cursive to work on a babashka project? Is it possible to connect to a babashka REPL?#2020-06-1918:24borkdude@boris834 There are some docs here: https://github.com/borkdude/babashka/blob/master/doc/repl.md#2020-06-2013:40adamIs it possible to make cursive recognize my tests without clj prefix? If I have my namespace as (ns myproj.util.string-test Cursive show the red line underline and is unable to run tests, if I change it to (ns clj.myproj.util.string-test it recognizes and everything works. However, my tests run just fine from the command line without clj prefix#2020-06-2013:47adamI have this in my project.clj:
:source-paths ["src/clj" "src/cljs" "src/cljc"]
And this in my profiles.clj
:test {:source-paths ["test/clj"]
#2020-06-2013:49dpsuttonThat’s in your user profiles.clj and not in the project?
#2020-06-2013:51adam:test {:source-paths ["test/clj"] is in my profiles.clj#2020-06-2013:52dpsuttonThat seems like it should be added to the dev profile of project.clj. I bet it works then#2020-06-2013:53dpsuttonThat seems a legitimate config for this project. And cursive is thinking “test” is on the class path. Not sure if that’s a default or also configured in the project #2020-06-2013:56dpsuttonNot saying you aren’t seeing a bug. Just a potential workaround that seems to also make good sense in this case#2020-06-2013:58adamThe following fixes the problem but I assume I shouldn't be doing this on the top level of project.clj: :source-paths ["src/clj" "src/cljs" "src/cljc" "test/clj"] This doesn't seem to have any effect: :profiles {:uberjar {:aot :all} :dev {:source-paths ["test/clj"]}}#2020-06-2014:04dpsuttonI wonder if there’s two profiles named test. Maybe rename the test one in profiles.clj and reimport the project. Open the profiles config window and see if you can select it?#2020-06-2014:14adamNot sure how I can import the changes on profiles.clj. I am asked to import the changes when I modify projects.clj only via the little popup that appears at the bottom right#2020-06-2014:22dpsuttonRight click on project.clj and it’s in that menu I believe#2020-06-2014:42adamThanks - your tip "should be added to the dev profile of project.clj" helped me solve the problem. I was under the impression that it's enough to have :source-paths ["test/clj"] in my test profile. I added it to my dev profile in profiles.clj and restarted the IDE. Now it works.#2020-06-2014:43adamI ran my tests from command line using lein with-profile +test test that's why it was working...#2020-06-2017:45emccueCurious what the blockers/points of progress are on type inference when the type isn't explicitly imported#2020-06-2023:16cflemingThe types aren’t required to be explicitly imported, Cursive will track them anyway. In your example there must be something else going on. Can you give a concrete example that fails that I could take a look at?#2020-06-2322:16emccueran into one in the wild#2020-06-2322:17emccue
(ns dev.mccue.egge.aws
  (:import (com.amazonaws.services.simpleemail AmazonSimpleEmailServiceClientBuilder)
           (com.amazonaws.services.simpleemail.model SendEmailRequest Destination Message Content Body)))


(defprotocol PhotoService
  (upload-photo! [this path contents])
  (retrieve-photo [this path]))

(defprotocol EmailService
  (send-support-email! [this to subject body]))

(def noop-email-service
  (reify EmailService
    (send-support-email! [_ _ _ _])))

(def ^{:private true} support-email "
#2020-06-2322:17emccuei'll make a project and zip it up#2020-06-2322:20emccue#2020-06-2500:02cfleming@U3JH98J4R The problem in this snippet is that you can’t use (AmazonSimpleEmailServiceClientBuilder.) because the constructor is private. However Cursive doesn’t warn about that, which it should. In fact, oddly, I can open that whole snippet and the only warning I see is in .sendEmail.#2020-06-2500:03cflemingThe solution to that problem is to use (AmazonSimpleEmailServiceClientBuilder/standard) instead, then the type of the builder resolves, at least. However the type of client is still unknown, but that’s a Clojure problem due to type erasure - the type of build() is a generic type which Clojure doesn’t understand.#2020-06-2500:07cflemingI think the constructor problem is because Cursive resolves constructor invocations to the class in cases where the class doesn’t have an explicit constructor. In this case it looks for a constructor but filters out the private ones so it thinks that there aren’t any.#2020-06-2500:13cflemingThere’s definitely scope here for Cursive to track more precise types than Clojure is able to, and to suggest type hints in the appropriate places to fix the code so it actually means what you probably thought you were saying 🙂#2020-06-2500:40emccueYeah, sorry I wasn't running the code so I missed the constructor thing#2020-06-2500:48emccueI feel like there is no reason clojure couldn't track generic stuff - types aren't always erased#2020-06-2500:49emccueLike sure they are "erased", but that info is in the class file#2020-06-2510:05cflemingRight, but Clojure doesn’t track those types at all, it only uses raw types.#2020-06-2017:45emccueso like#2020-06-2017:46emccue
(ns thing
  (:import (some.package A)))

(-> (A/builder)
    (.b "c")  ;; Won't be able to infer this method exists since A$Builder isn't imported
    (.build))
#2020-06-2017:47emccuethe annoyance is just that when i import a class just for cursive to be able to infer properly, it is still listed as unused in the imports list#2020-06-2017:58thosmosI recently attempted to Refactor->Move File a file like app.ui.foo to app.foo and found the refactor support not really working. All it did was move the file, but no refactoring happened. I wound up doing a global search/replace, which was easy enough, but there were some snags that would be avoided by having tooling automation. Is this supported via a different method? I would also like to be able to move individual fns from one namespace to another like from app.foo/myfn to app.bar/myfn and have the tooling change all namespace refs.#2020-06-2315:41wilkerluciohello, I'm having an issue with protocols, I did define one and using it, but Cursive is complaining about the wrong signatura, but the signature is correct:#2020-06-2315:42wilkerluciothe code loads and runs fine, but I don't understand why Cursive is complaining about it, a bug?#2020-06-2321:36cflemingI think the problem is that it’s not managing to parse the defrecord form. The arity warning means that Cursive thinks that form is an invocation. Is this public somewhere I could take a look at?#2020-06-2321:54wilkerlucio@U0567Q30W yes: https://github.com/wilkerlucio/pathom3/blob/master/src/main/com/wsscode/pathom3/connect/operation.cljc#2020-06-2321:55wilkerlucioone strange thing, for the clojure.lang.IFn it did recognized correctly#2020-06-2321:55wilkerluciomaybe the problem is that I have the protocol and the record on the same file? (and that may be confusing Cursive, also its a cljc file)#2020-06-2315:43henryw374when I type a ; on a line in cursive, the semicolon and the line content after that jumps over to the right. anyone know if there is a way to stop it doing that?#2020-06-2321:36cflemingYes, setting the comment alignment setting that @U06CM8C3V mentioned to 0 should work.#2020-06-2408:32henryw374gottit thanks. for some reason it was on 80! no idea if I set that or not#2020-06-2317:04manutter51In the preferences, under Editor > Code Style > Clojure, on the General tab, there’s an option for “Comment alignment column,” you might want to play with that.#2020-06-2317:49tony.kayI’m having troubles with dependency autocomplete again. Seems to die periodically as we go from version to version. I’m on latest everything. Is this known broken? I’ve tried invalidating caches and restarting. Maven remote repos has maven central and clojars, as does the remote jar repos. When I try autocompelte in a deps file I just get nothing:#2020-06-2321:37cflemingYeah, sorry, the underlying API changes a lot here, it’s being actively worked on and they seem to break the invariants around it a lot. Someone else reported this the other day, I’ll try to look at it today.#2020-06-2318:28imreI'm finding lately that when hovering over failed test assertions with large diffs, the IDE freezes for a while, depending on the size of the diff.#2020-06-2318:32imrethis is rather limiting as currently the only way to check an assertion diff is to hover (or view->error description) and click the link at the bottom of the tooltip#2020-06-2321:38cflemingYou can also click the icon in the gutter as long as there’s only a single test result per line, but yes, this is not ideal and I plan to fix it soon.#2020-06-2321:41imreOh yeah, forgot the gutter as I have it hidden#2020-06-2321:43imrethat's a lot better when clicked from there#2020-06-2321:44imreI just don't like the gutter really as it takes up a lot of screen real estate#2020-06-2500:21cflemingYeah, it’s not ideal and I have plans for a much better solution but I’m struggling to get to it 🙂#2020-06-2508:05simongrayThe past few months I’ve been experiencing increasingly lag between typing and seeing characters on the screen. I wonder if other people using Cursive are experiencing this? It manifests in many different ways, but one way I can force it is by writing out a symbol name that opens the code completion prompt. That is itself usually not the laggy part, but rather is it when I backspace a couple of times and delete the final character of the symbol. If I write out the same symbol once again it doesn’t happen, so I guess some cache is being filled and this is causing the lag? I am doing this on Apple’s latest wonder laptop, the 16" Macbook pro, so it’s not my hardware.#2020-06-2510:28cflemingCould that be this issue? https://youtrack.jetbrains.com/issue/JBR-2475#2020-06-2510:28cflemingSomeone reported this here the other day.#2020-06-2512:45simongrayThat seems likely. The delays I’m experiencing are around 0.5-1 seconds.#2020-06-2521:50cflemingOk, I’d be interested to know if the workaround helps.#2020-06-2609:21simongray@U0567Q30W Just tried it out. I didn’t switch to the exact runtime specified, just the AdoptOpenJDK Java 13 I already had installed on my system. It actually seems to have resolved the issue! No idea if I’ve introduced any new problems by using JDK 13. I’m just happy that the editor finally stopped lagging 🙂 Thanks for directing me there.#2020-06-2609:30cflemingOk, great! I would recommend switching to the JetBrains Runtime at some point rather than vanilla OpenJDK since it has a lot of IntelliJ-related fixes.#2020-06-2610:13simongrayYeah, I will do that now. Just couldn’t bother with trying to locate it in that incredibly long, poorly sorted list ;-)#2020-06-2508:11simongrayIt doesn’t seem to be a general problem with Intellij, e.g. Java works fine.#2020-06-2604:14lsenjovTrying out Cursive, I’m having a somewhat weird error to do with package resolution
Errors during project resolution
				The following errors were found during project resolve:
				/Users/ ... /deps.edn:
				/.m2/repository/buddy/buddy-core/1.6.0/buddy-core-1.6.0.pom.part.lock (No such file or directory)
It works perfectly fine on linux, but running on MacOS gets stuck on this. I’m also getting the “no modules containing clojure.main found” error when trying to set up a run configuration. Happens with both local tools and using tools.deps directly. As something possibly related, my deps aliases don’t appear to be working. Source paths from aliases I’ve apparently included don’t appear to have any effect.
#2020-06-2604:16cflemingThat package error is very weird. Do you get that using deps on the command line in that package?#2020-06-2604:17cflemingThe “No modules…” error is probably because your project didn’t sync correctly due to the first error.#2020-06-2604:17cflemingAliases will need to be configured like this: https://cursive-ide.com/userguide/deps.html#working-with-aliases#2020-06-2605:29lsenjovIt works fine running with deps, it’s just cursive/intellij that seems to be having the issue#2020-06-2607:16salam> /.m2/repository/buddy/buddy-core/1.6.0/buddy-core-1.6.0.pom.part.lock (No such file or directory) unless you redacted some portions of the path above, it indicates that the .m2 directory is under the / (root) directory (it's usually under ~, i.e., the path should have been something like ~/.m2/repository/buddy/buddy-core/1.6.0/buddy-core-1.6.0.pom.part.lock) and whatever process that's resolving the maven artifacts is having access permission issues with that directory.#2020-06-2623:39lsenjovHmmmm, it seems like using a relative :mvn/local-repo doesn’t work on cursive on mac#2020-06-2623:58lsenjovThat seems to have fixed the problems though, thanks!#2020-06-2702:16cflemingWhat did your local-repo declaration look like? I can fix that.#2020-06-2707:18lsenjov:mvn/local-repo ".m2/repository"#2020-06-2709:05cflemingPresumably you intended that to be relative to the directory the deps.edn file is in, correct?#2020-06-2716:21lsenjovYes#2020-06-2718:07JHi! Have you already seen this error message? clojure command is in this path!#2020-06-2720:16salamit looks like you’re on macos, what’s the output of executing clojure -Sdescribe in a regular terminal?#2020-06-2810:30J#2020-06-2812:06JI updated clojure with brew upgrade clojure and everything is ok!#2020-06-2803:35bennytrying to get up and running with cursive (from emacs). i have a shadow cljs project and started shadow in a terminal via yarn dev but no matter what i do i can’t load a cljs file. any suggestions?
Syntax error (FileNotFoundException) compiling at (src/app/core.cljs:1:1).
Could not locate app/views__init.class, app/views.clj or app/views.cljc on classpath.
#2020-06-2807:52thheller@benny this is an error from clojure. do you have a :require-macros or something else macro related for app.views but only a app/views.cljs?#2020-06-2813:52bennyi don’t, i literally ran lein new re-frame sockettest , opened it in cursive, ran npx shadow-cljs server in a terminal, created and ran a remote nREPL run config, switched to cljs and tried switching to the namespace#2020-06-2910:18kwladyka
{:a 1 :b 2}
=> {:a 1, :b 2}
Is a way to print this without commas? Is it Cursive thing or Clojure / REPL setting?
#2020-06-2910:21cflemingThat’s Clojure doing that. I’m not sure whether you can turn that off or not. Why do you need maps without commas? They can be read fine as is.#2020-06-2910:24kwladykaI know. Not a big deal, but I past this maps to tests and I like maps without commas. Just a habit and something to what I used to.#2020-06-2910:24kwladykaSo on the end each time I remove all this commas manually 😉#2020-07-0422:26onetomi usually select ", ", then press Ctrl-G a few times to create a multi-cursor, then press Enter to take every key-value pair onto a new line. without commas it wouldn't be so trivial to nicely format it 🙂#2020-06-2910:19kwladykaSometimes I need maps during developing without commas to past into tests etc.#2020-06-2913:15Alex Miller (Clojure team)why do you care?#2020-06-2916:19imrecode style conventions could be one case#2020-06-2913:16Alex Miller (Clojure team)(I don't know of a print setting to not print commas)#2020-06-2916:17lgesslerhi, I'm trying to connect to a remote nREPL (shadow-cljs) and I'm getting Exception while trying to sync input stream: .SocketException: Connection reset as soon as I try to connect. I've verified that the address I'm attempting to connect to is correct (localhost:9000, netstat -lt | grep 9000 confirms that it's listening only when my shadow-cljs process is running). does anyone have ideas for debugging this?#2020-06-2916:17lgesslerFWIW I'm using someone else's project template and I've never had this problem on my own projects so I fear there might be some kind of config issue here#2020-06-2916:21lgesslerdoh, nevermind... I was using "socket nrepl" instead of "Nrepl" for connection type 🙂#2020-06-3002:24benny@lgessler i’m trying to get things working with shadow too, would love any insights you have to share#2020-06-3013:17reefersleepI need this theme for Cursive! https://robbowen.digital/wrote-about/synthwave-84/#2020-06-3013:58imrebeen listening to too much Master Boot Record lately, have we?#2020-06-3014:16reefersleepNope, don’t know that. But I’m listening to Com Truise, Sword of Truth, Lazerhawk and other stuff atm 🙂#2020-06-3013:17reefersleepDoes anyone know a theme that’s equivalent to it? It might never be quite the same since I guess IntelliJ can’t/won’t produce that sweet halogen glow…#2020-06-3022:37cflemingActually… https://twitter.com/bulenkov/status/1126084296228339712?lang=en#2020-07-0206:40reefersleepWow! ❤️ ❤️ ❤️#2020-07-0206:41reefersleepI’ve no idea what he means by “viewing read/write access”, but I want the glow!#2020-06-3013:35reefersleepIn my quest for a nicer-looking theme, I’ve come upon Gradianto. Looks great, but I’m wondering if it’s supposed to be that light in the buffer. I’ve seen the same with other themes at times. Is this a thing that I can configure my way out of?#2020-06-3014:00imreThese theme configs have little to do with Cursive itself, it's IntelliJ providing the base colors. You can customize themes in IntelliJ, including editor window background#2020-06-3014:16reefersleepThanks, I’ll have a look if it doesn’t clear up with some software updates.#2020-06-3014:16reefersleepI’d prefer to have it working out of the box insofar as possible, so that I won’t have to tweak it on every machine/install/upgrade.#2020-06-3013:35reefersleep#2020-06-3013:35reefersleep(source code deliberately obscured)#2020-06-3019:37Kazuki YokoyamaHello, people. Does anyone have issues with Cursive unable to resolve symbols? I have some (:require [datomic.api :as d]) around the code and Cursive highlights stuffs like (d/transact ,,,) with a d/transact cannot be resolved. Any thoughts? Thank you.#2020-06-3019:39imreDid Cursive ever nag you about generating stubs? It's been a while since I worked with Datomic but I vaguely remember the need for stubs there.#2020-06-3019:47Kazuki YokoyamaYes, and it worked! I've never related one thing to another. Thank you, @U08BJGV6E.#2020-06-3019:48imreHappy to help!#2020-07-0100:50cfleming@UNZQ84WJV There’s some explanation of this feature here: https://cursive-ide.com/userguide/macros.html#stub-generation#2020-07-0100:54Kazuki YokoyamaI took a look at it after @U08BJGV6E told about stubs. I was not aware of this feature. Thank you, @U0567Q30W#2020-07-0118:25royalaidHey @cfleming, is there any reason why someone would want to autocomplete a symbol when defining a def or defn?#2020-07-0121:26cflemingThere isn’t the way it works now, no. I’ve been planning to make a more general fix to this problem (general context sensitive completion) but perhaps I can hack something in the meantime. This is a problem for local bindings too, which is also annoying.#2020-07-0121:28cflemingIntelliJ does actually provide some completion when writing variable declarations if you have unresolved symbols in the scope of the new var, on the theory that you’re probably defining something that’s missing in your code.#2020-07-0121:50royalaidI wonder if there is a good in between, because getting a long.namespace.foo.bar.shaded/flip when I want flip is akward. Maybe just short names as completion?#2020-07-0121:51royalaid(I might be mis-remember how this happens so I will try to capture the bad behavior next time it happens)#2020-07-0121:54cflemingThanks, if you have especially problematic cases that would be useful.#2020-07-0118:26royalaidand if not would it be possible to have cursive disable symbol completion then?#2020-07-0118:44dpsuttonis it possible to rename repls? I'm getting lost which one is cljs, which is port 7000, which is on port 7001, etc#2020-07-0119:49salamthis feature appears to be implemented and be shipped with cursive 1.10: https://github.com/cursive-ide/cursive/issues/2282#2020-07-0120:01dpsuttonthat issue was closed as a dupe of https://github.com/cursive-ide/cursive/issues/1974 which is listed as open. has cursive 1.10 shipped?#2020-07-0120:03dpsuttonapparently i'm on 1.9.2-eap8-2020.1 so this isn't "shipped" yet as far as i can tell#2020-07-0120:03dpsuttonbut big thanks for finding the issue so i can follow along#2020-07-0120:03salamah, i see. no, i don’t think 1.10 has even eaps yet.#2020-07-0121:25cflemingNo, it’s not - I had planned to start the EAP for it earlier but 2020.2 threw a spanner in that. I’m going to release 1.9.2 stable shortly, and then I should be able to start the next EAP.#2020-07-0206:57mike_ananev@cfleming Hello, Colin! I have Idea 2020.1 Ultimate and Cursive 1.9.2 (latest stable version) When I edit deps.edn I have no lib version recommendation (no pop up). All maven repos are indexed (clojars, maven central). Some time ago version recommendation worked fine, Where I can check settings to enable it?#2020-07-0210:06cflemingHi, someone else reported this as well, I’ve filed https://github.com/cursive-ide/cursive/issues/2393 so it doesn’t get lost.#2020-07-0210:15mike_ananevThanks!#2020-07-0207:54Vincent Cantin@cfleming hi, the symbols seems to be unrecognized when working with libraries whose namespace is made of just 1 part.#2020-07-0207:56Vincent Cantinmy project is deps based, and the library is
clojure.java-time {:mvn/version "0.3.2"}
#2020-07-0208:00raspasovcould stub generation be related? https://cursive-ide.com/userguide/macros.html#stub-generation#2020-07-0208:03Vincent CantinSuper thx, it worked#2020-07-0208:04raspasovGreat 🙂#2020-07-0209:11cflemingIn fact, that very library is the example in the stubs doc 🙂#2020-07-0209:12Vincent Cantinexact#2020-07-0208:38mokrHi, is anyone aware of a way to trigger a download of ClojureDocs? I seem keep losing them. This time it might have happened when I updated Cursive, but there was no “download Clojuredocs” popup afterwards, or after the two IntelliJ restarts I’ve tried so far.#2020-07-0209:51Cris B@mokr try Settings -> Languages & Frameworks -> Clojure . There's an 'update' button for ClojureDocs at the bottom of the preferences pane under 'Documentation Options'#2020-07-0209:55mokrThanks, @cb.lists , I missed that one. Too bad it doesn’t turn up when I search settings for “ClojureDocs”. But, it now dawned on me that these only turn up in docs for clj-files, not cljs.#2020-07-0210:05cflemingYes, I need to fix that. At one point this worked but it seems to have broken. I’ve just filed this so I don’t forget about it again: https://github.com/cursive-ide/cursive/issues/2392#2020-07-0210:10mokrGreat, then it will probably start working again at some point 🙂 BTW: I couldn’t find it in online docs either, so maybe you should make a small note there. Anyway, keep up the good work! I really enjoy Cursive.#2020-07-0210:12cflemingThe ClojureDocs support you mean? That’s described here: https://cursive-ide.com/userguide/documentation.html#clojuredocs-support#2020-07-0210:12mokrI was thinking about the “re-download” part.#2020-07-0210:13mokrBased on the docs and the search in settings I got the impression that there was nothing I could do about the situation apart from hoping to see the pop-up at some point#2020-07-0210:17cflemingAh, yes, good idea#2020-07-0210:17cflemingI’ll check why the doc search isn’t working too#2020-07-0210:19mokr👍#2020-07-0210:00mokrI generally use ClojureDocs on the web without thinking about the clj<->cljs distinction#2020-07-0215:15mileloI'm sure this is covered somewhere but couldn't find it. Is there a way to get cursive to recognise symbols for clojurescript ns requires in the form
["@material-ui/core" :refer [AppBar]]
["@material-ui/icons/Info" :default info-icon]
etc? Thanks
#2020-07-0221:41cflemingNot yet unfortunately, but I’m hoping to fix that soon.#2020-07-0315:42mileloOk great, thanks for the response.#2020-07-0216:02buttergunsHello @cfleming! When I start a REPL with Run with IntelliJ project classpath everything works perfectly. As soon as I switch to Run with Leiningen checked, I receive this:#2020-07-0216:03buttergunsMacOS Catalina, Cursive 1.9.0-2019.3#2020-07-0221:42cflemingThat is super weird.#2020-07-0221:43cflemingI’m actually about to upgrade to Catalina, I’ll see if I can repro it then.#2020-07-0216:05manutter51IntelliJ has a built-in JDK, but Leiningen doesn't. I installed a JDK from http://adoptopenjdk.net on my Mac.#2020-07-0216:07buttergunsExecuting lein repl on the command line works perfectly though.#2020-07-0216:30manutter51Hmm, might need to go under project settings and make sure your JDK is set as the project JDK#2020-07-0217:10butterguns#2020-07-0217:10buttergunsBit of a headscratcher! :thinking_face:#2020-07-0217:29manutter51Hmm, that is puzzling. Do you have the right Leiningen version listed in Preferences "Build, Execution, Deployment" -> Build Tools -> Leiningen?#2020-07-0217:33manutter51Also, in my Run Configuration, under environment variables, if I click the Browse icon in the right-hand side of the Environment Variables field, I have "Include system environment variables" checked, which pulls in some java-related stuff, maybe that's important?#2020-07-0219:31butterguns> Do you have the right Leiningen version listed in Preferences Well look at that! That fixed it! I had 2.9.1 in my prefs, but my lein version was 2.9.0. Thanks @U06CM8C3V!!#2020-07-0219:31buttergunsVery subtle and pernicious issue#2020-07-0219:32manutter51:thumbsup:#2020-07-0216:07bennyis there a way to load all files to the repl (i.e. all tests)#2020-07-0422:31onetomi don't there is anything simple to do that, but i would recommend looking into either https://github.com/cognitect-labs/test-runner or https://github.com/lambdaisland/kaocha if you want to load all tests. while it's a bit manual and hence also slightly error-prone, you can just create an all-tests namespace, which simply requires all the test namespaces. i think this approach can scale quite well until you only have 10-20 test-namespaces and saves you from introducing any of the test-related tools i just mentioned.#2020-07-0518:52stopaHey team, noob question. Whenever I update dependencies in deps, I don't see the refresh. The docs says to press the "refresh" button, but I am not sure where it is Is there some command I can search with for cmd + shift + a?#2020-07-0518:54stopaIf I search "Refresh", and press that, nothing happens. I did notice an error from cursive, about a non-idempotent computation
java.lang.Throwable: Non-idempotent computation: it returns different results when invoked multiple times or on different threads:
  PsiMethod:minusDays (class com.intellij.psi.impl.compiled.ClsMethodImpl) != PsiMethod:minusDays (class com.intellij.psi.impl.compiled.ClsMethodImpl)
  which is element of 
#2020-07-0521:50salamthe “Refresh” button is the first one in the tool bar of the “Clojure Deps” tool window as shown on the right-hand side in the following screenshot:#2020-07-0522:54Mikael AnderssonIn cursive a changed .deps file should also pop up a 'ballon' in the lower right corner with a clickable 'Import Changes' text unless the notification is turned off in preferences/notifications.#2020-07-0523:18stopaApologies for the v noob questions team -> 🙈 how can I access the Clojure deps tool window? (Also am not quite sure where I can get it. cmd + shift a only shows the preferences pane. Also am not quite sure where the notif option is)#2020-07-0523:24salamyou should be able to find it following one of the ways to open tool windows as described here: https://www.jetbrains.com/help/idea/tool-windows.html#open#2020-07-0523:29stopaOkay, this gets interesting -- I don't seem to have the "Clojure Deps" tool window. Maybe I opened the projected incorrectly -- taking further look#2020-07-0523:33salamhmm… the presence of REPL tool window and absence of Clojure Deps tool window indicates that Cursive didn’t recognize your project as a Deps project. you may need to reimport your project as a Deps project (don’t forget to delete the .idea directory and the *.iml files in the project directory)#2020-07-0523:38stopaUpdate: ooky doke we are back! Thanks team#2020-07-0523:39stopa(indeed re-initiate did the trick. Maybe it was because I had a pom.xml file in there too#2020-07-0523:41salamactually, i was, too, confused by the presence of deps.edn, pom.xml, and... a Makefile… 😅#2020-07-0523:42stopaxD My explanation: pom.xml was to be able to build a java jar -- uberdeps needed it. Will delete in my build script Makefile for having handy commands dev-repl, build-jar, etc If there are some recommended setups for deps projects, would love to know : } -- currently building on the fly#2020-07-0608:20imrere: makefile we started using just and Justfile s for the handy commands purpose. Has a lot less quirkyness than make#2020-07-0700:28cfleminghttps://twitter.com/CursiveIDE/status/1280295746919526400#2020-07-0716:24scarytomI'm wondering whether I have inadvertently activated a feature of Cursive, or whether the default has changed. When I hover over a word in the editor pane for more than a couple of seconds, the documentation pane opens, which hides my repl. This is quite irritating. I'm used to hitting ctrl-q to get documentation when I want it. Is there a way to turn the hover-doc-mode off @cfleming? I had a look in settings, but I cannot see anything obvious.#2020-07-0716:28scarytomI wonder if it is this? > 0.1.54 (Apr 19) > Notable changes: > ... > Hovering over a symbol shows the evaluation of the symbol in a tooltip. (from https://cursive-ide.com/eap.html) I'm not getting a tooltip though#2020-07-0716:39scarytomOkay, I think I have worked out how to fix this, but you might want to tweak this a bit @cfleming. I had my doc configured to open as a Tool Window. When I changed back to "open as Popup" (see gif 1) then I can hover to get a doc tooltip, then the menu on that tooltip has an option to uncheck "Show on mouse move" (see gif 2)#2020-07-0716:42scarytomTo reproduce the irritating world I was living in, ctrl-q once then tick "Show on mouse move" in the tooltip elipsis menu, then ctrl-q twice to open the documentation as a tool window. Now you can open the repl tool window, then hover over things in the editor tab and watch the documentation tool window take over the repl.#2020-07-0800:40cflemingHmm, I see. Unfortunately none of that is actually Cursive, that’s just standard IntelliJ features.#2020-07-0809:26scarytomoh well, never mind then. Thanks.#2020-07-0716:54tvaisanenHi, I've got a bit of a problem with my cursive plugin.. I collapsed the REPL input field and I can't seem to figure how to get it uncollapsed. Any tips?#2020-07-0718:54salam#2020-07-0718:55Graham Seyffertso annoying when this happens 😅#2020-07-0718:58salamturns out, you can also just double-click on the divider to reset the height of the editor pane.#2020-07-0718:59Graham Seyffertoo that’s good to know#2020-07-0719:26tvaisanenI've tried the drag up from the bottom but haven't succeeded in it. Double tap worked out nicely tho, Thanks!#2020-07-0719:30tvaisanenI think that my problem with the draggin might have been the fact that I had the file tabs under the REPL window and that's why the drag up didn't register correctly.#2020-07-0718:43Graham Seyffertdoes anyone know how to tell Cursive to package Clojure source files into whatever JAR gets made when you “build” a project? My project uses Maven, and this works fine w/ clojure-maven-plugin when I build on the command line, but when I build via IntelliJ, the application blows up at startup when trying to load Clojure files only from my project (finds e.g. clojure.core just fine) with a message that it can’t find the right .class / .cljc / .clj files#2020-07-0718:44Graham SeyffertIve tried telling IntelliJ that this directory is a “resource” directory instead of a “source” directory as well, but that doesn’t seem to help#2020-07-0718:48Graham SeyffertIn my pom.xml, I’m able to achieve this via these clojure-maven-plugin options -
<temporaryOutputDirectory>true</temporaryOutputDirectory>
                    <copiedNamespaces>
                        <namespace>project.*</namespace>
                    </copiedNamespaces>
                    <copyDeclaredNamespaceOnly>true</copyDeclaredNamespaceOnly>
#2020-07-0719:04salami'm not 100% sure but i don't think cursive works with maven. is there any particular reason you're using maven instead of other clojure-native options?#2020-07-0719:05Graham SeyffertI don’t have much of a choice - most of the repo is Java, and maven is the build tool the whole org uses#2020-07-0719:05Graham Seyffertyeah that was my fear… up to now we’ve just been AOT compiling our Clojure code#2020-07-0719:05salamok, i see, historical reasons. 🙂#2020-07-0719:06Graham Seyffertindeed#2020-07-0719:06salamso it feels like this is more of an intellij idea problem.#2020-07-0719:09salamso if you execute mvn package or something alike it builds the right ubjerjar but if you "build" from within intellij idea it doesn't?#2020-07-0719:09Graham Seyffertyeah it may be. And yeah, exactly#2020-07-0719:10Graham SeyffertCursive has an option to compile (or not / or only some) Clojure namespaces, hence why I started with Cursive#2020-07-0719:16salamhow are you triggering the "building" of the uberjar in intellij idea?#2020-07-0719:22Graham SeyffertJust Build -> (Re)build Project#2020-07-0719:22salamok#2020-07-0719:22Graham SeyffertI always Rebuild after mucking with compiler settings#2020-07-0719:23salamhave you tried using the Maven tool window?#2020-07-0719:25salamthe Build menu has always been a source of confusion for me. when working with a maven project, i'm not quite certain what it means to execute "Build -> (Re)build Project". is it mvn compile? mvn package? mvn install?#2020-07-0719:27salamso i would go ahead and try one of those goals in the Maven tool window (whichever you're using on the command line)#2020-07-0719:42Graham Seyfferthmm that’s a good thought! Let me mess around with that#2020-07-0800:43cflemingRight, so compiling within IntelliJ is normally distinct from building with whatever build tool you’re using. The Gradle integration has an option to use the Gradle commands whenever invoking the IntelliJ build, but I don’t know if that’s available for Maven too.#2020-07-0800:43cfleming@U8XCX0732 When you build your project in IntelliJ, are you sure a jar is produced, or are the artifacts normally built using Maven?#2020-07-0800:50salam> The Gradle integration has an option to use the Gradle commands whenever invoking the IntelliJ build, but I don’t know if that’s available for Maven too. that just reminded me of an intellij idea feature where you can let intellij idea delegate build actions to maven. https://www.jetbrains.com/help/idea/delegate-build-and-run-actions-to-maven.html#delegate_to_maven#2020-07-0809:56cflemingIf IntelliJ is actually producing jars for you, it will be done using Artifacts: https://www.jetbrains.com/help/idea/working-with-artifacts.html. You can then configure the artifact to include your Clojure source.#2020-07-0809:57cfleming@UDCGPTV9R That was what I meant, thanks for the link.#2020-07-0816:59Graham Seyffertawesome, I think telling IntelliJ to defer to maven is the way to go here. Unfortunately, maven is definitely slower than IntelliJ 😅#2020-07-0818:27Graham Seyfferturgh, now of course it doesn’t let me defer only build, so now I have to mess around with the run config because that’s not working properly#2020-07-0818:45Graham Seyffert@cfleming > You can then configure the artifact to include your Clojure source. Yes, I’ve tried telling IntelliJ that src/clj is a Resource folder, but that doesn’t seem to work#2020-07-0720:17Drew VerleeIs there anything that enumerates the ways in which intelliji + cursive does in terms of interopt with java and javascript? and/or compares to popular solutions (e.g emacs + cider) for interopt? I'm quickly approaching the feel that anytime i touch java its worth using intelliji but i would like to be sure of the trade off before the investment.#2020-07-0720:40salami've never seen/heard such a thing exists. out-of-the-box, hassle-free, native java inter-op support is one of the important reasons for me to use intellij idea and cursive exclusively for clojure (and any other jvm languages.) i believe cursive relies on (delegates to) the intellij platform when it involves java inter-op and we know the intellij platform has the best support for java therefore i doubt there is, if exists, any other solution that beats what the intellij platform has to offer (for now.)#2020-07-0721:20Drew VerleeWould you say cursive gives you everything intelliji can offer when it comes to java when your doing interopt? or are their limitations because your in clojure?#2020-07-0721:53salami would say almost everything. in situations where cursive can figure out the type of the thing you’re working with, you get most of those nice things that you get from intellij idea when you’re working with pure java (method signatures, code completion, searching for usages and whatnot)#2020-07-0822:22Pavel KlavíkYou want to add type hints to your function parameters, e.g. [^File file]#2020-07-0910:12cfleming@U0DJ4T5U1 This isn’t explicitly documented anywhere, no, although it should be - it’s on my list to document. Basically Cursive understands Java types (via IntelliJ) and it also performs more or less the same type inference in the editor as the Clojure compiler does. This means that you can get type-sensitive completions in cases like these:#2020-07-0910:13cfleming(.meth| ^MyType myObj) Here Cursive knows the type explicitly.#2020-07-0910:13cfleming(-> ^MyType myObj .meth|) Same here.#2020-07-0910:14cfleming(let [x (MyType.)] (.meth| x)) Here Cursive uses type inference and knows the type of x.#2020-07-0910:15cflemingThis works for method return types too. Here’s a concrete example:#2020-07-0910:16cfleming
(let [x (ArrayList.)
      y (.iterator x)]
  (.has| y))
#2020-07-0910:17cflemingHere Cursive knows the type of x and y, and you’ll get the completions for Iterator (e.g. .hasNext in this case) here.#2020-07-0910:17cflemingNote that this works even if Iterator isn’t imported in this namespace.#2020-07-0910:17cfleming(In all those examples above, | is where the caret is, and you’ll only get the completions for the relevant type there)#2020-07-0910:20cflemingPrefix notation is actually a pain here, since you often type the method before the receiver. Cursive can help with this. If you type (myObj .meth|) and Cursive knows the type of myObj, you’ll get the context sensitive completions there and when you choose the completion the forms will be swapped, and you’ll end up with: (.method myObj |).#2020-07-0910:20cflemingIt’s been pointed out to me that it would make more sense to use the . form for this: (. myObj meth|) and then on completion convert to the same form above, but that doesn’t work right now.#2020-07-0910:23cflemingAs well as this, the Java stuff is just nicely integrated - getting doc on an interop form shows the right doc with no setup, navigation to Java source etc, you can rename things in Java and the corresponding Clojure gets updated and vice versa - that all just works. The fancier Java refactorings don’t work automatically for the interop code, e.g. remove parameter etc.#2020-07-0910:23cflemingLet me know if you have more questions about this.#2020-07-0910:24cflemingOh, and you also asked about JavaScript - there’s no type inference for JS yet, and it’s much harder than in Java anyway. Cursive has some decent support for the Google Closure library (which should get better soon) but it’s still very primitive compared to the Java interop support.#2020-07-0913:38Drew Verleethanks @cfleming this was very helpful#2020-07-0915:29salam> This isn’t explicitly documented anywhere, no, although it should be - it’s on my list to document. this would be really helpful in showcasing cursive’s java inter-op features to attract developers who are familiar with intellij idea. i converted a few clojure developers from vscode to intellij idea just by showing how seamless its integration with intellij idea is and how you can leverage almost all of your intellij idea knowledge when writing clojure code. of course, i did it manually so it’s totally possible i missed some. it would be great if i could just point them at some kind of animated demos (like the paredit/parinfer gifs.) on the cursive site.#2020-07-0921:36cflemingBTW one other major thing I forgot to mention here is debugging - since it’s all JVM, you can debug from Clojure through Java and back again, which is a lot of peoples’ main motivation for using Cursive I believe.#2020-07-0921:36cflemingAnd in all the above, you can substitute Scala/Kotlin/whatever for Java as needed.#2020-07-0915:29salam> This isn’t explicitly documented anywhere, no, although it should be - it’s on my list to document. this would be really helpful in showcasing cursive’s java inter-op features to attract developers who are familiar with intellij idea. i converted a few clojure developers from vscode to intellij idea just by showing how seamless its integration with intellij idea is and how you can leverage almost all of your intellij idea knowledge when writing clojure code. of course, i did it manually so it’s totally possible i missed some. it would be great if i could just point them at some kind of animated demos (like the paredit/parinfer gifs.) on the cursive site.#2020-07-0913:41Drew Verleewhen i run the repl i setup via run > configurations > local-repl > Nrepl it throws an excpetion that it couldn't find refactor nrepl. Why is it looking for refactor nrepl? Is that a dependency of using an nrepl server? I believe thats the case, on emacs i believe this is auto injected when i run cider-jack-in. What do people do using cursive? add a dev alias to to their deps.edn and add the dep there?#2020-07-0915:41salammy typical workflow (on macos) is: 1) start a socket repl server in the terminal 2) start a remote socket repl client in intellij idea (via cursive, of course) the benefits are: 1) i have finer control over how i want to configure the repl server (via deps.edn) 2) separation of concerns: if intellij idea crashes, i still have my repl server and all the state in it#2020-07-0915:47salamof course, this doesn’t mean the local-repl approach won’t work in cursive. when i started with cursive, that is what i used but over time, as i got more and more familiar with repl-aided development, i switched to the current remote-repl approach.#2020-07-0921:27cfleming@U0DJ4T5U1 Cursive doesn’t use or look for refactor nrepl. Can you post the stacktrace?#2020-07-0921:31Drew VerleeYes. Though it might be a while. Thanks again.#2020-07-0915:47salamof course, this doesn’t mean the local-repl approach won’t work in cursive. when i started with cursive, that is what i used but over time, as i got more and more familiar with repl-aided development, i switched to the current remote-repl approach.#2020-07-0915:55Adrian SmithIs there anything new on the inline REPL evaluation feature? I think I remember it was mentioned on twitter a while ago, I'm really excited about it#2020-07-0921:27cflemingNothing new I’m afraid, but it’s definitely on my short-medium term to-do list.#2020-07-0921:28cflemingDropping support for older IntelliJ versions will help that along.#2020-07-0921:40dvingoAnyone on macos 10.15.5 (19F101) experiencing crashes of intellij which brings down the OS as well? I'm at a loss. I just switched from a linux machine which also experienced intellij crashing the OS. I'm about to switch to emacs + cider. this is unbearable.#2020-07-0922:19salami've never experienced this. my environment: IntelliJ IDEA 2020.1.3 (Ultimate Edition) Build #IU-201.8538.31, built on July 7, 2020 Runtime version: 11.0.7+10-b765.64 x86_64 VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o. macOS 10.15.5 GC: ParNew, ConcurrentMarkSweep Memory: 1981M Cores: 8 Registry: ide.browser.jcef.preinit=false Non-Bundled Plugins: String Manipulation, org.jetbrains.kotlin, com.cursiveclojure.cursive, org.intellij.scala#2020-07-0923:59cflemingI haven’t heard anything about that, no. I’m not on 10.15 myself, although I’m planning to upgrade sometime soon.#2020-07-1000:00cflemingDefinitely report that at https://youtrack.jetbrains.com/issues if you can’t find a relevant issue there - the JetBrains staff are very responsive on their tracker.#2020-07-1000:03cfleming@U051V5LLP ^^#2020-07-1000:45dvingothanks for the feedback, I'll try reporting it and see what happens#2020-07-0921:45Alex Miller (Clojure team)wow, that sounds bad#2020-07-0921:46Alex Miller (Clojure team)I'm on 10.15.5, have never seen that#2020-07-0921:46Alex Miller (Clojure team)there may be a crash report somewhere#2020-07-0921:47Alex Miller (Clojure team)if you open Console, there's a Crash Reports section#2020-07-0921:47dvingoah thank you, was trying to find it#2020-07-0921:48dvingoI believe the linux issue was due to intellij not handling a 4k screen, but the mac box is not 4k#2020-07-1006:24jsyrjalaNoticed that IDEA becomes completely unresponsive when running a test which fails and then hovering on the test to get diff and diff happens to be large#2020-07-1006:27jsyrjalamacos, IDEA 2020.1.2, Latest Cursive#2020-07-1006:28salami don't think this is a cursive-specific problem. intellij idea, in general, hangs when rendering large amount of text.#2020-07-1006:28jsyrjalaunresponsive meaning that cmd-Q will not kill the app.#2020-07-1006:29salamyou can try this by converting that edn data to json and paste it into a json scratch file.#2020-07-1006:29salam300k is a lot#2020-07-1006:30jsyrjalaMaybe Cursive could detect that this amount of text will hang the ide and not render it.#2020-07-1006:31salamit could but i don't how useful the diff would be in that case...#2020-07-1006:32jsyrjalaIt think it would be better to say that can’t show diff because it is too large than to hang the whole IDE 😉#2020-07-1006:32salamagreed. 🙂#2020-07-1006:39jsyrjalaI made an issue https://github.com/cursive-ide/cursive/issues/2396#2020-07-1007:50imreRelated: https://clojurians-log.clojureverse.org/cursive/2020-06-23/1592936912.211900#2020-07-1006:26jsyrjala(is (= {} very-large-list-of-list-of-maps)#2020-07-1006:26jsyrjalathe object is about 300k as EDN file#2020-07-1014:09Jakub Holý (HolyJak)Hi! Cursive tells me > thrown-with-msg? cannot be resolved for (deftest ... (is (thrown-with-msg? ...))) (I do require [clojure.test :refer :all]) Is this a known problem or do I do something wrong? The code runs just fine.#2020-07-1014:11arnaud_bosI just (declare ...) it so the warning disappears. Your require is right and you're not doing anything wrong 🙂#2020-07-1014:11arnaud_bosthrown-with-msg? is not something you can import, it's clojure test macro "magic"#2020-07-1014:12arnaud_boshttps://github.com/clojure/clojure/blob/28efe345d5e995dc152a0286fb0be81443a0d9ac/src/clj/clojure/test.clj#L518#2020-07-1014:14arnaud_bosThis comment is interesting : https://github.com/clojure/clojure/blob/28efe345d5e995dc152a0286fb0be81443a0d9ac/src/clj/clojure/test.clj#L472 You can extend clojure.test thanks to the assert-expr multimethod.#2020-07-1014:21Jakub Holý (HolyJak)ok, thanks! I expected Cursive to have some special support for the built-in stuff in clj test. Nice trick with declare!#2020-07-1019:32katox@danvingo if your machine is a recent one you might have bumped into an CPU bug in icelake: https://www.techpowerup.com/268479/intel-ice-lake-cpus-have-a-system-crashing-bug#2020-07-1019:34katox@danvingo BTW I use a 4k screen on Linux with cursive without any new specific issues#2020-07-1021:04dvingo@katox yup MacBook Air 2020 - could be it#2020-07-1021:06dvingoprobably will just use it as a frisbee, or a coaster#2020-07-1021:09dvingopretty shit luck this year - the linux machine was the dell xps dev edition laptop with a 4k screen. I spent about a week scouring the intellij forums and that issue showed up, so that was my best guess, but could have been some other hardware issue. I returned that and got the macbook only to have it crash as well. I'm looking at a thinkpad next...#2020-07-1021:10dvingolenovo finally has some amd models#2020-07-1116:20onetomyou are just going to trade hw your issues with a different set of ones, which you will have probably even less info about on the internet >;D#2020-07-1117:07dvingoyep... I'm going to try emacs on the macbook for a while and see if there are any issues, the more time others can find and fix the issues on the new hardware the better 😄#2020-07-1022:08imre@cfleming I need this in my life (with editor support 🙂): https://twitter.com/cgrand/status/1281527501387440128#2020-07-1101:07cflemingThat’s pretty freaky 🙂#2020-07-1101:09cflemingI’m actually not sure how I’d add support for that one, I’ll think about it.#2020-07-1022:09imreI just recently rewatched https://youtu.be/kt4haSH2xcs from you and wondering if there are any plans to extend the macro support#2020-07-1101:08cflemingSo, yes, there are, but unfortunately there’s a somewhat large refactor I have to do first, and I never get to it.#2020-07-1208:23imreThat talk is impressive. I saw it a few years ago and got there again reading the clj-kondo macro thread on clojureverse. It would be really nice to see an alternative approach emerge.#2020-07-1300:51cflemingThanks! I think that talk was one of the original motivations for spec - Rich came up and talked to me quite a bit about it afterwards.#2020-07-1300:52cflemingI’m actually planning to (finally!) get the error-marking part of that in Cursive soon, based on a new parser I wrote a while back. That will allow a lot of nice things, like context-sensitive completions.#2020-07-1309:18imreThe similarity with spec did occur to me while watching the talk, good job, if that's really the case 🙂#2020-07-1309:19imreLooking forward to the new stuff 🙂
#2020-07-1022:10imreTo perhaps be able to properly use macros like this#2020-07-1117:01dvingoIf I alter-meta! on a var to change it's docstring will cursive pick this change when showing the documentation help? - same question for clojurescript - it looks like it's not working in cljs#2020-07-1117:43dpsuttoni see in clojure.core there are
(alter-meta! #'*agent* assoc :added "1.0")
(alter-meta! #'in-ns assoc :added "1.0")
(alter-meta! #'load-file assoc :added "1.0")
none of these seem to have documentation in cursive
#2020-07-1117:44dvingogotcha - thanks!#2020-07-1117:45dpsutton(alter-meta! (find-ns 'clojure.core) assoc :doc "Fundamental library of the Clojure language") in clj, (doc clojure.core) returns that. in cursive, control-j on clojure.core says "The core Clojure language"#2020-07-1117:45dpsuttonwhich comes from the def form
(ns ^{:doc "The core Clojure language."
       :author "Rich Hickey"}
  clojure.core)
interesting that is overridden with such similar language. and not done in-line
#2020-07-1118:00dvingoha, that's interesting#2020-07-1123:25cflemingCursive won’t pick this up when getting doc in the editor (which comes via static analysis) but in the REPL it will.#2020-07-1203:37Vincent CantinIs it possible to have the size of the REPL view match the real size on the screen (i.e. without a scroll bar)? That’s to have the display of Clojure data been printed without me having to scroll the view toward the right side each time I am evaluating a new expression.#2020-07-1203:39Vincent Cantin#2020-07-1300:49cflemingUnfortunately that’s actually surprisingly tricky. It’s also sort of transient, since it depends on the size of your REPL at any particular time (i.e. if you later resize your REPL previously printed forms will be wrong. Currently this just uses the standard editor right margin width.#2020-07-1300:49cflemingI can investigate making that dynamic based on the size of the window, could you file an issue for that?#2020-07-1308:19Vincent CantinCursive marks some symbol as "unresolved" while they should not be resolved, in a clojure.core/case expression (it's a macro).#2020-07-1308:21Vincent Cantinthe keys in a case expression are not evaluated#2020-07-1322:52cflemingYes, that’s true.#2020-07-1504:45Vincent CantinIt would be nice if the Clojure-specific constants like ##Inf would appear in the auto-completion list.#2020-07-1510:23tengstrandI haven't been able to evaluate expressions in Cursive for a while (when stopping at a break point). Is there a solution for that?#2020-07-1512:44katoxYou can set a break-point for one thread only instead of for all. But eval expression (alt-f8) should work even though there are some limitations.#2020-07-1601:20cfleming@U1G0HH87L What happens when you do?#2020-07-1609:42tengstrandI can evaluate "123" but not "(+ 1 2 3)" (or any other expression) @U0567Q30W.#2020-07-1623:00cfleming@U1G0HH87L That is https://github.com/cursive-ide/cursive/issues/2345, which should be fixed in Cursive 1.9.2.#2020-07-1706:16tengstrandIt works now, thanks!#2020-07-1518:35Michael CohenTrying to create a new Remote Clojure REPL configuration but seeing this error "No modules containing clojure.main found"....any ideas?#2020-07-1518:41salamyou can fix that by selecting a project/module from the “Project” drop-down list. #2020-07-1518:43Michael Cohenthe project dropdown list is....empty#2020-07-1518:43Michael Cohennot sure why, i have added a Leiningen module to the project#2020-07-1518:45salamit sounds like cursive was unable to recognize your project as a leiningen project. #2020-07-1518:45Michael Cohenhmm....i see these in the event log
11:43 AM	Dependency resolution error
					Error synchronising /Users/michaelcohen/xbeam/muncher/project.clj:
					Failed to collect dependencies at lein-ancient:lein-ancient:jar:0.6.15

11:43 AM	Dependency resolution error
					Error synchronising muncher:0.1.0-SNAPSHOT:
					Failed to collect dependencies at amazonica:amazonica:jar:0.3.152
#2020-07-1518:47salamyeah, that seems a like a problem that can cause this kind project/module related issues.#2020-07-1518:48salamdoes it work if you execute a lein command on the command line?#2020-07-1518:49Michael Cohenyeah, app runs fine otherwise, lein repl, etc...#2020-07-1518:53salamhmm… what does the Leiningen tool window look like?#2020-07-1518:59salamif you cannot find the leiningen tool window or it’s empty, you may have to re-import the project as a leiningen project: https://cursive-ide.com/userguide/leiningen.html#2020-07-1519:08Michael Cohen#2020-07-1519:09salamso your project was correctly recognized as of type leiningen... what happens if your hit the refresh button at the top?#2020-07-1519:10salami'm just curious to see if it'll cause the same maven errors...#2020-07-1519:11Michael Cohenit does appear to error. it pops open another message in the event log in the bottom right corner. which is strange, because....#2020-07-1519:11Michael Cohen#2020-07-1519:12Michael Cohen#2020-07-1519:14Michael Cohenfkin amazonica garbage#2020-07-1519:14salam😄#2020-07-1519:15salamyeah, we used it before but quickly switched to cognitect-labs aws-api and never looked back...#2020-07-1519:17salamone more thing to try is the good ol', ultimate weapon: "Invalidate Caches / Restart"#2020-07-1522:08chrisulloa+1 on moving away from amazonica#2020-07-1522:44Michael CohenFWIW, i had to remove the :local-repo key from project.clj and then Cursive picked everything up just fine#2020-07-1522:45salamah... sounds like a bug to me.#2020-07-1522:51Michael Cohenappreciate your time though 🙂#2020-07-1601:23cfleming@U015YDZ16AJ Just to make sure I understand, using :local-repo broke the Cursive project resolution, is that right? What did you have that set to?#2020-07-1606:11Michael Cohen@U0567Q30W yep, :local-repo was just set to a directory in the root of the project. all of the jars had already been downloaded there by maven. first i removed amazonica, which was the very first dep in this project, then tried to start a repl, got the same error that the next dep couldn't be resolved. removed that one, got the error again with the new, first dep in project.clj , finally just removed :local-repoand then it resolved everything...#2020-07-1606:42cflemingOk thanks, I’ll check that.#2020-07-1808:22mike_ananevI've got the same error today, in existing project, using deps.edn project. Any solutions?#2020-07-1808:27mike_ananev"Invalidate Caches / Restart" solved my problem.#2020-07-1621:35kennyHow does Cursive determine which "standard port file" to use if multiple exist? (e.g., .nrepl-port and .shadow-cljs/nrepl.port) Does it pick the newest one?#2020-07-1623:01cflemingIIRC it just tries them in order and uses the first one it finds. I could change it to pick the newest one pretty easily.#2020-07-1623:03kennyNewest seems like it'd make more sense. My guess is if you're relying on that behavior you should probably specify a custom port file haha.#2020-07-1701:15cflemingYeah, I think that’s probably true 🙂#2020-07-1719:30jCan Cursive auto run tests? Intellij products usually have an option under Run to auto test on file change#2020-07-1720:38salami don't think cursive can but you can try kaocha, a feature-rich test runner that has the --watch mode: https://github.com/lambdaisland/kaocha#2020-07-1721:35jthanks @UDCGPTV9R! I'll take a look#2020-07-2019:34GGfpcHello, I'm having a problem with Cursive and Leiningen. Whenever I import figwheel-main in my project.clj I get this error #2020-07-2102:37cflemingThat looks like a problem in your project.clj, are you able to share it?#2020-07-2112:46GGfpcSure
(defproject goodstats "0.1.0-SNAPSHOT"
  :description "FIXME: write description"
  :url ""
  :license {:name "Mozilla Public License 2.0"
            :url  "none"
            :year 2020
            :key "mpl-2.0"}
  ;; CLJ AND CLJS source code paths
  :source-paths ["src/clj" "src/cljs"]
  :dependencies [
                 ]
  :plugins [
            [lein-cljfmt "0.6.8"]
            [lein-cloverage "1.1.2"]
            [lein-license "0.1.8"]
            [lein-cljsbuild "1.1.8"]
            ]


  :aliases {"fig"       ["trampoline" "run" "-m" "figwheel.main"]
            "fig:build" ["trampoline" "run" "-m" "figwheel.main" "-b" "dev" "-r"]
            "fig:min"   ["run" "-m" "figwheel.main" "-O" "advanced" "-bo" "dev"]
            "fig:test"  ["run" "-m" "figwheel.main" "-co" "test.cljs.edn" "-m" "hello-world.test-runner"]}

  :profiles {:dev {:dependencies [
                                  [org.clojure/clojure "1.10.1"]
                                  [org.clojure/clojurescript "1.10.773"]
                                  [clj-http "3.10.1"]
                                  [org.clojure/data.xml "0.0.8"]
                                  [com.bhauman/figwheel-main "0.2.3"]
                                  [compojure "1.6.1"]
                                  [domina "1.0.3"]
                                  [com.bhauman/rebel-readline-cljs "0.1.4"]]
                   }}

  )
#2020-07-2019:34GGfpc
java.lang.RuntimeException: EOF while reading
	at clojure.lang.Util.runtimeException(Util.java:221)
	at clojure.lang.EdnReader.read(EdnReader.java:130)
	at clojure.lang.EdnReader$MetaReader.invoke(EdnReader.java:576)
	at clojure.lang.EdnReader.read(EdnReader.java:145)
	at clojure.lang.EdnReader.read(EdnReader.java:111)
	at clojure.lang.EdnReader.readString(EdnReader.java:67)
	at clojure.edn$read_string.invokeStatic(edn.clj:46)
	at clojure.edn$read_string.invokeStatic(edn.clj:37)
	at clojure.edn$read_string.invoke(edn.clj:37)
	at cursive.leiningen.module$figwheel_main_outputs$fn__14374.invoke(module.clj:70)
	at clojure.core$keep$fn__8559.invoke(core.clj:7341)
	at clojure.lang.LazySeq.sval(LazySeq.java:42)
	at clojure.lang.LazySeq.seq(LazySeq.java:58)
	at clojure.lang.RT.seq(RT.java:535)
	at clojure.core$seq__5402.invokeStatic(core.clj:137)
	at clojure.core.protocols$seq_reduce.invokeStatic(protocols.clj:24)
	at clojure.core.protocols$fn__8146.invokeStatic(protocols.clj:75)
	at clojure.core.protocols$fn__8146.invoke(protocols.clj:75)
	at clojure.core.protocols$fn__8088$G__8083__8101.invoke(protocols.clj:13)
	at clojure.core$reduce.invokeStatic(core.clj:6828)
	at clojure.core$into.invokeStatic(core.clj:6895)
	at clojure.core$into.invoke(core.clj:6887)
	at cursive.leiningen.module$figwheel_main_outputs.invokeStatic(module.clj:74)
	at cursive.leiningen.module$figwheel_main_outputs.invoke(module.clj:60)
	at cursive.leiningen.module$with_source_paths.invokeStatic(module.clj:118)
	at cursive.leiningen.module$with_source_paths.invoke(module.clj:79)
	at cursive.leiningen.module$module.invokeStatic(module.clj:157)
	at cursive.leiningen.module$module.invoke(module.clj:143)
	at cursive.leiningen.module$module_info$fn__14434.invoke(module.clj:171)
	at clojure.core$map$fn__5866.invoke(core.clj:2755)
	at clojure.lang.LazySeq.sval(LazySeq.java:42)
	at clojure.lang.LazySeq.seq(LazySeq.java:51)
	at clojure.lang.RT.seq(RT.java:535)
	at clojure.core$seq__5402.invokeStatic(core.clj:137)
	at clojure.core$reduce1.invokeStatic(core.clj:930)
	at clojure.core$set.invokeStatic(core.clj:4113)
	at clojure.core$set.invoke(core.clj:4105)
	at cursive.leiningen.module$module_info.invokeStatic(module.clj:171)
	at cursive.leiningen.module$module_info.invoke(module.clj:159)
	at cursive.leiningen.sync$sync.invokeStatic(sync.clj:136)
	at cursive.leiningen.sync$sync.invoke(sync.clj:134)
	at clojure.lang.Var.invoke(Var.java:393)
	at cursive.api.DelayedFn.invoke(DelayedFn.java:41)
	at cursive.build.BuildSystemProjectsManager$reimportAllProjects$$inlined$synchronized$lambda$1$1.invoke(BuildSystemManager.kt:154)
	at cursive.build.BuildSystemProjectsManager$reimportAllProjects$$inlined$synchronized$lambda$1$1.invoke(BuildSystemManager.kt:35)
	at cursive.application.ApplicationKt$sam$java_lang_Runnable$0.run(Application.kt)
	at com.intellij.openapi.application.TransactionGuardImpl$2.run(TransactionGuardImpl.java:309)
	at com.intellij.openapi.application.impl.LaterInvocator$FlushQueue.doRun(LaterInvocator.java:441)
	at com.intellij.openapi.application.impl.LaterInvocator$FlushQueue.runNextEvent(LaterInvocator.java:424)
	at com.intellij.openapi.application.impl.LaterInvocator$FlushQueue.run(LaterInvocator.java:407)
	at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:313)
	at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:776)
	at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:727)
	at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:721)
	at java.base/java.security.AccessController.doPrivileged(Native Method)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
	at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:746)
	at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:908)
	at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:781)
	at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$8(IdeEventQueue.java:424)
	at com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:698)
	at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:423)
	at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
	at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)
#2020-07-2019:34GGfpcRemoving the dependency fixes it. Is this a known issue?#2020-07-2114:19wegiHey there folks. Whenever I use Cursive with CLojurescript, a lot of the interop-functions are highlighted as not resolvable. .preventDefault or .indexOf for example. Any possibility to get them being resolved correctly, through type-hints or similar? Or at least an option to mute specific warnings, so the IDE doesn't look like a christmas tree. 🙂#2020-07-2211:12cflemingUgh, yes, this is a pain for a lot of people, sorry - I’m planning to fix this soon.#2020-07-2220:14wegiThanks, much appreciated.#2020-07-2115:23robHi Colin 👋 have you ever looked at making use of the “scientific tools” intellij ships to show data from a python console? Seems like the data explorer and plot tab could be driven by the datafy protocols a-la rebl. Where “could” mostly means “I’d like that”, not dug into how possible this is at all 🙂#2020-07-2211:13cflemingI think the short answer to this is “no” 🙂#2020-07-2211:13cflemingI don’t use the Python stuff at all and none of that bit is open source, so even if it made it to the top of my to-do list (very unlikely) I would’t know where to start.#2020-07-2213:10maxtI'm stuck at tools.deps version 0.8.599 When I press the Refresh button, nothing seems to change. I would like to use 0.8.709 which is the one the latest clojure cli tool uses#2020-07-2213:24maxtAlso, when I instead try to use CLI tools directly, I get this error
The following errors were found during project resolve:
			/home/max/wavy/wavy-v2/deps.edn:
			Coordinate type :mvn not loaded for library org.clojure/clojure in coordinate {:mvn/version "1.10.1"}
#2020-07-2213:25Alex Miller (Clojure team)the coordinate types are ordinarily automatically loaded by requiring org.clojure.tools.deps.alpha so not sure what Cursive is doing where that's not happening#2020-07-2213:36maxtIt still happens if I make a new deps project from within cursive#2020-07-2213:41maxtAlso still happens after removing ~/.clojure and reinstalling clojure cli tools#2020-07-2213:44manutter51Maybe uninstall/reinstall the Cursive plugin?#2020-07-2213:44salami’m not 100% sure but i had similar, weird problems because of this issue: https://github.com/cursive-ide/cursive/issues/2105#2020-07-2213:49maxtThank you for the hints! I did have several versions in that directory but the problem persists after removing all but the latest. But I also just found out that Cursive is no longer available for my version of IntelliJ, so I might just need to upgrade#2020-07-2214:30maxtAfter upgrading to IntelliJ CU 2020.1.4 and Cursive 1.9.2 the refresh button works and I can use tools.deps v 0.8.709. But I still get the same maven resolution error when choosing the "Use CLI Tools" option#2020-07-2214:36maxtTo recap on the error: • I open IntelliJ CU 2020.1.4 with Cursive 1.9.2 • I select "Use CLI Tools" in the Clojure Deps settings panel, which detects version 1.10.1.561 • I create a new Clojure Deps project in Cursive with File > New > Project • I get this error in the console
16:31	Errors during project resolution
				The following errors were found during project resolve:
				/home/max/t/mvn-not-loaded-repro/deps.edn:
				Coordinate type :mvn not loaded for library org.clojure/clojure in coordinate {:mvn/version "1.10.1"}
• The same project works if I start it with clj from the command line. clj -Stree also works.
#2020-07-2311:58cflemingHi @maxt, that is very strange. That error used to appear a long time ago, but no-one has reported it for ages. It looks like you’re on Linux, correct? Could you reproduce the problem and then send me a copy of your log file, in case there’s anything to see there? Probably best to email it to <mailto:/cdn-cgi/l/email-protection|/cdn-cgi/l/email-protection>.#2020-07-2312:00cflemingBTW you can find the log using Help | Show log in &lt;whatever&gt;#2020-07-2215:12onetom@maxt see my answer in #datomic#2020-07-2220:45markbastianHey all, I am trying to get a new dev onboarded with cursive on windows in a tools.deps project. When we try to get a REPL to run the dialog says "No modules containing clojure.main" found. Any suggestions? He used the dialog to download tools deps in the settings menu.#2020-07-2220:55salamrelated? https://clojurians.slack.com/archives/C0744GXCJ/p1594838128420400#2020-07-2221:04markbastianHmm, this is a deps.edn project and so we tried invalidating caches and restarting and no dice. We're also seeing a "could not create shim" error. Does that sound familiar?#2020-07-2221:30salamis the “Project” drop-down list empty on your Run Configuration window as well? if that’s the case then it might be an indication that there’s a problem with project/module resolution. you may want to check that your deps.edn doesn’t have any error and the project resolves successfully when you reimport it.#2020-07-2221:35markbastianI'll have him check that.#2020-07-2312:00cfleming@U0JUR9FPH The “could not create shim” error is the problem, I think. Could you reproduce the problem and send a copy of his log file to <mailto:/cdn-cgi/l/email-protection|/cdn-cgi/l/email-protection>? Help | Show log in Finder/Explorer…#2020-07-2314:49markbastianI’ll ask him to do it.#2020-07-2315:10markbastianEmail sent. Thanks!#2020-07-2221:04markbastianHmm, this is a deps.edn project and so we tried invalidating caches and restarting and no dice. We're also seeing a "could not create shim" error. Does that sound familiar?#2020-07-2321:52kennyI was told a while ago to commit .idea/clojure-deps.xml to version control. I think it had something to do with branch switching not remembering your projects. While commiting it does solve that problem, it brings up a bunch of other issues. I don't have a repro but our team continually gets projects added or removed from the list without explicitly doing so. Also, adding a project outside of the git root will cause issues for everyone else that doesn't have that directory available. Is committing .idea/clojure-deps.xml still the right approach to get projects kept when switching git branches?#2020-07-2414:23onetomi usually don't have issues with that specific file, although the list in the <option name="projectFiles"> section might get reordered arbitrarily. however, the upcoming intellij version would like to convert the configuration directory, so i can imagine that would confuse earlier versions, so im not yet switching to the next EAP, though it's in RC stage now.#2020-07-2409:07maxtWe have also experienced problems with commiting clojure-deps.xml. Mainly related to developers running different versions of idea and cursive and the contents jumps around, causing cursive to not detect it as a deps project any more.#2020-07-2410:19Paul NewberryHi, I'm trying to get Cursive working on Windows but I'm having a few problems. I've installed Clojure on Windows via the recommended way (as mentioned on the Cognitect website) and it is available via powershell. When trying to use this in Cursive however, it keeps defaulting to running in CMD. I've set the terminal path to be powershell.exe. I also get the error could not create shim Does anyone know how to get this working? Any help would be much appreciated!#2020-07-2523:35cflemingCursive doesn’t support running via the command line on Windows yet. Here’s the recommended approach: https://cursive-ide.com/userguide/deps.html#windows#2020-07-2417:02cap10morganI'm getting the error Could not create shim in tools-deps projects after updating clojure to 1.10.1.561 and Idea to 2020.1.4. On both macOS 10.15.6 and Big Sur dev beta 3. Anyone else seeing that?#2020-07-2417:33onetomI have the same set of versions, but I haven't seen any error like that. Where is that error appearing? Are you using the Use CLI tools (recommended) option?#2020-07-2419:39cap10morganIt's a popup when I open the project. Where is that option?#2020-07-2422:32cfleming@U06FS3DLH Could you email me your log file from Help | Show log in Finder? <mailto:/cdn-cgi/l/email-protection|/cdn-cgi/l/email-protection>. I’ll try to look at that over the weekend, someone else reported this yesterday too.#2020-07-2422:41cap10morganCan do!#2020-07-2515:39onetomI just got this shim error on macOS. I switched to the Use tools.deps directly option yesterday and I'm on version 0.9.745 IntelliJ IDEA 2020.1.4 (Ultimate Edition) Build #IU-201.8743.12, built on July 21, 2020 Licensed to Tamas Herman Subscription is active until November 27, 2020 Runtime version: 11.0.7+10-b765.65 x86_64 VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o. macOS 10.15.6 GC: ParNew, ConcurrentMarkSweep Memory: 4029M Cores: 8 Registry: suppress.focus.stealing.active.window.checks=true, suppress.focus.stealing.disable.auto.request.focus=true Non-Bundled Plugins: AceJump, IdeaVIM, Org4Idea, PlantUML integration, TabSwitch, com.4lex4.intellij.solarized, com.alayouni.ansiHighlight, com.github.pshirshov.bytecodeeditor, zielu.gittoolbox, com.intellij.ideolog, com.intellij.plugins.watcher, com.paperetto.dash, com.vincentp.gruvbox-theme, de.netnexus.camelcaseplugin, de.thomasrosenau.diffplugin, io.protostuff.protostuff-jetbrains-plugin, name.kropp.intellij.makefile, net.vektah.codeglance, nix-idea, org.intellij.RegexpTester, org.jetbrains.plugins.localization, org.jetbrains.plugins.rest, com.dmarcotte.handlebars, com.cursiveclojure.cursive, Pythonid, ru.meanmail.plugin.requirements, com.intellij.plugins.html.instantEditing, com.jetbrains.plugins.jade, intellij.prettierJS, org.asciidoctor.intellij.asciidoc, org.plugin.dot.id, org.toml.lang, org.rust.lang#2020-07-2515:40cap10morgan@U0567Q30W Just emailed my log file#2020-07-2515:41onetomThen I switched back to Use CLI tools with this version: /nix/store/q45vy8nvlfvz528hm1bp5fl6phy9gpi6-clojure-1.10.1.510/bin/clojure and now I can start a REPL without triggering that shim error#2020-07-2509:47reefersleepIn Cursive,
(fn x [x]
  x)

marks the parameter x as unused, even though (x 10) ;;=> 10. I know that this is a weird example, but I just thought I'd bring it up.
#2020-07-2523:38cflemingHmm, interesting, looks like Clojure prioritises the parameter and Cursive prioritises the local fn name.#2020-07-2619:26reefersleepYeah, that’s what I figured, too.#2020-07-2509:55reefersleepDifferent issue, but related: is it possible for m to show parameters named either or _somename as unused? Clj-kondo complains that unused parameters should be named either underscore or be preceded by an underscore, and I get why; the source code, undecorated by syntax highlighting, will be more explicit about usage. And I agree with that reasoning; you don't always have syntax highlighting available._#2020-07-2509:56reefersleepPardon the formatting; I'm on mobile, and can't find the option to turn off the newish "smart" formatting in Slack.#2020-07-2509:57reefersleepOn to the point; underscore alone is a convention I'm used to seeing, but sometimes it's nice to give contextual hints by using a name preceded by an underscore, and this is new to me. And I am finding it much harder to ignore such a name.#2020-07-2509:59reefersleepIf Cursive were to gray out the underscored name, I'd find it much more agreeable; the underscored name would give you both a contextual clue and mark it explicitly as unused in a nonhighlighted context, and in Cursive, I'd be able to scan past it as I'm used to.#2020-07-2510:00reefersleepIs it possible for me to configure this in Cursive?#2020-07-2523:40cflemingInteresting, Cursive basically does the exact opposite of what you describe: the leading underscore basically means “don’t mark this as unused, because I know it is”. This is because marking something as unused is considered a light warning, and things like IntelliJ’s “jump to next error/problem” will pick it up.#2020-07-2619:15reefersleepI totally get that, @U0567Q30W, it’s reasonable behaviour. I realise that it’s a case of me wanting to have my cake and eat it too; I want to mark symbols in the source as explicitly unused with a leading _, but I also want Cursive to colorize them differently in order for me to more easily scan the code.#2020-07-2619:17reefersleepI figure that IntelliJ is so featureful that it might be able to do what I want through some (to me) obscure setting - or you might already have thought of this in Cursive somehow.#2020-07-2510:44raymcdermottSetting up IntelliJ in Linux without Clojure, cursive downloads 1.9. I had to uninstall Cursive, install 1.10.1 manually. Reinstall cursive and all good again.#2020-07-2515:36onetomwhen would cursive download clojure? are you talking about loading a leiningen project or something? im curious, because i was also just setting up a pop!_os + nix machine a few hours ago and experienced some strange error when it was trying to generate stubs.#2020-07-2523:36cflemingI’m curious about this too, the only time I can think of that Cursive downloads Clojure is when setting up a bare project with no dependency management.#2020-07-2619:33raymcdermottyes @U0567Q30W that was the case#2020-07-2510:45raymcdermottMaybe it’s just a dusty corner :)#2020-07-2601:11paul931224Hello everyone. I started to use Cursive a while ago, just for the parinfer mode. Now I read the user guide, and use it for more things. I very much like the File Structure option. Unfortunately it is not showing my (re-frame.core/reg-event-db :some-keyword some-function) type of functions. I guess because they are not def or defn . Is this somehow a solvable thing? Any help would be appreciated.#2020-07-2605:08cflemingCursive does provide support for re-frame forms including reg-event-db so I think that should work. Do you see a lot of things not being resolved, i.e. highlighted in yellow?#2020-07-2614:57paul931224yes, stuff like (.log js/console "something") and third party libraries implemented with npm and shadow-cljs, like material-ui.core#2020-07-2614:58paul931224I read about it being able to handle re-frame functions, do I need to make some further steps to reach this functionality?#2020-07-2602:48tapGetting this error and can't start repl. #2020-07-2605:52cflemingHi @U05111TCS, this looks like a result of this issue here: https://github.com/cursive-ide/cursive/issues/2403. I’ve just released a fix for this in the latest EAP build, 1.9.3-eap1. If you’re not already signed up to get EAP builds you can check how to do that here: https://cursive-ide.com/userguide/index.html#eap.#2020-07-2611:13tapThank you#2020-07-2616:14tapConfirmed the issue is fixed by 1.9.3-eap1#2020-07-2622:07cflemingGreat, thanks for letting me know!#2020-07-2602:48tap
java.lang.RuntimeException: Could not create shim
	at cursive.shim.ShimProvider.getShim(Shim.kt:136)
	at cursive.shim.ShimProvider.withShim(Shim.kt:103)
	at cursive.deps.DepsProjectDetails.doGetDetails(Project.kt:161)
	at cursive.deps.DepsProjectDetails.doGetDetails(Project.kt:84)
	at cursive.build.BuildSystemProjectDetails.getProjectDetails(BuildSystem.kt:42)
	at cursive.build.BuildSystemProjectsManager$reimportAllProjects$$inlined$synchronized$lambda$1.run(BuildSystemManager.kt:143)
	at cursive.build.BuildSystemUtil$runTask$1$1.run(BuildSystemUtil.kt:93)
	at com.intellij.openapi.progress.impl.CoreProgressManager$TaskRunnable.run(CoreProgressManager.java:932)
	at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcessWithProgressAsync$5(CoreProgressManager.java:434)
	at com.intellij.openapi.progress.impl.ProgressRunner.lambda$null$3(ProgressRunner.java:233)
	at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$2(CoreProgressManager.java:166)
	at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:627)
	at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:572)
	at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:61)
	at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:153)
	at com.intellij.openapi.progress.impl.ProgressRunner.lambda$submit$4(ProgressRunner.java:233)
	at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1700)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
	at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: Syntax error compiling at (cursive/deps/relocate.clj:1:1).
	at clojure.lang.Compiler.load(Compiler.java:7648)
	at clojure.lang.RT.loadResourceScript(RT.java:381)
	at clojure.lang.RT.loadResourceScript(RT.java:372)
	at clojure.lang.RT.load(RT.java:459)
	at clojure.lang.RT.load(RT.java:424)
	at clojure.core$load$fn__6839.invoke(core.clj:6126)
	at clojure.core$load.invokeStatic(core.clj:6125)
	at clojure.core$load.doInvoke(core.clj:6109)
	at clojure.lang.RestFn.invoke(RestFn.java:408)
	at clojure.core$load_one.invokeStatic(core.clj:5908)
	at clojure.core$load_one.invoke(core.clj:5903)
	at clojure.core$load_lib$fn__6780.invoke(core.clj:5948)
	at clojure.core$load_lib.invokeStatic(core.clj:5947)
	at clojure.core$load_lib.doInvoke(core.clj:5928)
	at clojure.lang.RestFn.applyTo(RestFn.java:142)
	at clojure.core$apply.invokeStatic(core.clj:667)
	at clojure.core$load_libs.invokeStatic(core.clj:5985)
	at clojure.core$load_libs.doInvoke(core.clj:5969)
	at clojure.lang.RestFn.applyTo(RestFn.java:137)
	at clojure.core$apply.invokeStatic(core.clj:667)
	at clojure.core$require.invokeStatic(core.clj:6007)
	at clojure.core$require.doInvoke(core.clj:6007)
	at clojure.lang.RestFn.invoke(RestFn.java:457)
	at cursive.deps.command$eval138$loading__6721__auto____139.invoke(command.clj:1)
	at cursive.deps.command$eval138.invokeStatic(command.clj:1)
	at cursive.deps.command$eval138.invoke(command.clj:1)
	at clojure.lang.Compiler.eval(Compiler.java:7177)
	at clojure.lang.Compiler.eval(Compiler.java:7166)
	at clojure.lang.Compiler.load(Compiler.java:7636)
	at clojure.lang.RT.loadResourceScript(RT.java:381)
	at clojure.lang.RT.loadResourceScript(RT.java:372)
	at clojure.lang.RT.load(RT.java:459)
	at clojure.lang.RT.load(RT.java:424)
	at clojure.core$load$fn__6839.invoke(core.clj:6126)
	at clojure.core$load.invokeStatic(core.clj:6125)
	at clojure.core$load.doInvoke(core.clj:6109)
	at clojure.lang.RestFn.invoke(RestFn.java:408)
	at clojure.core$load_one.invokeStatic(core.clj:5908)
	at clojure.core$load_one.invoke(core.clj:5903)
	at clojure.core$load_lib$fn__6780.invoke(core.clj:5948)
	at clojure.core$load_lib.invokeStatic(core.clj:5947)
	at clojure.core$load_lib.doInvoke(core.clj:5928)
	at clojure.lang.RestFn.applyTo(RestFn.java:142)
	at clojure.core$apply.invokeStatic(core.clj:667)
	at clojure.core$load_libs.invokeStatic(core.clj:5985)
	at clojure.core$load_libs.doInvoke(core.clj:5969)
	at clojure.lang.RestFn.applyTo(RestFn.java:137)
	at clojure.core$apply.invokeStatic(core.clj:667)
	at clojure.core$require.invokeStatic(core.clj:6007)
	at clojure.core$require.doInvoke(core.clj:6007)
	at clojure.lang.RestFn.invoke(RestFn.java:408)
	at clojure.lang.Var.invoke(Var.java:384)
	at org.projectodd.shimdandy.impl.ClojureRuntimeShimImpl.require(ClojureRuntimeShimImpl.java:78)
	at cursive.shim.ShimBootstrap.apply(ShimBootstrap.java:29)
	at cursive.shim.Shim$createShimProvider$1.apply(Shim.kt:68)
	at cursive.shim.Shim$createShimProvider$1.apply(Shim.kt:23)
	at cursive.shim.ShimProvider$createShim$1.invoke(Shim.kt:143)
	at cursive.shim.ShimProvider$createShim$1.invoke(Shim.kt:85)
	at cursive.application.ApplicationKt$sam$java_lang_Runnable$0.run(Application.kt)
	at com.intellij.util.RunnableCallable.call(RunnableCallable.java:20)
	at com.intellij.util.RunnableCallable.call(RunnableCallable.java:11)
	at com.intellij.openapi.application.impl.ApplicationImpl$1.call(ApplicationImpl.java:255)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	... 3 more
Caused by: java.io.FileNotFoundException: Could not locate clojure/tools/deps/alpha/reader__init.class, clojure/tools/deps/alpha/reader.clj or clojure/tools/deps/alpha/reader.cljc on classpath.
	at clojure.lang.RT.load(RT.java:462)
	at clojure.lang.RT.load(RT.java:424)
	at clojure.core$load$fn__6839.invoke(core.clj:6126)
	at clojure.core$load.invokeStatic(core.clj:6125)
	at clojure.core$load.doInvoke(core.clj:6109)
	at clojure.lang.RestFn.invoke(RestFn.java:408)
	at clojure.core$load_one.invokeStatic(core.clj:5908)
	at clojure.core$load_one.invoke(core.clj:5903)
	at clojure.core$load_lib$fn__6780.invoke(core.clj:5948)
	at clojure.core$load_lib.invokeStatic(core.clj:5947)
	at clojure.core$load_lib.doInvoke(core.clj:5928)
	at clojure.lang.RestFn.applyTo(RestFn.java:142)
	at clojure.core$apply.invokeStatic(core.clj:667)
	at clojure.core$load_libs.invokeStatic(core.clj:5985)
	at clojure.core$load_libs.doInvoke(core.clj:5969)
	at clojure.lang.RestFn.applyTo(RestFn.java:137)
	at clojure.core$apply.invokeStatic(core.clj:667)
	at clojure.core$require.invokeStatic(core.clj:6007)
	at clojure.core$require.doInvoke(core.clj:6007)
	at clojure.lang.RestFn.invoke(RestFn.java:436)
	at cursive.deps.relocate$eval1039$loading__6721__auto____1040.invoke(relocate.clj:1)
	at cursive.deps.relocate$eval1039.invokeStatic(relocate.clj:1)
	at cursive.deps.relocate$eval1039.invoke(relocate.clj:1)
	at clojure.lang.Compiler.eval(Compiler.java:7177)
	at clojure.lang.Compiler.eval(Compiler.java:7166)
	at clojure.lang.Compiler.load(Compiler.java:7636)
	... 65 more
#2020-07-2602:48tap I've just updated clojure homebrew package. Not sure they are related.#2020-07-2606:14cfleminghttps://twitter.com/CursiveIDE/status/1287269735176892416#2020-07-2710:00onetomwhat's the workflow with cursive if someone wants to develop a library, but in the context of an application, which depends on that library? i assumed that i would just provide a :classpath-overrides {some/lib "/Users/me/src/some-lib"} in ~/.clojure/deps.edn and then if i navigate to the library source code from my application's intellij project, i would end up in "/Users/me/src/some-lib" and i could just edit the file. instead of this, i still end up somewhere inside ~/.m2/repositories/.../some/lib/...", like i would without the override and of course i can't edit the source code of some/lib`, since the opened file is coming from inside a jar.#2020-07-2716:52onetomMade a repro case to demonstrate this issue: https://github.com/cursive-ide/cursive/issues/1641#issuecomment-664513197#2020-07-2718:40onetomadded more repro cases to a related issue: https://github.com/cursive-ide/cursive/issues/2204#2020-07-2808:38cfleming@U086D6TBN Thanks for these examples, I haven’t had a chance to read them in detail yet but I should get to that tomorrow.#2020-07-2808:39onetomthat would be a great help because we are starting a new project in a monorepo and would like to use :local/root deps extensively#2020-07-2713:00Toby ClemsonHi all, I'm trying to write a clojure.test extension, i.e., a custom assert-expr implementation. I'd like to test this by intercepting clojure.test/report within some scope. However, Cursive's test runner appears to intercept clojure.test at some level higher up for its own purposes. Is there some way I can turn off Cursive's interception within some scope?#2020-07-2713:09imreYou could try running the test directly from the repl instead of through cursive#2020-07-2713:10imrealthough that won't help in the long term#2020-07-2713:39Toby ClemsonYes, I'm able to run the tests that way, or using other test runners like eftest. Was just hoping to maintain my current workflow.#2020-07-2714:16onetomor you can use a clojure.main REPL. that doesn't have cursive test support#2020-07-2714:18Toby ClemsonI'm looking to maintain the Cursive test support whilst testing test infrastructure. An edge case I'm aware. After some digging I think I've got a solution. It appears Cursive redefs clojure.test/do-report. If I capture the original and redef it back within the scope of my test code, I can capture the reports:
(def do-report clojure.test/do-report)

(defmacro report-on [form]
  `(let [reports# (atom nil)]
     (with-redefs [clojure.test/do-report do-report]
       (binding [clojure.test/report (fn [m#] (swap! reports# conj m#))]
         (is ~form)))
     (deref reports#)))
#2020-07-2714:18onetomalso, maybe try to test your custom extension more directly somehow... eg extract the code of it into functions and have tests for those bits only. wiring it up to the test framework should be trivial code then, which you can omit tests for after observing it to work once.#2020-07-2714:20Toby ClemsonYes, I'll definitely pull out the bulk of the assertion logic. However there are some bits I'd like to test in the assert-expr implementation.#2020-07-2714:21Toby ClemsonWith this in place, I can write a test like:
(deftest logged?-exactly-matches-single-log-event
  (let [logger (cartus-test/logger)
        type ::some.event
        context {:some "context"}

        _ ^{:line 1 :column 1} (cartus-core/info logger type context)

        report
        (report-on
          (logged? logger
            {:level   :info
             :type    type
             :context context
             :meta    {:ns     (find-ns 'cartus.test-test)
                       :line   1
                       :column 1}}))]
    (is (= :pass (:type (first report))))))
#2020-07-2714:21Toby ClemsonCan be cleaned up a little as there should only be one report but I'm capturing everything for now in order to test whether that assumption is correct 🙂#2020-07-2714:24onetomjust make sure you leave some notes in the code explaining why is it so convoluted ;D#2020-07-2714:25Toby ClemsonOf course 🙂#2020-07-2714:25onetomincidentally, i just came across cartus a few days ago and it's on my list of libraries to evaluate. just saying. as an inspiration 🙂#2020-07-2714:26Toby ClemsonGreat! Let me know if anything is unclear, I've tried to be quite comprehensive in the documentation but would be great to get feedback.#2020-07-2808:43cfleming@UDA9YHF8V Yes, you’re right that Cursive monkey-patches do-report. I can’t remember all the gory details, it was a long time ago, but IIRC I had to do it at that level to get the metadata from failing forms, which I need to paint the passed/failed icons. I’ve been planning to investigate using eftest instead, but (also IIRC) part of the problem was actually in the is macro and the way assert-expr works. I’d have to go back and dig into the code in depth to remember all the details though.#2020-07-2809:00Toby Clemson@U0567Q30W Ok great, thanks. I have something up and running that's working nicely by capturing and rebinding clojure.test/do-report within the scope of my test so it's no longer a problem 🙂#2020-07-2809:00cflemingGreat 🙂#2020-07-2816:56kennyWhen I manually mark a directory as excluded Cursive (IntelliJ?) doesn't seem to always persist that. Is there a way to make that sort of change more permanent?#2020-07-2821:34cflemingI think that should always be persisted. When does that tend to get lost? Restarting the IDE, or just re-opening a project?#2020-07-2821:36kennyWell, I updated to 2020.2 and all of them disappeared. It seems to happen on other occasions as well though. I can always tell because it starts to think real hard on shadow-cljs cache directory or cljs output files when those dirs are not excluded.#2020-07-2914:09folconIs anyone having any issues with deps.edn :extra-paths not being respected as source roots? I keep having to reapply mine constantly... Not sure what I'm doing wrong#2020-07-3002:00cflemingYou probably need to tell Cursive which aliases to sync: https://cursive-ide.com/userguide/deps.html#working-with-aliases#2020-07-3012:36folconOh, I didn’t realise that’s what that meant =)… Thanks!#2020-07-2915:44bedersHey there. IntelliJ idea 2020.2 was just released. Any known issues with Cursive? Ie is it safe to update? #2020-07-3002:01cflemingI think so, I’m using it with no problems.#2020-07-2915:59imreOn that note, are there any goodies in 2020.2 for those of us who mainly only work with clojure? year.x->y upgrades are always a little more involved when it comes to idea#2020-07-2917:08bedersthere's better support for dealing with pull-requests and reviews right in the IDE. Also, finally a separate Problem window.#2020-07-2917:09bedersAlso git commit squashing and faster indices (even shared indices)#2020-07-2921:01imreInteresting, thank you!#2020-07-3002:02cflemingHere’s the feature announcement: https://blog.jetbrains.com/idea/2020/07/intellij-idea-2020-2-is-released/#2020-07-3002:02cflemingThere’s nothing Clojure specific in there, but things like Shared Indexes might be interesting too. I haven’t had time to play around with them yet, though.#2020-07-3005:00onetomwhat i missed the most for the past half year is that they allow again putting the Diff preview in the VSC log tool window on the side as opposed to below the log entries. depending on screen size and whether you just study code, browse or preparing to review, both locations can make a lot of sense.#2020-07-3005:04onetomalso, everything is faster. by not much, but noticeably faster to make it feel smoother even on a 2012 3.4GHz Quad-Core i7 iMac#2020-07-3009:44imrespeed is always a good reason to upgrade, thanks#2020-07-2916:56hayley@beders I'm new to Cursive so I could be missing something, but I had problems with 2020.2 and importing projects that were started outside of Cursive. Starting a new project inside of Cursive worked though. And I didn't seem to have this problem with 2020.1. @cfleming is github where bugs should be reported?#2020-07-3002:03cflemingYes, please, link is in the channel title.#2020-07-2917:13hayleyDoes Cursive have the equivalent of the equivalent of #dbg behavior? Like I can do the below and it will show me the output of each individual step.
#dbg
 (->> (range 10)
      (take 5)
      (map #(* % 2)))
I tried messing with breakpoints but it didn't seem to have the equivalent behavior when doing a step over or step into.
#2020-07-3002:07cflemingNo, there isn’t at the moment. I’d like to integrate the stream debugger with Cursive, but haven’t managed to look at that yet.#2020-07-2919:22vlaaadIs it possible to create a repl run configuration for new -X:alias feature of tools-deps?#2020-07-2919:41Alex Miller (Clojure team)what's a run configuration?#2020-07-3005:06onetomthis question reminded me the "what is love?" song :) https://www.youtube.com/watch?v=HEXWRTEbj1I#2020-07-3005:15onetom@U064X3EF3 im super excited about these new cli options. you are doing some amazing, fundamental work at cognitect. it feels like you are slowly but surely pulling the industry out of the tar pit 🙂#2020-07-2919:41Alex Miller (Clojure team)oh sorry, didn't realize I was in #cursive nvm#2020-07-3007:57wegiWhen I have a tools-deps alias which has -m any.cool.class as main-opts the cursive nrepl seems to ignore those, when started with that alias. Am I doing something wrong or is this intended behaviour?#2020-07-3008:36onetomhow does your run configuration look like exactly? maybe u can just paste the corresponding XML here from your .idea/runConfiguration or .run folder#2020-07-3008:38wegiSure.
<component name="ProjectRunConfigurationManager">
  <configuration default="false" name="CLJ REPL" type="ClojureREPL" factoryName="Local" activateToolWindowBeforeRun="false">
    <module name="meetly" />
    <setting name="replType" value="NREPL" />
    <setting name="execution" value="DEPS" />
    <setting name="jvmArgs" value="-Dghostwheel.enabled=true" />
    <setting name="parameters" value="" />
    <setting name="workingDir" value="$PROJECT_DIR$" />
    <setting name="profiles" value="" />
    <setting name="aliases" value="run-server" />
    <setting name="fixLineNumbers" value="false" />
    <method v="2" />
  </configuration>
</component>
The run-server alias has a main-opt -m project.server. Its main is never executed. I even put non-existing function-calls in to see if it breaks. But it does not run at all.
#2020-07-3008:41wegiWhen i do clj -A:run-server it works just fine. But of course I would like to have it inside of my nrepl#2020-07-3008:46onetomokay, so this is a Local nREPL config. IntelliJ have to tell your app to start an nREPL server, so the IntelliJ process can connect and talk to it.#2020-07-3008:47onetomwhen u start it from the command line, there is no need for a server, because your application process is accepting input from the stdin directly#2020-07-3008:50onetomif u click on the line which appears at the top of your Cursive REPL window, it should expand to a very long command line. at the end of that command-line, there is a -i <some/randomly/named.clj>. that is the program which executes first and enters an nREPL server loop. because of that, no other code has the chance to interpret the -m option from the command-line.#2020-07-3008:50onetom(or something like that; can't remember it precisely)#2020-07-3008:55wegiThanks, so there is no option to start the -main function inside the newly created nrepl, except of doint it by hand then?#2020-07-3114:51onetomim not sure i understand that question, but at the same time im not sure i can explain it more precisely either. how i understood this was by reading the source code of clojure.main/-main https://github.com/clojure/clojure/blob/master/src/clj/clojure/main.clj#L616-L674 which is referenced from this java entry point: https://github.com/clojure/clojure/blob/master/src/jvm/clojure/main.java#L23#2020-07-3114:53onetomnothing really beats reading the source code, when it comes to understanding how things work 🙂#2020-07-3100:09lsenjovIs there a command to trigger stub generation?#2020-07-3104:50onetomi missed that the other day too... also, i have a monorepo with 4-5 clojure projects in it now and im being asked 4-5 times whether i want to generate stubs. that would be great if i could just say yes 1 time 🙂#2020-07-3105:26cflemingThere isn’t, but there should be. You can provoke the check by refreshing your lein/deps project from the corresponding toolwindow as a workaround.#2020-07-3105:27cfleming@U086D6TBN You should only be asked once for that, I think. Do you mean you have multiple deps projects in a single IntelliJ project?#2020-07-3105:27onetomyes. i have multiple deps modules#2020-07-3105:33onetomif i understand correctly, we should version control the .idea/clojure-deps.xml files. they contain system aliases though, which might not be present on other systems. those are not transferrable to other machines and iirc they got cleaned up automatically, resulting in an unnecessary churn in changes to this file. what can we do about it? would it make sense to put the system aliases into a different file, which can be gitignored?#2020-07-3105:38onetomof course turning aliases on and off might also result in changes to the .iml files of other the intellij deps modules, eg:
-    <orderEntry type="library" name="Deps: vlaaad/reveal:d0fe22" level="project" />
+    <orderEntry type="library" name="Deps: Local vlaaad/reveal" level="project" />
i have no idea what to do about that.
#2020-07-3105:41onetomand the alias checkboxes are still buggy. if i click them nothing seems to happen, but if i move up/down in the alias tree, then they update and reflect the new state. initially i thought it should be just my system, but i've seen the same behaviour on 3 other machines too, so i think it's a bug#2020-07-3106:00onetomhmmm... my run configurations i put in .run/ are not showing up amongst the other ones, which are still under .idea/runConfigurations. how can i make cursive aware of the ones in .run/ ?#2020-07-3106:02cflemingI’m not sure, actually. How are you putting them under .run/?#2020-07-3106:03cflemingOh, I see - there’s a “Store configuration file in…” option - I think that’s new, or at least I don’t remember seeing it previously.#2020-07-3106:03onetomoriginally they were added under the old location, then the other day i clicked on that cog next to the Store as project file and changed the path to .run#2020-07-3106:04onetomoh, that's not a cursive feature?#2020-07-3106:04cflemingCould you file an issue for that? I’m not sure what’s going on there. It looks to me like they’re expecting run configs to be in one location, rather than two.#2020-07-3106:04cflemingNo, that’s IntelliJ doing that.#2020-07-3106:04cflemingBut that you can now specify what that location should be.#2020-07-3106:05onetomaaah... so that's supposed to be a per-project option, not a per run-config! it's not clear from the UI...#2020-07-3106:05onetombeacuse it shows different paths for the different run configs#2020-07-3106:18onetomso the references to the run configs are stored in workspace.xml, which is not under version control (and correctly so), so im not sure how this new feature is meant to work... 😕 also, i think i've started intellij community editor over this project recently and that might have tangled these settings up, since i had some python run configs too, which are not supported under the CE#2020-07-3106:23onetomworkspace.xml has this kind of magic too, to deal with chaning the run config location:
<component name="ChangeListManager">
    <list default="true" id="73adb5ea-abbc-47f9-83c2-475bd4854522" name="Default Changelist" comment="Reveal integration and documentation">
      <change beforePath="$PROJECT_DIR$/.idea/runConfigurations/Datomic_testbed.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.run/Datomic testbed.run.xml" afterDir="false" />
      <change beforePath="$PROJECT_DIR$/.idea/runConfigurations/Recurrence_REPL.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.run/Recurrence REPL.run.xml" afterDir="false" />
...
    </list>
#2020-07-3106:01onetomi've also noticed that one of those files have a lot of repetition in them. smells like a bug:
xml
<component name="ProjectRunConfigurationManager">
  <configuration default="false" name="Rule Crib" type="ClojureREPL" factoryName="Local" activateToolWindowBeforeRun="false" singleton="true">
    <module name="rule-crib" />
    <setting name="replType" value="NREPL" />
    <setting name="execution" value="DEPS" />
    <setting name="jvmArgs" value="" />
    <setting name="parameters" value="" />
    <setting name="workingDir" value="$PROJECT_DIR$/rule-crib" />
    <setting name="profiles" value="" />
    <setting name="aliases" value="datomic-peer,expect,dev" />
    <setting name="fixLineNumbers" value="false" />
    <method v="2" />
  </configuration>
  <configuration default="false" name="Rule Crib" type="ClojureREPL" factoryName="Local" activateToolWindowBeforeRun="false" singleton="true">
    <module name="rule-crib" />
    <setting name="replType" value="NREPL" />
    <setting name="execution" value="DEPS" />
    <setting name="jvmArgs" value="" />
    <setting name="parameters" value="" />
    <setting name="workingDir" value="$PROJECT_DIR$/rule-crib" />
    <setting name="profiles" value="" />
    <setting name="aliases" value="datomic-peer,expect,dev" />
    <setting name="fixLineNumbers" value="false" />
    <method v="2" />
  </configuration>
  <configuration default="false" name="Rule Crib" type="ClojureREPL" factoryName="Local" activateToolWindowBeforeRun="false" singleton="true">
    <module name="rule-crib" />
    <setting name="replType" value="NREPL" />
    <setting name="execution" value="DEPS" />
    <setting name="jvmArgs" value="" />
    <setting name="parameters" value="" />
    <setting name="workingDir" value="$PROJECT_DIR$/rule-crib" />
    <setting name="profiles" value="" />
    <setting name="aliases" value="datomic-peer,expect,dev" />
    <setting name="fixLineNumbers" value="false" />
    <method v="2" />
  </configuration>
  <configuration default="false" name="Rule Crib" type="ClojureREPL" factoryName="Local" activateToolWindowBeforeRun="false" singleton="true">
    <module name="rule-crib" />
    <setting name="replType" value="NREPL" />
    <setting name="execution" value="DEPS" />
    <setting name="jvmArgs" value="" />
    <setting name="parameters" value="" />
    <setting name="workingDir" value="$PROJECT_DIR$/rule-crib" />
    <setting name="profiles" value="" />
    <setting name="aliases" value="datomic-peer,expect,dev" />
    <setting name="fixLineNumbers" value="false" />
    <method v="2" />
  </configuration>
  <configuration default="false" name="Rule Crib" type="ClojureREPL" factoryName="Local" activateToolWindowBeforeRun="false" singleton="true">
    <module name="rule-crib" />
    <setting name="replType" value="NREPL" />
    <setting name="execution" value="DEPS" />
    <setting name="jvmArgs" value="" />
    <setting name="parameters" value="" />
    <setting name="workingDir" value="$PROJECT_DIR$/rule-crib" />
    <setting name="profiles" value="" />
    <setting name="aliases" value="datomic-peer,expect,dev" />
    <setting name="fixLineNumbers" value="false" />
    <method v="2" />
  </configuration>
  <configuration default="false" name="Rule Crib" type="ClojureREPL" factoryName="Local" activateToolWindowBeforeRun="false" singleton="true">
    <module name="rule-crib" />
    <setting name="replType" value="NREPL" />
    <setting name="execution" value="DEPS" />
    <setting name="jvmArgs" value="" />
    <setting name="parameters" value="" />
    <setting name="workingDir" value="$PROJECT_DIR$/rule-crib" />
    <setting name="profiles" value="" />
    <setting name="aliases" value="datomic-peer,expect,kaocha,dev" />
    <setting name="fixLineNumbers" value="false" />
    <method v="2" />
  </configuration>
</component>
#2020-07-3107:41EmpperiSeems like structural editing choices don't show up anymore in the taskbar. Even though they are selected to be shown. Disabling the selection and re-enabling it won't matter.#2020-08-0101:43cflemingWhich version of Cursive are you using? There was a bug with this which was fixed in 1.9.2.#2020-08-0605:20Empperi@U0567Q30W sorry, missed your question but I had answered that just in the next message 🙂 The version was 1.9.3-2020.2#2020-08-0605:21EmpperiJust got an update to 1.9.4-eap1-2020.2 where this issue seems to have gone away 👍#2020-07-3107:41EmpperiVersion 1.9.3-2020.2#2020-07-3115:58TrevorOn OSX what's the key binding to send the currently highlighted form (even if it's nested inside another form?) to the REPL? I'm using <CMD>+p and that's great but would be cool to send just a nested bit of the form I'm failing to find it so I figured I'd just ask, thanks!#2020-08-0101:41cflemingThere isn’t one for “surrounding sexp”, but if you have a form selected then all the “Send xxx to REPL” actions will send that instead of what they would normally send. So you can select the form using Alt-up arrow and then use Cmd-P.#2020-08-0109:17onetomI've also assigned Ctrl-Enter (aka Cmd-Shift-P) to Eval top form and Ctrl-Shift-Enter to Eval form before caret, so I can just move to the end of a form and Ctrl-Shift-Enter just that. it's often followed by a Ctrl-Enter to eval the whole, containing form too if I were happy with the evaluation result of the sub-form.#2020-08-0109:26onetomon that note, i often find myself wanting to evaluate a sub-form, which comes right after my cursor. i was wondering if it would be possible to create a composite action, which does all this at once. if there is an ambiguity, maybe a popup can show the alternatives, just like the variable extraction popup. the rules could be similar to how the Alt-Up Extend Selection decides what to highlight, but favoring sequences as opposed to individual tokens. in other words, when i press ctrl-shift-enter, i would like it to be the combination of a more greedy alt-up + ctrl-enter.#2020-08-0109:27onetomi could describe such an action as Eval around caret or Eval in caret's vincinity#2020-08-0200:01cflemingThe problem with these sorts of actions is the combinatorial explosion of <form selection>/<how to eval>/<what to do with the results>. Lots of people have asked for an eval which puts the result in a comment in the source file. So I’m planning to extend the REPL commands feature to allow people to build the particular commands they want out of component pieces.#2020-08-0112:48onetomI'm getting a Cannot disambiguate overloads of ProcessBuilder warning from Cursive in the (defn build-process [cmd] ... (java.lang.ProcessBuilder. cmd) ...) expression. It also manifests at runtime as this message:
Reflection warning, /Users/onetom/.../src/testbed.cljc:92:9 - call to java.lang.ProcessBuilder ctor can't be resolved.
I tried to add ^List in front of cmd and that made the issue go away, but List is not defined in Babashka...
#2020-08-0112:50onetomwhat is the most generic type I should use in these situations? the constructor is defined to accept "var-args" and I read somewhere, to call such functions, Clojure should provide them with some array-ish thing.#2020-08-0113:08Alex Miller (Clojure team)https://clojure.org/guides/faq#varargs#2020-08-0113:15onetom
(require '[clojure.reflect :as r])
(import '[clojure.reflect Constructor])
(->> (r/type-reflect ProcessBuilder)
     :members
     (filter (comp #{Constructor} type)))

(#clojure.reflect.Constructor{:name java.lang.ProcessBuilder,
                              :declaring-class java.lang.ProcessBuilder,
                              :parameter-types [java.util.List],
                              :exception-types [],
                              :flags #{:public}}
 #clojure.reflect.Constructor{:name java.lang.ProcessBuilder,
                              :declaring-class java.lang.ProcessBuilder,
                              :parameter-types [java.lang.String<>],
                              :exception-types [],
                              :flags #{:varargs :public}})
#2020-08-0113:17onetomI'm wondering if there is a literal form for java.lang.String<> to use it as a type hint 😕#2020-08-0113:19onetom^Ljava.lang.String or ^java.lang.String<> doesn't work..#2020-08-0113:20borkdude@U086D6TBN This works with both bb and clj:
$ bb -e '(set! *warn-on-reflection* true) ((fn [& args] (ProcessBuilder. ^java.util.List args)) "ls")'
#2020-08-0113:20borkdudeSo you get your reflection avoided and also compatible with bb#2020-08-0113:22borkdudeList is not a thing both in bb and clj without importing it or fully qualifying it#2020-08-0113:22onetom
bb -e '(import (quote [java.util List])) ((fn [& args] (ProcessBuilder. ^List args)) "ls")'
java.lang.Exception: Unable to resolve classname: java.util.List [at line 1, column 1]
#2020-08-0113:23onetomi was importing it in Clojure and as i mentioned it made Cursive happy, but not bb#2020-08-0113:24onetomCursive recommends using the short form of fully qualified class references; that's how I cornered my self 🙂#2020-08-0113:25borkdudeAh right, bb allows you to use type hints without actually needing those classes to be in bb#2020-08-0113:25borkdudejust for compatibility#2020-08-0113:27onetomi can't remember reading about this in the bb docs so far. might worth mentioning it#2020-08-0113:28borkdudeit will try to use the type hint if it can resolve the class#2020-08-0113:29onetomi feel like to make bb a good alternative to bash, using any kind of external process related functionality should be really friendly#2020-08-0113:30borkdudeI think it might be better to just add the java.util.List class to bb (I was kind of surprised it wasn't already in there)#2020-08-0113:35borkdudeIf vec would have a return type tag on it, one could do this with (ProcessBuilder (vec args)) right?#2020-08-0114:11onetomare you asking me? i don't know. i didn't have to deal with type metadata much on my clojure journey so far 🙂 im not even sure where should the return type tag go. on the var or the arg vector...#2020-08-0114:13onetomwhich is i think a testament to how practical clojure is 🙂 i've trained a few people clojure over the past ~5 years. wrote a bunch of useful programs, even in clojurescript with hoplon, yet there was hardly any need to deal with type tags.#2020-08-0114:15borkdudeIf you use this function:
(defn vec2 ^clojure.lang.PersistentVector [x]
  (vec x))
around your arguments to ProcessBuilder, the reflection warning goes away, because PersistentVector implements List. Maybe there's a reason why clojure.core doesn't have the type tag on vec as of now. @U064X3EF3?
#2020-08-0115:09Alex Miller (Clojure team)Generally, collections are never hinted with the concrete type - it just relies on polymorphism are the call site#2020-08-0115:10Alex Miller (Clojure team)The return here is not necessarily that type either#2020-08-0115:11Alex Miller (Clojure team)If you make your own concrete vector collection, and call vec on it, you’d get that type#2020-08-0115:12borkdudeok, makes sense#2020-08-0308:26reefersleepThis is really more of an IntelliJ question, but perhaps someone here has an idea about this, since it’s relevant in a Clojure context. In the interest of keeping lines short, I might sometimes break up a string literal in more than one line, eg.
"This is my
multiline string"
If I were to search for this in IntelliJ, I’d normally just use “Find in Path” (CMD F on Mac). However, if I typed this into the search field, I would find nothing: This is my multiline. I’d have to turn regex on and search for This is my\s*multiline. However, since I won’t know where line breaks are, I’d really have to search for This\s*is\s*my\s*multiline. This becomes really cumbersome really quick! I wonder if there’s a way to assume or specify that each space in a search represents \s*? Or some other, smart way to search for this type of literal?
#2020-08-0311:43manutter51I don’t know any way to directly do what you want, but you could set up a Live Template that would make it easy to generate your search string in a REPL..#2020-08-0313:05reefersleepNot exactly what I’m looking for, but it’d be a help. How do I make it available to the REPL?#2020-08-0313:07manutter51Once you define it you can use it in either the repl or the editor just by typing as[TAB]#2020-08-0313:07manutter51where [TAB] is the TAB key, of course.#2020-08-0407:22reefersleepCheers @U06CM8C3V, an extra weapon for the arsenal 🙂#2020-08-0411:30manutter51:thumbsup:#2020-08-0311:44manutter51
(println (clojure.string/replace "Here is some test text." " " "\\s+"))
Here\s+is\s+some\s+test\s+text.
#2020-08-0401:03cfleminghttps://twitter.com/CursiveIDE/status/1290452435216072704#2020-08-0600:19steveb8nQ: I’m having stability issues with Idea crashing. To fix, I’d like to update from 2019.3 so I’m exploring compatibility. I always find this difficult: I want to know the two pairs of stable/eap and supported Idea versions for each. The user guide states the requirement for stable (not alway certain it’s up to date) but eap means scrolling through the google group messages. could both of these pairs be documented in one place to it’s easy to check?#2020-08-0600:21steveb8nI also noticed this info in the plugins section of Idea… Built on: 2020-07-02 14:17 Built from: 1.9.2-68-g08c574e5#2020-08-0600:21steveb8nI presume this provides the edges of the supported range?#2020-08-0600:22steveb8nI would find it very useful to have all this stuff in one place, known to always be up to date. Is that possible?#2020-08-0600:24steveb8nAn extra cherry on top: if this web page could also explain the versioning semantics of Cursive and how they relate to Ideas versions, that would help. I’m pretty sure this is already out there somewhere#2020-08-0600:27steveb8nMy goal now is to understand if I can upgrade Idea to 2020.2.#2020-08-0600:28steveb8ndespite this sounding like a gripe, it’s not 🙂 just a hopeful request#2020-08-0601:25cflemingBasically, I need proper release notes and change log 🙂. And the answer to that is that yes, yes I do.#2020-08-0601:26cflemingFor your particular case, you should be able to update to 2020.2 and use either the latest stable or EAP with that with no problem.#2020-08-0602:28steveb8ngreat. thanks for a concise response to a long winded question 🙂#2020-08-0611:23reefersleepIs it correctly understood that Cursive does not support breakpoints at all for .cljs at this time? I thought that it didn’t make sense, as your browser is usually the execution environment for CLJS, and the connection between the browser and the IDE is “weaker” than e.g. a Clojure REPL and the IDE, but it seems I was misinformed. Other IDEs support breakpoints in JS. My face was like 😮 when I discovered this.#2020-08-0612:00armedHello. I'm using tools deps. How to force cursive load all paths namespaces when REPL starts? By default in no project namespaces is loaded.#2020-08-0622:32cflemingThere isn’t a good way in Cursive to do this right now. However you can use a user.clj file, which is a Clojure thing.#2020-08-0612:02armedFor example I have :paths ["src" "test"]. And when I try run some tests, it shows me error that can't find init files of namespaces from src. Then I have to manually load root namespace into repl.#2020-08-0612:05armedhere is my run configuration#2020-08-0705:47armedOk, I was experimenting with single deps.edn for monorepo with multiple modules and got all working now. Previous dumb question is not relevant anymore 🙂#2020-08-0901:50ashkHi all 🙂 Thanks for making cursive - great tool! 👏 I’m just getting started with clojure & cursive, i’m trying to get into the swing of the development workflow. Just wondering if cursive can do code completion when editing deps.edn files for resolving package names and versions. I’m thinking along the line of the npm package tools for intellij. thanks :)#2020-08-0904:58ashkJust having some difficulties with creating a new deps project Cursive doesn’t seem to be indexing the clojure library so i’m getting warning such as “ns cannot be resolved” Also the Dependencies in the Clojure Deps view aren’t being populated I’m I doing something dumb? Please see attached screenshot Cursive: 1.9.4-eap1-2020.2 IntelliJ IDEA 2020.2 (Ultimate Edition) Build #IU-202.6397.94,#2020-08-0921:04jaimeHello, previously when I run failing tests using cursive, it will show a pop-up and there is a link "show difference". Right now I don't see it anymore Cursive Version: 1.9.2-2020.1 IntelliJ IDEA 2020.1.3 (Community Edition) Build #IC-201.8538.31, built on July 7, 2020 Runtime version: 11.0.7+10-b765.64 x86_64 VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o. macOS 10.15.4 GC: ParNew, ConcurrentMarkSweep Memory: 2014M Cores: 4 Registry: ide.balloon.shadow.size=0 Non-Bundled Plugins: com.alicannklc.tailwind, com.chrisrm.idea.MaterialThemeUI, SQL Query Plugin, com.intellij.plugins.watcher, com.cursiveclojure.cursive#2020-08-1000:57cfleminghttps://twitter.com/CursiveIDE/status/1292623354105495557?s=20#2020-08-1021:22jaimeI'm trying to follow the answer (below link) to require namespaces in the repl using cursive Tools→REPL→Load file in REPL However after loading the file, I'm expecting that the namespaces required in that file will be loaded, but they are not. I'm still getting No such namespace error. Is it expected behaviour? https://stackoverflow.com/a/27682091/1730988#2020-08-1118:17jaimeI've tried it on two namespace. The src/limeray/api/util.clj has only this content
(ns limeray.api.util
  (:require [tick.core :as t]))

(t/new-date) ;; I'm trying to send this to repl after loading this ns

(defn uuid
  ([]
   (java.util.UUID/randomUUID))
  ([uuid-string]
   (java.util.UUID/fromString uuid-string)))
#2020-08-1118:20jaime#2020-08-1118:25jaimeHmm after playing with it, I guess I'm doing silly mistake. My repl should be in the same namespace of the file in order for the symbols to be available 😅#2020-08-1107:03jysandyI have a clj + cljs project with both a Leiningen project.clj for the backend code and a shadow-cljs.edn for the frontend. I exported a pom.xml using shadow-cljs, but importing that seems to break dependency resolution using Leiningen since a module can only be managed by one build tool at a time. Is there a workaround for this besides integrating shadow-cljs with Lein completely?#2020-08-1107:04jysandyBoth the project.clj and the shadow-cljs.edn are sitting in the same project root.#2020-08-1107:07jysandyIf moving the Lein project to use deps will help, I’m open to exploring that.#2020-08-1109:09thheller@jysandy probably best to configure your CLJS dependencies in project.clj and then make shadow-cljs use that too. less of a hassle overall to just have one place to declare dependencies. if you don't mind copying you can also just copy your CLJS dependencies to project.clj under the :dev profile or so that Cursive can find it but still actually use shadow-cljs.edn for CLJS deps#2020-08-1118:09salamthere seems to a bug with the way cursive evaluates calls to clojure.core/pr and clojure.core/print. i used a few expressions to compare the behavior of cursive's repl client to that of clojure's built-in repl client. both clients are connected to the same clojure socket repl server. the results are shown in the following screenshots. is there any github issue tracking this bug?#2020-08-1118:21Alex Miller (Clojure team)pr and print don't force a flush#2020-08-1118:22Alex Miller (Clojure team)you may be observing some independent difference in when the output stream is flushed#2020-08-1803:15cflemingActually I based Cursive’s socket REPL code on prepl, and prepl has the same bug:
~> telnet 127.0.0.1 5555
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
(+ 1 2)
{:tag :ret, :val "3", :ns "user", :ms 17, :form "(+ 1 2)"}
(pr 1 2 3)
{:tag :ret, :val "nil", :ns "user", :ms 3, :form "(pr 1 2 3)"}
(prn 1 2 3)
{:tag :out, :val "1 2 31 2 3\n"}
{:tag :ret, :val "nil", :ns "user", :ms 1, :form "(prn 1 2 3)"}
#2020-08-1803:15cfleming@U064X3EF3 @UDCGPTV9R ^^#2020-08-1803:17cflemingI can’t figure out the right place to fix this for the moment, but I’m looking into it.#2020-08-1803:17cfleming
(binding [*out* out, *flush-on-newline* true, *print-readably* true]
  (locking lock
    (prn (if (#{:ret :tap} (:tag m))
           (try
             (assoc m :val (valf (:val m)))
             (catch Throwable ex
               (assoc m :val (ex->data ex :print-eval-result)
                        :exception true)))
           m))))
#2020-08-1803:17cflemingHere, the *flush-on-newline* doesn’t seem to work, even though prn is used.#2020-08-1803:35cflemingActually, I lie, I was getting my streams confused. *out* needs to be flushed before calling out-fn with :tag :ret or :tag :error if any eval might have output anything.#2020-08-1803:35cflemingI have this fixed for Cursive.#2020-08-1804:10salamThank you very much, Colin! I really appreciate the time you’ve taken out of your busy schedule to fix this. 🙂#2020-08-1805:23cflemingNo worries, sorry it took so long to get to! I’ll try to get an EAP out with this shortly.#2020-08-1118:38salamyeah, that's what i figured (when the output stream gets flushed) and was a little hesitant to call this a bug. however, i believe, i was bitten by this a few times in some other contexts in the past ~(i vaguely remember one of them being clojure.test)~.
#2020-08-1120:23salamah, after hours of sifting through the clojurians slack log, i finally found what it was. i was wrong, it wasn't clojure.test, it was expound. here is the problem we ran into: https://clojurians-log.clojureverse.org/cursive/2020-06-09/1591730202.130400#2020-08-1120:24salam> i'm curious how everybody's experience with using a remote socket repl with cursive is. we've been having problems with this set-up. one particular problem that we had today was that the cursive repl client wouldn't show the output from expound. that is if you evaluate (expound/expound string? 42), all you get in the repl client output is nil. am i missing something?#2020-08-1120:33salamhere is, i believe, how this difference manifests itself as a bug in cursive's repl client:#2020-08-1120:34salamand that was very confusing back then...#2020-08-1204:54salam@cfleming would you please take a look at this problem above? i can submit a github issue. we use clojure spec for business entity and logic validation at work. as we all know, libraries like expound make clojure spec and it’s error messages a lot nicer and friendlier to work with. we have a workaround (force-flushing output stream using a prn) but since it’s not something you would do normally, it gets tedious and tiring overtime, not to mention forgetting to do it completely and getting confused all over again. this is also one of the bugs (including being bombarded with cursive exceptions at least 100 times a day) that cause eye-rolls from people who are just skeptical about everything clojure. thanks in advance!#2020-08-1205:19cflemingSure, I’ll take a look - thanks for the repro cases.#2020-08-1205:10salami don’t know if this helps, but please take that request as from a cursive commercial-license user who caused a one-time purchase of 40 commercial licenses a few years ago and is now trying to maintain that number at 20.#2020-08-1306:47gibbREPL Commands bound to shortcuts are pretty sweet!#2020-08-1306:49gibbCan I access my own REPL commands in the cursive.actions list somehow? I remember looking a big text file with cursive actions for making ideavim bindings but I can't seem to remember where I found it..#2020-08-1306:50gibbmap <leader>x :action :cursive.actions.paredit/kill-sexp<CR> Something like that but instead cursive.actions.MyREPLCommand ?#2020-08-1306:50gibbAh :actionlist is what I was looking for..#2020-08-1313:38cjsauerWas your REPL action in that list? I was attempting to do this as well and couldn’t find it. #2020-08-1404:51gibbNope the REPL command does not show up there, I did not find a way to bind it to a vim shortcut.#2020-08-1308:13mishajust wanted to share that unbalanced " in comments breaks parinfer's smart mode:
(let [] ;
  {:a 1
   :b 2})

;tab second line:
(let [] ;"
     {:a 1
   :b 2}) 

;vs expected:
(let [] ;
     {:a 1
      :b 2})
but then found disclaimer: https://shaunlebron.github.io/parinfer/#inserting-quotes opieop
#2020-08-1308:14mishaI hope mentioning it will save some time and sanity for somebody with a suddenly broken smart mode in a large ns#2020-08-1320:13pmallettI have a deps alias with the following.
:dev {:extra-paths ["dev/src" "dev/resources"]
                       :extra-deps  {environ                     {:mvn/version "1.1.0"}
                                     org.clojure/tools.namespace {:mvn/version "0.2.11"}
                                     org.clojure/tools.nrepl     {:mvn/version "0.2.12"}
                                     reloaded.repl               {:mvn/version "0.2.4"}}
                       :main-opts   ["-i" "dev/src/foobar/user.clj"
                                     "-e" "(in-ns,'foobar.user)"]}
The main-opts works when I start a repl from the command line.
clj -A:dev -r
But it does not work when I use nREPL in Cursive run config.
#2020-08-1320:15Alex Miller (Clojure team)"does not work" = ?#2020-08-1320:16pmallettload the file and switch to the ns. Similar to this in leiningen.
:repl-options   {:init-ns foobar.user}
#2020-08-1321:28salamwhat does your run configuration look like?#2020-08-1322:30katoxCursive ignores the -m part of deps. Which is good in a way because it only supports -A#2020-08-1407:58ashkHi all, i’m a cursive + ideavim user 🙂 Just wondering if anyone can help me: i’m trying my darnedest type this into the editor:
(d/q {:query '[:find ?e
               :where [?e :artist/name "The Beatles"]]
     :args [db]})
But I’m having difficulty with the ’[ syntax
#2020-08-1410:58thheller@ashk I also use cursive + ideavim and have no such issue. I'm also using paredit though. do you maybe have any other plugin active that tries to handle parens? I think there are some?#2020-08-1411:13ashki’ve disabled vim emulation and it’s still happening…. I’ve just got the cursive & rainbow brackets installed. I think i’m on a EAP build.. i might try a fresh install of cursive thanks @thheller!#2020-08-1500:14cflemingI can’t see how Cursive would ever cause that behaviour. Have you tried disabling the rainbow brackets plugin? Cursive actually has its own rainbow brackets (Preferences | Languages &amp; Frameworks | Clojure | Appearance options | Rainbow parentheses) so you shouldn’t need that.#2020-08-1501:58ashkWell this is embarrassing, I had mapped the [ to “wrap with []“… foolish, but I think my thoughts were that this would apply to vims command mode only disabled the idea key mapping and all is well now thanks @thheller & @cfleming#2020-08-1502:46cflemingNo worries, glad it’s working 🙂#2020-08-1415:35kennyWhen calling datomic.client.api/client, I get this exception:
Syntax error (FileNotFoundException) compiling at (datomic/client/impl/shared.clj:1:1).
Could not locate cognitect/hmac_authn__init.class, cognitect/hmac_authn.clj or cognitect/hmac_authn.cljc on classpath. Please check that namespaces with dashes use underscores in the Clojure file name.
That namespace is provided by the com.cognitect/hmac-authn dep. I can call clj -A:<all my aliases> -Stree -Sforce and see that hmac-authn is being brought in by com.datomic/dev-local 0.9.184. In the Clojure Deps panel under my project's Dependencies, I do not see hmac-authn under dev-local. I have Cursive set to use CLI tools under Clojure Deps. My clojure CLI version is 1.10.1.561. My Cursive version is 1.9.4-eap2-2020.2. This occurs in a REPL configured to use nREPL ran with the IntelliJ project classpath. I have tried restarting the REPL, hitting the Clojure Deps refresh button, and restarting my computer. Any idea why this would happen?
#2020-08-1415:38kennyThe dev-local part of -Stree
com.datomic/dev-local 0.9.184
  com.google.errorprone/error_prone_annotations 2.3.4
  com.datomic/client-api 0.8.54
  com.google.guava/listenablefuture 9999.0-empty-to-avoid-conflict-with-guava
  com.datomic/client 0.8.111
    com.cognitect/http-client 0.1.105
      org.eclipse.jetty/jetty-client 9.4.27.v20200227
  org.checkerframework/checker-compat-qual 2.5.5
  com.google.guava/failureaccess 1.0.1
  com.google.guava/guava 28.2-android
  com.datomic/client-impl-shared 0.8.80
    com.cognitect/hmac-authn 0.1.195
  com.google.j2objc/j2objc-annotations 1.3
  com.datomic/query-support 0.8.27
  org.fressian/fressian 0.6.5
  com.google.code.findbugs/jsr305 3.0.2
  org.ow2.asm/asm-all 4.2
#2020-08-1415:44kennySwitching the Clojure Deps setting to "Use tools.deps" directly with 0.9.763 selected and restarting IntelliJ fixes the issue. Seems like there's some sort of bug in the most recent Clojure CLI + Cursive.#2020-08-1522:47cfleming@U083D6HK9 If you manually refresh your project using the button in the deps toolwindow, does that fix that problem using the deps CLI?#2020-08-1600:55kennyNo. #2020-08-1604:54cflemingI spent some time looking at this, I can’t reproduce it and nor do I have a plausible explanation for how it might occur. I created this test repo, could you try it and see if it reproduces the problem for you? https://github.com/cursive-ide/deps-problem-repro#2020-08-1618:52kennyOkay I have a smaller repro here: https://github.com/kennyjwilli/deps-problem-repro. For whatever reason, if I remove any other deps from the deps.edn, the call will succeed. I added an example namespace with a single call in a comment block. A "successful" call will look like this:
(d/client {:endpoint    "",
             :server-type :ion,
             :region      "",
             :system      "",})
2020-08-16 11:49:43.136:INFO::main: Logging initialized @22704ms to org.eclipse.jetty.util.log.StdErrLog
Execution error (ExceptionInfo) at datomic.client.impl.cloud/parse-endpoint (cloud.clj:75).
Invalid endpoint 
A failed call will look like this.
(d/client {:endpoint    "",
             :server-type :ion,
             :region      "",
             :system      "",})
Syntax error (FileNotFoundException) compiling at (datomic/client/impl/shared.clj:1:1).
Could not locate cognitect/hmac_authn__init.class, cognitect/hmac_authn.clj or cognitect/hmac_authn.cljc on classpath. Please check that namespaces with dashes use underscores in the Clojure file name.
When running the REPL with "Run with IntelliJ project classpath" and the test alias checked, I will get a failed call. When running the same call in a terminal started via the REPL I get a successful call.
clojure -A:test
Clojure 1.10.1
user=> (require 'example)
nil
user=> (in-ns 'example)
#object[clojure.lang.Namespace 0x218e28d9 "example"]
example=> (d/client {:endpoint    "",
             :server-type :ion,
             :region      "",
             :system      "",})
2020-08-16 11:49:43.136:INFO::main: Logging initialized @22704ms to org.eclipse.jetty.util.log.StdErrLog
Execution error (ExceptionInfo) at datomic.client.impl.cloud/parse-endpoint (cloud.clj:75).
Invalid endpoint
#2020-08-1618:54kennyI did notice that when calling clj -Stree -A:test, the hmac-authn dep comes from dev-local. In Cursive's dependency tree in Clojure Deps, it comes from client-cloud.#2020-08-1618:54kennyBoth are the same version so I wouldn't expect a different behavior.#2020-08-1415:54Alex Miller (Clojure team)there was a dependency bug related to this scenario in tools.deps / clj#2020-08-1415:55Alex Miller (Clojure team)that was fixed in tools.deps 0.8.709 / clj 1.10.1.561#2020-08-1415:57Alex Miller (Clojure team)the bug here relates to having the same dep being included via two dependency paths where it's excluded in one and included in another (was previously somewhat arbitrary which branch you encountered first whether you'd get it). as of those versions above, you should always get it.#2020-08-1415:57kennyOh, so I assume Cursive needs to make some change to work correctly with the fix?#2020-08-1415:59Alex Miller (Clojure team)not sure what happens in the nrepl case in intelllij#2020-08-1415:59Alex Miller (Clojure team)running it as a deps project with system clj should work based on what you have#2020-08-1416:00Alex Miller (Clojure team)intellij has been updated in the version you have to cover recent changes in clj#2020-08-1416:00kennyAh, selecting "Run with Deps" in the run config?#2020-08-1416:00Alex Miller (Clojure team)yeah#2020-08-1416:01Alex Miller (Clojure team)re "the IntelliJ project classpath" - I think that's an independent thing sourced from your deps, not sure I understand exactly how it's managed#2020-08-1522:54cflemingBasically, when you sync a project to IntelliJ, it adds all the deps to the project and indexes them. That’s what you see under “External Libraries” in the project view, or in more detail under File-&gt;Project Structure-&gt;Modules-&gt;&lt;some module&gt;-&gt;Dependencies.#2020-08-1522:55cflemingRun with IntelliJ project classpath just uses those deps as well as the source roots etc to make the classpath. In a deps project, this should be the same as using Run with Deps, with the caveat that you’re implicitly using the aliases which were used to sync the project.#2020-08-1416:03kennyEach time I start a REPL with the "Run with Deps" option, Cursive will run a "Calculating Classpath" step that takes a solid 5s or so. The IntelliJ project classpath appears to use some sort of caching to avoid that step.#2020-08-1416:04kenny"Run with Deps" also does not encounter the problem.#2020-08-1416:04Alex Miller (Clojure team)you are past my level of knowledge on the calculating thing#2020-08-1416:05kennyIt sounds like whatever machinery IntelliJ project classpath uses requires some sort of change to work correctly with the latest cli version.#2020-08-1416:06Alex Miller (Clojure team)don't know, that's a question for Colin. of course it's like 4 am Sat morning his time so he's probably won't see this for a bit :)#2020-08-1416:07kennyThe Run with Deps option fixes my problem so I'll use that. Thanks 🙂#2020-08-1416:16kennyActually, that's not true. I didn't add any aliases to my "Run with Deps" selection. After adding in the alias that has dev-local, I get the same FileNotFound exception.#2020-08-1416:20kennyThe only method that works is selecting "Use tools.deps directly".#2020-08-1416:24Alex Miller (Clojure team)that doesn't make sense to me, as I would expect using clj 1.10.1.561 to work#2020-08-1416:26kennyI would agree. Directly using the CLI works as expected.#2020-08-1417:19marciolHi @cfleming, I’m wondering if it’s possible to add some niceties in the cursive REPL, such as a way to fold and unfold large EDNs, and to add some kind of scrolling to exceptions. I suspect that this is not so easy to do given the Intellij constraints, but it’d be nice to know at first hand.#2020-08-1522:57cflemingThe folding of large EDNs might be possible (I assume you’re talking about eval results, right?) and I have some plans along those lines. I’m not sure what you mean by “scrolling to exceptions” - can you elaborate?#2020-08-1417:42Alex Miller (Clojure team)there are some options under Preferences -> Languages & Frameworks -> Clojure like "Prettify stacktrace elements using folding" - did you try that?#2020-08-1417:49frozenlockHello, I have some co-workers using Cursive and apparently the static analysis doesn't work with modified defn forms. Is it something that can be configured?
(defn-spec my-inc
  :args any?
  :ret any?
  [x]
  (inc x))
#2020-08-1523:00cflemingSort of. If your macro can be made to look like one of the built-in ones, then you can tell Cursive to treat it as the built-in like this: https://cursive-ide.com/userguide/macros.html#customising-symbol-resolution#2020-08-1523:01cflemingYour example there won’t work, because defn doesn’t accept forms before the arglist. However, see https://github.com/gnl/ghostwheel for an example of how that macro might look to be able to work with Cursive.#2020-08-1615:49frozenlockAh I see. It's unfortunate it cannot work with the current form, but thank you for providing the ghostwheel example.#2020-08-1417:57marciolNice @alexmiller#2020-08-1423:25Pavel KlavíkHi, I am getting the following error in Shadow-cljs when evaluating a string with UTF-8 characters in nREPL: #2020-08-1423:25Pavel Klavík
Exception in thread "XNIO-1 I/O-3" java.lang.RuntimeException: com.fasterxml.jackson.core.JsonParseException: Invalid UTF-8 start byte 0xf8
 at [Source: 
#2020-08-1423:25Pavel KlavíkIf I evaluate it from REPL in terminal, everything works fine.#2020-08-1423:25Pavel KlavíkAny idea what could be causing this?#2020-08-1521:21Nick Cernis[SOLVED: thanks to salam for the help!] Should Cursive automatically load and run the Clojure hello world project from http://exercism.io without additional setup? If I “Run tests in current NS in REPL” from hello_world_test.clj I see Could not locate hello_world__init.class, hello_world.clj or hello_world.cljc on classpath. Please check that namespaces with dashes use underscores in the Clojure file name. (The docs suggest Cursive should load any dependent namespaces, and the hello-world-test ns requires the hello-world namespace.) If I send hello_world.clj to the REPL and then “run tests in current NS in REPL” from the test file I see Running tests in hello-world-test but tests never appear to complete and the forms are not annotated with test results as described in the https://cursive-ide.com/userguide/testing.html. Running lein test produces results as expected but obviously does not offer editor integration.#2020-08-1521:36salamwhat’s the classpath you chose in the run configuration to start the repl?#2020-08-1521:49Nick CernisThere was no option to select a classpath. I just picked “Start IDE repl” from the Tools menu.#2020-08-1521:52salam“IDE repl” in Tools menu? i’m not sure what that is and how it’s configured.#2020-08-1521:52Nick Cernis#2020-08-1521:54salamyeah, ~that might be something excercism-specific.~#2020-08-1521:54salamcan you try running the repl using a regular run configuration?#2020-08-1521:55salamControl + Option + R and Edit Run Configurations.#2020-08-1521:59Nick CernisIt works! Thank you so much, that has been a big help.#2020-08-1522:00Nick CernisIt looks like there is a difference between an “IDE: User” REPL (which Tools → Start IDE REPL generates) and a “Local: User” REPL (which the run configuration starts). I'll dig into the Cursive docs to learn more…#2020-08-1522:25cflemingThe IDE REPL isn’t documented - you need to have a property (`idea.is.internal=true`) set in order to see it. It opens a REPL on your open IDE instance, which is a totally different environment to your project. It’s mostly useful for me, at least at this stage.#2020-08-1616:19Nick CernisAh, thank you @U0567Q30W — that explains it. I have the internal flag set to true for my own theme/plugin development and didn't realise it affected Cursive in that way.#2020-08-1607:46p-himikIs there any way to disable the prompt to convert pasted HTML into Hiccup?#2020-08-1823:35cflemingThere isn’t, but I’ll add one.#2020-08-1823:37cfleminghttps://github.com/cursive-ide/cursive/issues/2416#2020-08-1623:16Mr. SavyI'm getting a "cannot be resolved" for all function names in Intellij. I saw that there was a recent conversation about this. Would that be the one to refer to or is there a more general troubleshooting suggestion to try first? I suspect the namespaces aren't being imported correctly, but I'm not really sure.#2020-08-1823:44cflemingThere are a few things to check here. This is usually that the project hasn’t synced correctly. Are you using deps/lein to manage your project? If so, check the relevant toolwindow and make sure that your project is correctly registered there. If it’s not, then in the project view, right click on the project.clj/deps.edn and select add as lein/deps project.#2020-08-1823:45cflemingIf it is, then check that your module has dependencies - go to File -&gt; Project Structure -&gt; &lt;your module&gt; -&gt; Dependencies and make sure that looks roughly like you expect.#2020-08-1823:45cflemingIf you’re getting it for all symbols and not just your Java interop then it’s probably not your SDK.#2020-08-1823:46cflemingFailing all that, you can also try File -&gt; Invalidate Indexes and Restart, since sometimes the indexes can get funky.#2020-08-1708:47mhuebertIs there any way to customize the indentation of host interop forms like this? I’d like them all to be “indent”, otherwise when doing interop, forms tend to grow far to the right#2020-08-1823:38cflemingHmm, no, there isn’t. Would you like this for all interop forms across the board, or for specific calls?#2020-08-2409:46mhuebertI’d do it across the board#2020-08-1714:57reefersleepI’m experimenting with getting a single source of truth for env vars for my Clojure project. Struggling with keeping secrets secret 🙂 Using the an .env file for env vars, EnvFile for loading that file into my Cursive project, and direnv for automatically loading in the .env file via a .envrc proxy whenever I cd into my project in the terminal, I can get most of the way; the .env file is a single source of truth for both Cursive and the terminal. However, I’d like to avoid storing secrets directly in my .env file, as I might accidentally commit those to the project repo. And the .env file is pretty much just a key-value store, so I can’t do scripting in it like pull-this-key-from-my-secrets-store (where secrets-store is pass, or lastpass, or (on mac) security or what have you).#2020-08-1714:57reefersleepAnyone know of a good solution for what I’m talking about?#2020-08-1715:05reefersleepPerhaps it’s really simple and readily available, like running a .sh script just before starting my REPL or whatever.#2020-08-1715:17kenny> I might accidentally commit those to the project repo @reefersleep Sounds like you should gitignore that file.#2020-08-1715:23reefersleepThat’s one solution, but I feel it isn’t strong enough. I’d like to keep secrets completely out of the lexical scope of the project.#2020-08-1715:24reefersleepIf I keep them in something like pass, they’ll be encrypted as well, not available in plaintext.#2020-08-1715:56Alex Miller (Clojure team)https://github.com/awslabs/git-secrets#2020-08-1716:06reefersleepCheers both @U064X3EF3 and @U083D6HK9. I feel that both utilising .gitignore and git-secrets are additions that one can make to prevent leakage of secrets - and there’s nothing against using these things in the project while also keeping your secrets in an encrypted store.#2020-08-1716:06reefersleepI just want to be able to get them out of the store and into IntelliJ somehow 🙂#2020-08-1717:21jdhollisNot necessarily intended for local development (though there’s nothing preventing it): https://www.vaultproject.io#2020-08-1717:24jdhollisRails has a more file-oriented approach: https://edgeguides.rubyonrails.org/security.html#environmental-security#2020-08-1717:25jdhollisBut you’ll still need to store the key somewhere.#2020-08-1723:31rutledgepaulvhttps://github.com/mozilla/sops is one way of keeping secrets in your git repo but secure. I've used this so I can manage secrets "in-band" with the rest of my changes, then decrypt them on the deploy agent and push them to wherever they need to go (like a k8s secret). I use AWS KMS keys so the key is nowhere on my machine (just some temporary credentials for AWS that expire every few hours)#2020-08-1723:34rutledgepaulv.gitattributes filters for check-in and check-out are useful too. I've wired those up with sops (above) so that locally my file always appears plaintext but when I check it into git it gets encrypted automatically so there's never a plaintext version in the remote. I was initially inspired by https://oteemo.com/2019/06/20/hashicorp-vault-is-overhyped-and-mozilla-sops-with-kms-and-git-is-massively-underrated/#2020-08-1812:19reefersleepThanks a bunch @U5RCSJ6BB and @U7JK67T3N! Lots of reading material 🙂#2020-08-1800:15jI'm using cursive on windows, and when I try to add a Run Configuration for a local REPL, I get Run Configuration Error: No modules containing clojure.main found . I checked under File | Settings | Build, Execution, Deployment | Build Tools | Clojure Deps and made sure that I was using tools.deps directly with the latest version.#2020-08-1823:47cflemingThis usually means that your project hasn’t synced correctly, try the steps detailed here: https://clojurians.slack.com/archives/C0744GXCJ/p1597794253112900?thread_ts=1597619780.089600&amp;cid=C0744GXCJ#2020-08-1821:25luiseugenioIs anybody having trouble with Cursive when loading any namespace (MacOs Catalina 10.15.6)? I get this error:
Execution error (ConnectException) at java.net.PlainSocketImpl/socketConnect (PlainSocketImpl.java:-2).
Operation timed out
Regards
#2020-08-1822:06luiseugenioSOLVED. Nevermind, It was a (slurp to get an aws ip address) that last too much and timed out the loading process.#2020-08-1821:53jaimeHi, does cursive support resolving/autocomplete of methods in third party JS library? I'm using shadow-cljs and d3.js , most of the methods in the d3 object are showing "cannot be resolved"#2020-08-1823:47cflemingIt doesn’t right now, but I would like to fix that soon.#2020-08-1903:54Oliver GeorgeQuick sanity check. I updated IntelliJ and seems like Cursive isn't working. IntelliJ IDEA 2020.2 (Community Edition) Build #IC-202.6397.94, built on July 27, 2020 Non-Bundled Plugins: String Manipulation, com.intellij.plugins.watcher, name.kropp.intellij.makefile, net.seesharpsoft.intellij.plugins.csv, com.cursiveclojure.cursive, PythonCore#2020-08-1903:56cflemingLooks ok to me, I’m using Cursive on 2020.2 and lots of others are too. What’s not working?#2020-08-1903:57Oliver George#2020-08-1903:57Oliver GeorgePerhaps my project isn't configured right. I'll poke around more.#2020-08-1903:58Oliver GeorgeThanks for confirming it should work.#2020-08-1903:58cflemingIf this is a project that was working previously, the first thing to try would be File-&gt;Invalidate caches and restart - indexes can get funky after upgrades.#2020-08-1903:59Oliver GeorgeFound the problem. My fault. I'd rebuilt the project but not enabled a required deps alias.#2020-08-1904:00Oliver GeorgeReason isn't interesting but it's react native and I'm switching between figwheel and krell... both have different clojurescript deps so I don't specify it as a top level dep.#2020-08-1904:00Oliver GeorgeAnyway, my bad.#2020-08-1903:54Oliver GeorgeShould I downgrade IntelliJ?#2020-08-1904:02Oliver George@cfleming while you're about. It'd be really nice if js interop stuff wasn't all marked as "not resolved"...#2020-08-1904:04cflemingYeah, I was actually planning to start fixing that this afternoon - it’s on my shortlist.#2020-08-1904:04Oliver GeorgeAwesome.#2020-08-1904:04Oliver GeorgeSame for core js stuff like promises...#2020-08-1904:04Oliver George#2020-08-1904:22bedersI'm getting Dependency errors when using [day8.re-frame/tracing "0.5.1"]. When loading a namespace, Cursive displays: "Dependency cycle. trace.cljc -> trace.cljc -> trace.cljc"#2020-08-1904:22bedersany way around that other than not using this library?#2020-08-1904:24beders(this is with old fighweel using piggy back and whatnot)#2020-08-1905:20stuartrexkingCan anyone remind me which setting is responsible for wrapping on indenting? Say I have
(comment)
(println "HELLO")
if I indent the second line I want it to automatically wrap like so
(comment
  (println "HELLO"))
#2020-08-1920:27misha#2020-08-1905:22stuartrexkingI've had to setup on ubuntu as my MBP battery exploded and I lost my settings 😢. I can't remember what configuration I had exactly.#2020-08-1905:44stuartrexkingThis is what it does with the default settings. I can't tell if it's IdeaVim not playing nicely or Cursive config.#2020-08-1906:19stuartrexkingLooks like what I actually want is parinfer.#2020-08-1906:25stuartrexking🤐#2020-08-2006:57mishacan anyone point me to "the latest clojure-script repl in cursive how-to" or something? (with deps and shadow-cljs preferably)#2020-08-2006:59mishaI find myself spending too much time trying to split code into cljs/cljc just to be able to send it into clojure repl to check/test things. but it kills prototyping speed because I have way too many points of integration with js#2020-08-2007:00mishaso I figured, that just setting up "send to cljs repl" would save me tons of time#2020-08-2007:52mishahttps://gist.github.com/akovantsev/44e2a0e10908785d1f40d3d3bcfff574#2020-08-2016:51jdhollisThe only tweak I would make is to use the generated .nrepl-port file.#2020-08-2018:45mishayeah, shadow-cljs doc mentions that, but I don't have it in earlier cursive version. I updated gist.#2020-08-2108:03JoniIs there some issue with idea resolving dependencies installed locally? Trying to use datomic local dev library which is not available for distribution, but is installed locally mvn -q org.apache.maven.plugins:maven-install-plugin:3.0.0-M1:install-file -Dfile=dev-local-0.9.195/dev-local-0.9.195.jar but idea/cursive can't resolve so I can't start a repl with com.datomic/dev-local {:mvn/version "0.9.195"} in deps#2020-08-2108:27cflemingNo, there shouldn’t be a problem with that. Can you check that ~/.m2/repository/com/datomic/dev-local/dev-local-0.9.195.jar exists?#2020-08-2108:29Joniit's in ~/.m2/repository/com/datomic/dev-local/0.9.195/dev-local-0.9.195.jar#2020-08-2108:30cflemingAh, yes, right. What’s the error that you receive?#2020-08-2108:30cflemingYou don’t have your local repo customised, right?#2020-08-2108:32Joni
Errors during project resolution
			The following errors were found during project resolve:
			/Users/joni.korpelin/projects/****/app/backend/deps.edn:
			Could not find artifact com.datomic:dev-local:jar:0.9.195 in central ()
#2020-08-2108:34Jonirunning the repl works fine with clj cli tool. I don't think I have customised local repo in any meaningful way#2020-08-2503:11cfleming@UMBC73RK9 Is this still a problem for you? I just got around to trying to reproduce this and I can’t - I’ve followed the above steps and it works fine for me.#2020-08-2505:40JoniNo it's not, and sorry for not getting back to you before. I assumed dependencies were fetched on Idea restart because it threw the error then, but didn't resolve it after I did the install locally. Did another change to deps and it worked.#2020-08-2305:14dangercoderIs it possible to hide private vars from auto-completion?#2020-08-2323:57cflemingIt’s not at the moment, no.#2020-08-2408:58ikitommiI imported a shared (deps-based, via :local/root) library as a module into an existsing deps-project. It seems that the paths are not resolved correctly for that module if the paths are defined under a alias, e.g.
{:aliases {:backend {:extra-paths ["src/clj"]}}}
If I put all the paths into top :paths it works correctly.
{:paths ["src/clj" "resources"]}
How can I work with deps-modules with paths under aliases?
#2020-08-2410:59cflemingThis should do it: https://cursive-ide.com/userguide/deps.html#working-with-aliases#2020-08-2414:17ikitommiCan’t figure out how to do that. In the Deps section I can see both modules, but only 1 set of aliases, which are from the main project. I don’t know how to enable :dev profile just for the added module.#2020-08-2414:18ikitommiDeps looks like (`common`) is the module I imported, need to apply it’s :dev alias.#2020-08-2414:19ikitommisetting the paths to top-level resolved the issue:#2020-08-2414:20ikitommithis fails:#2020-08-2414:20ikitommiwith this:#2020-08-2414:21ikitommiand the actual the code is under src/clj.#2020-08-2414:23ikitommiresolved: removing the src from sources makes it work. so, having src at top-level and src/clj under alias made it to fail.#2020-08-2500:43cflemingOh, so the problem is that src was present, but is not the actual source root - is that right? You don’t have code directly under src?#2020-08-2503:59ikitommino code directly under src directly, just subfolders clj, cljc and cljs with the actual sources.#2020-08-2409:22ConorI'm having some trouble refreshing deps-based projects using Cursive - the error I get is 'Command failed when executing /usr/local/bin/clojure'. Going in to the settings, I can see it's pointing to that path but it seems like it can't correctly pick up the clojure executable there as it also has 'Command failed' just under it rather than the clojure version. I can run clojure using the terminal - what am I missing here?#2020-08-2411:01cflemingDo you have anything in your log saying Output from <command> where command is probably /usr/local/bin/clojure? Help-&gt;Show log in Finder/Explorer/whatever#2020-08-2411:04Conor
#cursive.deps.DepsSettings - Output from /usr/local/bin/clojure -Sdescribe: Couldn't find 'java'. Please set JAVA_HOME.
#2020-08-2411:06ConorOddly, I can now use Clojure directly and it appears to work OK#2020-08-2411:11cflemingDo you mean use tools.deps directly?#2020-08-2411:12ConorNo, I switched to that temporarily, which worked. I mean that I can select the 'Use CLI tools' radio button and it now doesn't display the error#2020-08-2411:13cflemingThat is super weird, but I’ll take it 🙂#2020-08-2411:15ConorI did a bunch of different things (installed tools.deps, installed lein via apt, restarted IntelliJ), so not sure which one was the winner. At least it works! 😄#2020-08-2607:52mokrHi, does anyone know if the keyword navigation changed in one of the latest versions? I used to be able to find usages of my re-frame subscriptions and events (namespaced keywords), by CMD-clicking or using OPT-F7 (“Find usages”). In the latest version it seems to interpret the namespace of the keyword literally so that “Find usages” only searches that namespace in addition to the current file. Example: namespace x.y have (reg-sub :foo/bar …) previously I would be able to find all places this subscription was used, but now it will only show me usages in ns “x.y” or “foo”. Is the old behaviour available behind some setting, perhaps? PS: I actually started using namespace keywords when I found that it allowed that kind of navigation while regular keywords didn’t. (Specs: IntelliJ 2020.2 CE, Cursive 1.9.3-2020.2, MacOS 10.15.6) EDIT: Maybe I got confused by a change in the popup or something. “Find usages” now asks which of the two namespaces I would like to search, but the selection does not seem to have any effect, as it search all anyway. What I’m hoping for is to see usages directly in that popup as that gives a much smoother experience than going via a listing in the “3:Find” panel.#2020-08-2700:47cflemingThat sounds very strange. Can you post a screenshot of the find usages panel with the results of a problematic search?#2020-08-2700:48cflemingIn particular I’m interested in the summary that says “Usages of <something> in <some scope>” - what does <some scope> look like?#2020-08-2614:58imreHey @cfleming, has anyone ever requested a feature to highlight unneeded type hints? I find the missing type hint highlighting quite useful#2020-08-2700:49cflemingYes, I’ve thought about this, as well as related things like moving multiple type hints from usages to the declaration (e.g. if a parameter has type hints on 3 of its usages, you could remove them all and type hint the parameter itself).#2020-08-2700:50cflemingBut it’s surprisingly tricky. Here’s an example:
(let [x ^List some-thing
      y x]
  (.iterator y))
#2020-08-2700:52cflemingHere the type hint on x is required because later it’s used after being implicitly passed to y. However if y never used interop forms, that would not be required.#2020-08-2700:52cflemingI haven’t sat down to think through all the corner cases, but I suspect it’s a long list 🙂#2020-08-2717:11imreI'm sure about that, thanks for the insight#2020-08-2615:41isakYou know the feature where you type something like (rf/dispatch ...), but you have no rf alias in your :require , and Cursive automatically adds or suggests it for you? I'm having a problem where it doesn't work for one namespace aliasing: [lambdaisland.glogi :as log]. Any ideas?#2020-08-2700:59cflemingNo, I can’t see why that wouldn’t work - I just tried to repro and it works fine here.#2020-08-2700:59cflemingCan you create a small reproduction project and put it on github so I can try it?#2020-08-2714:49isak@cfleming Sure, here it is: https://github.com/isaksky/cursive-ns-test (for me :require assist does not work in db.cljs), it just looks like this:#2020-08-2807:44svtHello IntelliJ with Cursive I want to setup debugger for my clojure code using ring-server what is the good way to setup it. Could someone please help me on this?#2020-08-3018:00mishawhat is the latest "stabler" idea+cursive version? I've been on 2018.2 for a while after some issues last year. Now I got a minute to update opieop#2020-08-3019:12salami haven’t experienced anything major other than annoying (but seemingly benign) exceptions from Cursive with IntelliJ IDEA 2020.2.1 + Cursive 1.9.3-2020.2#2020-09-0110:40cflemingYes, the latest stable versions of both should be fine AFAIK.#2020-09-0110:39Jakub Holý (HolyJak)@cfleming Perhaps mention on https://cursive-ide.com/userguide/testing.html the trick to resolve with-test as do so that the function usages are not marked as "unresolved"?#2020-09-0110:41cflemingActually, what I should do is just add proper support for with-test so you don’t have to hack it.#2020-09-0110:44cflemingAmazingly, I don’t seem to have an issue for that: https://github.com/cursive-ide/cursive/issues/2423#2020-09-0110:48conanHiya, I'm getting an error Deferred parameters have not been cached! whenever I try to restart my REPL. It seems as though this https://github.com/cursive-ide/cursive/issues/2308 has previously been raised and closed, is there a known fix or should i reopen the issue? Cursive 1.9.3-2020.2, Intellij Ultimate 2020.2#2020-09-0110:49cflemingCould you file a new issue linking the old one, with some repro instructions?#2020-09-0110:54conanwill do#2020-09-0714:08conani haven't been able to figure out a small reproduction, sorry#2020-09-0714:08conanhappens every time though, only on restart never on stop/start#2020-09-0719:55cflemingOk, I’ll see if I can repro trying that.#2020-09-0205:27cfleminghttps://twitter.com/CursiveIDE/status/1301028728244330496#2020-09-0205:28cfleming@U2FRKM4TW This contains the switch to turn off hiccup conversion you asked about.#2020-09-0205:31p-himikAwesome, thanks!#2020-09-0206:32Nick CernisThank you for Cursive. I bought a licence and really like it. Does Cursive accept bounties via https://www.bountysource.com/ or similar? Some issues I'd be willing to put money towards if it helped to prioritise their development: • Inline form evaluation (this is my most-missed feature from other editors): https://github.com/cursive-ide/cursive/issues/391 • Shadow CLJS support: https://github.com/cursive-ide/cursive/issues/1804 • Test runner: https://github.com/cursive-ide/cursive/issues/247#2020-09-0221:40cflemingHi Nick, thanks for the kind words, I’m glad you’re liking Cursive! There’s no bounties for Cursive, simply because money isn’t the limiting factor, my time is. However those three issues are on my shortlist to get fixed ASAP, so I hope they’ll be there soon.#2020-09-0215:36potetm@cfleming After updating this morning, I’m not getting colorization/formatting on some REPL evaluations.#2020-09-0215:36potetmI can’t quite figure out what the pattern is.#2020-09-0215:37borkdude@cfleming Does Cursive have a similar thing to this? https://github.com/borkdude/clj-kondo/issues/872#issuecomment-685781515#2020-09-0221:28cflemingIt doesn’t, but it should. There’s some debate about what they should look like too, since not all forms accept metadata. Possibly something like #_:no-unused-symbol before the form for those cases.#2020-09-0221:28borkdude@cfleming That's exactly the discussion I'm having in that issue. Maybe we could come up with a common format#2020-09-0221:29borkdudeInstead of the uneval (which also came along in the issue) I've also proposed:
^{:clj-kondo/ignore-nth 1} (foo "bar" (baz ...))
#2020-09-0221:32cflemingOk, I’ll think about it - I’ve actually just been adding some inspections and missed being able to disable them. I’ll check what IntelliJ provides/requires for this as well, since that may limit my possible solutions.#2020-09-0215:39potetmWait I think I found it#2020-09-0215:40potetmYeah, there was a key in the response that started with an @#2020-09-0215:41potetmpretty printer didn’t like it#2020-09-0221:24cflemingInteresting, what did those look like? I can have a go at fixing that.#2020-09-0221:25potetmIt was an invalid keyword: :@timestamp#2020-09-0221:25potetmIt plain-printed the response form.#2020-09-0221:25potetmNo colorization, no indentation.#2020-09-0221:26potetmtbh it made sense once I figured out what was up#2020-09-0221:26potetmBut I updated the EAP today, and Jumped To Conclusions!™#2020-09-0221:28cflemingAh, I see - yes, unreadable keywords can cause interesting issues 🙂#2020-09-0221:57potetmI was once on a crusade to un-keywordize all json. Sheer momentum put a stop to it, and now I, for one, welcome the pile of unnecessary errors I will live with forever and ever amen.#2020-09-0223:12cfleming:hail_mary:#2020-09-0215:41potetmall good here, ty#2020-09-0319:22jmvhow do i switch my license type over? i used cursive a while back with the non-commercial license but now i'm able to use clojure professionally so i bought the personal license.#2020-09-0321:46cflemingThanks! You can always register a new licence at Help | Register Cursive…#2020-09-0400:43jmvthanks!#2020-09-0319:35chrisulloaIs there a Cursive/IntelliJ way of deleting a function across an entire project?#2020-09-0321:47cflemingHmm, no, I don’t think there’s anything like that, sorry.#2020-09-0322:12chrisulloaThanks for confirming, ended up doing it with some vim regex commands#2020-09-0319:35chrisulloa(foo/some-fn val) -> val#2020-09-0320:44octahedrionone thing I'd like for Cursive to have is for each new REPL to have an easy way to communicate with all the existing open REPLs. Yes, I can do (require '[nrepl.core :as nrepl]) and then eval forms given the right port numbers but I want it all configured for me by default#2020-09-0321:47cflemingInteresting idea, what’s your use case?#2020-09-0322:06octahedriongeneral everyday REPL use - often I'm working in one REPL, then I open another and find I want to get something I'd computed in the other REPL#2020-09-0322:09octahedrionI want to be able to refer to all the open REPLs like namespaces#2020-09-0322:11octahedrionlike repls/0/user/x would refer to var x in the user namespace of the first REPL#2020-09-0322:11octahedrionsomething like that#2020-09-0322:11octahedrionor have a fn like ns-map repl-map that would return all the information in all the repls#2020-09-0420:54thhellerhmm what could I have done that made the cursive auto-require intent not show up anymore? it used to work but now it just doesn't appear ever?#2020-09-0509:18cflemingThis changed in the latest EAP so it’s possible something broke. First up, did you disable any of the new inspections? If not, can you email me your log file and I’ll take a look?#2020-09-0610:03thhellerhmmm I think I disabled something but not exactly sure what#2020-09-0610:04thhellerthe thing that used to show up in the top right corner of the editor window showing warning/errors numbers in the file is gone somehow#2020-09-0610:04thhellerdon't know what its called but maybe its related#2020-09-0610:04thhellerinspection I disabled for undeclared var stuff since half my files are yellow all over 😛#2020-09-0610:08thhellerah thats actually it. turned it into a "weak warning" and now I have the auto-require thing back without the visual noise#2020-09-0610:08thhellerthx for the hint. didn't think those were related.#2020-09-0610:51katoxIn the latest EAP it does the opposite for me (in the REPL and during debugging, like alt-F8 eval expr). If I confirm the bubble in the REPL cursive spits out the require just to present the same bubble again every time. But it is not really needed it works even though it shows an underlined unresolved symbol.#2020-09-0621:47cfleming@U05224H0W They weren’t until the latest EAP. I broke some of that out into inspections which means that users can control them better. There seem to be some performance issues doing that though so that may go backwards.#2020-09-0621:48cfleming@U0KD0N5T5 I’ll look into that, thanks.#2020-09-0720:23dazldDid something break in the latest EAP builds to do with protocols? I’m getting some very weird behaviour now (`1.9.4-eap3-2020.2` ) - namely cursive tries to import protocols instead of requiring them.#2020-09-0720:23kennyI've seen this too.#2020-09-0720:26dazldgetting some code warnings on valid destructuring of a method arg too#2020-09-0720:29dazldgoing to downgrade to 1.9.3#2020-09-0720:40dazldthis is valid, right?#2020-09-0720:40dazldthe :or clause, specifically#2020-09-0720:42kennyYes#2020-09-0720:42dazldwell, that’s a bug in 1.9.3 as well then, and the import behaviour happens there too#2020-09-0720:43dazldthank for sanity check @U083D6HK9#2020-09-0720:54cflemingThanks for the report, I’ll check those cases out.#2020-09-0721:41cflemingWith the protocol issue, what does the protocol reference look like in your code when Cursive is trying to import it?#2020-09-0721:43cflemingThere’s actually an additional problem where Cursive tries to resolve the symbol at the protocol definition itself, I think that’s an IntelliJ 2020 problem.#2020-09-0721:45kenny#2020-09-0721:46kennyIt seems to only happen in some namespaces.#2020-09-0721:46kennyThat namespace is .clj#2020-09-0721:47kennyDoesn't appear to happen in the 3 cljs namespaces I tested (though, they're all from the same IntelliJ module)#2020-09-0721:47cflemingRight, that’s at the definition - that I think is new in IntelliJ 2020, I had to fix a bunch of similar cases for vars.#2020-09-0721:48cflemingHmm, yeah, protocols are treated differently by Cursive in clj and cljs, since in clj they create an interface and in cljs they’re more like a var.#2020-09-0721:48cflemingI got the impression that @U3ZUC5M0R was talking about referring to them from another namespace, though.#2020-09-0721:48kennyOh, okay. That's the issue I've had. Not sure if @U3ZUC5M0R's issue is different.#2020-09-0721:49cflemingI’ll fix that one now.#2020-09-0722:27kennyJust noticed this one too @U0567Q30W#2020-09-0722:28cflemingYeah, I think that’s all the same case. I’ve just fixed it, it is indeed new in the new EAP, I can’t blame IntelliJ 2020 for this one.#2020-09-0821:15dazldwhen cursive imports the protocol, it looks like:
(:import (foo.bar.baz ISomething))
#2020-09-0821:15dazldas if it was a java interface#2020-09-0821:16dazldeg:#2020-09-0821:18dazldhowever, when imported like this, intelliJ does provide gutter hints, which doesn’t happen with require#2020-09-0821:20dazldetc.#2020-09-0900:17cflemingSo in that case, you would normally either :require/`:refer` that protocol, or refer to it qualified with an alias, like component/Lifecycle. Protocols are tricky in Clojure because they actually do define an interface, and in this case it’s probably what you want, although there are probably subtleties there that I’m not aware of.#2020-09-0817:10Harish TellaHello all, does anyone here use Figwheel with IntelliJ (Cursive)? This question is likely more IntelliJ-related than Cursive-related, but I thought this would be a good audience to ask. When I save a file in IntelliJ, my running Figwheel instance does not do a hot-reload right away. I have to switch my focus to the browser or the Figwheel repl for the hot reload to happen. When saving a file in a different editor, VS Code for example, the hot-reload happens right after saving. I think this has something to do with the virtual filesystem setup by IntelliJ. Something about saving a file in IntelliJ doesn’t alert other programs like normal. An other clue is when I execute the Reload All From Disk command inside IntelliJ, the hot-reload happens. If anyone has a clue it would be a huge step towards front-end nirvana.#2020-09-0900:13cflemingThat should work. How are you saving the file in IntelliJ?#2020-09-0914:07Harish TellaOh you are brilliant. That one question solved it for me. ⌘-S was not bound to anything in IntelliJ. I just assumed it was. It must have auto-saved when I switched the focus off of IntelliJ. After binding ⌘-S to Save All , everything works like it should. Thank you so much. And thank you for Cursive. I really love it.#2020-09-0919:52cflemingGreat! I’m glad it’s working. And thanks for the kind words, I’m glad you’re liking Cursive!#2020-09-0817:15manutter51I have this in my core.cljs file:
(defn ^:after-load refresh-on-figwheel-reload
  []
  (rf/dispatch [:globals/refresh-on-figwheel-reload]))
Do you have something like that?
#2020-09-0817:19Harish TellaHey, yup mine is like this
(defn ^:after-load re-render []
  (rdom/render [views/app] (dom/$ "app")))
#2020-09-0817:19Harish TellaJust re-rendering a reagent component to the dom.#2020-09-0817:20manutter51Hmm, seems like it should work then#2020-09-0817:21Harish TellaYeah, I think this part is good. But thank you all the same. Your CLJS files refresh without taking focus off of IntelliJ?#2020-09-0817:21manutter51You might try the ^{:key ...} trick, sometimes React does some internal caching that causes it to hold on to old renderings.#2020-09-0817:23Harish TellaOk, I’ll give that a try.#2020-09-0817:23manutter51Generally I can’t see my browser while IntelliJ has the focus, because the browser and the IDE are both full-screen on the same monitor, but I’ve seen CLJS debug messages scroll by in the CLJS REPL, so I’m assuming so.#2020-09-0817:19manutter51My CLJS files do refresh, but it can take a bit of time to re-compile, plus even after the refresh happens, my UI doesn’t necessarily re-render until it notices a data change. I have the refresh-on-figwheel-reload event handler set up to increment a value in the app-db, and then in my main page render I have
(fn []
      ^{:key (str "figwheel-refresh-key-" @[:globals/figwheel-refresh-key])}
        [:div.container 
          ;; main page container
        ])
#2020-09-0909:57heliosgenerating stubs seems to not work for me, i’ve copied the .idea folder from another computer (just changed one). could that be the reason? where are the stubs written? Example: the stubs for datomic#2020-09-0910:00heliosi’ve invalidated the cache and restarted, but to no avail, using intellij 2020.2 and latest EAP cursive#2020-09-0910:04heliosnevermind, it said that my JDK was misconfigured. once i did that generating stubs worked fine#2020-09-1013:11Jakub Holý (HolyJak)How is it possible that I def-ine a var in the REPL window but it is then undefined? My session:
*ns* 
=> #object[clojure.lang.Namespace 0xfcdc79d "user"]
(def s1 "To work with module.rds-st2.module.rds.random_string.suffix its original") 
=> #'user/s1
(re-find #"To work with (module[^ ]+)" s1)
Execution error (ClassCastException) at user/eval72482 (form-init11451571577345478644.clj:1).
class clojure.lang.Var$Unbound cannot be cast to class java.lang.CharSequence (clojure.lang.Var$Unbound is in unnamed module of loader 'app'; java.lang.CharSequence is in module java.base of loader 'bootstrap')
(re-find #"To work with (module[^ ]+)" user/s1)
Execution error (ClassCastException) at user/eval72486 (form-init11451571577345478644.clj:1).
class clojure.lang.Var$Unbound cannot be cast to class java.lang.CharSequence (clojure.lang.Var$Unbound is in unnamed module of loader 'app'; java.lang.CharSequence is in module java.base of loader 'bootstrap')
s1
=> "To work with module.rds-st2.module.rds.random_string.suffix its original"
user/s1 
=> #object[clojure.lang.Var$Unbound 0x2363d6f "Unbound: #'user/s1"]
Update It seems it was Shadow-cljs' cljs REPL and the app has likely not been running anymore so that could perhaps explain it...
#2020-09-1013:15manutter51That was definitely a weird one#2020-09-1014:16kennytiltonIs there any way for us to extend the Cursive editor? On of the great tricks I learned thanks to an old skool Lisper was a surprising mouse-copy command that at first seemed bizarre and then became pretty much how I edited, esp. when refactoring: https://github.com/vsedach/mouse-copy We leave the insertion point where we want to (in effect) paste some code, then control-click or alt-control-click what we want to copy. Utterly counterintuitive and utterly addictive. Cursive rocks, but I miss this! 🙂#2020-09-1100:04cflemingOk, I’m going to have a quick go at implementing this. When you say copy, does the original stay in place or get deleted?#2020-09-1100:04cflemingAnd I guess you’re talking about the sexp surrounding the point you click on, correct?#2020-09-1101:51cflemingOk, the mouse handling here is trickier than I expected. I’ll ask JetBrains how to best handle this.
#2020-09-1304:54cfleminghttps://github.com/cursive-ide/mouse-copy#2020-09-1304:54cflemingGive that a try! I’m unlikely to support it much, but if it doesn’t work let me know and I’ll see if I can take a look. That was definitely harder than I expected.#2020-09-1304:54cfleming@U0PUGPSFR ^^#2020-09-1307:05kennytiltonSorry, I was away…thanks!!! Too awesome for words. Don’t know if you solved it already, but c-leftclick copies (leaving the original intact) and c-m-leftclick moves the original. I will give it a try now. If it needs work/support I will give it a shot. I guess my bigger Q was how to modify Cursive. Brilliant! 🙏#2020-09-1307:19cfleming@U0PUGPSFR Great! Let me know if you have questions. If you want a copying and a cutting version, I’d create separate actions and factor the common code out, so you can assign different shortcuts. Ctrl-leftclick is probably caught at a very low level, particularly on OSX, for showing context menus. The other thing you might want is reformatting either the source or destination locations after pasting, let me know if that’s something you might want, it’s pretty easy to implement. Don’t be afraid to ask if you have questions!#2020-09-1307:20cflemingNote that this doesn’t extend Cursive directly at all, just uses standard IntelliJ machinery. So you can also use this to do the same in e.g. Java if the mood takes you 🙂#2020-09-1307:24kennytiltonOK, right, I have to fight the Mac for the keychords. 🙂 I guess it could be the right or middle button if I go get a 3-button mouse. I have an Apple mouse which at least has the right click. Thx again for the effort. I know this is a counterintuitive mouse gesture but once I got into it it was all I did while refactoring.#2020-09-1308:02cflemingNot only the Mac but also IntelliJ, that has actions bound to all the common key combinations with the left click, at least.#2020-09-1308:05cflemingI’m actually not sure if you can reuse Ctrl-click if you have an external mouse connected, you’ll probably need to play around with that and maybe look in the debugger to see what the events end up looking like.#2020-09-1308:06cflemingThat code is pending a code review from the guy at JetBrains who was helping me with it, I’ll let you know if there are changes to it.#2020-09-1308:53kennytiltonOh, wow, this is great support. I had to upgrade to 2020.1 and have encouraging results, with some issues: • the context menu still pops up; and • the text is copied where the click (to copy) is made, not to where I left the insertion point. I am starting to dig into the JB doc, but quickly: is it possible to develop interactively, or is the flow to edit, rebuild plugin, and re-import? Thx again for the effort and JB’s effort as well.#2020-09-1313:27kennytiltonAh, you mentioned a debugger, sounds like I could hack interactively. I will dig into the docs.#2020-09-1316:14kennytiltonOK, not sure what I did but while thrashing I also got Kotlin upgraded to 1.4, maybe that helped. Anyway, text is indeed now copied to the current point. Also, I stole option-click for this feature and that works without kicking off other things. Sweet, I will try to work this much into fingers’ keychord repertoire. Thx again.#2020-09-1316:15kennytiltonI have a couple of feature tweaks that would be nice. Should I put them up on the repo as “issues” or just mention them here?#2020-09-1318:46kennytiltonOK, @U0567Q30W, by hook or by crook I am able to generate debug prints from the plugin. 🎉 First RFE will be to allow copy from a right brace back to the matching left.#2020-09-1318:47kennytiltonbtw, I use the “runIde” task to bring up a whole IDE. Is there a simpler/faster way to iterate?#2020-09-1320:39cfleming@U0PUGPSFR Great! Glad you’re getting into the swing (ha ha) of things. Yes, runIde is what you want, and you want to run it in debug mode. The only interactive option, sadly, is to change the code and then recompile (Build | Build Project), and if you’re lucky the debugger will offer to reload the new classes for you.#2020-09-1320:45cflemingWRT your two issues above - here’s a bit of background. Normally to add a new action, you’d define an AnAction subclass like the Copy one in this plugin, declare it in the plugin.xml and be on your merry way. This one is more complicated because we need to capture the Swing events very early in the process so that the IDE doesn’t perform other actions based on the mouse click, like moving the caret. So if we don’t intercept the events early, what will happen is that they’ll propagate through the IDE, the editor will move the caret and then eventually our action will be invoked. That will cause this issue: “text is copied where the click (to copy) is made, not to where I left the insertion point”, because the editor moves the caret before our action is invoked.#2020-09-1320:47cflemingSo what I suspect is happening is that for some reason the event dispatcher is not catching your event early, or your action is disabled for some reason. You’ll need to debug to figure that out - put the breakpoint here: https://github.com/cursive-ide/mouse-copy/blob/master/src/main/kotlin/mouse/Copy.kt#L127 - that’s the most likely point for the interception of the events to fail.#2020-09-1320:48cflemingAssuming you catch the event there, debug down to here https://github.com/cursive-ide/mouse-copy/blob/master/src/main/kotlin/mouse/Copy.kt#L150, step in until you reach our update() method here: https://github.com/cursive-ide/mouse-copy/blob/master/src/main/kotlin/mouse/Copy.kt#L82 and make sure that isEnabled is coming out true.#2020-09-1320:51cflemingBTW for debug logging, your best option is to set a breakpoint which doesn’t suspend, but which does log to the console (see under Breakpoints’ properties -> Suspend and Logging options here: https://www.jetbrains.com/help/idea/using-breakpoints.html#breakpoint-properties)#2020-09-1322:45kennytiltonThanks for all that! It started copying to the right place. Only thing that changed was a Kotlin upgrade to 1.4. shrug. And I managed to do print debugging by creating a run config from the runIDE task. A bit heavy handed but it let me explore a little. 🙂 I studied your code and looked at the API, and just played with normal editing. I noticed the Kotlin editor does not support double-click select on a right brace. Started getting pessimistic, then I had an insight.#2020-09-1322:54kennytiltonWhat is needed is exactly the logic that determines the range to select when we double-click. In IJ/Cursive that will either identify a grouping (brace, bracket, or parens) or a word. If we can pilfer that logic, it will identify precisely what to copy or move to “point”. Is that logic (that decides the double-click range) also outside Cursive? In com.code.Insight? If you can help me track that down I’ll work on this next weekend. Meanwhile I’ll have fun with the copy off the left parens. 🙂#2020-09-1323:31cflemingI’m not sure what you mean by the logic to select the right brace - what is it you’re trying to achieve there?#2020-09-1414:29kennytiltonWell, we can double-click just to the right of a right parens/bracket/brace in a Clojure file and it will select the whole form to the left. Perfect for a Lispy language. In a Kotlin file the editor selects just the character to the right of the closing brace, which actually makes sense typographically given that we prolly are in the bounding box of that glyph when we click to the right of a parens et al. So I think leveraging the codeInsights library may not work for a Lispy language. But something is! The double-click selection range in Clojure is just what we need for mouse-copy. We will not actually get that as a selection and that is good, because any existing selection needs to be replaced by whatever we click (so we need to know what it is). Hmm, I am about to fire up the Lisp editor I use that has this implemented. Should I capture a movie?#2020-09-1416:24kennytiltonVoila mouse copy: https://drive.google.com/file/d/1p2n7CEq6diW6Lbf_uiX8lmZZYFsr6umR/view?usp=sharing @U0567Q30W#2020-09-1420:16cflemingI see, that demo was very helpful, thanks. So that doesn’t work quite how I envisioned, I thought it worked only for sexps but it also works for other types of form too.#2020-09-1503:17cflemingOk, I’ve investigated this a bit, and added some features to Cursive along the way that I’ve wanted to do for a while. The double-click form selection is driven by the same logic as the Extend Selection command, which is quite easy to hook into. But I don’t think that’s actually what you want, since that will select various types of intermediate things which are not actually single forms but which are useful to select sometimes, like words in strings and sub-parts of qualified keywords and symbols. I think you’d only ever want a complete atom for this, correct?#2020-09-1503:17cfleming@U0PUGPSFR ^^#2020-09-1504:11kennytiltonSorry, I was lost in the history of Lisp over here: http://www.softwarepreservation.org/projects/LISP/resource/#Bibliographies_ I never knew that resource existed! There goes the next month. As for words in strings, (a) lemme check that lisp (btw, that is the AllegorCL IDE on Windoze, they have a free version, but there is an internal flag we have to toggle to get the behavior — I will dig that up, as well) and (b) picking up the whole string would be amazing, but if we fall short of that it is not the end of the world. ISTR just sucking it up when edge cases like that did not quite work. eg, “Fine, I will click the open or close quote” 🙂. brb#2020-09-1504:12kennytiltonps. just option-clicking left-groupers is already a delight. Thx!#2020-09-1504:32kennytiltonOk, here is the magic incantation on AllegroCL for Windows if you want to go that far: (setf (cg.base::use-mouse-clicks-to-copy-lisp-forms (configuration cg.base::*system*)) t) And here is that version: https://franz.com/products/express/#2020-09-1504:43kennytiltonMeanwhile, yeah, the AllegroCL implementation is not smart enough to jump out to the whole string, it just copies the word I click. It can also do insane things if invoked within a comment. Basically my attitude was "do not get carried away, and be ready to revert the file". (The undo in that editor barely works.) As for parts of namespaced keywords, heh-heh, that gets me even now when double-clicking, so I am used to the disappointment. 🙂 But yes, I think most users would be trying to copy the whole atom. Good for the "nice to have" category, but not at all essential in my heavy experience of this feature.#2020-09-1504:54kennytilton@U0567Q30W ^^#2020-09-1504:56cfleming@U0PUGPSFR I’ve often thought I should download the CL IDEs to try them out, but it comes with a difficult first step which is “Learn Common Lisp” 🙂#2020-09-1504:57cflemingI don’t think those modifications are hard, I’ll try to make the changes in the next day or two.#2020-09-1505:01kennytiltonHeheh, CL is a lot different than Clojure, though also much the same. In my experience, that AllegroCL Windoze version is far and away the best. The Lispworks Free version is also a GUI-ish IDE. ClozureCL no longer works for me, too bad, it was good, too. Overall, I think EMACS+Slime is the predominant favorite by far. btw, the only reason I use Windoze is for that AllegroCL IDE. Their port to *nix did not pan out, and with everyone using emacs anyway….#2020-09-1505:09cflemingLooks like they have a Mac version though? Is that buggier than the Windows version?#2020-09-1505:58kennytiltonLemme give it a try. I thought they had given up on the IDE aspect….well, it bravely starts up, has me install GTk, then I just see squares where chars should be. YMMV. The Lisp REPL should be fine, but we’re after the editor.#2020-09-1015:42Jeff Evansis it possible to run cljs tests (via lein-doo) in Cursive directly?#2020-09-1023:14cflemingNo, unfortunately Cursive doesn’t support running CLJS tests yet.#2020-09-1018:10plinshello everyone, is there a way to override cursive’s formatting? force it to use a tool like clj-fmt/zprint?#2020-09-1023:13cflemingThere isn’t, no. This is because the formatting engine is pretty deeply embedded into IntelliJ, and is used in a lot of actions (for example, when you press Enter it’s used to figure out where in the next line the caret should go).#2020-09-1018:44Eric Casteleijn👋 another formatting related question: when you tell cursive to format a macro in a particular way, (say, ‘Resolve as let’), where is that setting stored, and is it exportable, or shareable with others in some way?#2020-09-1023:18cflemingThe formatting (“Configure indentation for….“) and resolution (“Resolve … as…“) are stored in different places, but they both use IntelliJ’s schemes mechanism. So under Preferences | Editor | Code Style | Clojure or Preferences | Languages &amp; Frameworks | Clojure | Symbol Resolution, you can choose to share them with the project, export them etc.#2020-09-1018:46Eric CasteleijnOops asked too soon, my colleauge told me: Preferences > Languages & Frameworks > Clojure > Symbol Resolution shows it.#2020-09-1018:52Eric Casteleijn@plins if you have either of them as a command line tool, you can configure an ‘External Tool’ to run it.#2020-09-1018:53Eric CasteleijnI haven’t tried, but I suspect you could then run it automatically on save if you install the Save Actions plug-in.#2020-09-1018:53plinsthanks for the directions, ill try to see if I can make it behave properly#2020-09-1018:53Eric Casteleijn(Honestly I find configuring Vim easier than Intellij. ;)#2020-09-1307:58Enrico Teterrahi, anyone know how to get functions in cljs like .getTime or .preventDefault to not be highlighted as cannot be resolved?#2020-09-1308:07cflemingThere’s no good solution to that right now, but I’m planning to fix that shortly as part of changes I’m making at the moment.#2020-09-1311:35Enrico Teterrasweet! thanks 🙂#2020-09-1607:36mhuebertminor addition to the request, if you’re working on this anyway - ^js type hints are now common in ClojureScript and would be great if they do not show up as unresolved (even though they do not really resolve to anything)#2020-09-1608:54cfleming@U050RLRRQ Do you mean ^number, ^boolean and the rest?#2020-09-1608:55cflemingAh, no, I see Shadow has some doc about this: https://shadow-cljs.github.io/docs/UsersGuide.html#infer-externs#2020-09-2221:38mhuebertyup, that’s it. sorry, I always miss these updates in Slack#2020-09-1405:36EmpperiDuuno if this has been reported already but stub generation doesn't work for me anymore:
Syntax error (FileNotFoundException) compiling at (C:\Users\Niklas\AppData\Local\Temp\create-stub14382613955835016522.clj:1:1).
Could not locate cursive/stubs/metadata/clojure__init.class, cursive/stubs/metadata/clojure.clj or cursive/stubs/metadata/clojure.cljc on classpath.
#2020-09-1410:37cflemingCan you try this please? Help-&gt;Diagnostic Tools-&gt;Debug Log Settings…, add #cursive.stubs there, then reproduce the problem and send me the logs to <mailto:/cdn-cgi/l/email-protection|/cdn-cgi/l/email-protection>?#2020-09-1410:41cfleming@U7MRZK43B ^^#2020-09-1411:08EmpperiI'll try that#2020-09-1405:37EmpperiIntelliJ Ultimate 2020.2, Cursive 1.9.4-eap3-2020.2#2020-09-1418:50stijnIs there a way to make alternative repls like REBL or Reveal work with the nREPL option from Cursive > run configurations? I can make it work with clojure.main from the run config, and also by starting the REPL from the shell and then connecting to it from Cursive. But both of these have some drawbacks for running tests / debugging.#2020-09-1422:50thumbnailI use nrebl middleware, which works good most of the time; https://github.com/RickMoynihan/nrebl.middleware#2020-09-1506:14stijnCould you share your run configuration settings in Cursive? I can't make it work with starting the repl from inside IntelliJ#2020-09-1510:16cfleming@U0539NJF7 I haven’t tried this, but I’ll have a go at setting it up in the next day or so.#2020-09-1510:18cflemingThe author of reveal is a Cursive user, so I imagine it can be made to work well there (paging @U47G49KHQ)#2020-09-1510:28stijnAh I didn't know that. Here's some more documentation on what I tried: Solution 1 (works) add alias
:reveal-nrepl {:extra-deps {vlaaad/reveal {:mvn/version "0.1.0-ea30"}
                            nrepl/nrepl   {:mvn/version "0.7.0"}}
               :main-opts  ["-m" "nrepl.cmdline" "--middleware" "[vlaaad.reveal.nrepl/middleware]"]}
and start from cli
clj -A:reveal-nrepl
and connect Cursive remote nREPL to that process Solution 2 (works) define alias
:reveal {:extra-deps {vlaaad/reveal {:mvn/version "0.1.0-ea30"}}
         :main-opts ["-m" "vlaaad.reveal" "repl"]}
and from Cursive, create run configuration as follows (see screenshot) • clojure.main • add reveal to aliases
#2020-09-1510:29cflemingOk, but you’d like to start the process using a local REPL, install the middleware and be able to connect to it?#2020-09-1510:29stijnNow what doesn't work: • nREPL • add reveal-nrepl alias#2020-09-1510:29stijnthat's right#2020-09-1510:31stijnbecause, the clojure.main repl doesn't have run tests integration, and the remote repl doesn't allow debugging#2020-09-1510:32cflemingHave you tried setting the middleware using .nrepl.edn? https://nrepl.org/nrepl/0.8/usage/server.html#server-configuration#2020-09-1510:32cflemingActually, you can debug the remote REPL. One sec…#2020-09-1510:33stijnI didn't try that, let me see#2020-09-1510:34cflemingFor remote debugging, see: https://groups.google.com/g/cursive/c/iTri7vvXViA/m/w_HXi5mlDAAJ#2020-09-1510:35cflemingI should still document that 😕#2020-09-1510:36cflemingI’m off to bed now, but let me know if it works.#2020-09-1510:37stijnOK, the nrepl config works!#2020-09-1510:38stijnjust adding
:middleware   [vlaaad.reveal.nrepl/middleware]
to the config and ensuring to add an alias that includes the dep works thanks!
#2020-09-1510:38cflemingGreat!#2020-09-1510:43vlaaadYes, reveal has nrepl middleware 🙂#2020-09-1510:43cflemingSorry vlaaad, I pinged you prematurely there 🙂#2020-09-1510:43vlaaadnp 🙂#2020-09-1510:44vlaaadI never had a need for test integration provided by nrepl, tests can be run from the repl ¯\(ツ)/¯#2020-09-1510:45cflemingI think stijn means that Cursive’s test integration requires nREPL and doesn’t work over a socket/clojure.main connection.#2020-09-1510:46cflemingIt could work over a socket connection but I haven’t fixed that yet.#2020-09-1515:11stijnyeah, that's what I meant. Anyway, Reveal looks awesome @U47G49KHQ 🙂#2020-09-1505:19cfleminghttps://twitter.com/CursiveIDE/status/1305737573004795904#2020-09-1505:20cfleming@U083D6HK9 This includes the protocol name resolution fix.#2020-09-1505:40salam~does “structural selection in let” mean semantic highlighting in ~ ah, never mind. it’s what i thought it is, which is awesome! 🎉 i noticed the github issue has a comment that has a request for the same behavior for map literals. will this work there as well?#2020-09-1507:55cfleming@UDCGPTV9R Yep!#2020-09-1509:17stijn> When extending selection in maps or let-binding or similar forms (e.g. cond, assoc pairs etc) the pairs of forms will now be selected as an intermediate step. Nice!!#2020-09-1515:07salamas a heavy user of “extend/shrink selection”, this is a huge quality of life improvement! thanks!#2020-09-1505:37EmpperiCheers @cfleming, stub generation works now! :thumbsup:#2020-09-1507:55cflemingNice, thanks for letting me know!#2020-09-1505:59vmarcinkoJust asking is this even possible in IDEA/Cursive (not implemented yet, I'm aware) - to customize IDEA to pretty print various content types (say application/edn) in HTTP responses.... Currently JSON gets pretty printed, but EDN not:
GET 

HTTP/1.1 400 Bad Request
Date: Tue, 15 Sep 2020 05:57:27 GMT
Content-Type: application/edn; charset=utf-8
Access-Control-Allow-Origin: *
Access-Control-Allow-Methods: *
Access-Control-Allow-Headers: *
Content-Length: 456
Server: Jetty(9.4.28.v20200408)

{:spec "(spec-tools.core/spec {:spec (clojure.spec.alpha/keys :req-un [:spec$6285/s1 :spec$6285/s2]), :type :map, :leaf? false})", :problems [{:path [:s2], :pred "(clojure.core/fn [%] (clojure.core/re-matches #\"[a-z]*\" %))", :val "worldz123", :via [:spec$6285/s2 :my-clojure-demo.api/only-small-letters-spec], :in [:s2]}], :type :reitit.coercion/request-coercion, :coercion :spec, :value {:s1 "abcorldwbh", :s2 "worldz123"}, :in [:request :query-params]}
#2020-09-1508:34cflemingI don’t know, could you file an issue to look into it?#2020-09-1506:00vmarcinkoI find using IDEA's HTTP request support nice - similar to curl/httpie/postman, probably weaker than some, but nice to have everything in one place, no context switching#2020-09-1515:11salamyes, this is one of those “easter egg” features that i use to impress my colleagues. 😉#2020-09-1506:01vmarcinko(btw, also found that most of IDEA users are barely aware of it existing)#2020-09-1509:23cmdrdats@cfleming has the matching paren highlighting changed? I've upgraded from a goodness-knows-how-old version of cursive to the latest, and keep hitting newline on the wrong paren now - it's like it used to match on the paren before the caret, and now it highlights based on the current paren?#2020-09-1510:15cfleming@U050CLJ53 Can you show a screenshot of what you mean? I’m not seeing what I think you mean here, but I might be wrong.#2020-09-1510:18cmdrdatsSo, in this case, I (think I) expected the highlight on the paren by the + instead of fn#2020-09-1510:19cmdrdatsthe only reason I noticed this is because I'm suddenly getting it wrong very consistently#2020-09-1510:19cmdrdatsoooh#2020-09-1510:20cmdrdatsif I change away from block caret, it acts correctly :mindblown:#2020-09-1510:20cflemingI was just going to ask where your caret was 🙂#2020-09-1510:21cmdrdatsmust be an intellij weirdness?#2020-09-1510:23cflemingMaybe, I’ve never used the block caret, so it’s not clear to me exactly where the caret is. I would assume that screenshot is the equivalent of having the caret before the final paren, but you’re right that that highlighting makes it look like it’s after it.#2020-09-1510:25cmdrdatsye, the actual 'position' of the caret on block caret is to the left of the block - I assumed this was just a display thing :rolling_on_the_floor_laughing:#2020-09-1510:26cmdrdatsbut cool - I'm happy to just switch to pipe caret - it sorts the issue out!#2020-09-1510:27cflemingYes, my official recommendation is Don’t Do That.#2020-09-1510:31cmdrdats:rolling_on_the_floor_laughing:#2020-09-1510:31cmdrdatsthanks for the feedback 🙂#2020-09-1510:57heliosAfter updating cursive a few minutes ago, datomic stuff looks a little weirder (i have generated stubs):#2020-09-1510:57heliosalthough i can imagine that those things can't be resolved by cursive, it makes all my queries look like something is wrong#2020-09-1510:58helios(intelij 2020.2, latest cursive 1.9.4-eap4, JDK 11 through Graal)#2020-09-1511:06imreHave you your stubs generated?#2020-09-1511:06imreAh ai see you do, nvm#2020-09-1511:21imreInvalidate caches?#2020-09-1511:28heliosdone both, no avail#2020-09-1515:12stijnI can confirm I see the same issue#2020-09-1606:12helios@cfleming ☝️#2020-09-1606:58cfleming@U0AD3JSHL Thanks, yes, I’ll fix that and probably release the fix tomorrow.#2020-09-1515:08kennyAfter updating to the latest Cursive (1.9.4-eap4-2020.2), my monorepo style project will continuously ask me to generate stubs for a project. It appears to want to generate stubs for many of the modules in this project. If I keep clicking "Generate now," it'll eventually stop asking. It seems like instead it should ask me to generate stubs for all projects.#2020-09-1515:10kennyAlso, after updating to the latest, all (defs in a comment block are now marked as cannot be resolved. Example in the below screenshot.#2020-09-1515:14kennyAlso Datomic queries all are marked as unresolved even though they are quoted.#2020-09-1515:18kennyAnother one. I assume these are probably all the same issue.#2020-09-1515:20kennyApplying Cursive's auto-format will move the commented out datomic.client.api require too far to the left. Previously it would keep it indented to align with the first datomic.client.api require.#2020-09-1515:23potetmYeah same here^.#2020-09-1515:24potetmAll quoted/commented symbols are now marked as “unresolved.”#2020-09-1515:59Joe R. SmithAt some point Cursive changed how Parinfer works w.r.t. to opening a new form. It used to be the case that opening a new parenthesis would add a matching paren at the end of the parent form, e.g., given:
(+ 1 2 3)
If I were to add an opening paren right before 1 I'd get:
(+ (1 2 3))
But at some point the behavior became this:
(+ () 1 2 3)
Is this configurable? I found the former behavior nicer bc if I did want a closing paren anywhere but the end of the current parent form I'd just explicitly place one (and it'd move).
#2020-09-1521:19cflemingYes, I think I’ll need to make this configurable. I’ll do that for the next release.#2020-09-1612:47Joe R. SmithThanks– in the meantime, is it something I can change in a config file or something?#2020-09-1704:24cflemingNo need: https://github.com/cursive-ide/cursive/issues/2432#issuecomment-693804522#2020-09-1704:24cflemingThat’s in eap5, out now.#2020-09-2018:53Joe R. Smithperfect.#2020-09-1521:19cflemingSorry about the quoted highlighting folks, I’ll fix that today.#2020-09-1602:26tapIs there a trick to bind *print-length* only for cursive repl without making it affect other printing parts of the running program?#2020-09-1704:30cflemingHmm, no, I don’t think there is.#2020-09-1603:16Mr. Savydoes cursive still have compatibility issues with deps? related to the shadow-cljs dependencies#2020-09-1608:32akielThe quoted highlighting also occurs in defn :arglists.#2020-09-1613:10AJ JaroWhat is the best form to choose when resolving a macro that looks like this? When using the defn1 and defn2 functions that are produced from here, these are unable to be resolved by Cursive. I’ve tried a few easy options, but I’m not familiar with a form in Clojure that I could tell Cursive to resolve this in a decent way
(defmacro two-defns
  [defn1 defn2]
  `(do
    (defn ~defn1 ...)
    (defn ~defn2 ...))
#2020-09-1704:31cflemingI don’t think there’s any way to handle that, sorry.#2020-09-1620:41cap10morganIs it still true that figwheel & cursive don't get along well in tools-deps projects? read it here: https://figwheel.org/docs/cursive.html#2020-09-1704:31cflemingNo, AFAIK they work together well.#2020-09-1622:27MitchI don't use Cursive myself, but most of my coworkers do and we have not had issues porting our figwheel based projects to deps#2020-09-1703:21emccueIs there a button i can push to alphabetize my requires?#2020-09-1715:40AJ Jaro@U3JH98J4R I put this plugin together to help address that problem. It’s super basic so I’m open to PRs to it as well on GitHub https://plugins.jetbrains.com/plugin/13222-clojure-namespace-sort#2020-09-1703:25dpsuttonmy cursive coworkers will add a new line before the final closing paren, highlight all the imports and then hit sort lines. would be nice for this to be automated#2020-09-1704:20cfleminghttps://twitter.com/CursiveIDE/status/1306447122598748160#2020-09-1708:56Jim NewtonHi, I am not a cursive user. rather I'm a cider user. However, some of my students ARE NOT emacs users. It is a good idea for me to recommend to them to use cursive?#2020-09-1708:57Jim Newtonespecially if they are already using intelliJ for Scala development?#2020-09-1708:57Jim NewtonI welcome advice.#2020-09-1709:01cfleming@jimka.issy Obviously I’m biased, but I would say yes. Generally I recommend that new Clojure users use whatever they’re used to, so if that’s IntelliJ then sticking to that will make things easier for them. If they’re not either IntelliJ nor Emacs users I’d generally still recommend IntelliJ since it works in a more similar way to other apps they’re used to, but things like VSCode or Atom are also good options for that these days.#2020-09-1709:02cflemingStudents don’t have to pay for Cursive, there’s a free non-commercial licence covering that use case, among others.#2020-09-1709:03Jim Newtonand professors as well, I suppose. I will try it out to have a vague idea what it's like.#2020-09-1709:03Jim Newtonis there a danger of using cursive to edit a project which I otherwise develop using cider?#2020-09-1709:04cflemingOk, the userguide is here: https://cursive-ide.com/userguide/. Let me know if you or others have questions or issues.#2020-09-1709:04Jim Newtondo I risk destroying some of the meta-files if it try to edit the project with two different ides?#2020-09-1709:04cflemingYes - you may not want to go back to Emacs 🙂#2020-09-1709:04cflemingOther than that you should be fine.#2020-09-1709:05cflemingNo, IntelliJ will create its project files in a .idea directory and it will all be self-contained in there.#2020-09-1709:05Jim Newtonbeing multi-lingual can only be good.#2020-09-1709:05cflemingDefinitely.#2020-09-1709:05Jim Newtonhttps://cursive-ide.com#2020-09-1709:05Jim Newtonis that the wrong installation instructions? I see you recommended a different link.#2020-09-1709:06cflemingNo, if you follow the link from the homepage to the installation instructions you’ll end up at the userguide.#2020-09-1709:08Jim Newtongreat. BTW, where is Settings->Plugins. I don't see it in my IntelliJ menu. "IntelliJ Ultimate" not "IntelliJ Community"#2020-09-1709:09Jim NewtonAhh, I see it is in Preferences, not Settings.#2020-09-1709:10cflemingIf you’re on a Mac, it will… yes, that’s right. That differs by platform, unfortunately.#2020-09-1709:13Jim NewtonDo I need to both download cursive AND install the plugin?#2020-09-1709:14cflemingYou need to download and install IntelliJ, and then install the plugin (Cursive) from within the IDE.#2020-09-1709:18Jim NewtonI already have intelliJ installed.#2020-09-1709:18Jim NewtonI downloaded the license and the plugin/Cursive.#2020-09-1709:18Jim Newtonthen I restarted intelliJ and opened up a clojure project, it looks sweet.#2020-09-1709:18Jim NewtonHowever, it never asked me to accept a license.#2020-09-1709:18Jim Newtonis that a bug?#2020-09-1709:21cflemingIt should have popped up a notification in the bottom right corner. That will go away in a while if you don’t do anything about it, you can either find it in the event log or just not worry about it. Cursive is generally non-intrusive with respect to licensing, so if you don’t do it now it will gently nag you at some future point.#2020-09-1709:21cflemingBut everything will work, Cursive never disables anything due to lack of a licence.#2020-09-1709:24Jim Newtonthat's polite and nonintrusive.#2020-09-1709:25Jim NewtonOK, the first curious thing I notice. When I'm editing a scala project, and I view one of my test cases files, I see these little green triangles. I can click one of them to run a single test.#2020-09-1709:25Jim Newtonbut i see no such green triangle in the clojure file. Does that mean something is not installed correctly?#2020-09-1709:26Jim Newton#2020-09-1709:42cflemingNo, Cursive’s test integration works differently to most IntelliJ plugins because it’s REPL-based. I also need a standard test runner, but that’s not there yet. Here’s how the testing works in Cursive: https://cursive-ide.com/userguide/testing.html#2020-09-1709:57Jim NewtonOK, I have a strange problem which seems to differ from the documentation https://cursive-ide.com/userguide/first-repl.html#2020-09-1709:57Jim Newtonthe section Import Existing Project#2020-09-1709:58Jim NewtonI have imported the clojure cmd line tools. brew install clojure/tools/clojure#2020-09-1710:00Jim NewtonI see the dialog#2020-09-1710:01Jim NewtonWhen I press Next I see the following#2020-09-1710:02Jim Newtonand when I press Next here I see the following:#2020-09-1710:02cflemingIs there a deps.edn file in that directory?#2020-09-1710:02Jim Newtonno. should there be?#2020-09-1710:03Jim Newtoncan I check whether "deps" is installed properly?#2020-09-1710:03cflemingYes, that flow is for importing an existing project. If you want to create a new project you should use “new project”.#2020-09-1710:03Jim Newtonno, I have a project which was already created months ago with leiningen#2020-09-1710:04cflemingOh, so there’s a project.clj in that directory?#2020-09-1710:04Jim Newtonyes#2020-09-1710:06cflemingSo did you start this from the splash screen, or did you use File→New→Project from Existing Sources....?#2020-09-1710:06Jim NewtonFile→New→Project from Existing Sources.#2020-09-1710:08cflemingSo I think there’s a step before your first screenshot, which is “Import project from external model”. If your project is a Leiningen one, you have to specify Leiningen there, not Deps.#2020-09-1710:10jsyrjalaIt seems that recent cursive versions have issues with importing java classess:#2020-09-1710:11jsyrjala#2020-09-1710:11jsyrjalaIt shows some java classes as unused even when they are used in the same file#2020-09-1710:13jsyrjalabetter image#2020-09-1710:14jsyrjalathis applies only to some java classes:#2020-09-1710:14jsyrjala#2020-09-1710:15jsyrjalaI think this started in last 1-2 weeks#2020-09-1710:17jsyrjalaHovering on classes says that “Instant cannot be resolved” etc#2020-09-1710:21cflemingI’ll try to reproduce that tomorrow, thanks for the examples.#2020-09-1710:24jsyrjalaThe latter example switched changed to this for some reason when i saved/modified whitespace#2020-09-1710:24jsyrjala#2020-09-1710:27jsyrjalaeverything else seems to work as expected, it is only the coloring is wrong#2020-09-1710:12Jim Newtonahhh.#2020-09-1710:12Jim NewtonI know that sometimes using Scala and the Scala plugin, from time to time intellij gets confused and I have to re-import from source.#2020-09-1710:13Jim Newton!!!#2020-09-1710:13Jim Newtonseems to work. super#2020-09-1710:14Jim NewtonI selected Leiningen rather than Deps and with works great.#2020-09-1710:30Jim NewtonI don't understand "Load File in REPL". is this supposed to load the file which is displayed in the editor?#2020-09-1710:31Jim NewtonI don't see that it has any effect.#2020-09-1710:32Jim NewtonIs there a hidden repl which is being loaded into?#2020-09-1710:33Jim Newton#2020-09-1710:33Jim NewtonI don't get the function rte-run-all-test defined in the repl.#2020-09-1711:42Jim Newtonat the documentation link https://cursive-ide.com/userguide/repl.html#interaction-with-the-editor there is an animated graphic. https://cursive-ide.com/userguide/images/repl/editor-interaction.png , what is the user pressing to deliver those commands to the repl?#2020-09-1711:55Jim NewtonThere is an intelliJ bug about keyboard shortcuts with the mac.#2020-09-1711:56Jim Newtonhttps://youtrack.jetbrains.com/issue/IDEA-79144 the entire key sequence is not shown.#2020-09-1711:56Jim NewtonWhat is the keystroke for sending the current sexpr to the repl?#2020-09-1711:58Jim Newtonhere is what I see on the menu indicating the shortcut, but that does not seem to be correct.#2020-09-1713:14Jim NewtonDoes anyone know if there is a way to register the Cursive license when using IntelliJ Ultimate edition? The instructions in the email is to use Help -> Register Cursive. But that does not seem to exist in my IntelliJ#2020-09-1713:16manutter51I have IntelliJ “Ultimate” on Mac OS, and it’s there, at the bottom. Maybe check under Preferences -> Plugins and make sure Cursive is active? If it’s not active, you won’t get the Register menu option.#2020-09-1713:21Jim Newton@manutter51 how do I know whether it is active ?#2020-09-1713:21Jim Newton#2020-09-1713:21manutter51There should be a checked checkbox to the right of the plugin name#2020-09-1713:22manutter51Oh, click on the Installed tab in that window, the Marketplace tab is showing you available plugins.#2020-09-1713:23manutter51Top center#2020-09-1713:23Jim Newtonhm.... seems to be clicked. right?#2020-09-1713:24manutter51Yeah, that looks right#2020-09-1713:24manutter51It’s not asking you to restart, so it should be there :thinking_face:#2020-09-1713:25manutter51Do you have other plugins installed besides the ones that come standard with IntelliJ?#2020-09-1713:26Jim Newtoncould be a restart issue perhaps.#2020-09-1713:26Jim NewtonI found the menu item in the mean time. not sure whether it magically appeared, or whether I was blind before.#2020-09-1713:26Jim NewtonYes I have other plugins, the scala plugin is the main one.#2020-09-1713:27manutter51Ah, ok, sounds like you’re back in business at least.#2020-09-1713:27Jim Newtoncool. BTW what keys do I need to press to reload a file into the repl, or to re-eval the current top-level form?#2020-09-1713:30manutter51I could never remember the default keys, so I went into Preferences -> Keymap and defined my own (Cmd-Shift-L for “Load file in REPL” and Cmd-Shift-Enter for “Load form before cursor”)#2020-09-1713:31manutter51Also if you look at the top in the KeyMap prefs pane, there’s a dropdown menu with a list of common key bindings for those who are used to other editors, might be something there you’d like.#2020-09-1713:37Jim Newtonyes I took a look at that but I don't really understand how to use it. For example I see "Load File in Repl" is C-c C-k. However, when I press C-c C-k, it does not load the file but rather shows me the dependency list in a huge pink popup#2020-09-1713:38Jim Newtonhowever, C-c C-c does seem to load the current form into the repl. That's a big help.#2020-09-1713:38manutter51Sounds like a key mapping conflict. I’d try changing it to something else, and then changing it back. The IDE will tell you if you specify a key mapping that conflicts with something else, and I believe it tells you what the conflicting command(s) would be#2020-09-1713:39Jim Newtongood advice, thanks.#2020-09-1713:39Jim Newtonin slime (common lisp) and also in cider C-c C-k compiles and loads the current file. That at least that's intuitive#2020-09-1713:40manutter51Yeah, if you’re already used to that might as well keep it, assuming you can resolve the conflict.#2020-09-1817:11Jim Newtonturns out it wasn't a key mapping issue. But rather cursive thinks there is a conflict and refuses to load the file.#2020-09-1817:25manutter51🤯#2020-09-1817:27Jim Newton👍#2020-09-1817:27Jim Newtonjust a little bug. probably easy to fix.#2020-09-1713:32Jim NewtonI ran the menu item REPL-&gt;Type Check Current NS and it gives some innocuous wrong information. Where's the best place to report this?#2020-09-1713:35manutter51Hmm, maybe ping cfleming here. He’s on New Zealand time, so he may not see it right away if you’re posting from a US timezone.#2020-09-1713:37manutter51You can also get his email from the plugin page on the IntelliJ site.#2020-09-1713:39manutter51Or you could sign up for the mailing list at cursive (at-sign) #2020-09-1713:56Alex Miller (Clojure team)you can report issues at https://github.com/cursive-ide/cursive/issues#2020-09-1713:58Jim NewtonThanks, I found it. I reported the issue https://github.com/cursive-ide/cursive/issues/2433#2020-09-1713:59Jim Newtonnot sure what's the best way to make a MWE (minimum working example) because a single file doesn't suffice. eventually you need an entire project directory structure.#2020-09-1714:30jsyrjalaI am seeing similar behavior with Java classes: https://clojurians.slack.com/archives/C0744GXCJ/p1600337448171800#2020-09-1815:23Jim NewtonI am unable to load a file from cursive. I believe the reason is that cursive falsely thinks there are recursive dependencies.#2020-09-1815:25Jim Newton#2020-09-1815:25Jim NewtonIs there a way to load the file anyway?#2020-09-1815:32isakHmm, is that :require syntax valid @jimka.issy? I think people usually put [brackets.around.them]#2020-09-1815:32Jim NewtonI filed an issue in the cursive issue tracker: https://github.com/cursive-ide/cursive/issues/2435#2020-09-1815:33Jim NewtonYes, the synax is correct. At least it loads fine from lein (command line) and from cider.#2020-09-1815:33Alex Miller (Clojure team)it's correct#2020-09-1815:34Jim Newtonthe [brackets] are not needed if you are not using any decorators#2020-09-1815:36Jim NewtonBTW cursive seems to be an amazing project. congrats to the developers.#2020-09-1815:37Jim Newtoneven though I've run into a few limitations I can see the value 🙂#2020-09-1816:08Jim NewtonBTW this problem of circular deps came up because i'm using Cider normally, but one of my students (A scala programmer) is trying to look at the clojure code to figure out how it works and implement a similar project in Clojure (based on the same underlying theory). He's not an emacs user, so I hoped he might be able to run the code using cursive/intelliJ. This seems to be pretty difficult unfortunately. 😞#2020-09-1818:56kingmobIs there a setting to make fns taking keyvals for parameters align them like a map (e.g., component/system-map)?#2020-09-1902:57cflemingCan you show me an example of what you want?#2020-09-1909:04Jim NewtonA long time ago I used lein to create my project which I've been developing for several months. It created the files in the project which I just used as a template but didn't understand on day 1. How when I look at the main ns declaration, I wonder whether the form (:gen-class) needs to be removed. What purpose does it serve?
(ns clojure-rte.core
  (:require [clojure.set :refer [union]]
            [clojure.pprint :refer [cl-format]]
            [clojure-rte.cl-compat :refer [cl-cond]]
            [clojure-rte.util :refer [with-first-match call-with-collector
                                      fixed-point
                                      visit-permutations rte-constantly rte-identity
                                      partition-by-pred
                                      print-vals sort-operands member]]
            [clojure-rte.type :as ty]
            [clojure-rte.dfa :as dfa ]
            [clojure-rte.rte]
            [clojure-rte.memoize]
            [clojure-rte.api]
            [clojure-rte.type-extend]
            )
  (:gen-class))
#2020-09-1909:51sogaiuif you don't aot compile, perhaps it is not necessary. this page might have some useful details: https://clojure.org/reference/compilation#2020-09-1911:07Jim Newtondoes :gen-class simply allow me to define a function named -main which is then automatically called whenever the class is loaded?#2020-09-1911:44Alex Miller (Clojure team)No, it compiles a class with a static method named main (the - is the default prefix)#2020-09-1911:44Alex Miller (Clojure team)There is no automatic anything#2020-09-1911:45Alex Miller (Clojure team)When Java runs, it needs a class with a staric main to invoke#2020-09-1911:45Alex Miller (Clojure team)So :gen-class + a compile can give you a Java main entry point#2020-09-1911:47Alex Miller (Clojure team)Or you can just use clojure.main for the same purpose - it knows how to call the -main method on a Clojure ns (compiled or not)#2020-09-1914:03Jim Newtonwhat does a "Java main entry point" do? is that the function which is automatically run when java is started from the unix command line?#2020-09-1914:36Alex Miller (Clojure team)Yes - you start Java with a class name and it loads that class and invokes it’s static main method#2020-09-1914:39Jim NewtonAnd I also see that in cursive, there is a green play triangle if there is a -main method and :gen-class has been specified.#2020-09-1914:40Jim NewtonThat's pretty useful actually 🙂#2020-09-2002:11cflemingIn fact, that will be there even if gen-class is not specified. From my understanding of this project, I think you can remove the :gen-class safely.#2020-09-1914:30Michael WG'morning. Is there any way to add middleware to the nrepl that cursive sets up, when you choose the nrepl option for your repl configuration?#2020-09-1915:18Michael WFound an answer. Create .nrepl.edn in the root of your project with middleware specified like this:
{:middleware [vlaaad.reveal.nrepl/middleware]}
#2020-09-2002:15cflemingThat is the correct answer!#2020-09-1915:18Michael WFound an answer. Create .nrepl.edn in the root of your project with middleware specified like this:
{:middleware [vlaaad.reveal.nrepl/middleware]}
#2020-09-2115:07cjmurphyIs "No nREPL ack received" still a problem. I have a Shadow nREPL server running and can connect to it using the command line. But starting the nREPL from Cursive I always get "No nREPL ack received".#2020-09-2115:09cjmurphy#2020-09-2115:12cjmurphy@U6Y72LQ4A#2020-09-2115:15cjmurphyThe stack trace says the connection is being refused.#2020-09-2121:41cflemingI can’t think of any reason why the connection should be refused from Cursive but not from the command line.
#2020-09-2200:51cjmurphyCould IntelliJ stop certain things from happening, swallow events/messages that it sees, when it knows is it resource constrained? I know I'm thinking of the weird and ridiculous, but that sometimes helps... I'll try on a smaller project...#2020-09-2201:02cjmurphySo it works fine when my machine not 'taxed'. When I'm doing that form it is in colour! I'm not saying I've found the primary cause thou...#2020-09-2201:29cjmurphyLuckily this time I got the failure I also got a Cursive crash. Sent you the exception report.#2020-09-2207:22misha@U0D5RN0S1 in cursive run configuration, do you have nrepl port hardcoded, or "from nrepl file"? generally, shadow starts on new port every time:#2020-09-2207:26mishajust now, restarted 2 times within a minute:
shadow-cljs - nREPL server started on port 55773
shadow-cljs - nREPL server started on port 55785
#2020-09-2207:26mishaand when port is hardcoded:
Could not connect to localhost:50892: Connection refused (Connection refused)
#2020-09-2207:28misha#2020-09-2210:15cjmurphyI don't known where to find that screenshot.#2020-09-2215:07misha#2020-09-2215:39cjmurphyThe nREPL server is always started on:
:nrepl  {:port 9000}
, from the shadow-cljs.edn file. And the Run/Debug Configurations thing that I've named nREPL is very standard. It has 'nREPL' checked and 'Run with Deps' checked. Perhaps multiple projects that get killed (or not) and all use port 9000 doesn't help. I certainly think that I've done clean state experiments. Perhaps it would be better if my projects never set an :nrepl :port ??
#2020-09-2222:23cfleming@U0D5RN0S1 Can you send a screenshot of your run config?#2020-09-2222:23cflemingI’ve received reports of that exception, but I’ve never managed to reproduce it.#2020-09-2223:21cjmurphySent you as a PM. There's nothing special about it and it is the same that others use.#2020-09-2300:04cjmurphyConnecting to Shadow's existing nREPL is a revelation to me. Does it really mean my REPL/JVM will never be hosed?? I'll never have to wait for it coming up again. I should have picked up on this a long time ago.#2020-09-2308:37cjmurphyFor the UX one possibility would be to do away with local and remote all together. And have more explanation on the Run Configuration page, making it longer than a page. Also if you detect that there's an nrepl server running at 9000 and the REPL is not connecting to it then that's almost certainly a mis-configuration and the user should be alerted. It could be in red writing on that page.#2020-09-2308:39cjmurphyMaybe make each possible situation that the user might want into a sentence and the user chooses one.#2020-09-2308:44cjmurphySo "Full stack with Shadow-cljs" option might have a status of 'waiting for nREPL server to start listening at port 9000'. There would be a place to enter the port number (9000 only being a default).#2020-09-2115:57Rachel WestmacottDoes anyone have a fix for the following: I've set up a dev directory (with a user ns) in a deps.edn configured project. My REPL runs nicely with a :dev alias that I've added to include the dev directory in :extra-paths. It's all working great... except that the IDE has no idea about the dev directory, so editing code there is a real pita. I've tried Mark Directory As -> Sources Root and that absolutely solves the problem - but of course that gets periodically overridden (as it should) by the deps.edn configuration. Is there some way to make the IDE pick up an alias? I'm loathe to move the extra path out of the alias as we don't want that code in our finished artefacts.#2020-09-2116:02Michael WIf you edit your repl configuration, there is an option under "How to run it" called "Run with Deps". you can put your dev alias(es) there once you select the option.#2020-09-2121:42cfleming@U0FR9C8RZ https://cursive-ide.com/userguide/deps.html#working-with-aliases#2020-09-2208:18Rachel Westmacott@UAB2NMK25 thanks - but I got that already#2020-09-2208:19Rachel Westmacott@U0567Q30W that's it! perfect! best possible answer! In my defence I don't think that existed last time I read the docs.#2020-09-2208:19Rachel Westmacott^FYI @UCQV87CN7#2020-09-2301:55folconJust trying out the cursive socket repl and nrepl with arcadia and both appear to fail to connect?
Connecting to remote Socket REPL...
Could not connect to localhost:37220: Connection refused: connect
The funny thing is that the socket repl fails to connect (can connect via telnet on that same port) whereas the nrepl just hangs here:
Connecting to remote nREPL server...
Arcadia does ack a successful connection on it's side however...
#2020-09-2302:57cflemingRight now, for both of those REPL types Cursive assumes there’s a Clojure system at the other end. That’s not true for Arcadia, so all bets are pretty much off unfortunately. I’m going to add a pure streaming socket REPL, but it’s not there yet. In the meantime, you could try a clojure.main REPL in Cursive and then connect over https://github.com/vlaaad/remote-repl#2020-09-2313:42folconOh ok, that's an option 😃...#2020-09-2313:42folconThanks!#2020-09-2317:06folcon@U0567Q30W This might be crazy, but is there someway that I can get cursive's resolution to work for arcadia? Other than writing a pass through layer of functions?#2020-09-2423:35cfleming@U0JUM502E There’s an old comment on an issue about this - unfortunately nothing has changed in the meantime: https://github.com/cursive-ide/cursive/issues/942#issuecomment-117940224#2020-09-2513:17folcon@U0567Q30W There might be some changes on that front based on Rider, but I can completely understand not wanting to go down that rabbithole =)...#2020-09-2523:19cflemingYes, supporting Rider would be basically a total rewrite of Cursive, since it works in a very different way to other IntelliJ plugins (more like a LSP).#2020-09-2309:03reefersleepMy colleague sees nonbreaking spaces as NSBP in editor windows. I see them as a regular space. Does anyone know how I can get the same result as him?#2020-09-2309:36cflemingIs that possibly the font he’s using?#2020-09-2410:00reefersleepHmmmm maybe. I have a suspicion that it’s just because I’m not on the very tip OS/Intellij/Cursive-wise, and he is.#2020-09-2410:00reefersleepI’ll check the font thing though, thanks!#2020-09-2513:21reefersleepIt wasn’t the font, it seems. Gotta try updating my OS/IntelliJ/Cursive next.#2020-09-2309:04reefersleepI tried turning on Editor -> General -> Appearance -> Show Whitespaces (and updating Intellij and Cursive), but still no result.#2020-09-2313:29cjmurphyWhen running a local REPL 'Run Configuration' has an option 'Run with Deps' that accepts alias, alias,... Thus the REPL's classpath can be picked up from aliases in deps.edn. I'm now trying to use the remote REPL instead, which is connecting to an already existing Shadow-cljs nREPL. This might be a shadow-cljs question, and I've read the docs there but they haven't helped me. How should I specify aliases (and hence the classpath of the development server/REPL) now that the remote 'Run Configuration' doesn't have a text-box to write them in?#2020-09-2315:01thheller@cjmurphy you are connecting remotely. so the classpath of the process you are connected to applies, however that was started. you cannot adjust the classpath when connecting remotely.#2020-09-2316:06cjmurphyThe already running server is this: "shadow-cljs - nREPL server started on port 9000". How do you specify the classpath for it? That is what I was hoping to find in the shadow-cljs docs. Somewhere there has to be a list of deps aliases or paths that make up the classpath for what I simply see as 'the server'.#2020-09-2316:31thhellerhttps://shadow-cljs.github.io/docs/UsersGuide.html#deps-edn ?#2020-09-2316:32thhelleror just run via clj directly?#2020-09-2316:32thhellerI don't really think that there is anything but I don't have a clue what would be happening here#2020-09-2323:49cjmurphyI'm going to assume that the classpath is picked up from the aliases checked on 'Clojure Deps Projects', and has nothing to do with the Shadow nREPL server.#2020-09-2315:13João Galritohello all#2020-09-2315:13João Galritowhen using Cursive, do I only get method name resolution if I import the corresponding classes?#2020-09-2401:37cflemingNo, you’ll get it sometimes even if the class is not imported, but Cursive will need to know what the type is. So: (-> (ArrayList.) (.iterator) (.next)) will give you completion on .next because Cursive knows the type is Iterator.#2020-09-2414:02João Galritook, makes sense#2020-09-2323:09João GalritoI think i did something and now Cursive is not auto aligning forms (if I move the first line of a form to the line below, the other lines don't move to the correct indentation)#2020-09-2401:37cflemingThat sounds like parinfer - have you disabled that, perhaps?#2020-09-2414:00João Galritono, I'm using parinfer#2020-09-2423:35cflemingCan you share a screen capture of what you’re seeing?#2020-09-2323:11João Galritoor maybe I dreamt it did that#2020-09-2409:52imreHey @cfleming just out of curiosity, is there a roadmap for Cursive available? I'd love to have a peek at what you think will be coming, whether the focus is on features or fixes etc.#2020-09-2423:46cflemingSo I just dragged Cursive kicking and screaming out of the dark ages and got a changelog, so a roadmap would be the next logical step.#2020-09-2423:47cflemingRight now I basically try to fix bugs as they come up, and in the time left over I do new stuff. A fair amount of my new stuff time recently has been spent on licence management, since that was a pain for large customers. But I’m working on actual Cursive new stuff now.#2020-09-2423:49cflemingOne thing I’ve planned for a while is to actually have a feedback panel in Cursive, which would allow users to pick 3 bugs and 3 features which are the most important to them, along with a slider saying how important each one is to them. Then I can make those decisions based on what people actually need. Github’s reactions are not really sufficient for voting purposes.#2020-09-2423:52cflemingIn the short term, what I’m working on right now is namespace rewriting, which will allow automatic namespace tidying as well as refactorings such as moving namespaces around, functions between namespaces etc.#2020-09-2423:53cflemingThen I’m planning to improve Cursive’s CLJS support, since the current JS parser throws exceptions and the current indexing of JS deps in Shadow is pretty bad.#2020-09-2503:57salamthese sound like pretty good milestones that you can quickly put into a simple roadmap.MD and publish somewhere on the Cursive’s GitHub repository or its official website. i’m sure a lot of people (including myself) are interested in this kind of stuff.#2020-09-2509:39imreThanks for the updates, the voting panel would be super actually#2020-09-2412:54Felipe de MoraisHey folks, what are the Cursive shortcuts that you create to use de REPL commands, run the tests and all of these important actions without conflict with IntelliJ shortcuts?#2020-09-2413:00imreI use a custom, somewhat-mnemonics-based setup. ctrl-r is the repl prefix (`ctrl-r l` to load file, ctrl-r e to send form before caret etc) ctrl-t is the test prefix, followed by t to run current test, shift-t to run all tests in ns, l to run last test#2020-09-2413:00imrehttps://github.com/imrekoszo/dotfiles/tree/master/settings/IdeaIC2020/keymaps#2020-09-2413:02Felipe de MoraisI will try it here. Thanks!#2020-09-2418:58Felipe de MoraisBut it uses mnemonics like emacs, right? Is there a simpler solution?#2020-09-2418:58Felipe de MoraisAny other approach are welcome as well. 🙂#2020-09-2419:00imrenot emacs-like mnemonics, just two-stroke chords more like#2020-09-2419:01imreIntellij is a lot more limited out of the box in that regard than emacs#2020-09-2419:01imreI found it logical to have commands organised into groups, hence the prefixes. That way I run out of keys a lot slower#2020-09-2419:02imreOf course you can set up single-stroke keybinds, it's up to you really#2020-09-2419:03imreNot sure what you mean by simpler solution though#2020-09-2419:03Felipe de MoraisI'm trying to get different approaches to se which one works better for me.#2020-09-2419:10imreOh I see. I guess you gotta try a few mappings#2020-09-2423:44cflemingI use quick lists for testing, Preferences | Appearance &amp; Behavior | Quick Lists. For example, I have a list for testing with a single easy key bound to it, and then IntelliJ pops up a menu I can choose an action from.#2020-09-2509:37imreHmm I wasn't aware of that feature in idea, need to have a look at it#2020-09-2509:38imreSounds rather useful#2020-09-2521:16Felipe de MoraisGreat tip! I was not aware of this feature on IntelliJ but it works pretty well in my workflow! Thanks, @cfleming#2020-09-2601:33cflemingI like it a lot for groups of related actions that I want to be able to access easily but don’t want individual bindings for.#2020-09-2813:09Felipe de MoraisDo you mind to share any other quick list that you have with other Cursive actions? 👀#2020-09-2821:45cflemingI have another one for splitting windows (split vertically/horizontally, unsplit) which I do a lot. But I’m sure I could make a lot more if I sat down and thought about the types of things I typically end up using a menu for.#2020-09-2913:21Felipe de MoraisI see! Thank you for the idea.#2020-09-2414:39Jim NewtonSimilar question already asked in the cider channel. Is there a way for me to tell cursive how to indent a macro call-site? Hopefully I can do so in the macro definition so that any user who uses my macro sees the same indentation, and if a second user edits my file, it won't re-indent differently.#2020-09-2415:01imreSee https://cursive-ide.com/userguide/formatting.html#code-style-settings#2020-09-2416:47Jim NewtonThanks imre, I saw that already. But I didn't understand the connection to macros I write myself.. I want to tell cursive that my-case should be indented the same as the clojure case#2020-09-2416:48Jim NewtonDid I miss something in that documentation?#2020-09-2420:55reefersleepRelated; Cursive is marking forms in calls to my threading-like macro as missing parameters. I thought alt+enter and Resolve as… -> would remove these red lines, but they don’t.#2020-09-2423:42cfleming@U010VP3UY9X Cursive doesn’t support Cider’s indent metadata. You can configure it in your project by configuring the indentation to be 1, which is what case uses, and then if you’re sharing your project files in VCS you can have Cursive store that config in the project. Unfortunately that’s the closest thing right now.#2020-09-2423:42cfleming@U0AQ3HP9U What does your macro look like?#2020-09-2423:55cfleming@U010VP3UY9X Reading what you wrote more carefully, in case it wasn’t clear - yes, you can use the customisation described in that doc for your own macros too.#2020-09-2506:56reefersleep@cfleming My macro is like this:
(defmacro ->until [predicate-fn x & forms]
  (let [result (eval x)]
    (if (predicate-fn result)
      result
      (if forms
        (let [form     (first forms)
              threaded (if (seq? form)
                         (list `-> result form)
                         (list form result))]
          `(->until ~predicate-fn ~threaded 
And can be used like this:
(->until :errors {}
         ((fn [x]
            (prn "hej!")
            (merge x {:dog "fido"})))
         (assoc :errors [])
         (assoc :wow :nej))
"hej!"
=> {:dog "fido", :errors []}
#2020-09-2506:59Jim NewtonSo anyone using my library, but not my project, will get incorrect indentation for the macro calls? Is there a plan/desire to fix this? Or has it been discussed already and rejected.#2020-09-2507:00Jim NewtonBTW, extending the syntax to say "Indent A like B" would be really great, and probably easy to implement. That's what I did years ago when I customized slime to another lisp language.#2020-09-2507:02Jim NewtonBTW(2) is there some desire to have a mutually understandable indentation specification syntax for clojure which all IDEs could choose to implement? In particular something where the macro designer can annotate on the macro definition, which will be delivered therefore with the macro to whoever uses it?#2020-09-2507:03Jim NewtonClearly the person who delivers a macro in a library would like to make it easy for everyone to use his macro, regardless of the editor his customers choose. right?#2020-09-2509:39reefersleepAs for your BTW(2), this goes beyond macros 🙂 It’d be amazing for there to be a cross-editor indentation ruleset.#2020-09-2509:40imreYep that would be most welcome. I don't see any chance of it being clojure-official though, more like an agreement between tool developers#2020-09-2509:41imreSame for programmatic macro descriptions to help static analysis#2020-09-2423:29kennyJust wanted to say thank you for making "Interrupt current execution" stop REPL printing! That has saved me many REPL restarts today. 😃#2020-09-2423:54cflemingOne thing I didn’t announce here when it happened, Cursive finally got a changelog! It’s been far too long coming: https://github.com/cursive-ide/cursive/blob/master/CHANGELOG.md. It has details about the last two years’ worth of releases.#2020-09-2503:57salamthese sound like pretty good milestones that you can quickly put into a simple roadmap.MD and publish somewhere on the Cursive’s GitHub repository or its official website. i’m sure a lot of people (including myself) are interested in this kind of stuff.#2020-09-2510:56cmdrdatshi! my cursive started printing the form in the REPL when I use "Send top form to REPL" - which kinda wrecks the history (particularly since I push defn with shortcut, then hit 'up' to replay my last form quite often)#2020-09-2510:57cmdrdatsI don't know if that's just a setting I accidentally changed, but I can't find it#2020-09-2510:58cmdrdatsah, found it#2020-09-2510:59cmdrdatsLanguages & Frameworks -> Clojure -> uncheck "Add forms sent from editor to REPL history" - in case anyone else wants to know xD#2020-09-2511:11manutter51There's also Cmd-Up (or Ctrl-Up on PC) to scroll an entire form at a time in the REPL history. For example, if you have "Add to REPL history" checked, and you send a 5-line form to the REPL, you can use Cmd-Up to get to the previous REPL command instead of having to hit Up 5 times.#2020-09-2608:31Jim NewtonIn cursive, what is it that tries to figure out the line number being executed during single stepping. Is this IntelliJ or is it the cursive plugin? I ask because it seems to do a pretty bad job. My code single-steps, but the line displayed in the editor is completely wrong.#2020-09-2608:50cflemingThose numbers are written into the bytecode, and they’re basically always correct. However, they’re correct for the moment at which you compile a particular piece of code, which in the case of Clojure means when you sent it to the REPL. So in particular, if you’re editing functions and then sending them to the REPL, odds are that the lines compiled into the functions appearing after the ones you sent are now incorrect. The safest thing to do is to send the entire namespace before debugging.#2020-09-2610:38Jim NewtonHi Collin is it cursive who is responsible for writing these into the byte code, or is that some magic of the jvm or intelliJ?#2020-09-2610:39Jim NewtonI believe my byte-code line numbers must be wrong from the outset, because I don't think I'm doing any redefinitions in the repl.#2020-09-2610:39Jim Newtonmy suspicion is that cursive is assuming the package name is the same as the file name.#2020-09-2610:40Jim Newtonhowever, it might be that java/maven/intelliJ is making this assumption.#2020-09-2621:20cfleming@U064X3EF3 Any idea if there are bugs around this? This project has an unusual layout, e.g. https://gitlab.lrde.epita.fr/jnewton/clojure-rte/-/blob/180118911e37024c9216bd05b9fee93a327095bf/src/clojure_rte/api.clj, where in-ns is used to define things in the core ns from other files.#2020-09-2700:02Alex Miller (Clojure team)Doesn’t ring a bell but could be#2020-09-2804:07cfleming> my suspicion is that cursive is assuming the package name is the same as the file name. This is possible, or some similar type of bug. I’ll try to take a look at this.#2020-09-2608:32Jim NewtonIf it is the responsibility of cursive, then it is probably possible to fix. if it is intelliJ that just makes me cry.#2020-09-2608:32Jim Newton😥#2020-09-2613:36Alex Miller (Clojure team)Clojure is the one writing that into the bytecode#2020-09-2619:51Jeff Evansis there the equivalent of reverse i-search in the Cursive REPL? using nREPL as the type, Run with Leinengen, if that matters#2020-09-2622:42cflemingTools-&gt;REPL-&gt;Search REPL History#2020-09-2622:56Jeff EvansThanks#2020-09-2822:17kennyI know cljc stuff is tricky and an ongoing WIP, but it'd be super awesome if this particular reader conditional didn't mark ex as unresolved. We use this particular conditional all over the place.#2020-09-2822:44dpsuttonis that unresolved or unused? I think its saying the binding ex is not used which is true. If you add an underscore to it does the face go away?#2020-09-2914:45kennyNo, it's unresolved.#2020-09-2914:45kennyJust copied a minimal example from our code. Usually ex is used 🙂#2020-09-2907:01andrzejsliwais there any way to eval in place (in editor) in for ex. in comments (similar to CIDER behaviour) without going to REPL window?#2020-09-2910:23kennytiltonYes, but only after you bring up a REPL. Then Tools>repl>(various options to send things to repl) will be available. I mean, it still “goes to the repl”, but I do not have to 🙂. Also, not sure if you meant “…and dump the output into my source file”. I do not know if Cursive does that. btw, Instead of a text comment involving ;;; I use the clojure comment form to hold snippets. Then I do not have to select a form to evaluate, just position the cursor in/after the form. Cursive then evaluates the ouermost form around the cursor, excluding comment of course.#2020-09-2914:24Jovanny CruzHello! Apparently my cursive installation (or IDEA) is not able to recognize some functions that are declared using https://github.com/plumatic/schema like (s/defn my-function...). IDEA keeps marking functions calls in red and complains about the arity even if the number of arguments is correct. Is there any way to solve this problem? IDEA version 2020.2.2 Cursive version 1.9.3-2020.2#2020-09-2915:10imreHey there. You should be able to teach cursive about these, see https://cursive-ide.com/userguide/macros.html#2020-09-2917:38Jovanny CruzThank you!#2020-09-2920:07cflemingCursive should support those out of the box, though. @U0168NRNKDJ Is your project available anywhere to look at, or is it private?#2020-09-2920:11Jovanny CruzThe repo is private, unfortunately, but even with Imre's suggestion, IDEA keeps complaining 😕#2020-09-2920:12cflemingCould you create a small repro repo that shows the problem?#2020-09-2920:13Jovanny CruzSure, will do and post it here#2020-09-2920:25Jovanny CruzIn the small repo IDEA and Cursive works just fine, I just needed to click on "resolve as defn", but in the repo of the company I work for they do not work#2020-09-2920:27cflemingResolving as plain defn won’t work, because it’s not aware of the type hints. But Cursive does include support for schema, which is why I’m surprised it doesn’t work out of the box. Have you vendored schema under a different namespace, or anything like that?#2020-09-2920:30Jovanny CruzSchema is imported using [schema.core :as s], as usual#2020-09-2920:30Jovanny CruzWorth mentioning that the error says "Incorrect arity"#2020-09-2920:31cflemingOk, I’ll take a look at the repro and see if I can figure it out.#2020-09-2920:32Jovanny CruzThank you! BTW, my teammates can open up the exact same repo but using an older version of IDEA (2019) and no complaints appear#2020-09-2920:33cflemingThat’s very strange. One thing you could try is File->Invalidate caches and restart, it’s possible your indexes have gotten funky.#2020-09-2920:35Jovanny CruzI've tried that but it does not seem to work#2020-09-2920:36cflemingOk, there must be something else going on then.#2020-09-2920:38Jovanny CruzPlease, ping me in case I can help in any way#2020-09-2922:46cflemingSure, the most important thing is just a repro case - hopefully I can figure it out from there.#2020-09-3007:05steveb8nQ: when I use shadow-cljs style requires e.g.
["fs" :as fs]
in a namespace form, it seems to disable unused require checking below the npm require Is this a known bug or should I log one?
#2020-10-0101:53steveb8n@U0567Q30W any comments? I can workaround it by putting all npm requires last but not sure if that is a feature or a bug?#2020-10-0102:39cflemingI’m not sure if that’s been reported, but thinking about it I believe it happens 🙂. I’m actually working on some changes at the moment which will fix that though.#2020-10-0102:39cflemingDefinitely a bug#2020-10-0103:30steveb8ngreat. glad I asked. Thanks :)#2020-10-0112:27Kari MarttilaShould the Code -> Reformat Code work for a directory? Nothing happens if I try it for a directory but works if focus is inside a clojure namespace file -> reformats that file. Ultimate 2020.2.2. on Ubuntu 2020.04. Cursive 1.94-eap5-2020.2.#2020-10-0119:29cflemingI think so, yes, although something may have changed in IntelliJ there.#2020-10-0207:41katoxThank you @cfleming for resolving quite a few old annoyances. I welcome closing nice to have features in the issue tracker because there is a bigger fish to fry. Cursive feels alive once again instead of being stuck in endless busywork (platform changes etc). Thumbs up!#2020-10-0220:34cfleming@U0KD0N5T5 Thanks! Yes, it’s nice to be adding new features again. I’m also planning to get some feedback on the most annoying annoyances and get those fixed too.#2020-10-0402:21Mr. Savyyoo I think I fixed the deps issue but idk how#2020-10-0415:58Norman EcksteinAnyone using rebl in Cursive with Leiningen on Windows?#2020-10-0512:38reefersleepA colleague of mine is used to coding without type annotations, and has now landed in a project that is full of them, and he is overwhelmed when reading code. I was wondering if there are any examples of editor support for hiding types? Just any editor, any language, just an example. We can “fold away” code in a wide array of editors, hide docstrings, stuff like that. I have no trouble imagining that an editor could be capable of hiding all of that type noise as well, at least in a read-only mode. But I wonder if there’s ever been a need strong enough to actually generate in-the-wild examples.#2020-10-0522:29cflemingIt’s definitely possible with folding, yes. I’d question how bad it really is, though - I have tons of type annotations in the Cursive source, and I can read it fine. I’d definitely question the “need strong enough…” aspect.#2020-10-0606:45thumbnailI've seen styling in emacs where typehints are way lighter colored than the rest of the params. I don't think this is possible in cursive yet, but might be a good alternative#2020-10-0608:32reefersleep@U0567Q30W In this particular case, we’re talking about someone going from a very dynamic context to a very statically typed one. I realise that people normally probably attribute the “overwhelmedness” that he is feeling to the learning curve that anyone would experience going from one language to another, and in particular from dynamic to static or vice versa. And therefore, a lot of people might brush off this sort of feeling, saying, “Ah, well, that’s to be expected.” At the same time, I feel like developers are expected (or expect themselves) to move between a lot of different languages in their day job, e.g. when undertaking devops tasks on multilingual projects. Having whatever editors support the developer’s “style of reading” is worth considering imo. And it is considered, to some degrees - observe, for example, the “Distraction Free Mode” in IntelliJ, or the ability to show or hide line numbers or whitespace characters in whatever editors. And were it that easy to implement, I’m sure someone would have done it for e.g. Java in IntelliJ already (for example, a disgruntled Clojurian forced to work with some legacy system 🙂 ). I suspect that there is a need, or that it could prove valuable and create the need if it existed, but that it doesn’t weigh up against the effort needed to implement it. Do you have any idea of what kind of effort it would take to implement something like that in a plugin for IntelliJ, for example? I seem to recall you praising JetBrains for providing such an excellent platform for you with so much stuff working out of the box, and so many affordances for building stuff on top of that box. I’ve also been surprised myself at times with IntelliJ’s capabilities. So, maybe it’s easier than I think, by some definition of “easier” 😉#2020-10-0608:32reefersleep@UHJH8MG6S that might be a good low-effort solution!#2020-10-0610:06cfleming> a lot of people might brush off this sort of feeling, saying, “Ah, well, that’s to be expected.” It’s not so much that, it’s that I think the types are a fundamental aspect of working in a statically typed context, and I’m not sure it’s a good thing to hide them. Your colleague will have to get used to them at some point, at best hiding them will delay that moment. As soon as they start writing code, they’re going to need to both read and write them.#2020-10-0610:07cflemingI’ve actually been considering the opposite, a mode which would show the types that Cursive has inferred - Kotlin has this, for example.#2020-10-0610:07cflemingLet me think about it, it’s probably not hard to implement but I’ll have to decide if I want to implement it or not 🙂#2020-10-0610:08reefersleepSure! It was actually just meant as an open question, not as a feature request 😅#2020-10-0610:09reefersleepShowing inferred types sounds really cool, too!#2020-10-0610:10reefersleepAnd, to be perfectly clear, my colleague is not working in IntelliJ, and he is not working with Clojure. I was just curious whether somebody had thought about this or seen examples of it already, and I couldn’t think of a better place to ask off-hand 🙂#2020-10-0610:12cflemingOh, I see - I had assumed this was someone having problems with type hints in Clojure. What’s he working in?#2020-10-0610:43reefersleepHe’s coming from vanilla JS to Flow, using Vim 🙂#2020-10-0610:47reefersleepPardon the confusion! I’m beginning to realise that this channel is primarily used for communication between you and users concerning bugs and feature requests. I thought that other users might also partake in general discussion about editors and editor usage, but it’s not quite as lively in that regard as I had hoped - rather, you loyally respond to everything, which is awesome, but I don’t want to burden you personally with extraneous musings. Perhaps I should look for a more apt forum for such subjects.#2020-10-0621:42cfleming#editors is always there for you 🙂#2020-10-0712:35reefersleepAwesome, thanks!#2020-10-0513:23jacklombardIn the color scheme for clojure, function definition styles are inherited from symbols. Is there anyway to separate function definition from symbols? Basically I want to have a color scheme like this https://github.com/tonsky/intellij-alabaster which is unfortunately not able to highlight function definitions because they are symbols#2020-10-0522:32cflemingJust to be clear, you’d like to highlight the function definition symbol differently from the rest? So the foo in (defn foo [] nil)?#2020-10-0607:06jacklombardYes exactly @U0567Q30W#2020-10-0704:59jacklombardSorry, but is this possible?#2020-10-0801:33cflemingIt’s not possible in Cursive right now, no. I’ll take a look when I get a moment to see how hard it would be to add.#2020-10-0805:33jacklombardThank you!#2020-10-0611:04heliosi might have already asked, but is there a way to have syntax highlighting into babashka scripts that have no file extension? or is that something inside intellij that's not easily configurable?#2020-10-0611:04borkdudemay I ask why you don't just use .clj or .cljc @helios?#2020-10-0615:11heliosBecause we make self contained executables with the shebang 🙂 and they normally don't have an extension#2020-10-0615:11heliosAlso if i put .clj, cursive thinks it's a "normal" clj file and not a bb script, and it can't resolve anyway#2020-10-0615:23borkdudeI make .clj scripts with shebangs all the time#2020-10-0615:48heliosgood for you 😉#2020-10-0615:49borkdudeShebangs don't exclude extensions, that's just wrong ;)#2020-10-0620:46heliosYeah totally. I've used emacs with no problem by just setting the mode with front matter but was hoping there is the same flexibility in intellij. It's not a problem because we use a bb wrapper anyway to auto put the classpath#2020-10-0621:44cflemingYes, I have on my list to fix the symbol resolution in babashka scripts, but I haven’t got to that yet.#2020-10-0611:05borkdudeyou may be able to associate the Clojure file type with some other extension (e.g. .bb)#2020-10-0621:03andrzejsliwais there any way (via jar or other way) to make cursive aware about dom/js api?#2020-10-0621:44cflemingNot at the moment, but it’s on my short list to fix.#2020-10-0621:05andrzejsliwaI generated shadow-cljs project, then generated with it the pom file, to import it correctly from intellij/cursive level. Reagenet is recognized, but I have no idea how to make cursive aware about dom/js contracts#2020-10-0811:08tothdaHey! Is this normal operation, that there is no code completion inside :refer ?#2020-10-0816:57kennytiltonI am seeing completion until I get past `make-` in your example, at which point there just seem to be no candidates.#2020-10-0821:09cflemingYes, this is currently the case, but I’ve actually been working recently on a new form parser which will allow context-sensitive completion like this. I’m hoping that will be in 1.10#2020-10-1212:04p-himikIs "View as -> Clojure defrecord" broken in the Debugger Variables panel? Because it doesn't allow me to expand an instance.#2020-10-1422:45cflemingI’m not sure, a couple of people have reported issues with records, I’ll take a look.#2020-10-1216:34katoxI noticed that :extra-paths in deps is basically unusable in the latest Cursive EAP. I created a new project based on deps.edn and cursive fails to parse/highlight and load everything listed in :extra-paths dirs. I'm using the latest stable tools.deps.#2020-10-1422:46cflemingI’ll take a look at that - no-one else has reported anything so I’d be surprised at a problem like that slipping through.#2020-10-1508:04katoxI did a clone of an existing project into a new repo and imported that. There are no problems with the original repo (created and imported in an older version).#2020-10-1508:04katoxI found this related issue https://github.com/cursive-ide/cursive/issues/2450#2020-10-1508:17katoxI tried to create a repro project so I tried to re-do everything but everything is normal this time. No idea what went wrong last time. There was no error in the first nor the second time. Rather don't waste time on this one. I'll create an issue in the tracker if I bump into it once more.#2020-10-1508:54cflemingOk, thanks, and I’ll try to repro Kenny’s issue tomorrow.#2020-10-1410:13reefersleepIs it possible to configure macro indentations in Cursive? I see the “Intentions > Clojure > Indentation” in Options, but I don’t see any way to affect it.#2020-10-1410:14reefersleepE.g., I’m using (jdbc/with-db-connection [conn {:datasource d}] (my-long-expression)), and IntelliJ keeps wanting to format it like
(jdbc/with-db-connection [conn {:datasource d}]
                         (my-long-expression))
, when the sensible thing would be
(jdbc/with-db-connection [conn {:datasource d}]
  (my-long-expression))
#2020-10-1410:28reefersleepEven just cond-> wants to be aligned like the first example, when the styleguide says it should be aligned like the second.#2020-10-1410:29reefersleep(The styleguide = https://github.com/bbatsov/clojure-style-guide#body-indentation )#2020-10-1411:30imre@reefersleep see https://cursive-ide.com/userguide/formatting.html#code-style-settings#2020-10-1411:50reefersleepThanks a bunch, I’ll have a lok at that!#2020-10-1411:50imrenp mate#2020-10-1411:30imreI believe you have to select 1 to get it formatted the way you want#2020-10-1515:41denik@cfleming While doing web dev I often have a CLJ and CLJS repl running. Oftentimes I want to evaluate expressions of CLJ/CLJS files in their respective REPLS which currently requires matching the file type with the repl. Is there a way to auto-switch REPLs by filetype? Would be a great improvement for my DX#2020-10-1517:48msolliLately I’ve been having trouble with stub generation. It used to work fine, then one day it didn’t. When I press “Generate now”, I get an error after a few seconds. The Event Log doesn’t provide much detail:#2020-10-1607:21cflemingHere’s how to diagnose: 1. Open Help-&gt;Diagnostic Tools-&gt;Debug Log Settings. 2. In the box that’s opened, enter #cursive.stubs and press Ok. 3. Reproduce the problem. You can do that by refreshing your project from the lein or deps tool window, whichever you’re using. That should show the notification if you don’t already have it. Then press “Generate now”. 4. Send me your log file from Help-&gt;Show log in Finder/Explorer to <mailto:/cdn-cgi/l/email-protection|/cdn-cgi/l/email-protection>.#2020-10-1611:13msolliThanks! I’ll send it to you, along with some more info.#2020-10-1517:49msolliHow can I troubleshoot this?#2020-10-1718:53simon#2020-10-1720:42cflemingI’m actually working on a test runner at the moment, which should be in the next release (1.10).#2020-10-1720:43cfleming#2020-10-1721:00simonThanks @U0567Q30W :star-struck:#2020-10-1720:43cfleming#2020-10-1806:43tengstrandI have a Cursive license that I use on my Mac. Now I want to use it on my PC too. Do I have to pay a full license for that @cfleming?#2020-10-1807:25cfleming@U1G0HH87L Nope, just use the same licence on both, no problem.#2020-10-1807:25tengstrandNice, thanks!#2020-10-1903:50onetomim trying to use net.sf.jtidy/jtidy {:mvn/version "r938"}, but in (:import (org.w3c.tidy Tidy)) it's marked as unresolved. is it possible that it's caused by the :mvn/version starting with a letter instead of a number?#2020-10-1904:27cflemingShouldn’t be, I don’t think. Check in File-&gt;Project Structure to see if a library was created, and if it’s attached to your module correctly.#2020-10-1903:50Oliver GeorgeWhat's the intellij repl command to find something in the repl history. E.g. "<ctrl-r>(def db @re<tab>" to find the last full command with that string in it.#2020-10-1904:10onetomCmd-Opt-E on macOS action name is Search REPL History#2020-10-1904:18Oliver GeorgeThanks!#2020-10-1904:20Oliver GeorgeWas hoping for something more like bash command completion but greatly appreciated anway#2020-10-1904:21onetomu can still type anything in that dialog and that filters the list by fuzzy searching whatever u typed#2020-10-1904:21onetomjust like in most intellij tool windows or dialog boxes or popups#2020-10-1904:28cflemingRIght, that view should narrow down on typing, if it doesn’t (or doesn’t do what you expect) let me know.#2020-10-1904:34Oliver GeorgeWill do. It's sluggish but I've been playing with a large chunk data. I suspect I'll need a fresh history to see it working well.#2020-10-1904:34Oliver George@cfleming do you think IntelliJ will ever have a repl comprable to the chrome console (richer ways to drill into data...)#2020-10-1904:35cflemingYep, I’ve been working on a data browser, and that should be available at some point soon for inline evaluation in the editor, as well as possibly in the REPL output too.#2020-10-1904:36Oliver GeorgeThat sounds quite exciting#2020-10-1904:36cflemingI’m quite excited 🙂#2020-10-1904:37cflemingI have a bunch of different changes on the go, they should all be in there over the coming months.#2020-10-1904:37Oliver GeorgeFantastic#2020-10-1913:18AJ JaroI have a CLJC namespace that I want to “Find Usages” for. When I command click or use the context menu, it does not display any references for CLJS usages of that namespace. However, when I “Find Usages” for any functions in that namespace it works as expected. Cursive version: 1.9.4-eap6-2019.3#2020-10-1913:22AJ JaroThe same situation occurs with this version: 1.9.4-eap6-2020.2#2020-10-2001:22cflemingHmm, I’ll check that - CLJC is still a bit funky unfortunately.#2020-10-1914:41octahedriona weird thing happened the other day, I don't know what I did but suddenly "send top form to REPL" changed its behaviour, normally I can be anywhere in a form that's inside a comment form and go send-top-form-to-REPL and it will send the top form but not the parent comment form to the REPL, but now it changed to send (comment (my-top-form...)) to the REPL. Restarting IntelliJ fixed it but I don't know why it did it#2020-10-2001:23cflemingThat can happen if IntelliJ decides to index at the time you’re sending the form - I’ve been meaning to add a workaround for that.#2020-10-2009:38octahedrionuh indexing I wish IntelliJ wouldn't be quite so keen to index all the time#2020-10-1919:02d5pwhat setting controls soft-wrap in the repl? i want it completely disabled and from what i can see it is, but it always auto-enables when an output line is long enough#2020-10-2001:21cflemingIt should be controlled by the soft-wrap icon in the REPL toolbar - is that not working? I’m pretty sure this never happens to me.#2020-10-2001:30d5pyeah it’s strange, I have it turned off via the icon in the toolbar, but it turns itself on when one of my output lines is long enough , i haven’t determined the exact length that makes it turn on but it’s rather frustrating#2020-10-2205:06d5phi @cfleming, to easily reproduce this it seems once an output line is over 100000 chars it turns on soft-wrap automatically , i.e (println (repeat 50000 "x")) , do you know of any intellij internals that might be setting this limit? can’t see any settings anywhere#2020-10-2205:10cfleming@U0HJCPF3J Looks like https://youtrack.jetbrains.com/issue/IDEA-138523, there’s a property you can set using Help-&gt;Edit Custom Properties…#2020-10-2205:10cfleming> You can disable it by setting editor.soft.wrap.force.limit to a very large value (longer than any lines you work with), but you’ll most probably get a worse performance, so it’s a tradeoff for now.#2020-10-2205:11d5pahh thanks!#2020-10-1919:07manutter51Looks like there’s a *print-right-margin* var you might be bumping into?#2020-10-1919:07manutter51That would be a Clojure thing not a cursive thing, so cursive setting won’t affect it.#2020-10-2108:59katoxIt would be really cool if cursive REPL could change this setting so the pprint would respect the REPL window width automatically.#2020-10-1919:53lreadEven though my fingers have gotten used to spacemacs, I am finding Cursive is the bomb when doing Java interop. So nice to be able to dig deep into those Java objects! Thanks for Cursive @cfleming!#2020-10-2001:20cflemingThanks for the kind words! I’m glad it’s helpful. I’m planning to document all the interop functionality, it’s not all very discoverable right now.#2020-10-1923:50jI'm getting a "Run Configuration Error: No modules containing clojure.main found" when I try to add a run configuration. Can someone help?#2020-10-2000:03cjmurphyHave a look in File/Project Structure and you may find your project has no JDK defined for it.#2020-10-2000:10jThanks @U0D5RN0S1! That's the first thing I checked. I also made sure that all my new default projects has a JDK defined.#2020-10-2000:14cjmurphyAnd Modules / Dependencies has a has a Module SDK?#2020-10-2000:17jYes, I just checked, and it's set to the Project SDK#2020-10-2000:17cjmurphyInvalidate Caches and Restart?#2020-10-2000:19jJust did it, and still the same result. I'm trying to use deps.edn to setup the run configuration instead of lein. I have the simplest deps.edn file right now. Not sure if it's relevant
{:deps {}}
#2020-10-2000:39cjmurphyUsually you right click on it and 'Add as Clojure Deps project'. But you would want a better file than that...#2020-10-2000:40joh! where do I right click?#2020-10-2000:41jOh! That worked! Thanks @U0D5RN0S1! i didn't know about that step!#2020-10-2000:41jDo I have to do that every time I make a new project?#2020-10-2000:42cfleming@U419CTSQN How did you create that project?#2020-10-2000:43cflemingNormally you would create it using some variant of this: https://cursive-ide.com/userguide/deps.html#create-a-new-project-with-deps#2020-10-2000:43cjmurphyYes a deps.edn project. Else you can add the xml file under .idea yourself. But no need these days...#2020-10-2000:43jI made a new folder, then opened it with intellij. Ahh. I think that might've been my mistake#2020-10-2000:44cflemingRight, at some point you need to let Cursive know that you want this to be a deps project using whichever deps.edn. If you just open an empty project then you’ll get… an empty project 🙂#2020-10-2000:44jThank so much again @U0D5RN0S1. I'll make sure to create all my project via the the new project wizard next time#2020-10-2000:44jLol, yeah. I feel really dumb facepalm#2020-10-2000:45cflemingDon’t feel dumb, IntelliJ is huge and confusing if you’re not used to it.#2020-10-2000:45cflemingAnd in particular it works a bit differently to more file-based things like Emacs, VSCode or whatever.#2020-10-2000:45cflemingSince it’s more project-based.#2020-10-2000:45cjmurphyHa. No worries. Yes setup things can be tough sometimes.#2020-10-2000:46jYes, I see that now. I'm coming from vscode, so that was a learning experience. Thanks again! 😄#2020-10-2000:46jthanks @cfleming as well! 😄#2020-10-2000:38jCan someone help me setup deps.edn for cursive?#2020-10-2000:41cjmurphyThe deps.edn file is read by Cursive, but contains nothing that is particular to Cursive.#2020-10-2006:06mike_ananev@cfleming, hi! Have you any plans to resolve issue https://github.com/cursive-ide/cursive/issues/391 ? It would be great to eval forms and see result in little popup window#2020-10-2008:53cflemingYes, I do, hopefully sometime soon.#2020-10-2010:57lambdamHello, Does someone know if there is a way to print the result of an evaluation directly in the file being edited (and not in the repl window). This is the behavior of CIDER and I am wondering if it is possible to have it with Cursive. Thanks.#2020-10-2012:24imreThat appears so common of a question that the message right before your joining this channel seems to be about it#2020-10-2012:26imreSee https://github.com/cursive-ide/cursive/issues/391 I believe that's what you're looking for#2020-10-2016:07lambdamHoo, that's right. Thanks.#2020-10-2107:02lambdamHello, a new and "deeper" question about Cursive. I like to use https://github.com/jeaye/orchestra and its defn-spec macro. In a namespace, I have two functions:
(defn-spec start-server ::aleph-webserver
  [config ::config]
  ...)

(defn stop-server [server]
  (.close server))
In another namespace the text completion gives me stop-server but not start-server . The completion works well in emacs though. The mechanism for code "understanding" seems different. Does Cursive use nrepl for that or does it use an internal mechanism? Thanks
#2020-10-2111:41heliosdo you have a hint for using cursive with http://juxt.aero macro usetime ? (https://github.com/juxt/aero/blob/master/src/aero/impl/macro.cljc#L12) Usage is
(macro/usetime
  (defn foo [])
)
#2020-10-2120:22cflemingDo you mean so that it will recognise the defn inside it? You could resolve it as clojure.core/do, I think that should do it. https://cursive-ide.com/userguide/macros.html#customising-symbol-resolution#2020-10-2214:49heliosthanks!#2020-10-2309:18JoniIs there any way in cursive/idea to find all the unused function definitions in the project?#2020-10-2309:30Lennart BuitWould Analyze > Inspect code help you?#2020-10-2309:31JoniIt only seems to find unused local symbols, which don't seem to contain unused functions.#2020-10-2312:06AJ JaroIn the most recent version of Cursive, cmd-clicking a re-frame namespaced keyword does not show usages anymore. A user needs to right-click and Find Usages in order to show where that keyword is used. :sad-panda:#2020-10-2321:18cflemingDo you mean the most recent EAP? Is this problem new in that version?#2020-10-2901:14AJ JaroThis is happening here: 1.9.4-2020.2 @U0567Q30W#2020-10-2901:14cflemingThanks, I’ll take a look.
#2020-10-2901:15AJ JaroLet me know if there’s anything I can do to help with this#2020-10-2903:44cflemingIt looks like this has been broken again in 2020.2 due to platform changes.#2020-10-2908:26cfleminghttps://github.com/cursive-ide/cursive/issues/2457#2020-10-2910:19AJ JaroThanks for checking it out @U0567Q30W. I think there might be a similar problem with finding CLJC usages that are in CLJS namespaces but I haven't nailed the scenario down yet. I'll let you know when I figure it out in more detail#2020-10-2922:30cflemingThat’s possible, yeah - unfortunately the CLJC support needs a total re-vamp, the current impl is not very robust and violates some IntelliJ invariants.#2020-10-2319:26Michael WWhy does IDEA tell me it cannot resolve clojure.data.csv when the code works?
(ns com.repsrv.lib.csv
  (:require
    #?(:clj
       [ :as io])
    [clojure.data.csv :as csv]))

#?(:clj
   (defn take-csv
     "input path to file, output csv as coll of coll"
     [filename]
     (with-open [file (io/reader filename)]
       (-> (slurp file)
           (csv/read-csv)))))
IDEA says csv/read-csv can't be resolved. Am I missing something?
#2020-10-2419:26Michael WThis was a problem with clojure deps, I had to update src paths and refresh on clojure deps tab for it to resolve correctly again.#2020-10-2508:29Jakub Holý (HolyJak)Isn't Cursive supposed to have this feature where I can type (obj. and get completion of methods available on the object? It doesn't work for me:#2020-10-2510:56simongrayYou need a space between f and the dot#2020-10-2511:11Jakub Holý (HolyJak)Thanks a lot!#2020-10-2520:49cflemingSomeone pointed out to me that that should really use the dot form (. f |) and transform it on completion, but that doesn’t work at the moment.#2020-10-2608:15simongray@U0567Q30W What’s the | for?#2020-10-2608:20Janne SauvalaIs | marking the cursor placement?#2020-10-2609:08cflemingYes, that’s right, | marks where the caret would be.#2020-10-2705:07JoelThe REPL isn't loading java classes from my maven project (multi-module). It gives an error when loading the java class as part of the import statement. The class is found in a dependency (as listed in the pom) I am using nREPL with the radio button "use intellij class path"... Is there something more I need to do? I tried using a deps.edn, but couldn't figure out how to refer to the maven subproject.#2020-10-2707:38cflemingYes, IntelliJ classpath is what you want to use. A few things - is the module which you’re using for your run config one which has access to the class dependency?#2020-10-2707:39cflemingIf so, it’s worth checking that the dependency has actually been added correctly to the module you think it has - check that at File | Project Structure | Modules | &lt;your module&gt; | Dependencies#2020-10-2717:35Joelinterestingly the only dependencies listed there were clojure ones (eg. instaparse), i presume those are coming from the pom. I added the other module and that succeeded in the clj import highlighting properly, not grayed out now. However, even after restart of repl/intellij still doesn't understand import when trying to load file to repl. (?) Thanks for help so far, this is pretty important to using clojure/cursive at work.#2020-10-2719:27Joeli reimported my maven project, and redid the REPL... yay, seems to work now!#2020-10-2717:50royalaidHey @cfleming, small QOL fix that would be great: When generating a test for CLJS instead of :refering all can you just alias test or :refer a known set of useful vars? :refer :all isn’t valid in CLJS land.#2020-10-2722:21cflemingOops, my mistake, I’ll fix that. In the meantime you can edit the template yourself: Settings | Editor | File and Code Templates | CLJS Test NS. I’d be interested to know what you come up with.#2020-10-2818:13royalaid
(ns $NS_NAME
  (:require [cljs.test :refer [async deftest is testing use-fixtures]] 
            #if($TEST_SUBJECT_NS != "")[$TEST_SUBJECT_NS :as sut])#else)#end)
is what I will be using for the moment, not sure what the standard is for cljs.test :requires s
#2020-10-3009:07simongrayIs there a way to bind a key combo to send a piece of code to the REPL? I am developing a pedestal web service and it’s becoming a bit tiresome to navigate to the Rich comment block where my (restart-server) call is every time I make some changes… :S#2020-10-3009:12cflemingYep: https://cursive-ide.com/userguide/repl.html#repl-commands#2020-10-3009:19simongrayAwesomesauce!#2020-10-3009:28simongrayThank you very much! Works perfect.#2020-10-3011:08danieroux@U4P4NREBY it should not be necessary to call (restart-server) in pedestal. This is our dev-server:
(defn- route-fn
  "Use the deref of the namespace to get hot-reloaded namespaces."
  []
  (route/expand-routes
    (deref #'tech.matterindustries.titan.ion.api-gateway.service-handler/routes)))

(def interceptors
  (-> service-handler/service
    ; Get ion provider out of there
    (dissoc ::http/chain-provider)
    ; hot-reloaded-fn ftw!
    (assoc ::http/routes route-fn)
    (merge
      {::http/type  :jetty
       ::http/port  7001
       ::http/join? false})
    (http/default-interceptors)
    (http/dev-interceptors)))
#2020-10-3011:11danierouxNow everytime the route is hit, whatever code that was eval’ed in the REPL will get executed#2020-10-3014:34simongray@U9E8C7QRJ Interesting. Can you explain a little how it works? I am currently working with something like
(defn start []
  (http/start (http/create-server service-map)))
but I don’t see any servers started in your snippet so I’m unsure what to do with it…?
#2020-11-0210:47danieroux@U4P4NREBY interceptors is the service-map in your start The important line that you need in your service map while developing, would be (assoc ::http/routes route-fn) . That route-fn dynamically expands the routes on every call - so point it to your routes#2020-11-0211:00simongrayAh, I see. So #'tech.matterindustries.titan.ion.api-gateway.service-handler/routes is just a regular var that you’re deref’ing?#2020-11-0211:08danierouxYes, the app routing table#2020-11-0211:19simongrayOk. Thanks! I think I'm just not familiar with the syntax here. Never deref'ed a var before. Anyway, I guess it wouldn't work without the deref since yo made it this way. I'm just not sure why.#2020-10-3012:22roklenarcicI don’t know if this would be a cursive feature or nrepl feature, but how could I specify a snippet of code I want to run every time I reload a namespace while connected to REPL?#2020-10-3020:50Jakub Holý (HolyJak)Set an environment variable / system property when starting REPL, have top-level expression wrapped in (if my-env-var-is-set...)?#2020-10-3100:50roklenarcicI should have said reload any namespace instead of a namespace#2020-10-3112:33Adrian SmithDoes any one remember the setting to change the behaviour so when inserting a bracket the ending bracket is inserted at the end of the form in front of it rather than not moving at all?#2020-10-3112:38Adrian SmithFound it here: https://github.com/cursive-ide/cursive/issues/2432#2020-11-0211:55pezDoes anyone know of cljfmt settings that are somewhat compatible with Cursive defaults?#2020-11-0310:23cflemingI’ve never investigated this, but I’m interested in this too, it would be good to document.#2020-11-0310:33pezHow far from the https://github.com/bbatsov/clojure-style-guide#the-clojure-style-guide are the Cursive defaults? Not all that far, right? I see some difference in my day job project, but I am not sure what comes from Cursive settings and what is from its defaults (most people here use Cursive).#2020-11-0310:35pezThese are the settings one of my colleagues sent me:
<ClojureCodeStyleSettings>{
  :cljs.core/as-> :only-indent
  :cljs.core/case :only-indent
  :cljs.core/defonce :only-indent
  :clojure.core/case 2
  :compojure.core/defroutes :only-indent
  :cursive.formatting/align-binding-forms true
  :cursive.formatting/comment-align-column 0
  :garden.def/defstyles :only-indent
}</ClojureCodeStyleSettings>
#2020-11-0310:40pezThe main differences I see are that in the existing code base most re-frame (reg-.* forms and (:require are indented with 2 spaces, while they have no special treatment by cljfmt defaults (i.e. they are indented with 1 space).#2020-11-0310:46pezI seem to make Calva mostly behave together with Cursive on this project using this cjfmt.edn:
{:remove-surrounding-whitespace? true
 :remove-trailing-whitespace? true
 :remove-consecutive-blank-lines? false
 :insert-missing-whitespace? true
 :align-associative? true
 :indents {#"^reg-" [[:inner 0]]
           #"^:require" [[:block 0]]}}
(Note that align-associative? isn’t standard cljfmt , it is just on my fork. And it doesn’t behave nearly as stellar as Cursive’s one.)
#2020-11-0310:49pezI’ll let you know if I find out enough about this to provide https://calva.io/formatting/ with a settings example for Cursive defaults compatibility.#2020-11-0303:41rutledgepaulvI just ran into a small issue where I think cursive is resolving an unqualified get symbol in my namespace on repl startup even though I've done a (:refer-clojure :exclude [get]), so cursive either can't find the var and errors with "Error initialising locals clearing:" or if i define my own get in the namespace then cursive actually invokes my function (which also errors). I filed an issue: https://github.com/cursive-ide/cursive/issues/2459#2020-11-0310:22cflemingWow, that looks funky - I’ll check that out, thanks.#2020-11-0507:02onetomI might have asked this already, but is there a way to customize the REPL prompt for nREPL connections?#2020-11-0510:51cflemingIn Cursive, there really is no REPL prompt - which is the part you’d like to customise?#2020-11-0515:09onetomthere is a => in the output, but that's not really a prompt indeed. what i would like is the same kind of thing as clojure.main/repl-prompt, so i can constantly reflect some state of my program. more specifically i would use it to switch between different deployment environments (using different aws profiles, ssh keys, domain names) and evaluate expressions, which would implicitly depend on the current environment.#2020-11-0515:09onetomso before i evaluate something, i would see which environment will it going to be evaluated.#2020-11-0515:31onetomim practically trying to use cursive as a unix shell replacement, so it feels like i would need something like a shell prompt.#2020-11-0513:06pezIs there a way to fold maps?#2020-11-0513:08pezContext: We are trying with inlining tests into the function attribute maps. It often gets that tests take up much more space than the function itself and the Cursive users in the project do not seem to be able to fold the attribute map.#2020-11-0513:10imreA question on that: how do you keep test-only requires out of the prod namespace this way?#2020-11-0513:15pezWe don’t. 😃#2020-11-0513:34imreAh, okay then 🙂#2020-11-0513:24manutter51You can fold any selection with Command-Period on the Mac, I assume PC is similar.#2020-11-0615:20Vincent Cantin@cfleming Hi, I just noticed that Cursive does not mark the renamed variable as resolved in this snippet: https://clojuredocs.org/clojure.core/ns#example-5fa507fae4b0b1e3652d73ff#2020-11-0615:21Vincent Cantin#2020-11-0622:59cflemingYes, there’s an issue about that, I’m going to try to look at it soon.#2020-11-0917:48kennytiltonI am using Cursive 1.9.4 - 2020-10-20 and suddenly am unable to index projects:
12:41 PM	Error reading /Users/kennytilton/dev/crawlingchaos/project.clj
				Cannot run program "clojure" (in directory "/Users/kennytilton/dev/crawlingchaos"): error=2, No such file or directory
				error=2, No such file or directory
What did I do now?! 🙂 The command clojure brings up a prompt in that directory, and I created a symlink named clojure anyway and it still brings up a prompt. I must be misinterpreting that error. Any ideas appreciated. 🙏
#2020-11-0918:13kennytiltonI just recreated the IntelliJ project from sources, problem unchanged.#2020-11-0921:00kennytiltonAnother team member sees the same on a diff repo.#2020-11-0921:01kennytiltonCatalina is a suspect. It is aways a suspect.#2020-11-0923:10kennytilton(Some of us) had to tell lein-tools-deps where to find clojure
:lein-tools-deps/config {:clojure-executables ["clojure" "/usr/local/bin/clojure"]
                           :config-files [:install :user :project]}
#2020-11-0923:10kennytiltonEven tho it was on our path, btw.#2020-11-1000:45cflemingSo with that, is the problem fixed? That’s possible, since IntelliJ doesn’t use the same CWD or PATH as lein itself.#2020-11-0921:08Felipe de MoraisI would like to use kaocha as my test runner, how could I tell Cursive to use kaocha to run my tests? 👀#2020-11-1000:46cflemingSadly, right now, you can’t, although testing in general is something I’m working on at the moment.#2020-11-1014:19imreAlthough it doesn't integrate with gutter markers, etc, I use custom repl commands for this: run all
(do
  (require 'clojure.spec.alpha 'expound.alpha 'kaocha.repl)
  (binding [clojure.spec.alpha/*explain-out* expound.alpha/printer]
    (kaocha.repl/run-all)))
run current repl ns
(do
  (require 'clojure.spec.alpha 'expound.alpha 'kaocha.repl)
  (binding [clojure.spec.alpha/*explain-out* expound.alpha/printer]
    (kaocha.repl/run)))
#2020-11-1013:37EmpperiOK. I've spent this day debugging a problem where my integration tests just hang indefinitely. Now I've come to conclusion that it is actually a bug in Cursive and more specifically in the part of code that evaluates test assertion diffs. The reason why I've come to this conclusion is because if I execute tests from command line with lein test everything works fine. They also work fine in REPL if I use run-tests. This is true both for command line lein repl and within Cursive lein repl. However, if I use "Run tests in Current NS in REPL" keyboard shortcut (which I use all the time) they hang when a database query is done. To make matters more weird, this doesn't happen with all my tests, just this one causing issues. Also, if I remove assertions using is then they do not hang (but naturally tests are useless). Unfortunately I cannot share code which causes this issue. It is using HikariCP, next.jdbc and PostgreSQL database for this specific test. One additional thing is that my integration tests are wrapped with defintegrationtest macro which I can share:
(defmacro defintegrationtest
  "Defines an integration test. The main effect of this is a proper binding
   to 'lein test :integration'. Otherwise this is identical to normal deftest."
  [name & body]
  (when *load-tests*
    `(def ~(vary-meta
             (vary-meta name assoc :integration true)
             assoc :test `(fn [] 
#2020-11-1013:38EmpperiIf I change that to deftest the situation doesn't really change though#2020-11-1013:38EmpperiHowever I am using test-ns-hook functionality within Clojure test#2020-11-1307:20cflemingSorry for the slow reply on this - is the failing test the only one using test-ns-hook?#2020-11-1013:40EmpperiI wish I could give more information but this is a super weird bug and it is super annoying#2020-11-1014:45Joe R. SmithIdk if this is a cursive bug, but if I start a REPL from within intellij/cursive and then start a Jetty webserver, the webserver persists after intellij is closed.#2020-11-1014:46Joe R. SmithMy expectation is that it'd die with the repl process that started it (nrepl)#2020-11-1019:20Empperi@solussd this is what you will get if you try to exit IntelliJ with active REPL session. If you choose "disconnect" then REPL process is left alive and so is your Jetty. If you choose "terminate" REPL process is also killed as is your Jetty. If you however have checked "don't ask me again" and have chosen "disconnect" then it will perform like you described. So no, not a bug in Cursive.#2020-11-1019:22EmpperiI'm quite certain remembering the option can be reverted from somewhere#2020-11-1019:26Joe R. Smith@niklas.collin thanks- that explains it. I had slightly different reasoning. I assumed, incorrectly, that the repl process was a sub-process of intellij, but that doesn't make sense now that I think about it.#2020-11-1019:26EmpperiWell it actually is#2020-11-1019:26EmpperiBut it is tracked properly#2020-11-1019:32Joe R. Smith@niklas.collin fixed:#2020-11-1019:32EmpperiHappy to help#2020-11-1112:20scarytom@cfleming getting this strange behaviour, and wondered if I'm missing something obvious#2020-11-1310:58scarytomHas anyone seen this before?#2020-11-1320:28cflemingNot that I’m aware of, I’ll try to reproduce it. Is this CLJ, CLJS or CLJC?#2020-11-1423:08scarytomjust plain old clj#2020-11-1609:25Rachel WestmacottI can reproduce it.#2020-11-1609:25Rachel Westmacottsame code, same error message#2020-11-1609:26Rachel Westmacottit seems to be require specific - other functions (e.g. println, count) don't cause the error#2020-11-1823:15scarytom@cfleming did you try this out yet? The issue isn't really affecting me massively, but I am curious about it.#2020-11-1909:00cfleming@UCQV87CN7 No, I’ve been off work for a couple of days but I’ll look at this when I’m back.#2020-11-1909:29scarytomNo worries, thanks.#2020-11-2006:07cfleming@UCQV87CN7 So this is just a common or garden variety bug, although it’s a tricky one. require was one of the first forms I added support for (along with all the other ns-related stuff), and since the ns form is so complicated I cribbed a bunch of code for parsing it from tools.namespace, including this: https://github.com/clojure/tools.namespace/blob/master/src/main/clojure/clojure/tools/namespace/parse.cljc#L63-L70#2020-11-2006:09cflemingMuch of this code never got retrofitted to use my grammar parsing stuff which would have caught this. So this is still using old parsing code, which tries to parse the forms passed to require as a libspec and decides (due to that check) that it’s a prefix form.#2020-11-2006:12cflemingSo when a form is a prefix form, the initial symbols will sometimes but not always refer to namespaces. If you have (require '(clojure string (java io))) for example, there’s actually no namespace called clojure anywhere, so Cursive marks that symbol as something that shouldn’t be resolved, since in an actual prefix forms that’s often valid. Obviously, no namespace called -> exists 🙂#2020-11-2006:13cflemingThen, since that symbol is marked as not resolving to anything, when Cursive is trying to figure out the arity that’s being used for string/split it looks at the parent list to see if it’s a threading form. But the head symbol doesn’t resolve to anything, so it can’t be, which is why Cursive thinks it’s not in a threading form when it actually is.#2020-11-2006:14cflemingThe moral of the story is, as I have been preaching but obviously not entirely practising, is to always use grammars to parse your forms rather than ad-hoc parsing like this.#2020-11-2006:17cfleming(even when that ad-hoc parsing comes from something battle-tested like tools.namespace)#2020-11-2009:13scarytomWow, that's quite a journey. Thanks very much for the explanation, it's very interesting, and I've learnt a lot from it.#2020-11-1310:58scarytomHas anyone seen this before?#2020-11-1208:04saitouenaIs there any way to rename ns a.b to a.c.b ? I could rename a.b to a.c with M-x refactor-this + Rename but I couldn't do it for the above case. I think cursive currently cannot do it if it moves over directories. Is that correct?#2020-11-1208:04cflemingThat’s correct right now, but this will be possible soon.#2020-11-1208:06saitouenaI appreciate it so much! 👍 I'm looking forward to it. It would make it easier to refactor project structure.#2020-11-1208:06cflemingYes, no doubt!#2020-11-1216:33folconI've been trying to get nrepl working inside wsl2 for a while now and I'm not having much luck, has anyone else being trying this? Specifically running intellij in windows and trying to connect the remote repl to an nrepl instance via shadow-cljs running within wsl2. All of my ports appear to be open, but for some reason nrepl refuses connections. Does it not accept any external connections by default or something? I can definitely connect to it within wsl2 and I can connect to other running parts of shadow-cljs.#2020-11-1217:49tanzoniteblackwhat host are you using? localhost or the explicit IP address of the WSL2 instance?#2020-11-1217:50tanzoniteblackI have no idea if that's relevant or not, but random things like that do trip me up sometimes with wsl2 interop#2020-11-1217:50tanzoniteblackI also use windows+wsl2 for development. But, I just run intellij from wsl2 directly, using x410 as an x server on the windows side#2020-11-1217:52folconI've tried both, as well as using ssh to do port forwarding, it's surprisingly opaque.#2020-11-1217:53folconHmm, does that end up working well? I'm a little concerned about whether that's going to cause odd quirks like file system slowdowns or keyboard shortcut issues?#2020-11-1217:56tanzoniteblackhttps://nrepl.org/nrepl/usage/clients.html
clj -Sdeps '{:deps {nrepl {:mvn/version "0.8.3"}}}' -m nrepl.cmdline --connect --host host --port port
are you able to connect directly from powershell?
#2020-11-1217:56tanzoniteblackand it works well for me. I use intellij professionally for kotlin / javascript / clojure & do all of it directly in wsl2#2020-11-1217:57tanzoniteblackI haven't had any issues related to file system slowdowns as long as your code is also in the wsl2 disk. the file system speed issues only exist when accessing files from windows instead of the local partition#2020-11-1217:58tanzoniteblackno issues with keyboard shortcuts, but x410 does stick to the keyboard layout that you started it with. So if you switch between different windows keyboards (like I do with Russian & Chinese), they don't work directly in the intellij window.#2020-11-1217:59tanzoniteblackonly other annoyance is x410 connections are done over tcp, and those connections don't survive shut downs or sleep. So you have to close intellij before you turn off your computer#2020-11-1217:59tanzoniteblackthe windows team is supposed to be releasing a native version of handling gui apps from wsl2 this year. I'm hopeful those will fix those issues for me 🙂#2020-11-1217:59tanzoniteblackbut they're all pretty minor for my workflow#2020-11-1218:07folconHmm, that's pretty lucky. I'm assuming hibernating would also be an issue, which would be a problem for me. Sometimes leaving my code overnight and being able to just dive back in the morning is really helpful 😃...#2020-11-1218:08folconI've been testing with:
lein repl :connect 127.0.0.1:8777
Which I assume is similar? It certainly works within the wsl bash shell...
#2020-11-1218:08folconTrying it from powershell isn't great however#2020-11-1218:09tanzoniteblackyeah, hibernating also has the same issues#2020-11-1218:09tanzoniteblackin order to debug if it's a "windows thing" or "cursive/java thing", you'll probably need to be able to test it from powershell#2020-11-1218:10folconThe interesting thing is if I remove the entries in netsh portproxy then the response changes: with: netsh interface portproxy add v4tov4 listenport=8777 listenaddress=0.0.0.0 connectport=8777 connectaddress=172.18.255.20
lein repl :connect 0.0.0.0:8777
Connecting to nREPL at 0.0.0.0:8777
SocketException Connection reset
        java.net.SocketInputStream.read (:-1)
        java.net.SocketInputStream.read (:-1)
        java.io.BufferedInputStream.fill (:-1)
        java.io.BufferedInputStream.read (:-1)
        java.io.FilterInputStream.read (:-1)
        java.io.PushbackInputStream.read (:-1)
        bencode.core/read-byte (core.clj:87)
        bencode.core/read-byte (core.clj:-1)
        bencode.core/read-token (core.clj:239)
        bencode.core/read-token (core.clj:237)
        bencode.core/read-bencode (core.clj:257)
        bencode.core/read-bencode (core.clj:254)
Bye for now!
without:
lein repl :connect 0.0.0.0:8777
Connecting to nREPL at 0.0.0.0:8777
ConnectException Connection refused: connect
        java.net.DualStackPlainSocketImpl.connect0 (:-2)
        java.net.DualStackPlainSocketImpl.socketConnect (:-1)
        java.net.AbstractPlainSocketImpl.doConnect (:-1)
        java.net.AbstractPlainSocketImpl.connectToAddress (:-1)
        java.net.AbstractPlainSocketImpl.connect (:-1)
        java.net.PlainSocketImpl.connect (:-1)
        java.net.SocksSocketImpl.connect (:-1)
        java.net.Socket.connect (:-1)
        java.net.Socket.connect (:-1)
        java.net.Socket.<init> (:-1)
        java.net.Socket.<init> (:-1)
        nrepl.core/connect (core.clj:178)
Bye for now!
So it's connecting to something?
#2020-11-1218:11tanzoniteblacktry connecting to the actual IP address of the wsl2 virtual machine. you can get that by running ip addr in the wsl2 terminal & pulling the value for eth0#2020-11-1218:13folconNope, then you just get the connection refused, which makes sense as there's no open port on that IP address I think? Actually, I wonder if this is windows firewall being clever#2020-11-1218:15folconNope that's not it either#2020-11-1218:19tanzoniteblackno more ideas. Sorry#2020-11-1218:20folconThanks for the help anyway 😃#2020-11-1219:09folconFinally figured it out I think? Well sort of, I can connect to it via ssh if I use an alternative port via:
ssh -L 8778:localhost:8777 
So I guess that's one way of doing it >_<...
#2020-11-1308:34saitouenaI tried to make shadow-cljs.edn recognized by cursive in this way https://github.com/thheller/shadow-cljs/issues/70#issuecomment-341895828 but I couldn't figure out the way to import generated pom.xml to cursive. Is there anything to do to import it?#2020-11-1308:41saitouenahttps://github.com/cursive-ide/cursive/issues/1804#issuecomment-528441496 I might have misunderstood this. Importing pom.xml feature haven't been implemented yet but thheller suggested it would be a solution.#2020-11-1308:57thheller@tetsu.ponpon2000 pom.xml imports require the Maven plugin to be enabled. It should be enabled by default but it might not be. make sure it is enabled and then import the pom.xml via "project from existing sources"#2020-11-1309:06saitouenaThanks for your reply. I made it sure the maven plugin is enabled and then tried "project from existing sources" but it didn't work. I think it's because my project is multi-module project and my pom.xm generated by shadow-cljsl is in the sub module.#2020-11-1309:07saitouenaI might need to bring pom.xml to the top directory of the project and merge it with the existing pom.xml or something like that.#2020-11-1309:09thhellerpretty sure you can import pom.xml as a module too but I've never used that#2020-11-1309:11saitouenaI'll try to recreate my cursive project and to import my settings again. It might be a remedy.#2020-11-1309:49cfleming@tetsu.ponpon2000 You should be able to right click on the pom.xml and choose “Add as Maven project” or something similar.#2020-11-1607:51saitouenaThanks for your replies. What I want to do is making cursive to recognize shadow-cljs.edn dependencies without modifying my project.clj. I added shadow-cljs dependencies to :dev profile of my project.clj for a remedy but I don't like it. https://github.com/cursive-ide/cursive/issues/1804#issuecomment-528441496 I tried this with the following steps: • generate pom.xml with shadow-cljs pom • right click pom.xml and choose "Add as a Maven project" Cursive hasn't recognize my shadow-cljs dependencies yet. It reports rf cannot be resolved on (:require [[re-frame.core :as rf]]) . Is there anything to do on top of that?#2020-11-1607:52cflemingThat should be (:require [re-frame.core :as rf])#2020-11-1607:53cflemingYou have your []s doubled up.#2020-11-1608:22saitouenaIt's my typo. My actual source code is ok.#2020-11-1808:01royalaidHey @cfleming been playing around with https://github.com/jpmonettas/flow-storm, seems like #trace data reader can’t be resolved#2020-11-1821:28cflemingOk, I’ll take a look, I think this should work.#2020-11-2500:02cflemingSo I investigated this, what’s happening is that Cursive expects the data reader tags to be qualified, per the doc: https://clojure.org/reference/reader#tagged_literals > Reader tags without namespace qualifiers are reserved for Clojure.#2020-11-2500:04cflemingI guess non-qualified tags work but are frowned upon. I’m always unsure what to do in these cases.#2020-11-2502:56royalaidLooks like this is a pattern that is emerging#2020-11-2502:56royalaidhttps://github.com/weavejester/hashp/blob/master/src/data_readers.clj#2020-11-2502:57royalaidBecause people want short strings when debugging things#2020-11-2503:16cflemingOk, I’d better add support for that, then.#2020-11-2603:24cfleminghttps://github.com/cursive-ide/cursive/issues/2464#2020-11-1808:02royalaidIs this expected? Poking around a bit in old issue a while back seems to imply that data readers should be generally supported#2020-11-1911:29HenryIt is strange that the "find usages" action work for some files but not for others. Wonder if anyone has experienced the same and know why or how to fix it? Thank you.#2020-11-1911:53HenryFYI, I was going through fulcro-rad-tutorial when the issue occurred. https://github.com/fulcrologic/fulcro-rad-tutorial#2020-11-1912:08AJ Jaro@UVDMR4Y75 I have this trouble a bit, but I think my experiences are with CLJC and CLJS mappings#2020-11-1914:43Henry@UGMAVSMUM Thanks for sharing. I spent more time digging around and can confirm that the issue only exists in CLJC files and only pertains to the find usages and navigation actions of the namespaces inside (:require ...). A temporary solution I found: for CLJC files, put all required namespaces inside of reader conditionals (#? or #/cdn-cgi/l/email-protection) and the actions should work properly. @U0567Q30W Would like to share this finding. Not sure why this happen this way, but hopefully there could be a better fix. Thanks a lot for creating such an amazing tool.#2020-11-1914:52Michael WI have problems with that rad demo too, because the files on disk don't match the 'normal' layout for namespaces it confuses the IDE.#2020-11-1914:53Michael WI changed the layout on disk and made it simpler.#2020-11-1920:42cflemingInteresting, I’ll take a look at that. I’m surprised by that since Tony and the others that I know of who work on Fulcro all use Cursive.#2020-11-2500:13cfleming@UAB2NMK25 I just took a look at this project. When you talk about the layout, do you mean the dev directory which isn’t added as a source root?#2020-11-2500:15cflemingIf so, that’s added as in the dev alias (`:extra-paths` in the deps.edn), so you need to tell Cursive to use that alias when syncing: https://cursive-ide.com/userguide/deps.html#working-with-aliases#2020-11-2018:42Jakub Holý (HolyJak)Is there a way to teach Cursive to resolve symbols pointing to functions in another namespace, re-exported via a custom macro? There are fns such as tech.v3.dataset/column-count that are re-exported from a namespace that I require like this:
(exporter/export-symbols tech.v3.dataset
                         column-count
                         row-count)
When I require ☝️ as middleman-ns, I want Cursive to understand that middleman-ns/column-count is a fn. The exporter: https://github.com/cnuernber/dtype-next/blob/master/src/tech/v3/datatype/export_symbols.clj#L4
#2020-11-2105:09cflemingThere isn’t out of the box right now, but I’m planning some support for this. There are a few libraries out there that do this just with def too, and I’ve planned to add support for that for a while now.#2020-11-2105:10cflemingI’ll take a look at that macro when I fix this.#2020-11-2109:55ikitommiis there an easy way to edit a file inside a dependency (jar)? With emacs, you can make a buffer editable - modify the contents and reload that file into a repl: you can basically live-edit you dependencies, which is really awesome. With IDEA, can’t make the buffer/view editable. Could copy the content somewhere else and edit there, but looking for a cleaner way for this.#2020-11-2109:55ikitommi#2020-11-2109:57ikitomminot looking for any permanent changes, just ability to change what the current repl sees.#2020-11-2110:12imreThis would be awesome. I do remember seeing an idea command to make a file editable, not sure if it helps here#2020-11-2110:26cflemingThere isn’t, but this is something a few people have asked for. One idea I had was an action to convert a file from a jar into a scratch file, which you could then edit and send to the REPL.#2020-11-2110:41ikitommithat would be great. Two big benefits: • ability to use things like #p (hashp) or tap> (with portal / reveal) from 3rd party libs • ability to try / fix small things in libs. currently working with a lot of alpha libs (many ours), which are great, but full of gaps that would be to add/fix locally in the calling project as you find them. git-sha-deps-flow simplifies things a lot, but this would allow fixes to be instant.#2020-11-2111:04cflemingOk, I’ll check in the JetBrains slack how best to achieve that.#2020-11-2302:06sogaiupossibly not so helpful here, but fwiw i have some clojure code in: https://github.com/sogaiu/alc.index-defs that extracts .clj* files from dependency jars and makes them avaiable under a .alc-id subdirectory of one's project.#2020-11-2304:21cfleminghttps://github.com/cursive-ide/cursive/issues/2463#2020-11-2310:25Jakub Holý (HolyJak)FYI What I do is switch the repl to the ns of the file, copy-paste the fn to that file, adjust, eval. But ☝️ would be much more comfortable#2020-11-2317:56mike_ananev
brew install mc
mc
Just run Midnight Commander, put cursor on jar file and hit Enter. Use F4 to edit. Like in old good days..
#2020-11-2320:55cflemingWhat’s been implemented is copying to a scratch file, as described in that issue:#2020-11-2320:55cflemingScratch files are still a bit funky, but it seems to work pretty well.#2020-11-2314:59Caro AHi, I'm trying to get up and running with Cursive behind a corporate proxy. I have leiningen, clojure, jdk all installed and can happily run my project from the commandine. However, when I try to load the project in intellij, cursive tries to download a standalone binary for Leiningen, which is forbidden by the proxy. Is there a way to get cursive to recognise the lein binary of the same version that I have installed? I'm on Linux, javac 11.0.3 from openjdk, lein 1.9.2, intellij 2019.3 and cursive 1.9.1-2019.3 if that makes any difference. Thanks!#2020-11-2400:00cflemingCursive will download the leiningen uberjar to ~/.lein/self-installs, which is where lein itself will download it to. Check which versions you have there, if you have a specific version in that folder then you can tell Cursive to use that version at Preferences | Build, Execution, Deployment | Build Tools | Leiningen#2020-11-2410:30Caro AI don't have anything in .lein/self-installs, but I have what seems to be a lein binary at /usr/local/bin/lein. I didn't do the setup, but I can only assume this is from an operating system package rather than curling some script to install lein. Is there a way to get cursive to look on $PATH for lein, or to use this specific location for the binary?#2020-11-2421:18cflemingLein is two parts - it’s an uberjar containing the actual lein code, and a script which handles downloading the uberjar and running it. That’s what /usr/local/bin/lein is. In the script, there’s probably a line like:
LEIN_JAR="$LEIN_HOME/self-installs/leiningen-$LEIN_VERSION-standalone.jar"
Do you have LEIN_HOME set to something other than ~/.lein?
#2020-11-2617:42dimaHello. Is it possible to sort namespace requires alphabetically when formatting file?#2020-11-2620:08cflemingIt’s not right now (apart from dpsutton’s workaround), but this is something I’ve been working on recently. I had to park it for a while, but it will be in sometime soon.#2020-11-2700:52saitouenaI usually do it with cljstyle with the integration with file watcher. https://github.com/greglook/cljstyle https://cdn-ak.f.st-hatena.com/images/fotolife/e/egs33/20200214/20200214162956.png#2020-11-2900:44AJ JaroThere's also a plug-in for IntelliJ https://plugins.jetbrains.com/plugin/13222-clojure-namespace-sort#2020-12-0913:08dimaAnd there is one more plugin for that https://plugins.jetbrains.com/plugin/12731-amethyst#2020-11-2617:51dpsuttoni've seen coworkers make sure that the requires are each on a line (ie, add a newline after :require and before the final closing paren) and then use the built-in intellij feature to sort lines.#2020-11-2711:39dimaDidn’t know about intellij Sort lines It works, thanks for suggestion!#2020-11-2709:54heliosSomething strange. In my require i have [re-frame.context :as re-frame :refer [defc]] (it's a fork of re-frame) But later down in the text, where i have re-frame/subscribe cursive offers to require the ns#2020-11-2716:30imreWhy does cursive format tagged literals like this:
#kaocha/v1
    {:plugins [:kaocha.plugin/profiling
               :kaocha.plugin/print-invocations
               :kaocha.plugin/cloverage
               :kaocha.plugin.alpha/spec-test-check]}
and not like
#kaocha/v1
{:plugins [:kaocha.plugin/profiling
           :kaocha.plugin/print-invocations
           :kaocha.plugin/cloverage
           :kaocha.plugin.alpha/spec-test-check]}
?
#2020-11-2719:49cflemingGreat question, I have no idea - I’d have to look at that.#2020-11-2723:45pezcljfmt does something similar, although only one space indent. Maybe it is to show what is tagged? It makes a bit of extra sense when readers stack. Like so:
#kaocha/v1
 #foo/bar
  #baz
   {:plugins [:kaocha.plugin/profiling
              :kaocha.plugin/print-invocations
              :kaocha.plugin/cloverage
              :kaocha.plugin.alpha/spec-test-check]}
#2020-11-2801:35cflemingI don’t think I did it on purpose in Cursive, it’s probably just an artifact of sub-elements in the AST being indented by default. I’d have expected 2 spaces rather than 4, though.#2020-11-2807:48imreMy personal preference would be to have no indentation for these: a) they belong together b) that would match my teammates' spacemacs default formatting 😁#2020-11-2808:10pezCould be a similar artifact in cljfmt, I can't see that the behaviour is documented.#2020-11-2722:47tony.kayI’m reading in the docs that ~file-namespace is supposed to sub in REPL commands as the current namespace. It is not expanding for me. Is this a typo in docs?#2020-11-2722:49tony.kayhm…strangely, it expands if I put it on a line by itself#2020-11-2722:52tony.kayI figured it out. Strange issue, but here it is: I wanted to reload the file myself (so I could catch compiler exceptions), and I tried this: (require '~file-namespace :reload) in the REPL command. That did not expand; however, if I do this it works:
(let [n '~file-namespace]
  (require n :reload))
#2020-11-2820:51cflemingThanks, I’ll take a look - that should work anywhere.#2020-11-2816:27lilactownhi! I had a user report an issue when using Cursive with my library: https://github.com/lilactown/helix/issues/79#2020-11-2820:51cflemingI’ve asked them for the version of Cursive they’re using, I think this is fixed in the latest version.#2020-11-2816:28lilactownit looks like the CLJS analyzer is throwing on "stub generation" due to a require that looks like ["react" :as react], which AFAIK is a perfectly valid require#2020-11-2816:28lilactownshould I tell them to follow up here, or is this a #cljs-dev issue?#2020-11-3014:29imreFYI https://github.com/cursive-ide/cursive/issues/2466#2020-11-3014:43Alex Miller (Clojure team)this is really a problem in deps.edn, which cannot successfully pass the jvm-opts with spaces in it due to bash word splitting#2020-11-3014:44Alex Miller (Clojure team)same issue as https://clojure.atlassian.net/browse/TDEPS-56 (I don't think I have one specifically for jvm-opts, but same thing)#2020-11-3015:15imreThanks for the info, Alex. I added a link to the Cursive ticket#2020-11-3018:45Rebecca Star👋 im having an issue with dependency resolution. I am trying to import an existing project into cursive, that has a project.clj with some profiles. One of the profiles has :local-repo "local-m2" set. If i comment out that line, everything imports fine, but with it, i am getting Dependency resolution error...Failed to collect dependencies at... . Has anyone else seen this issue, or know of some setup step I may be missing?#2020-11-3019:27cflemingNo, there have been some historical problems with this, but I think it should all work in newer versions. I’ll try to find some time to test this shortly.#2020-11-3019:28Rebecca Starok thanks, let me know if theres any info i can provide to help debug#2020-12-0107:43heliosI opened a project with deps.edn, but i don't see the "Clojure Deps" toolbar. So when i change deps it doesn't prompt me to import/refresh them. How do i solve it?#2020-12-0107:46heliosi just added a clojure-deps.xml manually from another project i had, but what would have been the kosher way to get it?#2020-12-0107:58cflemingI think probably, right-clicking on the deps.edn file and selecting “Add as deps project” - I’m not sure why that wouldn’t have worked from the initial import, perhaps something went wrong with it.#2020-12-0107:58mike_ananevwhen you open deps.edn file select Open as project#2020-12-0108:41heliosNote that i had already an IntelliJ project with REPL and everything configured, just it wasn't recognized as a Deps project. Not sure what happend on initial import. I've seen this occur more than once though. I'll remember it for next time and maybe we'll investigate#2020-12-0111:35mike_ananevIt is invalid project. Close project and remove it from recent project history in IDEA. then, reopen project by openning deps.edn file as Project.#2020-12-0110:03helioshttps://clojurians.slack.com/archives/C0744GXCJ/p1606470844280100 does this look like a cursive bug?#2020-12-0207:39steveb8nQ: when Intellij releases native support for Apple M1 chips, I’m gonna get a Mac Mini to try it out. Is there anything about Cursive that needs porting or should it “just work”?#2020-12-0208:05cflemingIt’ll just work as much as IntelliJ does. They’re working on M1 support for the JDK they use, but it’s not there yet. Apparently now it runs ~70% of the speed of a current system, depending on what you’re doing. Gradle is very slow for some reason.#2020-12-0208:06cflemingETA is sometime this year though, I think.#2020-12-0208:12steveb8nyeah, I’ve seen the reports of Rosetta being slow to run the JVM.#2020-12-0208:13steveb8nbut a $1500 desktop that is twice as fast as my MBP is so tempting! Xmas present to myself if the JVM can benefit from that speed#2020-12-0208:13steveb8nthanks for the info#2020-12-0220:57cfleminghttps://twitter.com/intellijidea/status/1331993497788960768#2020-12-0220:58cfleminghttps://youtrack.jetbrains.com/issue/JBR-2526#2020-12-0220:59cflemingI’m also tempted by the mini, I’ve been planning to try working on one for a while now and the M1 makes it a no-brainer. But I’ll wait till it’s properly supported.#2020-12-0216:38kennyI updated to 2020.3 and it seems to have broken the namespace search functionality. I am on Cursive 1.9.4-2020.3. I have attached the stacktrace from the IntelliJ logs. Reverting to 2020.2 for now.#2020-12-0303:19tapIt's broken for me as well.#2020-12-0217:21imreI noticed that Cursive doesn't seem to persist per-project code style settings between sessions. Has anyone come across this?#2020-12-0308:22cflemingFor those having problems with namespace switching: https://groups.google.com/g/cursive/c/r6ORtyx4nnM/m/TlFKB-EABAAJ (@kenny, @tap and others)#2020-12-0308:24tapThank you#2020-12-0401:58cfleminghttps://twitter.com/CursiveIDE/status/1334678405002842112#2020-12-0403:25salami just tried the new test runner and it works like a charm! this is huge, especially for folks who are used to the traditional tdd approach in intellij idea. i just found a minor bug as shown in the screenshot attached. anyway, thanks a lot!#2020-12-0403:47cflemingThanks! I’m glad it’s useful, I already use it all the time. With that screenshot, did the error message persist even after entering a display name, or had that been defaulted when you opened it?#2020-12-0403:59salamyes and yes: when i created the run configuration, the error message was already there even though the Display Name was already pre-populated with the default value that was the same as that for Name (“Unnamed”). changing the Display Name didn’t make the error message go away. #2020-12-0404:00cflemingHmm, strange, thanks - I’ll try to reproduce that.#2020-12-0404:45cflemingI can’t reproduce this. I’ll see if anyone else has the same problem and and see if I can see any pattern in who’s getting it.#2020-12-0405:08salamthat’s strange. i’ll go back and try it again. this might just be me nitpicking but the other thing that’s been bugging me about this run configuration window is the way some options are indented. i feel like the labels “Host”, “Port,” and “Context Module” can use more indentation to make it clear that they are the children of the “Connect to server” radio button (same amount of indentation that the “Project” label has under the radio button “Use port from nREPL file”.)#2020-12-0405:33cflemingGood idea, I’ll fix that.#2020-12-0415:26kennyI see a new play button next to my deftests. If I click it I see several options: Run test, debug test, run with cpu profiler, ... If I click run with cpu profiler, I get a red popup in the corner pointing to the Run tab saying "Error running 'Test user/my-test': Internal error: Don't know how to patch selected configuration" Is running with cpu profiler not currently supported?#2020-12-0419:47cflemingI’m not sure about that actually, I’ll check it. I’m hoping to add coverage support, but it’s more complicated than I hoped because of how Clojure works.#2020-12-0501:44cflemingActually @UDCGPTV9R sorry, I can repro your error, I was trying it with a local REPL not a remote one. I’ll fix that.#2020-12-0502:08cflemingAlso fixed the indentation, and the marking elements disabled is now more consistent and obvious too.#2020-12-0503:59cfleminghttps://twitter.com/CursiveIDE/status/1335067469967314945#2020-12-0505:32salami just checked out the new EAP build and it looks great! now that the tabs have a close button (X) in them, is there any difference between that button and the one in the toolbar of the REPL tool window? the latter seems redundant now?#2020-12-0507:54cflemingPossibly, I think mostly it makes that consistent with the run config action toolbar, although you’re right that it’s probably not needed.#2020-12-0519:27ikitommicopy to scratch file 👍 👍 👍#2020-12-0519:46AJ JaroThanks @U0567Q30W for fixing the namespaced keywords!! Huge!!#2020-12-0519:51cflemingThanks everyone! @UGMAVSMUM In recent IntelliJ versions that is becoming a complex and subtle area of the code which is also difficult to test automatically - let me know if you see any more weirdness.#2020-12-0519:52AJ JaroFor sure I definitely will do. I know how much I appreciate this tool so anyway I can help is great!#2020-12-0522:29kenny@U0567Q30W Not sure if this is the display name bug you mentioned. I updated to 1.10.0-eap2-2020.3 and all my run configs have this red X next to them.#2020-12-0602:13cfleming@U083D6HK9 Did you get that with eap1?#2020-12-0602:13kennyYes#2020-12-0602:14cflemingSo that’s a different problem that I talked about in the release notes - the migration which fixes the display name field for existing run configs doesn’t fix IDE-local ones, only project-shared ones.#2020-12-0602:14cflemingIf you choose edit configurations and open those configs and then apply, that should fix it - the defaulting will be done in the editor.#2020-12-0602:15kennyWhat’s the difference between IDE-local and project-shared?#2020-12-0602:52cflemingIf you look in the REPL run config, there’s a checkbox in the top right - “Store as project file”. If that’s checked, then the run config will be stored as a separate file in .idea and can be shared in VCS etc.#2020-12-0602:55kennyAh, got it. Will try this tomorrow. Thanks. #2020-12-0412:54roklenarcicWhat’s the trick for getting to connect to remote Babashka REPL? The connect process just waits#2020-12-0416:01pezHave you started babashka with an nrepl server?#2020-12-0416:01borkdudehttps://book.babashka.org/#repl and ctrl-f for Cursive#2020-12-0416:02borkdudeif that info is out of date, please let me know#2020-12-0503:59cfleminghttps://twitter.com/CursiveIDE/status/1335067469967314945#2020-12-0500:54markwHey all - new to Cursive and coming from CIDER - wondering if there is anything comparable to eldoc style function signature hints that stay out of the way in the minibuffer, highlighting each parameter as you come across it?#2020-12-0501:02cflemingIt’s not quite the same, but there’s this: https://cursive-ide.com/userguide/documentation.html#parameter-info#2020-12-0501:03cflemingThe one thing it doesn’t do yet is highlight the parameter you’re currently at.#2020-12-0501:12markwYeah I did notice this feature and it is very close . I just personally prefer the fixed location in the minibuffer. Nit-picky I know! 🙂 Thanks for getting back to me#2020-12-0501:12markwReally liking Cursive so far#2020-12-0501:16cflemingGreat! I’m glad it’s working out for you.#2020-12-0519:12kennytiltonIs there any way to have Cursive auto-format, say, the :requires list under an ns form so the :as (or :refer`) options all line up? I would offer an example but Slack is fighting me. :)#2020-12-0612:59devnWhy is it that there is no inspection for global unused declaration, but I see fn names highlighted as being unused?#2020-12-0619:36cflemingThat one is an editor-only inspection. The one that should work for global vars is the general unused declaration inspection, but for some reason it doesn’t work and I haven’t got around to investigating it yet.#2020-12-0810:11cflemingJust checking - is anyone using the new test runner stuff? Is it working ok? I’ve only had one bit of feedback that a simple test worked, so that means either it’s all working fine or no-one is using it 🙂. If it’s working I’ll get a stable build out soon so users upgrading to 2020.3 aren’t bitten by the namespace navigation bug.#2020-12-0813:49AJ JaroIt definitely works for me, but I’m not at the point to include it in my workflow. I normally use the REPL so that the liquibase DB changes don’t have to be run every time I run the tests, they only have to run the first time. I have some ideas on making it a bit better, however it generally works so it’s good enough to shipit There are some neat things that it looks like are included in this, so I can see this tool continuing to grow in the future and being really great for sure.#2020-12-0817:21kennyI'm not entirely sure how to integrate the test runner stuff into my workflow. Maybe I'm missing something. We already have a flow set up to run tests (kaocha) on CI. When running tests, it seems best to run them in the same manner that they'd run on CI. During development, I almost always have a REPL open and will run my tests using one of the REPL shortcuts. Running a test or tests in a fresh JVM takes a long time -- the initial boot up can be like 30-40s for a large application.#2020-12-0817:23kennyThe one piece that did seem useful for certain scenarios was the ability to run a test using the cpu profiler or java flight recorder.#2020-12-0820:07cflemingThanks for the feedback everyone, I agree that the REPL workflow is the most useful for development. I mostly use the full test suite as a sanity check for not having broken anything after making changes, although CI should pick those up too.#2020-12-0820:07cflemingI’ll check the CPU profiler thing too.#2020-12-0820:08cflemingI’m also hoping to integrate coverage information which would be useful.#2020-12-0822:46AJ Jaro@cfleming for sure! I think there are going to be some really cool enhancements coming out of this#2020-12-0822:51salamas i mentioned before, the test runner feature might be more appealing to those who come to clojure from other languages where the only way to run tests is via a fresh jvm (java, scala, etc.) during the transition period (maybe). i myself run my tests using kaocha with its --watch feature in a terminal these days... so... if this test runner one day can do just that, i.e., running tests reusing the same jvm upon changes to files (the --watch feature), i can totally see myself switching to it. i think intellij idea already supports this for running jest tests within the ide: https://www.jetbrains.com/help/idea/running-unit-tests-on-jest.html#createRunConfigJest#2020-12-0822:52cflemingInteresting, thanks - back in the day I asked JetBrains about that and their runner didn’t support it. I guess they’ve added that in a recent version, I’ll ask about it again.#2020-12-0810:26msolli@cfleming I tested it briefly. My rather big application takes north of 30 seconds to start. My usual workflow is to run the tests in a repl (with “Run Tests in Current NS in REPL” and friends bound to custom key combinations). Since the new test runner spins up a new instance of the app it just takes too long. Admittedly I should address the underlying problem, but there is always going to be some startup cost that is greater than just running the tests in a repl.#2020-12-0810:27cflemingThanks for the feedback. But I assume that if you do “lein run” or whatever then it takes the same amount of time, right? i.e. it’s not actually a problem with the runner itself.#2020-12-0810:28cflemingOne thing I had thought of was allowing the run config to execute in the active REPL instead of opening up a new process, but that’s unfortunately hard because the IntelliJ testing stuff is very tied to starting a process. But that might not be impossible if there’s interest.#2020-12-0810:31msolliI start the process with lein repl in the terminal, then I connect using a “Remote REPL” run configuration. This way my application process lifetime is not tied to IntelliJ. The test runs are instantaneous when run this way.#2020-12-0810:34msolliHm, I’m trying out different stuff now. Seems I can’t edit the Leiningen run configuration now. The window’s just empty.#2020-12-0810:34msolliI’ll post a screenshot in a sec…#2020-12-0810:36msolli#2020-12-0820:05cfleming@U06BEJGKD Could you send me your log file, please? Help | Show log in Finder#2020-12-0810:39msolliA question about protocols: Is it (or rather, should it be) possible to find implementations of protocols using Option-Command-B (Navigate -> Implementation(s))?#2020-12-1021:00kingmobI'd also love this functionality.#2020-12-0810:39imre@cfleming I also gave it a brief try just now and it seems to be working well. However my workflow is also repl-focused. I'd load the project, start the repl inside idea and work and run tests within the repl connection. For CI we use the kaocha test runner so before pushing I'd run that from the command line. I also have repl commands to run kaocha in-repl. Integrating kaocha with idea would be interesting to me as we use its plugin system etc so the tests being run through kaocha are different to what Cursive's built-in test runners discover#2020-12-0910:24onetomhow does Cursive determines whether a deps path should be a Sources root or a Test sources root? can i somehow avoid this? manually marking the folder as sources root is not enough; Refresh Clojure Deps Project reverts it back to test sources. i have a directory which has only 1 clj file in it and it keeps being recognized as test sources. it doesn't contain tests, though im requiring clojure.test in it, because i've implemented some feature using kaocha.runner/-main.#2020-12-0910:53cflemingSource roots are marked as tests if they’re in the test alias. This isn’t configurable at the moment. I made a change a while ago to allow arbitrary source roots to be marked as test roots and Cursive would leave them that way, but I haven’t made the equivalent change in the other direction (which would basically be to leave all source root type markings alone).#2020-12-0911:38cjmurphyI just have an alias with a different name: :tset.
:tset      {:extra-paths ["src/test"]}
#2020-12-0916:06hadilsHi I am using Intellij Ultimate 2020.3 with Cursive. One change I've noticed is that the namespace no longer shows up in my local REPL tab. Is there a way I can fix this?#2020-12-0916:09manutter51Might be related to this: https://groups.google.com/g/cursive/c/Ybcgx_oTS7c
#2020-12-0916:10manutter51(That’s an email from Colin talking about Cursive 1.10.0-eap1 — he mentions a bug in 2020.3 related to namespaces, not sure if that’s the same thing you’re talking about#2020-12-0916:41hadilsThanks @manutter51#2020-12-0920:46JAtkinsHow can I figure out what is wrong with stubs generation? I'm seeing some error appearing when I try to generate them for my project, but the description only contains the *out* of the clj process, which isn't very enlightening. AFAICT there shouldn't be any errors at all.#2020-12-0921:05JAtkinsActually, could it be related to this: https://github.com/cursive-ide/cursive/issues/2066 . I get a warning from slf4j#2020-12-0921:05JAtkinsIt's printed on *err* though#2020-12-0921:50JAtkinsI can silence my *err* stream with "-Dorg.eclipse.jetty.util.log.announce=false" . I put that in my dev alias (which is enabled in the project view). It removes all prints to *err* while starting the repl, but it appears that this option is not applied while building stubs... How do I control the build of the stub generator?#2020-12-0922:31JAtkinsAfter much ado, I realized that I could put
(java.lang.System/setProperty "org.eclipse.jetty.util.log.announce" "false")
in my user.clj. That fixes it. However, can this be documented elsewhere? This was a 1.5 ish hour problem, and it's not obvious at all that cursive is doing it's own thing without deps.edn, and that it crashes on anything printed to *err* (except those redefinition warnings).
#2020-12-1001:40cflemingI’ll document that and add it to the troubleshooting page in the userguide, thanks. The short answer is that when you run an external process, having output on stderr is often the only way to know that a problem occurred - I’ve seen a lot of cases where the process exit code isn’t set to an error condition.#2020-12-1001:44JAtkinsRight. I just never thought of it. Perfectly reasonable behavior, once you’ve thought of it :)#2020-12-1001:44JAtkinsThanks!#2020-12-0920:50JAtkinsAlso, I accidentally clicked Disable on the stub generation failure popup... I see nothing in either main settings or project settings to undo that. I don't see a diff in my project files, so I have no idea how to undo this ;p#2020-12-0922:08JAtkinsFound under Project Settings -> Modules -> (Clojure Tab) -> Create stubs if required#2020-12-0922:48JAtkinsanyway, all of that was me trying to get rewrite-clj.potemkin/import-vars to resolve correctly as potemkin/import-vars. Unfortunately, this is still not working. After invalidating cache and rebuilding stubs and verifying that the macro is resolved as potemkin/import-vars, documentation/autocomplete still don't work.#2020-12-1001:41cflemingThat should work, I think - I’ll have a look at that and see if I can reproduce it.#2020-12-1001:42JAtkinsThanks. This usually works fine, but something is weird today :/. Btw I’m on IntelliJ 2020.3 and cursive eap #2020-12-1001:21salamColin, before you release cursive 1.10.0, do you mind fixing this NPE which seems to be new?
java.lang.NullPointerException
	at cursive.scratch.CopyLibraryFileToScratchAction.update(Scratches.kt:46)
	at com.intellij.openapi.actionSystem.ex.ActionUtil.performDumbAwareUpdate(ActionUtil.java:178)
	at com.intellij.ide.util.gotoByName.GotoActionModel.updateActionBeforeShow(GotoActionModel.java:337)
	at com.intellij.ide.util.gotoByName.GotoActionModel$ActionWrapper.lambda$getPresentation$0(GotoActionModel.java:701)
	at com.intellij.ide.util.gotoByName.GotoActionModel.lambda$updateOnEdt$4(GotoActionModel.java:495)
	at com.intellij.openapi.application.TransactionGuardImpl.runWithWritingAllowed(TransactionGuardImpl.java:216)
	at com.intellij.openapi.application.TransactionGuardImpl.access$200(TransactionGuardImpl.java:24)
	at com.intellij.openapi.application.TransactionGuardImpl$2.run(TransactionGuardImpl.java:199)
	at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:822)
	at com.intellij.openapi.application.impl.ApplicationImpl.lambda$invokeLater$4(ApplicationImpl.java:324)
	at com.intellij.openapi.application.impl.FlushQueue.doRun(FlushQueue.java:85)
	at com.intellij.openapi.application.impl.FlushQueue.runNextEvent(FlushQueue.java:134)
	at com.intellij.openapi.application.impl.FlushQueue.flushNow(FlushQueue.java:47)
	at com.intellij.openapi.application.impl.FlushQueue$FlushNow.run(FlushQueue.java:190)
	at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:313)
	at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:776)
	at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:727)
	at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:721)
	at java.base/java.security.AccessController.doPrivileged(Native Method)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
	at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:746)
	at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:976)
	at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:843)
	at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$8(IdeEventQueue.java:454)
	at com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:773)
	at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$9(IdeEventQueue.java:453)
	at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:822)
	at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:501)
	at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
	at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)
#2020-12-1001:43cflemingDone, thanks.#2020-12-1004:00cfleminghttps://twitter.com/CursiveIDE/status/1336882984251576322#2020-12-1009:37stijnnamed REPLs are 💯 !#2020-12-1010:19cflemingGreat!#2020-12-1010:49helioscongrats on shipping @cfleming 😄#2020-12-1023:32cflemingThanks @U0AD3JSHL! I was worried about this one since I’m about to move cities so I didn’t want it to all go to pot, but it was the smoothest EAP ever, especially one that contains a lot of new stuff - phew!#2020-12-1421:11Lucio AssisThank you SO MUCH for the test runner and the lib file scratches! These will help me immensely!#2020-12-1012:24HenryQuick question: in terms of "send top form to repl", is there a way for the result to be printed directly next to the form in the file, instead of the repl? Thank you.#2020-12-1023:33cflemingThere isn’t at the moment, but it’s something I’m planning to implement very soon.#2020-12-1605:12genekimIncredible! I’ve always loved that in LightTable! 🎉🎉 I always assumed it would be impossible inside IntelliJ. Brilliant!#2020-12-1605:12genekim🤞🤞🙏🙏😃😃#2020-12-1608:28cflemingIt actually was until the last couple of releases, but they’ve made a lot of great changes there in the 2020.x series.#2020-12-1018:05royalaidhttps://github.com/cursive-ide/cursive/issues/394 Hey @cfleming, just wondering if this issue is on your radar? Running into renamed functions behind undefined#2020-12-1023:32cflemingYes, I’ve been meaning to look at that one, I’ll try to do it for the next EAP.#2020-12-1100:17royalaidTy and thanks for the generally quick turn around on other issues I have raised!#2020-12-1018:05royalaidThis happens in both ns forms and let destructuring#2020-12-1220:27vmarcinkojust a short question... Has Cursive removed current namespace name in the running REPL tool window title ? wasn't it there before?#2020-12-1220:30vmarcinkosorry about last question - i had better read last version changlog#2020-12-1413:49manutter51Not sure if this is strictly on topic, but after upgrading to the latest IDEA and Cursive versions, I notice I’m now running 24 separate instances of /Applications/IntelliJ IDEA 2020.3.app/Contents/plugins/maven/lib/maven3/boot/plexus-classworlds-2.6.0.jar org.jetbrains.idea.maven.server.RemoteMavenServer36, which is not something I ever intentionally initiated. Is anybody else seeing that?#2020-12-1420:11cflemingNo idea what that might be, sorry.#2020-12-1420:15manutter51No worries, it’s not a major resource hog as far as I can tell, so it’s more curiosity than concern.#2020-12-1413:50manutter51Oh, hmm, I kill -9’ed one of them, and now all 24 are gone… :thinking_face:#2020-12-1413:51manutter51Welcome to Monday Morning Mysteries™. Now I’m off to get more coffee 😵#2020-12-1421:51msshas anyone had any luck manually installing cursive from disk? I’ve verified that I have the correct version of cursive for my version of intellij, but cursive keeps crashing on startup with the error:
java.lang.NoClassDefFoundError: clojure/lang/DynamicClassLoader
#2020-12-1503:21onetomWaaaah, the REPL tabs show the name of the run config!!! Very nice, indeed! - to quote Protesilaos Stavrou :D#2020-12-1513:02heliosi'm doing quite a bit of Babashka work in Cursive, but it's a bit of a pity that some stuff can't be resolved babashka.curl, etc. Do you have any idea?#2020-12-1513:03borkdude@helios does it help if you add a deps.edn with babashka.curl in it?#2020-12-1513:05helioswhere should i add it?#2020-12-1513:06helioshow would cursive know that that specific deps.edn applies to the bb script?#2020-12-1513:08borkdudeI'm not sure, was just a lucky guess.#2020-12-1515:24Janne SauvalaI added deps.end file to my bb project and added this. This is seemed to help resolve the dependency
{:deps
 {babashka/babashka.curl {:mvn/version "0.0.1"}}}
#2020-12-1618:14daniel.spanielI really like the new REPL tabs label concept. At first it worked fine, then now the labels collapse and they are blank. Has anyone seen this ? I am on the latest intellij 2020.3 built on Nov 20 2020#2020-12-1618:19manutter51I had that when I first upgraded, I fixed it by opening each run config and filling in the Display Name field (which is new and probably empty).#2020-12-1618:41daniel.spanielAh, so i had them already filled in, and when i upgraded (it showed X on the label in the config dropdown ) seems like you need to resave that REPL after touching the label ( retype the last char ) and then save .. and then it shows up .. odd .. but ok .. back in business#2020-12-1618:41cflemingYes, this is the IntelliJ bug with the run config migrations I mentioned in the release email.#2020-12-1618:42daniel.spanieloh .. man .. facepalm did not read that .. sorry#2020-12-1618:51cflemingNo worries, it’s still not entirely obvious that that is the cause even if you did read it!#2020-12-1620:09hadilsI find that symbols in datomic.ion and datomic.ion-dev do not get resolved by Intellij/Cursive (2020.3 Nov 20, 2020) because I have a repo definition in deps.edn. This is causing my stub generation to crash as well as showing these symbols as undefined. Anyone have a solution to this?#2020-12-1723:39cflemingWhat’s the error you get from stub generation? You should be able to see it in the log file at Help | Show log in Finder/Explorer#2020-12-1801:55hadils
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/Users/hadilsabbagh/.m2/repository/org/slf4j/slf4j-nop/1.7.25/slf4j-nop-1.7.25.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/Users/hadilsabbagh/.m2/repository/ch/qos/logback/logback-classic/1.2.3/logback-classic-1.2.3.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See  for an explanation.
SLF4J: Actual binding is of type [org.slf4j.helpers.NOPLoggerFactory]
java.lang.ExceptionInInitializerError
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:348)
at clojure.lang.RT.classForName(RT.java:2211)
at clojure.lang.RT.classForName(RT.java:2220)
at clojure.lang.RT.loadClassForName(RT.java:2239)
at clojure.lang.RT.load(RT.java:449)
at clojure.lang.RT.load(RT.java:424)
at clojure.core$load$fn__6839.invoke(core.clj:6126)
at clojure.core$load.invokeStatic(core.clj:6125)
at clojure.core$load.doInvoke(core.clj:6109)
at clojure.lang.RestFn.invoke(RestFn.java:408)
at clojure.core$load_one.invokeStatic(core.clj:5908)
at clojure.core$load_one.invoke(core.clj:5903)
at clojure.core$load_lib$fn__6780.invoke(core.clj:5948)
at clojure.core$load_lib.invokeStatic(core.clj:5947)
at clojure.core$load_lib.doInvoke(core.clj:5928)
at clojure.lang.RestFn.applyTo(RestFn.java:142)
at clojure.core$apply.invokeStatic(core.clj:667)
at clojure.core$load_libs.invokeStatic(core.clj:5985)
at clojure.core$load_libs.doInvoke(core.clj:5969)
at clojure.lang.RestFn.applyTo(RestFn.java:137)
at clojure.core$apply.invokeStatic(core.clj:667)
at clojure.core$require.invokeStatic(core.clj:6007)
at clojure.core$require.doInvoke(core.clj:6007)
at clojure.lang.RestFn.invoke(RestFn.java:930)
at datomic.ion.dev.bundle$loading__6721__auto____6441.invoke(bundle.clj:3)
at datomic.ion.dev.bundle__init.load(Unknown Source)
at datomic.ion.dev.bundle__init. (Unknown Source)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:348)
at clojure.lang.RT.classForName(RT.java:2211)
at clojure.lang.RT.classForName(RT.java:2220)
at clojure.lang.RT.loadClassForName(RT.java:2239)
at clojure.lang.RT.load(RT.java:449)
at clojure.lang.RT.load(RT.java:424)
at clojure.core$load$fn__6839.invoke(core.clj:6126)
at clojure.core$load.invokeStatic(core.clj:6125)
at clojure.core$load.doInvoke(core.clj:6109)
at clojure.lang.RestFn.invoke(RestFn.java:408)
at clojure.core$load_one.invokeStatic(core.clj:5908)

at clojure.core$load_one.invoke(core.clj:5903)
at clojure.core$load_lib$fn__6780.invoke(core.clj:5948)

at clojure.core$load_lib.invokeStatic(core.clj:5947)
at clojure.core$load_lib.doInvoke(core.clj:5928)
at clojure.lang.RestFn.applyTo(RestFn.java:142)
at clojure.core$apply.invokeStatic(core.clj:667)
at clojure.core$load_libs.invokeStatic(core.clj:5985)
at clojure.core$load_libs.doInvoke(core.clj:5969)
at clojure.lang.RestFn.applyTo(RestFn.java:137)
at clojure.core$apply.invokeStatic(core.clj:667)
at clojure.core$require.invokeStatic(core.clj:6007)
at clojure.core$require.doInvoke(core.clj:6007)
at clojure.lang.RestFn.invoke(RestFn.java:2088)
at datomic.ion.dev$loading__6721__auto____6274.invoke(dev.clj:3)
at datomic.ion.dev__init.load(Unknown Source)
at datomic.ion.dev__init. (Unknown Source)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:348)
at clojure.lang.RT.classForName(RT.java:2211)
at clojure.lang.RT.classForName(RT.java:2220)
at clojure.lang.RT.loadClassForName(RT.java:2239)
at clojure.lang.RT.load(RT.java:449)
at clojure.lang.RT.load(RT.java:424)
at clojure.core$load$fn__6839.invoke(core.clj:6126)
at clojure.core$load.invokeStatic(core.clj:6125)
at clojure.core$load.doInvoke(core.clj:6109)
at clojure.lang.RestFn.invoke(RestFn.java:408)
at clojure.core$load_one.invokeStatic(core.clj:5908)
at clojure.core$load_one.invoke(core.clj:5903)
at clojure.core$load_lib$fn__6780.invoke(core.clj:5948)
at clojure.core$load_lib.invokeStatic(core.clj:5947)
at clojure.core$load_lib.doInvoke(core.clj:5928)
at clojure.lang.RestFn.applyTo(RestFn.java:142)
at clojure.core$apply.invokeStatic(core.clj:667)
at clojure.core$load_libs.invokeStatic(core.clj:5985)
at clojure.core$load_libs.doInvoke(core.clj:5969)
at clojure.lang.RestFn.applyTo(RestFn.java:137)
at clojure.core$apply.invokeStatic(core.clj:667)
at clojure.core$require.invokeStatic(core.clj:6007)
at clojure.core$require.doInvoke(core.clj:6007)
at clojure.lang.RestFn.invoke(RestFn.java:408)
at cursive.stubs.metadata.clojure$read_ns.invokeStatic(clojure.clj:65)
at cursive.stubs.metadata.clojure$read_ns.invoke(clojure.clj:64)
at user$eval15051.invokeStatic(create-stub15273084368453599599.clj:5)
at user$eval15051.invoke(create-stub15273084368453599599.clj:5)
at clojure.lang.Compiler.eval(Compiler.java:7177)
at clojure.lang.Compiler.load(Compiler.java:7636)
at clojure.lang.Compiler.loadFile(Compiler.java:7574)
at clojure.main$load_script.invokeStatic(main.clj:475)
at clojure.main$init_opt.invokeStatic(main.clj:477)
at clojure.main$init_opt.invoke(main.clj:477)
at clojure.main$initialize.invokeStatic(main.clj:508)
at clojure.main$null_opt.invokeStatic(main.clj:542)
at clojure.main$null_opt.invoke(main.clj:539)
at clojure.main$main.invokeStatic(main.clj:664)
at clojure.main$main.doInvoke(main.clj:616)
at clojure.lang.RestFn.applyTo(RestFn.java:137)
at clojure.lang.Var.applyTo(Var.java:705)
at clojure.main.main(main.java:40)
Caused by: java.io.FileNotFoundException: Could not locate clojure/tools/deps/alpha/reader__init.class, clojure/tools/deps/alpha/reader.clj or clojure/tools/deps/alpha/reader.cljc on classpath.
at clojure.lang.RT.load(RT.java:462)
at clojure.lang.RT.load(RT.java:424)
at clojure.core$load$fn__6839.invoke(core.clj:6126)
at clojure.core$load.invokeStatic(core.clj:6125)
at clojure.core$load.doInvoke(core.clj:6109)
at clojure.lang.RestFn.invoke(RestFn.java:408)
at clojure.core$load_one.invokeStatic(core.clj:5908)
at clojure.core$load_one.invoke(core.clj:5903)
at clojure.core$load_lib$fn__6780.invoke(core.clj:5948)
at clojure.core$load_lib.invokeStatic(core.clj:5947)

at clojure.core$load_lib.doInvoke(core.clj:5928)
at clojure.lang.RestFn.applyTo(RestFn.java:142)
at clojure.core$apply.invokeStatic(core.clj:667)
at clojure.core$load_libs.invokeStatic(core.clj:5985)
at clojure.core$load_libs.doInvoke(core.clj:5969)
at clojure.lang.RestFn.applyTo(RestFn.java:137)
at clojure.core$apply.invokeStatic(core.clj:667)
at clojure.core$require.invokeStatic(core.clj:6007)
at clojure.core$require.doInvoke(core.clj:6007)
at clojure.lang.RestFn.invoke(RestFn.java:1289)
at datomic.ion.dev.classpath$loading__6721__auto____6519.invoke(classpath.clj:3)
at datomic.ion.dev.classpath__init.load(Unknown Source)
at datomic.ion.dev.classpath__init. (Unknown Source)
... 99 more
Disable stub generation for module stackz-ion
#2020-12-1803:07cflemingHmm, that’s not a very useful error message. Are you able to share this project so I can take a look at it?#2020-12-1814:51hadilsNo, it's proprietary, sorry. I can show you parts of it...tell me what you would like to see in particular, if possible...#2020-12-1814:55hadilsHere's my deps.edn file:#2020-12-1815:25hadilsThe problem centers around datomic.ion-dev#2020-12-1904:09cflemingThanks. I’m travelling tomorrow but I’ll try to look at this next week.#2020-12-1620:28asilverman@cfleming Cursive debugger no longer stops at breakpoints for my project, can I please get some help?#2020-12-1723:38cflemingDoes this happen for all projects, or just one?#2020-12-1707:25steveb8nQ: I have a couple of questions about the testing integrations in Cursive…#2020-12-1707:26steveb8n1/ how does the new test runner feature work within the REPL? Or does it not?#2020-12-1707:26steveb8nI use “Run test in REPL” all the time. I can’t see how the new features add new capabilities#2020-12-1707:27steveb8n2/ is anyone using Greenlight integration tests with a Cursive integration?#2020-12-1707:27steveb8nI’ve created a simple project to show what I mean: https://github.com/stevebuik/cursive-testing-integrations/blob/master/src/various_tests.clj#2020-12-1716:57AJ Jaro@U0510KXTU I have taken a look at the test runner but don’t use it as part of my workflow. Based on what I saw, this is independent of the REPL. No, to part 2. I don’t use Greenlight#2020-12-1721:12steveb8n@UGMAVSMUM thanks for the reply. That’s what I suspected#2020-12-1721:52cflemingRight, the new test integration is independent of the REPL, at least for now. I would like to add a “Run tests in open REPL” option, but that’s tricky for intellij reasons which I haven’t had time to look at yet.#2020-12-1721:52cflemingI don’t know of anyone using Greenlight, no, sorry.#2020-12-1808:52steveb8nThanks for the clarification#2020-12-1722:29wilkerlucio@cfleming hello, one idea I just had here for the deps window, would be nice if it could make separated groups for project vs global aliases, so its easier to understand what alias come from a project, makes sense?#2020-12-1723:37cflemingYes, definitely.#2020-12-1722:34kennyRefactor > rename is broken in 1.10.0-2020.3. Take this code.
(s/def ::foo int?)
Right click on the keyword. Go to Refactor > Rename. This pops open the modal seen in screenshot 1. Changing "foo" to "foo2" results in a red message saying "'foo2' is not a valid identifier". If I add a double colon in from of "foo2" and click Refactor, the modal closes and nothing happens.
#2020-12-1722:40kennyOpened an issue. https://github.com/cursive-ide/cursive/issues/2473 This is a big issue for my workflow 😬#2020-12-1722:40kennyIt's kinda like it's now treating s/def's as symbols.#2020-12-1723:13cflemingUgh, this is probably a side effect of https://github.com/cursive-ide/cursive/issues/2457. There were a bunch of platform changes affecting navigation, I’ll get this fixed ASAP.#2020-12-1723:14kennyThank you @cfleming!#2020-12-1723:14cflemingSorry for the breakage, a lot of this stuff is really hard to test in automated tests since it’s quite tied to the UI.#2020-12-1723:15kennyYeah, that's crossed my mind before. I have no idea how you do it 🙂#2020-12-1723:16cflemingThere are actually some facilities for GUI testing now, but they’re still a pain to use. I actually use them for generating the screenshots in the documentation, so if I document something then as a side effect it gets tested when I regenerate the doc 🙂#2020-12-2321:44kenny@cfleming Potentially related to this is usually when your cursor is on a keyword, it will highlight all keywords that are the same. That is not happening in the latest version.#2020-12-1805:20onetomI'm getting this error:
Errors during project resolution
The following errors were found during project resolve:
Could not find artifact com.datomic:ion-dev:jar:0.9.276 in central ()
It's supposed to be downloaded from the datomic-cloud mvn repo, which I've defined in my deps.edn files as:
:mvn/repos
 {"datomic-cloud"
  {:url ""
   :why? "required by :ion-dev alias"}
  }
and the alias relying on it is defined as:
:ion-dev {:extra-deps {com.datomic/ion-dev   {:mvn/version "0.9.276"}}}
using the aws credentials from my default aws profile i can indeed have permission to download this artifact:
➜ nix-shell -p pkgs.awscli2 --run 'aws s3 cp  /tmp/'
download:  to ../../../../tmp/ion-dev-0.9.276.pom
(works on the .jar file too, im just testing it with the .pom, because it's smaller) using Clojure CLI tools, the artifact is successfully downloaded:
➜ rm -rf ~/.m2/repository/com/datomic/ion-dev/

➜ clj -A:ion-dev -Sforce
Downloading: com/datomic/ion-dev/0.9.276/ion-dev-0.9.276.pom from datomic-cloud
Downloading: com/datomic/ion-dev/0.9.276/ion-dev-0.9.276.jar from datomic-cloud
Clojure 1.10.1
user=> 
The problem in Cursive however persists. I've tried the "Use tools.deps directly" option too with tools.deps version 0.9.857 and using the CLI tools with /nix/store/g7cpwnmzfl9ikxnm7gbnq3qqgj0mynwk-clojure-1.10.1.754/bin/clojure, but the problem persists. The problem it causes is that all the library entries are gone from my *.iml files, which really pollutes the list of changed files when im trying to commit, because i see 14 changed iml files.
#2020-12-1805:28onetomIs it possible that Cursive is not using my default AWS credentials? How can we debug this?#2020-12-1805:58onetomI'm on Cursive 1.10.0-2020.3 and
IntelliJ IDEA 2020.3 (Ultimate Edition)
Build #IU-203.5981.155, built on December 1, 2020
Licensed to Tamas Herman
Subscription is active until November 27, 2021
Runtime version: 11.0.9+11-b1145.21 x86_64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
macOS 10.15.7
GC: ParNew, ConcurrentMarkSweep
Memory: 3005M
Cores: 8
Registry: ide.allow.merge.buttons=false, ide.settings.move.mouse.on.default.button=true, suppress.focus.stealing.disable.auto.request.focus=true
Non-Bundled Plugins: AceJump, IdeaVIM, Org4Idea, PlantUML integration, com.4lex4.intellij.solarized, com.alayouni.ansiHighlight, com.intellij.ideolog, com.intellij.plugins.watcher, com.paperetto.dash, de.netnexus.camelcaseplugin, io.protostuff.protostuff-jetbrains-plugin, net.vektah.codeglance, org.intellij.RegexpTester, name.kropp.intellij.makefile, org.plugin.dot.id, org.toml.lang, com.github.pshirshov.bytecodeeditor, com.intellij.plugins.html.instantEditing, com.cursiveclojure.cursive, Pythonid, org.asciidoctor.intellij.asciidoc
#2020-12-1807:24Alex Miller (Clojure team)it is almost certain that you're not seeing the right aws creds - you can set them as env vars in your run config#2020-12-1807:24Alex Miller (Clojure team)I know I have definitely done exactly this before#2020-12-1808:14cflemingThat will work for run configs, but I think onetom is talking about syncing the project to IntelliJ. That’s done in the IntelliJ process so the env vars would have to be set for the whole process I think.#2020-12-1808:15cflemingThat’s annoying to do depending on platform though, I’ll check to see if there’s a better solution.#2020-12-1810:37Jakub Holý (HolyJak)@cfleming you might want to update https://cursive-ide.com/userguide/#download-intellij, part > Cursive will work with IntelliJ versions from the last two years, currently 2017.3, 2018.x and 2019.x. adding 2020.x as well. Question: Where can I find out whether it is safe to upgrade to latest IntelliJ (currently 2020.3), i.e. that people have tried that Cursive works just fine with it? I have been burnt before by updating to eagerly....#2020-12-1812:25imreI'm using 2020.3 and haven't run into any blockers. But I suppose it doesn't hurt if you scroll up in this channel a bit#2020-12-1903:58cflemingThanks @U0522TWDA, yes, I actually have that updated in local as part of a larger doc update, but it got parked by non-work stuff. It’ll be updated in the next couple of days.#2020-12-1903:59cflemingI’m not aware of any 2020.3 issues at the moment. There are a couple of issues with Cursive 1.10.0 (https://github.com/cursive-ide/cursive/issues/2471 and https://github.com/cursive-ide/cursive/issues/2473) which will be fixed in the next couple of days.#2020-12-1917:05vmarcinkoBTW, anyone knows how can I generate implementation of protocol functions for given record...It seems by this documentation this should be possible: https://cursive-ide.com/userguide/editing.html#implement-and-override-methods#2020-12-1917:05vmarcinkoOr I misunderstood something?#2020-12-1917:07vmarcinkoI expected something to point to my record and pick something like implement Methods and specify desired protocol, and stubs for protocol functions should appear udner record or such ?#2020-12-1917:15vmarcinkoOK, I managed to make it, it just has a bug it seems that duplicates the name of protocol... So what I did, I entered the name of desired protocol within the record parens, and then have chosen "Implement Methods", and the result was this:
(defprotocol MailSender
  (send-email [this from to text]))

(defrecord DefaultMailSender [smpt-host smpt-port]
  MailSender
  MailSender
  (send_email [this from to text]))
#2020-12-2006:00cflemingSo actually this (shamefully) doesn’t support protocols at the moment, it only supports implementing Java interfaces. But since protocols also create an interface, I suspect Cursive is getting confused there. I’ll try to fix this soon.#2020-12-1917:15vmarcinkoso you see, duplciated protocol name...The first one I entered to be able to place caret on it and choose "Implement Methods"#2020-12-1918:16genekimDo any of y’all change the IntelliJ memory settings? After numerous suspends/resumes on my MacBook Pro, I start getting more and more “spinning wheels of death”, where I think the JVM is doing stop-the-world GC cleanups. It becomes increasingly less tolerable, and then I have to reboot (usually hard reboot, because various apps refuse to stop running). Are there things you do that prevent this inevitable decline of the usability of IntelliJ/Cursive over time? Thank you! (Part of me was researching how to have IntelliJ use one of the newer GCs like Shenandoah, but luckily, managed to contain my worst impulses, and likely avoided the fate of bricking my dev setup. 🙂#2020-12-2006:01cflemingI just set the max memory to 2G and don’t worry about the rest, although that’s unlikely to be optimal. I actually suspect I have a memory leak in the parinfer stuff if you happen to be using that, but I haven’t had time to track it down yet.#2020-12-2017:26genekimTotally can’t imagine life without parinfer! 🙂 No worries — life is great. I’ll just quit and restart IntelliJ more often. Totally not a big deal. Happy holidays to you and yours, all!#2020-12-2003:49JAtkinsToday I am running into a really weird bug. The "projects" tab is no longer visible in my project. Additionally, it appears that all cursive project management, since my files are not under a source root, dependencies cannot resolve, and goto definition fails. The funny thing is I can still see the "repl" window in the side, create run configurations with local or remote repls, and use sexp based editing. I'm on IntelliJ 2020.3 (just updated today to see if that was the issue) and Cursive latest (non EAP) (also reinstalled today).#2020-12-2006:02cflemingWhen you say the projects tab, do you mean that the projects toolwindow is not visible?#2020-12-2006:03cflemingIt sounds like a more fundamental issue is happening though, can you send me your log file (Help | Show log in Finder/Explorer) to <mailto:/cdn-cgi/l/email-protection|/cdn-cgi/l/email-protection>?#2020-12-2008:51JAtkinsThe deps window that is installed with cursive is the one that went missing. I’ll send tomorrow afternoon. It’s not mission critical for me, since it’s only my laptop and for now my desktop is fine. #2020-12-2115:39JAtkinsBad news. The issue is now being repeated on my desktop 😬 . Weirdly enough it doesn't happen on every project. I'm just being careful right now to not crash intellij so I don't have to re-open my work project.#2020-12-2116:36JAtkinsSolution found: click the deps.edn file in the file tree, and add as deps project. Weirdly, I thought I had tried something similar already when I had closed the projects and used the Open -> open "deps.edn" as project file -> importing... set of menus. Thanks @U066U8JQJ#2020-12-2121:29cflemingHmm, that is weird, did this problem start after upgrading IntelliJ?#2020-12-2121:59JAtkinsMaybe? I was on some version of IntelliJ 2020.2 before when the problem first arose#2020-12-2122:37kennyHow is Cursive supposed to work with :local/root deps? Didn't it used to automatically import local/root as a module so that the REPL would recognize file changes and automatically reload them when you run load file in repl?#2020-12-2200:07cflemingYes, I think that’s still the case. What is not working for you?#2020-12-2200:07kennyIt treats the local/root as an external dep.#2020-12-2200:08kennye.g., opens the tab in a tan color. If I try to edit, it pops open "Non-Project files protection"#2020-12-2200:08kennyThe tab's path is the local root directory too.#2020-12-2200:12cflemingDo you have the dependency deps.edn file added as a deps project?#2020-12-2200:12kennyNo#2020-12-2200:40cflemingIf you add that, does it help?#2020-12-2200:41kennyYes. It also adds it to .idea/clojure-deps.xml though. That file is in VCS. Not everyone wants my local project added to their IntelliJ setup (it also may not have the same path)#2020-12-2200:42cflemingOh, are you adding this via a user deps.edn or something?#2020-12-2200:42kennyNo. A project's deps.edn.#2020-12-2200:42cflemingOk, but that project isn’t checked into VCS?#2020-12-2200:42kennySo I have 1 monorepo IntelliJ project. There's a bunch of modules. One of those modules uses :local/root to a project outside of the IntelliJ project root directory.#2020-12-2200:43kennyIt is but it's in a separate repository.#2020-12-2200:55cflemingHmm, I see. Could you file an issue for that and I’ll look at it?#2020-12-2201:11kennyhttps://github.com/cursive-ide/cursive/issues/2474. Super busy today, so I hope that'll do it. Let me know if you need any other info.#2020-12-2201:11cflemingThanks, I’ll take a look in the next couple of days and let you know if I need more info.#2020-12-2212:41akielHi, can I force stub generation? I have a project using clojure.java-time . Cursive did generate the stubs about a month before. But now with 1.10.0-2020.3 Cursive had some errors while generating stubs. After the errors even reopening the project doesn’t generate the stubs.#2020-12-2313:33akielI can force the stub generation with an “Invalidate & Restart” in the File menu. However after starting stub generation, I get the following exception: #2020-12-2313:33akiel
com.intellij.openapi.project.IndexNotReadyException: Please change caller according to com.intellij.openapi.project.IndexNotReadyException documentation
	at com.intellij.openapi.project.IndexNotReadyException.create(IndexNotReadyException.java:67)
	at com.intellij.util.indexing.FileBasedIndexImpl.handleDumbMode(FileBasedIndexImpl.java:752)
	at com.intellij.util.indexing.FileBasedIndexImpl.ensureUpToDate(FileBasedIndexImpl.java:704)
	at com.intellij.util.indexing.FileBasedIndexEx.processExceptions(FileBasedIndexEx.java:229)
	at com.intellij.util.indexing.FileBasedIndexEx.processValueIterator(FileBasedIndexEx.java:334)
	at com.intellij.util.indexing.FileBasedIndexEx.processValuesInScope(FileBasedIndexEx.java:303)
	at com.intellij.util.indexing.FileBasedIndexEx.processValues(FileBasedIndexEx.java:204)
	at com.intellij.util.indexing.FileBasedIndexEx.processValues(FileBasedIndexEx.java:192)
	at cursive.index$namespaces.invokeStatic(index.clj:443)
	at cursive.index$namespaces.invoke(index.clj:435)
	at cursive.index$namespaces.invokeStatic(index.clj:438)
	at cursive.index$namespaces.invoke(index.clj:435)
	at cursive.namespace$namespaces_by_name.invokeStatic(namespace.clj:230)
	at cursive.namespace$namespaces_by_name.invoke(namespace.clj:224)
	at cursive.stubs$stub_file_name$reify__15640.compute(stubs.clj:68)
	at com.intellij.openapi.application.impl.ApplicationImpl.runReadAction(ApplicationImpl.java:875)
	at cursive.stubs$stub_file_name.invokeStatic(stubs.clj:67)
	at cursive.stubs$stub_file_name.invoke(stubs.clj:57)
	at cursive.stubs$clj_namespace_form.invokeStatic(stubs.clj:98)
	at cursive.stubs$clj_namespace_form.invoke(stubs.clj:97)
	at cursive.stubs$generate_stubs$fn__15692$process__15693$fn__15697.invoke(stubs.clj:265)
	at clojure.core$keep$fn__8559.invoke(core.clj:7341)
	at clojure.lang.LazySeq.sval(LazySeq.java:42)
	at clojure.lang.LazySeq.seq(LazySeq.java:51)
	at clojure.lang.RT.seq(RT.java:535)
	at clojure.core$seq__5402.invokeStatic(core.clj:137)
	at clojure.core$map$fn__5866.invoke(core.clj:2746)
	at clojure.lang.LazySeq.sval(LazySeq.java:42)
	at clojure.lang.LazySeq.seq(LazySeq.java:51)
	at clojure.lang.LazySeq.first(LazySeq.java:73)
	at clojure.lang.RT.first(RT.java:692)
	at clojure.core$first__5384.invokeStatic(core.clj:55)
	at clojure.string$join.invokeStatic(string.clj:180)
	at clojure.string$join.invoke(string.clj:180)
	at cursive.stubs$generate_stubs$fn__15692$process__15693.invoke(stubs.clj:264)
	at cursive.stubs$generate_stubs$fn__15692.invoke(stubs.clj:325)
	at cursive.task$backgroundable$reify__15626.run(task.clj:12)
	at com.intellij.openapi.progress.impl.CoreProgressManager$TaskRunnable.run(CoreProgressManager.java:962)
	at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcessWithProgressAsync$5(CoreProgressManager.java:472)
	at com.intellij.openapi.progress.impl.ProgressRunner.lambda$submit$3(ProgressRunner.java:235)
	at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$2(CoreProgressManager.java:178)
	at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:658)
	at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:610)
	at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:65)
	at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:165)
	at com.intellij.openapi.progress.impl.ProgressRunner.lambda$submit$4(ProgressRunner.java:235)
	at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1700)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
	at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:668)
	at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:665)
	at java.base/java.security.AccessController.doPrivileged(Native Method)
	at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1.run(Executors.java:665)
	at java.base/java.lang.Thread.run(Thread.java:834)
#2020-12-2313:33akielThe project is https://github.com/samply/blaze. One file with clojure.java-time is https://github.com/samply/blaze/blob/master/modules/db/test/blaze/db/api_test.clj#2020-12-2422:23cschephey all, I have a brand new clojure project I created with Cursive, trying to use deps.edn and I have a src folder with a module.. all super basic just hello world style code.. I had a test alias setup in deps.edn but i removed it because I found a way to run the tests within Cursive and I thought that was cool. I’m not sure what caused it, could have been editing the deps.edn file but now my project view only has a few things in, deps.edn being one of them.. but no folders listed and no modules and basically nothing works now because it can’t find any modules?#2020-12-2422:23cschepreally confused 🙂#2020-12-2422:23cschepi can still run clj -m schepball.core on the command line and it runs the hello world code#2020-12-2422:25cschepreading the thread above, i was able to fix my situation with the steps here#2020-12-2422:25cschephttps://clojurians.slack.com/archives/C0744GXCJ/p1608568616457500?thread_ts=1608436184.453600&amp;cid=C0744GXCJ#2020-12-2506:30Saurabh Sharanwhat is the best way to debug Could not create shim: Could not create shim error when trying to start the REPL on a cjl deps project?#2020-12-2606:18cflemingGet your log from Help | Show log in Finder/Explorer and email it to me at <mailto:/cdn-cgi/l/email-protection|/cdn-cgi/l/email-protection>#2021-12-2810:13onetomIf i have the same alias (eg. ion-dev) in my ~/.clojure/deps.edn and my project's deps.edn, what will Cursive do about it? In the Clojure Deps tool window, under the Aliases tree, I can only see one entry and that mentions (system) after its name. I'm asking, because it seems to be the key to the Errors during project resolution issue I've described a few days ago: https://clojurians.zulipchat.com/#narrow/stream/180378-slack-archive/topic/cursive/near/220338073 both my ~/.clojure/deps.edn and project deps.edn did have an ion-dev alias, but only my project deps.edn specified datomic-cloud in :mvn/repos, which is necessary for the :extra-deps {com.datomic/ion-dev {:mvn/version "0.9.276"}}#2021-12-2810:15onetomIt feels like Cursive is doing something slightly different from the Clojure CLI tools in such scenario, because the clojure script didn't have a difficulty in starting a REPL in such a situation.#2021-12-2820:35cflemingHmm, that’s possible, I’ll check that.#2021-12-2820:39cfleminghttps://github.com/cursive-ide/cursive/issues/2477#2021-12-2819:26wilkerluciohad anyone experience the keyword search just stopped working? I can find the keywords manually in the project, but in Cursive keyword search there are no results#2021-12-2819:26wilkerlucioalthough find usages on a keyword work as expected, just the search doesn't#2021-12-2820:35cflemingAre you on the latest Cursive? I’ll investigate that.#2021-12-2823:12wilkerlucioyup, latest#2021-12-2823:14wilkerluciosome keywords appear in the search, but not all#2021-12-2823:15wilkerlucioI think its worth mention this project has a ton of keywords, just wondering if its hitting some limit#2021-12-2823:15wilkerluciohere is one example#2021-12-3001:58steveb8n@cfleming I’m starting to use Malli in place of spec because it’s better in many ways. I miss the navigation on keywords that is supported for spec keywords. How do you decide when there’s enough adoption to provide navigation for Malli keywords? cc @ikitommi#2021-12-3001:59cflemingI would definitely add support now for Malli. What’s required?#2021-12-3002:17steveb8nawesome. initially just having the static analyzer understand when a keyword is defined in a Malli registry somewhere would allow you to provide the navigation that I desire#2021-12-3002:19steveb8nthat said, registries in Malli are not global (one of the benefits) so it will need to handle multiple nav locations (much like “show usages”)#2021-12-3002:20steveb8nI’d defer to Tommi for the official answer to this. I’m pretty sure he uses Cursive too. Is that correct? @ikitommi#2021-12-3002:20steveb8nhappy to provide some samples if you need/want them#2021-12-3005:58cflemingI’ll check the Malli docs and let you know if I need more examples. If @ikitommi has worked around it using Resolve As… then it should be pretty easy to add.#2021-12-3007:49cflemingI’d be interested in seeing some examples of where you’d like to see the navigation work. I’ve looked at the registry doc and it seems pretty open, so I’m not clear where the hooks for navigation should be.#2021-12-3007:50steveb8nsure. it’s probably fastest to look at some of my code so we can derive a few samples together. that work for you?#2021-12-3007:51steveb8nand should/would @ikitommi like to join? I think he might be on holiday atm#2021-12-3007:53cflemingI can’t do tonight but could do tomorrow.#2021-12-3016:14ikitommiGreat to hear that Cursive could support malli! In current version, there is no global schema definition, like there is s/def in spec. Instead, there can be multiple registries that are merged together, and one can build custom def for registering schemas. So, atm, not sure where to goto.#2021-12-3016:16ikitommithere Will be a new ns with Plumatic style def, defn and fn. Would be great if Cursive would handle those out-of-the-box, like the Plumatic ones. I'll ping @cfleming when the ns ships.#2021-12-3016:17ikitommibut, if you can cook up something for the goto-definition, I'm all ears :)#2021-12-3016:20ikitommiAlso, happy to help with anything that could help, add stuff to malli to Make it easy to integrate to etc.#2021-12-3020:22cflemingDoes just resolving the custom def as s/def work?#2021-12-3020:30ikitommithe plumatic def is not about registering key->schema like the spec s/def, but to define a value and the schema it represents, with eager validation: https://github.com/plumatic/schema/blob/master/src/cljx/schema/core.cljx#L1386-L1408#2021-12-3020:32ikitommiI think the goto would require a single global registry and a. custom def to register key->schema into it. No such thing in malli right now.#2021-12-3021:38steveb8nI have some ideas for the goto nav. Not sure how sophisticated Cursive can be but there are signals in the AST that a keyword is part of a Malli schema e.g. {:registry foo} could be the start of a walk back to :map keywords#2021-12-3021:39steveb8nalso https://github.com/metosin/malli/blob/master/test/malli/core_test.cljc#L1392-L1470#2021-12-3014:55emilaasaMy yearly appreciation post cfleming - you're great, the product is great, enjoy your holidays!#2021-12-3020:23cflemingThanks Emil, it’s much appreciated! I hope everyone has a good holiday season too.#2021-12-3017:55acim1Does anyone know if there is a way to eliminate "cannot be resolved" warnings for mount defstate declarations (and their usages)?#2021-12-3018:04mike_ananev@mkeller02 right click on defstate. select reslove as... select def.#2021-12-3018:07acim1Perfect! I had been trying to get some option by right-clicking where the warning showed on the name...whoops.#2021-01-0109:13cfleminghttps://twitter.com/CursiveIDE/status/1344934308151136256#2021-01-0216:37noorvirI’m trying to load NPM packages (`@material-ui/core`) into cursive with shadow-cljs as the build tool. I get $package cannot be resolved for every NPM package. As explained in the https://shadow-cljs.github.io/docs/UsersGuide.html#_cursive, I’m using full leinigen integration. The code runs (i.e. shadow-cljs works) but I don’t get any code completion because cursive cannot resolve NPM packages. Any Idea how to configure this?#2021-01-0219:28cflemingSadly, Cursive does not currently understand NPM packaging. It’s on my shortlist to fix, I had hoped to have it in there by now but it hasn’t made it yet.#2021-01-1113:38noorvirThanks for the reply @U0567Q30W. Is there an issue tracking this? Or is there an expected timeline for this?#2021-01-0701:38tony.kayIn Cursive (prior and latest stable) I have a forked version of specter…which has CLJC files. The nav ns pulls macros out of core and the core ns requires nav. Cursive mis-detects a ns loop in this condition and won’t let me load nses that use it. Is there a hack in place for regular specter? (i.e. I made a fork with new namespace names to prevent dependency conflicts). My version runs fine, but the REPL integration is hosed and refuses to load.#2021-01-0807:16cflemingI’m not sure about this sorry. I’m actually away with my family right now, but I’ll look at this ASAP when I’m back.#2021-01-0807:27cflemingI’m planning to make that check less aggressive, because it currently incorrectly catches cases which are not actually problematic.#2021-01-0817:46tony.kayok, thanks. Yeah, I’d rather just get the error from the REPL if possible when it has proven a problem. But perhaps that is a problem because of what you do to integrate, etc. Thanks!#2021-01-0701:39tony.kayhttps://github.com/redplanetlabs/specter/blob/master/src/clj/com/rpl/specter.cljc#L30 https://github.com/redplanetlabs/specter/blob/master/src/clj/com/rpl/specter/navs.cljc#L3#2021-01-0701:39tony.kaythose are the offending lines that cause the error#2021-01-0701:39tony.kay(but I don’t remember ever getting those when I use raw specter)#2021-01-0915:57gabrieleEDIT: fixed by upgrading intellj to the latest version :man-shrugging: ------ after i updated cursive (i was behind several versions) something changed with the formatting, if i write
(defn test |
and press enter where | is it doesn't indent by two like i would expected
(defn test 
  |
but
(defn test
      | 
it's driving me mad, any suggestions? cursive version: 1.10.1-eap1-2020.1 IntelliJ IDEA 2020.1.2 (Ultimate Edition) Build #IU-201.7846.76, built on June 1, 2020
#2021-01-0917:44emccueHow hard would it be to write an intelliJ plugin that displays a horizontal line directly above every top level form in a namespace (except the ns declaration)#2021-01-0917:44emccueAsking here because idk if there is some part of cursive i can "hook in to" to make it easier#2021-01-0917:45emccueand also because this is the place where intelliJ using people be#2021-01-0919:04emccueActually - intelliJ has a setting called "show method seperators"#2021-01-0919:05emccuebut trying it out it doesn't seem like it plays well with cursive#2021-01-0919:07emccue"that please"#2021-01-0919:41cflemingSure, if you could file an issue I’ll look at making Cursive obey that.#2021-01-0921:59emccueWill do - thanks for the responsiveness you're a gentleman and a scholar#2021-01-0922:45emccuehttps://github.com/cursive-ide/cursive/issues/2483#2021-01-1020:30cflemingThanks! I’m currently doing support from a caravan, but when that is no longer the case I’ll fix that.#2021-01-1220:28agata_anastazja (she/her)Edit: solved 😊 Hello, I have a question around repl set up in intellij with the cursive plugin. I used the `lein new app app_name`  command, and can run the app from my terminal. I haven’t changed anything at all in the scaffolded app. When I try to run the repl, I get Error: Could not find or load main class clojure.main Caused by: java.lang.ClassNotFoundException: clojure.main and all the function names in the text editor are highlighted as not resolved. Any idea what might be causing that?#2021-01-1220:29agata_anastazja (she/her)For the record, I also asked in beginners channel#2021-01-1307:11cflemingHow did you set your project up? Did you do something like this?: https://cursive-ide.com/userguide/leiningen.html#import-an-existing-leiningen-project#2021-01-1307:12cflemingIf you open your Leiningen toolwindow, do you see your project registered there? If not, you can right click on your project.clj and select “Add as Leiningen project”, that should help.#2021-01-1310:06agata_anastazja (she/her)I eventually did click on “Add as Leiningen project” from intellij file tab#2021-01-1501:15cflemingDid that fix the problem?#2021-01-1513:38agata_anastazja (she/her)yes, thank you!#2021-01-1221:55dvingoWhen I paste inside a string "\n" characters are added instead of actually inserting newlines. Is there anyway to disable this (I want the newlines, not the character "\n")#2021-01-1222:06isakNot sure, but the best workaround I've found is to do "Paste as Plain Text" instead of normal paste : Ctrl - Alt -Shift - V#2021-01-1222:14dvingothanks - that works for me#2021-01-1508:30Shantanu KumarIs it possible to have Cursive discover vars (for the purpose of jump-to-definition) defined using macros other than def, defonce and defn? I have connected Cursive via REPL, but that doesn’t seem to have any effect on discovery.#2021-01-1518:12tanzoniteblackmy understanding is that cursive doesn't use any information from the repl for jump to source and other similar things. it's all through static analysis. if your macro for defining is something that directly maps to similar definitions as def or the others (i.e. something like (my-def-macro my-var-name ...), you can resolve it as def https://cursive-ide.com/userguide/macros.html#customising-symbol-resolution#2021-01-1519:17Shantanu KumarThanks, @U236LQYB0#2021-01-1706:43popeyeI have installed intellj community edition and added cursive plugin , But I am not able to sync my file after starting repl, anyone faced same issue earlier?#2021-01-1707:09salamcan you be more specific with what you meant by “sync”? #2021-01-1710:17popeyeI was using wrong option, now loaded with namespace and it worked fine#2021-01-1812:23Robert MöstlHello! Is there a way to disable structural movement in Cursive?#2021-01-1812:44Robert MöstlOr how do Cursive users navigate from word to word in multi-word string literals?#2021-01-1813:06imrehere's an earlier comment of mine about the topic#2021-01-1813:06imre> Just checked this. It seems both cmd+sidearrow and alt+sidearrow (on a mac) are bound to cursive's structural editing move forward and move backward actions out of the box. As I use cmd+arrow for those, I unbound alt+arrow and it now works the way you describe#2021-01-1813:06imreFrom this thread https://clojurians.slack.com/archives/C0744GXCJ/p1610431219018800#2021-01-1814:19Robert MöstlThanks @U08BJGV6E and @UCCHXTXV4#2021-01-1912:47Shantanu KumarWhen I run a unit test in Cursive, the (large) diff output comes all in one line. Is it possible to pretty-print the diff so that I can inspect the details easily?#2021-01-1912:51Shantanu KumarIn clicked on <Click to see difference> to get at the diff window.#2021-01-2016:40Jeff EvansIt seems that the lein plugin doesn’t like this :profiles section too much (I suppose the nested content): https://github.com/metabase/metabase/blob/master/project.clj#L188 Notice the “profiles” detected here: https://imgur.com/a/7MvcfoO Anyone else seen something like this before?#2021-01-2100:59cflemingHmm, there’s definitely something odd going on there, I’ll take a look when I’m back at my computer.#2021-01-2116:15Jeff Evansthanks. I could also create a GitHub issue if that’s more helpful#2021-01-2223:41cflemingThat would be great, thank you.#2021-01-2515:30Jeff Evansopened https://github.com/cursive-ide/cursive/issues/2487; thanks#2021-01-2117:08Jordan Robinsonhey there, at the minute in cursive when I try and use httpkit.client I get a warning that it can't resolve the functions. I had a quick look into it and it looks like it might be because httpkit uses a macro to generate the functions under client. Is it expected that cursive wouldn't figure them out? It's a minor annoyance but it would be nice to have autocomplete on these if possible. This is the bit of httpkit with the macros: https://github.com/http-kit/http-kit/blob/master/src/org/httpkit/client.clj#L297 and please see attached image for what cursive says about it#2021-01-2117:12markaddlemanI just ran into this yesterday. I resolved by instructing cursive to resolve defreq as declare#2021-01-2117:12Jordan Robinsonah that would be good! Could I ask where I would instruct cursive to do so?#2021-01-2117:12markaddlemanNot a perfect solution but it keeps cursive from generating warnings#2021-01-2117:14markaddlemanSure. Go to defreq macro definition. Put the cursor on defreq and do an alt-enter#2021-01-2117:14markaddlemanYou'll get a popup menu with an option for "Resolve defreq as..."#2021-01-2117:14markaddlemanSelect "Specify"#2021-01-2117:14markaddlemanand choose declare from the next menu#2021-01-2117:15markaddlemanI'm giving these instructions from memory. If they aren't right, lmk#2021-01-2117:17Jordan Robinsonthat did it, thanks very much! 🙂#2021-01-2212:02GGfpcHello! Cursive is telling me that defn cannot be resolved in a cljc and cljs project, but only in the cljs files. Here is my deps.edn
{:paths          ["src"]
 :deps {
        clj-http/clj-http {:mvn/version "3.11.0"}
        org.clojure/data.json {:mvn/version "1.0.0"}
        reagent/reagent {:mvn/version "1.0.0"}}}
and my shadow-cljs.edn
{:deps         true
 :dev-http     {8081 "public"}
 :source-paths ["src"]
 :builds       {:app {:target     :browser
                      :output-dir "public/js"
                      :asset-path "/js"
                      :modules    {:main {:init-fn [mate-heatmap.index.render]}}}}}
Not sure what's causing this, I tried deleting the .idea folder and reimporting already
#2021-01-2212:59aratareseems like you don't have clojurescript itself in deps.edn?#2021-01-2213:09GGfpcwow I'm dumb haha#2021-01-2213:09GGfpcthanks, that fixed it#2021-01-2213:27thhelleryou are missing shadow-cljs too#2021-01-2213:27thhellerwhich would bring in cljs#2021-01-2217:48Kari MarttilaI guess you guys in this channel might be interested in reading https://www.metosin.fi/blog/metosin-favorite-editors/#2021-01-2319:47cflemingThanks, very interesting indeed!#2021-01-2217:50Kari MarttilaI counted some statistics: Which editors Metosinians like to use (one or more): • Cursive: 11 • Emacs: 5 • Vim: 2 • Eclipse: 1 • VSCode: 3 #2021-01-2217:50Kari MarttilaParedit or parinfer? • paredit: 13 • parinfer: 1 • something else: 1#2021-01-2314:45Kari MarttilaI'm wondering why the "Use port from nREPL file" selected option won't stay. If I start IDEA/Cursive and start the Clojure REPL and I have chosen "Specify custom port file" the previous time it will be changed to "Use standard port file" the next time.#2021-01-2315:53dpsuttonJust a guess but you’re selecting on of the standard files so it’s reverting back to that choice. If you put a non standard file there does it persist?#2021-01-2317:11Kari MarttilaIf I'm implementing a full stack app (both Clojure backend (.nrepl-port) and Clojurescript frontend (.shadow-cljs/nrepl.port)) there occasionally has been some hassle which file is chosen - therefore I'd like to make it explicit here.#2021-01-2319:48cflemingHmm, I think @U11BV7MTK might be right about the default value - I’ll try to reproduce this.#2021-01-2317:16dpsuttonMakes sense.#2021-01-2415:21ikitommiCursive seems to have issues understanding defprotocol and extend-type (maybe others) syntax when using reader conditionals. Cosmetic, but still. Below some valid code:#2021-01-2522:33cflemingThis is a problem with the parsing due to the reader conditional - I’ll have a look at that and see if I can fix it.#2021-01-2515:54katox@ikitommi there is a meta-issue on related issues already, https://github.com/cursive-ide/cursive/issues/2289 I'd also like to see the priority go up a bit, the first issue is from 2014 so no fingers crossed.#2021-01-2522:29cflemingThanks for that list, I will try to get to these sooner rather than later. @ikitommi’s issue is different though, that’s caused by the parsing not handling the reader conditional correctly.#2021-01-2607:55cfleminghttps://twitter.com/CursiveIDE/status/1353974663416692737#2021-01-2607:55cfleming(in reply to https://twitter.com/CursiveIDE/status/1349889139534032897)#2021-01-2609:28Rachel Westmacottis it known that :deps and :extra-deps in deps.edn files get autocomplete/intelligent suggestions on version numbers, but :replace-deps doesn't?#2021-01-2614:06Rachel Westmacottannoyingly olical/depot doesn't understand :replace-deps either, but I've fudged around both:
:aliases   {:outdated {:replace-deps {}
                        :extra-deps {olical/depot {:mvn/version "2.1.0"}}
                        :main-opts  ["-m" "depot.outdated.main" "--every" "--write"]}}
#2021-01-2614:07Rachel Westmacottnow I get to avoid all the project dependencies just to run a tool, and I get auto-suggestions in Cursive, and I get auto-updated dependencies in CI 😄#2021-01-2620:42cflemingI wasn’t aware of that, no, but it does indeed seem to be the case! Can you file an issue for that, and I’ll get it fixed?#2021-01-2621:25cflemingActually, never mind, I filed https://github.com/cursive-ide/cursive/issues/2490#2021-01-2622:26Oliver GeorgeQuick sanity check. Should Cursive play nicely with IntelliJ 2020.3#2021-01-2622:26cflemingYes!#2021-01-2622:27Oliver GeorgeTa.#2021-01-2622:28Oliver GeorgeHere's a screenshot in case you say "ah, try x"#2021-01-2622:29Oliver George#2021-01-2622:29Oliver Georgens alias stuff working. intenting borked....#2021-01-2622:29Oliver Georgehiglighting all over the show.#2021-01-2622:50cflemingTry this: https://cursive-ide.com/userguide/eap/troubleshooting.html#help-lots-of-symbols-don-t-resolve#2021-01-2622:58Oliver GeorgeThanks. Worked it out. I'm a goose.#2021-01-2622:59Oliver GeorgeIn case you see this again. My deps.edn didn't include clojurescript directly. I have to specify an alias to pick it up. I guess that without the alias CLJS namespaces didn't have cljs.core namespace available.#2021-01-2622:59Oliver GeorgeHere's our deps.edn for reference
{:paths   ["src" "test"]
 :deps    {reagent                                               {:mvn/version "0.10.0" :exclusions [cljsjs/react cljsjs/react-dom]}
           re-frame                                              {:mvn/version "1.1.0"}
           day8.re-frame/async-flow-fx                           {:mvn/version "0.1.0"}
           datascript                                            {:mvn/version "1.0.1"}
           datascript-transit                                    {:mvn/version "0.3.0"}
           com.cognitect/transit-cljs                            {:mvn/version "0.8.256"}
           condense/cljsrn-react-native-community-datetimepicker {:sha "e19943aaccbde0a2285d654f43846bb960dc7090" :git/url ""}
           condense/cljsrn-react-native-community-geolocation    {:sha "6f89fc4f39cf720ef1216783d9b0bb063710d3aa" :git/url ""}
           condense/cljsrn-react-native-community-netinfo        {:sha "9cb857ad9fb94bd79e1c28259b745c85f18acb00" :git/url ""}
           condense/cljsrn-react-native-elements                 {:sha "3fc1767c10da63a185cf58656c7fb6a39f0ddf50" :git/url ""}
           condense/cljsrn-react-native-image-picker             {:sha "f5069504fd5d3b8ba37a01725f7d12c349cf204d" :git/url ""}
           condense/cljsrn-react-native-sqlite-storage           {:sha "2cc6ba2ba16d7dfd4851618528bb3928babd429a" :git/url ""}
           org.xerial/sqlite-jdbc                                {:mvn/version "3.28.0"}
           org.clojure/java.jdbc                                 {:mvn/version "0.7.10"}
           com.cognitect/transit-clj                             {:mvn/version "1.0.324"}
           clj-statecharts                                       {:sha "84708b306c678a37ab5866532950691a7551732e" :git/url ""}}
 :aliases {:krell        {:extra-deps {io.vouch/krell         {:sha "577980ba68eb78bd0e49b93a514af27713c17d44" :git/url ""}
                                       binaryage/devtools     {:mvn/version "1.0.2"}
                                       org.slf4j/slf4j-simple {:mvn/version "1.7.30"}}
                          :main-opts  ["-m" "krell.main" "-co" "krell.edn" "-c" "-r"]}
           :release      {:extra-deps {io.vouch/krell         {:sha "577980ba68eb78bd0e49b93a514af27713c17d44" :git/url ""}
                                       org.slf4j/slf4j-simple {:mvn/version "1.7.30"}}
                          :main-opts  ["-m" "krell.main" "-co" "release.edn" "-O" "simple" "-c"]}
           :figwheel     {:extra-paths ["target"]
                          :extra-deps  {org.clojure/clojurescript {:mvn/version "1.10.773"}
                                        com.bhauman/figwheel-main {:mvn/version "0.2.11"}
                                        binaryage/devtools        {:mvn/version "1.0.2"}}
                          :main-opts   ["-m" "figwheel.main" "-b" "figwheel" "-r"]}
           :node-repl    {:extra-deps {org.clojure/clojurescript {:mvn/version "1.10.773"}}
                          :main-opts  ["-m" "cljs.main" "--repl-env" "node"]}
           :browser-repl {:extra-deps {org.clojure/clojurescript {:mvn/version "1.10.773"}}
                          :main-opts  ["-m" "cljs.main" "-r"]}
           :masterdata   {:main-opts ["-m" "app.masterdata"]}}}
#2021-01-2623:00Oliver GeorgeKrell is used for builds. It was (is?) specifying a specific sha for clojurescript and resolution between mvn/versions and :git/url shas was a problem. This was our work around.#2021-01-2623:01Oliver GeorgeOnly thing I think Cursive might have done to help is warn that there was no clojure core namespaces available in the deps path.#2021-01-2623:07cflemingThat might be a good idea, the problem is also guiding people to how to fix it.#2021-01-2623:08cflemingSo did this work in previous IntelliJ versions, and the alias you were syncing got lost in the upgrade somehow?#2021-01-2623:56Oliver GeorgePerhaps just a new entry in that link would be enough to get people thinking. Seems like it's rare so won't be offended if you don't.#2021-01-2623:57Oliver GeorgeNot sure how I got myself out of sync. Most likely I deleted and re imported the project for some reason. Perhaps clearing out the repo killed th impl files or cloning fresh. I don't recall - lots going on.#2021-01-2623:57Oliver GeorgeIt'd be a manual step to add an alias - easy to forget.#2021-01-2701:03cflemingActually, re-reading that doc there is this bit: > Also, you might have to configure your aliases (for deps) or your profiles (for Leiningen).#2021-01-2701:03cflemingBut it could probably be more visible.#2021-01-2701:54Oliver Georgeah, yep.#2021-01-2716:50Kari MarttilaIs there a way to configure a hotkey so that using that hotkey I could activate either REPL 1 or REPL 2 (e.g. frontend / backend). I develop a full stack app and have both frontend and backend REPLs and jumping in the editor between frontend and backend code and would like to switch the active REPL using a hotkey instead of getting my hand from my dear Dygma Raise keyboard to the mouse and click the "frontend" or "backend" tab:#2021-01-2809:19Kari MarttilaSorry for asking this here, it is IDEA specific and the same command that switches tab in any IDEA window. So, I have a hot key to switch focus to REPL window, then another hotkey to switch tab, hotkey to jump back to editor. Case closed.#2021-01-2816:17aratareIt would be nice if we can have a choice of which repl when sending forms.#2021-01-2816:18aratareand evaluating such forms will automatically switch to the repl to show the results.#2021-02-0108:23JoniI have a hotkey for focusing the repl then just switch tabs with ctrl + right/left arrow#2021-01-2720:57Daniel WellmanHello! I’m having problems opening a specific Leiningen project in IntelliJ 2020.3.2 with Cursive 1.10.0-2020.3. When I try to open the project folder (has a project.clj and no .idea folder or .iml) the idea.log has a message: ERROR - .LeiningenProjectOpenProcessor - Error opening project  java.lang.ClassCastException: class clojure.lang.Keyword cannot be cast to class java.lang.String I just tried creating a brand new Leiningen app and it opened fine, so I suspect there may be something with this specific project’s Leiningen configuration. Any suggestions where I should start investigating? I’ll post the full stack trace in a thread.#2021-01-2720:58Daniel Wellman
2021-01-27 14:54:49,532 [1409073]  ERROR - .LeiningenProjectOpenProcessor - Error opening project 
java.lang.ClassCastException: class clojure.lang.Keyword cannot be cast to class java.lang.String (clojure.lang.Keyword is in unnamed module of loader java.net.URLClassLoader @41915c2f; java.lang.String is in module java.base of loader 'bootstrap')
	at cursive.leiningen.project.LeiningenProjectOpenProcessor$getProjectInfo$1.run(ImportProject.kt:466)
	at com.intellij.openapi.progress.impl.CoreProgressManager$TaskRunnable.run(CoreProgressManager.java:962)
	at com.intellij.openapi.progress.impl.CoreProgressManager$4.run(CoreProgressManager.java:520)
	at com.intellij.openapi.progress.impl.ProgressRunner.lambda$new$0(ProgressRunner.java:79)
	at com.intellij.openapi.progress.impl.ProgressRunner.lambda$submit$3(ProgressRunner.java:235)
	at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$2(CoreProgressManager.java:178)
	at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:658)
	at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:610)
	at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:65)
	at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:165)
	at com.intellij.openapi.progress.impl.ProgressRunner.lambda$submit$4(ProgressRunner.java:235)
	at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1700)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
	at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:668)
	at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:665)
	at java.base/java.security.AccessController.doPrivileged(Native Method)
	at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1.run(Executors.java:665)
	at java.base/java.lang.Thread.run(Thread.java:834)
2021-01-27 14:54:49,533 [1409074]  ERROR - .LeiningenProjectOpenProcessor - IntelliJ IDEA 2020.3.2  Build #IU-203.7148.57 
2021-01-27 14:54:49,533 [1409074]  ERROR - .LeiningenProjectOpenProcessor - JDK: 11.0.9.1; VM: OpenJDK 64-Bit Server VM; Vendor: JetBrains s.r.o. 
2021-01-27 14:54:49,533 [1409074]  ERROR - .LeiningenProjectOpenProcessor - OS: Mac OS X 
2021-01-27 14:54:49,533 [1409074]  ERROR - .LeiningenProjectOpenProcessor - Plugin to blame: Cursive version: 1.10.0-2020.3 
2021-01-27 14:54:49,533 [1409074]  ERROR - .LeiningenProjectOpenProcessor - Last Action: WelcomeScreen.OpenProject 
#2021-01-2722:23markaddlemanCan you post your project.clj? I'm guessing there is some non-standard data in there. Perhaps Leiningen is not sensitive to it but (obviously) Cursive is#2021-01-2722:28Daniel WellmanIt’s from an open source project that I opened — https://github.com/empear-analytics/codescene-ci-cd/blob/master/project.clj#2021-01-2723:13markaddlemanYeah, I thought I recognized this error. It's because the project is using the "lein-v" Leiningen plugin.#2021-01-2723:13markaddlemanNotice that the version identifier in the project.clj is :lein-v - Cursive expects this to be a string.#2021-01-2723:14markaddlemanNormally, it is but the lein-v plugin allows it to be a keyword (it must play some games under the covers with Leiningen)#2021-01-2813:45Daniel WellmanOh! Thank you for pointing this out — I’ll look into the lein-v plug-in to learn more about that.#2021-01-2816:00Jeff Evansdoes anyone have an IntelliJ code style file that basically implements this? https://guide.clojure.style/ having a hard time making the formatting match what is outlined there#2021-01-2816:01Jeff Evansat a minimum, I had to enable Default to Only Indent, but I still haven’t figure out how to accomplish the https://guide.clojure.style/#one-space-indent part#2021-01-2821:09cflemingI don’t think you want Default to Only Indent for matching the guide. But you probably do want One space list indent.
#2021-01-2821:09cflemingIf there’s something else that you’re finding difficult, let me know.#2021-02-0420:48Jeff EvansI could be misunderstanding things, but it seems necessary to have Default to Only Indent checked in order to have the basic defn spacing work properly (i.e. one indent for the body, on a newline after the param list declaration). This can even be seen directly in the built-in example snippet to the right.#2021-02-0420:48Jeff EvansEx:#2021-01-2906:00TrevorSo I thought I read somewhere that cursive intellisense leverages clojure metadata? If I write a macro can I help intellisense out by applying certain meta data to the macro?#2021-01-2914:45AJ Jaro@UH0MTLCHF This is a great question. I suspect there’s something missing here, but I’d also like to know this#2021-02-0201:21cflemingThere isn’t anything like this at the moment, no. I have plans for complex support which will allow support for arbitrary DSLs, but that’s waiting on some internal refactoring that needs to happen first.#2021-01-2916:07Daniel SlutskyHello. Does anybody know how we could update to the new Cursive release that was announced today? https://groups.google.com/g/cursive/c/eK9RrEbGwMc It doesn't seem to appear on IntelliJ (maybe I'm missing something -- not so experienced with IntelliJ 🤷 ).#2021-01-2916:34imretry https://cursive-ide.com/userguide/#choosing-to-receive-eap-beta-builds#2021-01-2917:55Daniel SlutskyThanks!#2021-02-0120:09cflemingIf you’re interested in the REPL being shared via Code With Me, please vote for this issue: https://youtrack.jetbrains.com/issue/CWM-1921#2021-02-0208:16Kari MarttilaI'm using Cursive 1.10.1.eap2-2020.3 / IDEA 2020.3 with paredit. There is a Kill Sexp in Structural editing. Is there an equivalent Copy Sexp ? E.g. At the moment Kill Sexp kills the Sexp: (^ = cursor)
(remove ^(fn [[k v]] (nil? v)) {455 nil 555 "asdf"})  =>  kills: (fn [[k v]] (nil? v))  (OK)
But Copy as kill :
(remove ^(fn [[k v]] (nil? v)) {455 nil 555 "asdf"})  =>  copies: (fn [[k v]] (nil? v)) {455 nil 555 "asdf"}  (copies extra {455 nil 555 "asdf"} )
#2021-02-0209:47cflemingNo, there isn’t at the moment. If you file an issue I’ll see about adding that, it should be straightforward.#2021-02-0213:02Kari MarttilaOk. Thanks!#2021-02-0308:23Kari MarttilaDid it: https://github.com/cursive-ide/cursive/issues/2493#2021-02-0213:48Daniel WellmanIs the “Call Hierarchy” action expected to work in Cursive or is it not supported?#2021-02-0213:54Daniel WellmanSorry, I meant to clarify: Does it work on Clojure functions to find the call stack of those functions?#2021-02-0300:27cflemingSadly no, but it should.#2021-02-0215:56jamescroftHi, does anyone know if it’s possible to add our own “Form parameters”? To get my indentation aligned with some others on my team (who just clj-fmt) I need to tweak the indentation for functions beginning with with-#2021-02-0300:27cflemingYes, you can do this: https://cursive-ide.com/userguide/eap/formatting.html#code-style-settings. Note that you’ll have to do it for each form individually, you can’t do it for e.g. with-*#2021-02-0216:46AJ JaroHas anyone configured Code with Me to use parinfer ?#2021-02-0307:26cflemingI’ve never tried Code With Me, if there are problems do let me know and I’ll work with JetBrains to get them fixed.#2021-02-1121:15AJ JaroOk, I only tried it the other day, but I’ll let you know if I start leaning on this tool much#2021-02-0415:41thumbnailRestarting the repl often results in this message for me. Is there something wrong (that i can fix 😛) ?#2021-02-0419:55kennyIs there a way to have Cursive remember which code blocks have been folded?#2021-02-0515:08imreHey @cfleming, sorry for being a nuisance, I kinda feel that the way https://github.com/cursive-ide/cursive/issues/2097 was fixed doesn't work for me. Previously when I was inside a longer string I could move forward/back to get out of it, but now that's gone 😞 I tried move forward out of sexp but that put me outside the sexp that contained the string. Any chance I could either get the old behaviour back or add more structural support for strings?#2021-02-0708:45imreCommented on the gh issue#2021-02-0515:45Kari MarttilaI'm not sure if this IntelliJ 2020.3.2 or Cursive 1.10.1-eap2-2020.3 issue. But quite often now it has happened that I have suddenly lost all my project settings (e.g. File -> Project Structure -> Modules: source directories, test directories, excluded directories, and selected deps.edn aliases, in run configuration the project cannot be found etc). I'm considering to go back to the previous IDEA/Cursive configuration. Update: I deleted ~/.config/Jetbrains and ~/.cache/Jetbrains and installed a fresh IntellJ 2020.3.2. Let's see if things will be stable now.#2021-02-0517:21Daniel WellmanI just purchased a license of Cursive, thanks for the great product. I love the editor/REPL integration and being able to use the debugger is great. I’m looking forward to learning more ways to be productive!#2021-02-0603:06cflemingThanks for the kind words, I’m glad it’s helping!#2021-02-0522:05Jeff Evanscan the work that is done to recognize project-specific macros outlined here, be shared to the rest of the team, by some exportable/source controlled file? https://cursive-ide.com/userguide/macros.html I didn’t see anything obvious being updated within the project structure or .idea dir when doing so#2021-02-0523:07Jeff EvansEdit: found it under Languages & Frameworks/Clojure/Symbol Resolution#2021-02-0713:27Vincent CantinCursive has trouble understanding this form: '^{a b} [c d] which is the quoted version of ^{a b} [c d]#2021-02-0713:28Vincent Cantin
'^{a b} [c d]
;; => [c d]

(meta '^{a b} [c d])
;; => {a b}
#2021-02-0713:30Vincent Cantin'^{a b} [c d] is equivalent to ^{'a 'b} '[c d]#2021-02-0721:18cflemingRFC: those who were bothered by structural movement not working word-by-word in strings and comments, I’m interested in feedback on whether the fix in the latest build works well, see here: https://github.com/cursive-ide/cursive/issues/2097#issuecomment-774636269#2021-02-0721:19cfleminghttps://xkcd.com/1172/#2021-02-0809:15imreBelieve me or not, that was the exact same comic I was thinking about when I worded my original message here on Slack 😄#2021-02-1112:37katoxAnother thing that stopped working in the latest build is that kill stopped working on multi-line strings. The workaround is to to join the lines, then kill.#2021-02-1123:38cfleming@U0KD0N5T5 Thanks, I’ll fix that - that’s very strange.#2021-02-0810:06heliosdo you have an advice to help cursive understand core.match/match ? I always see a lot of unresolved stuff#2021-02-0813:58wilkerlucioone generic option is to specify the macro to resolve as "None"#2021-02-0813:58wilkerluciothis way it will ignore all failed symbols inside#2021-02-0909:09helios👍 thanks @U066U8JQJ#2021-02-0818:47joshkhHas anyone "randomly" had the following error when starting a REPL for a project that hasn't changed? Error modal: > No project file found for <project-name> Error in build configuration: > Run Configuration Error: No modules containing clojure.main found I swear it was working this morning, and other projects are still fine. I also tried invalidating caches and restarting (deps.edn project). Thanks!#2021-02-0819:02aratarePerhaps consider deleting .idea? When things go south with no way of salvaging or time is limited, I usually just delete .idea, remove the project from IntelliJ and add it again.#2021-02-0819:26Stuartyeah, i'm sure i've had that. Normally deleting .idea worked for me.#2021-02-0821:46joshkhno luck after deleting .idea. hmm. but thanks for the suggestion, this usually does the trick.#2021-02-0905:06cfleming@U0GC1C09L Check your Deps toolwindow to make sure your project is registered there. If it’s not for some reason, right click the deps.edn file in the project view and select “Add as deps project” and see if that helps.#2021-02-0909:29joshkhthanks, "Add as deps project" prompted a small message about choosing an SDK, which did the trick#2021-02-0915:58Kari MarttilaToday I saw something weird with IntelliJ + Cursive. I have a remote nrepl session in Cursive connected to a backend repl running in terminal (i.e. Run configuration: remote + nrepl). Suddenly cursive repl said that I was in user namespace even though I tried to change the namespace to something else with (in-ns ...). I stopped Cursive repl and connected it again to the remote nrepl session and then everything worked again as it should. I'm not 100% sure if this was some anomaly or maybe I just messed something myself.#2021-02-1000:37cflemingPSA: Cursive is currently broken with 2021.1 EAP 2: https://youtrack.jetbrains.com/issue/IDEA-261734#2021-02-1011:58menguhi everyone#2021-02-1011:58menguI imported my shadow-cljs project exactly like it's described here: https://cursive-ide.com/userguide/leiningen.html#import-an-existing-leiningen-project#2021-02-1011:59menguhowever I do have couple of issues: • I can't seem to find out how to start my shadow-cljs app from intellij • features such as auto import are not working. #2021-02-1011:59menguI believe I'm missing something but I don't know what it is#2021-02-1013:19p-himikI don't think you can start shadow-cljs REPL with a single GUI action. You have to either start the REPL separately from IDEA or initiate it within Cursive REPL (but the last time I tried that, it didn't work that well). What do you mean by "auto import" exactly?#2021-02-1019:24mengu@U2FRKM4TW, you know, as you type something, the intellisense show you auto completion options and once you choose one, it also automatically imports them#2021-02-1019:26mengusee it in action: https://cursive-ide.com/userguide/images/editing/class-completion.png#2021-02-1019:28p-himikRight. It's not supported for any string-based :require at all in Cursive.#2021-02-1019:28p-himikIt's not related to shadow-cljs at all.#2021-02-1101:20alex-ebertsI’m running Intellij 2019.3.5 and I’ve just upgraded Cursive to 1.10.1-eap2-2019.3. I’m not able to get a clojure repl running. The error message I’m getting is
Error running 'CLJ Local': class clojure.lang.PersistentVector cannot be cast to class [Lcom.intellij.openapi.actionSystem.AnAction; (clojure.lang.PersistentVector is in unnamed module of loader com.intellij.ide.plugins.cl.PluginClassLoader @7e26aea8; [Lcom.intellij.openapi.actionSystem.AnAction; is in unnamed module of loader com.intellij.util.lang.UrlClassLoader @5419f379)
I’ve tried deleting the .idea folder and the *.iml file and reimporting the project with no success. Any ideas what might be causing this? I’m on a Mac running 10.14.6 (Mojave) and my project is configured for Java SDK 13. Thanks!
#2021-02-1101:22cflemingCould you check your log (Help-&gt;Show log in Finder/Explorer) and see if the full stacktrace appears there?#2021-02-1101:26alex-ebertsHere’s a stacktrace that corresponds to the time I got the error: #2021-02-1101:26alex-eberts
2021-02-10 17:22:44,449 [ 652404]   WARN - .impl.LineStatusTrackerManager - Tracker is being held on dispose by 
#2021-02-1101:28cflemingI don’t think that’s the same problem unfortunately. That one looks like some kind of object leak, probably caused by the original problem.#2021-02-1101:29alex-ebertsI’ll take a look higher up in the log… stand by. Many thanks for your help BTW Colin! 🙂#2021-02-1101:30alex-ebertsMaybe this is it?
2021-02-10 17:12:14,903 [  22858]   INFO - il.indexing.FileBasedIndexImpl - Rebuild requested for index ClojureSymbolMeta 
java.lang.Throwable
	at com.intellij.util.indexing.FileBasedIndex.requestRebuild(FileBasedIndex.java:64)
	at cursive.stubs.ReplStubsNotifications$createNotification$1$whenDone$1.run(Stubs.kt:240)
	at cursive.stubs$generate_stubs$fn__15817$process__15818.invoke(stubs.clj:250)
	at cursive.stubs$generate_stubs$fn__15817.invoke(stubs.clj:325)
	at cursive.task$backgroundable$reify__15747.run(task.clj:12)
	at com.intellij.openapi.progress.impl.CoreProgressManager$TaskRunnable.run(CoreProgressManager.java:888)
	at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$2(CoreProgressManager.java:163)
	at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:585)
	at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:531)
	at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:59)
	at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:150)
	at com.intellij.openapi.progress.impl.CoreProgressManager$4.lambda$run$0(CoreProgressManager.java:402)
	at com.intellij.util.ConcurrencyUtil.runUnderThreadName(ConcurrencyUtil.java:221)
	at com.intellij.openapi.progress.impl.CoreProgressManager$4.run(CoreProgressManager.java:402)
	at com.intellij.openapi.application.impl.ApplicationImpl$1.run(ApplicationImpl.java:238)
	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
	at java.base/java.lang.Thread.run(Thread.java:834)
2021-02-10 17:12:14,962 [  22917]   INFO - il.indexing.FileBasedIndexImpl - scheduleIndexRebuild, reason: checkRebuild 
#2021-02-1101:31cflemingNo, that one’s not actually an error, just IntelliJ noting that something requested that the indexes get rebuilt. That’s an unusual thing to do (Cursive is one of the few plugins with a real use-case for it) so they log it to be sure.#2021-02-1101:31cflemingLet me dig the code out and see what I can see.#2021-02-1101:33alex-ebertsOk, please let me know if I can provide any other info (would you like the full log via email?).#2021-02-1101:33cflemingYeah, if you could send it that might be helpful - <mailto:/cdn-cgi/l/email-protection|/cdn-cgi/l/email-protection>#2021-02-1101:34alex-ebertsOk, will do.#2021-02-1101:35cflemingAlso, could you send a screenshot of the run config you’re trying to run in case there’s anything unusual about it?#2021-02-1101:39alex-ebertswill do.#2021-02-1101:40alex-ebertsScreenshot:#2021-02-1101:45alex-ebertsOne other thing to note is that git in Intellij seems to be in a weird state. It’s not seeing my develop branch even though it’s fine on disk. I’m not sure if that would have any impact on running a repl but thought I would mention it.#2021-02-1118:32alex-ebertsHi @U0567Q30W - I was going to delete the Intellij Preferences and Caches folders and start from a clean slate but wanted to check with you before doing that in case you needed anything from my config to track down this bug.#2021-02-1120:26Jakub Holý (HolyJak)My IntelliJ also shows wrong branch but otherwise works OK.#2021-02-1121:20alex-ebertsAfter deleting the project directory and re-cloning from github, all my git branches are back. Unfortunately, I’m still getting the same error on launching the repl. FWIW - here’s a link to the project: https://github.com/aeberts/fulcro-rad-demo#2021-02-1121:29cfleming@U0G3C3USJ Thanks for the project link, I’ll try to reproduce with that.#2021-02-1121:30alex-ebertsBTW - I just tried setting my project SDK to 1.8 and I’m getting the same error. (it was Java 13).#2021-02-1121:41alex-eberts@U0567Q30W More testing feedback: I tried running a remote nrepl server in the project with nrepl-0.8.3 and then connecting remotely to it and I’m getting the same error.#2021-02-1304:38cfleming@U0G3C3USJ Just to let you know I’ve managed to reproduce this with your setup, so I’ll be able to debug it - thanks!#2021-02-1304:41cflemingUgh, I had also planned to improve the error logging, but that’s handled by IntelliJ. What it does is write out the exception at debug level, so you have to know which logger to set to debug level to see it. Yuk.#2021-02-1305:08cflemingOk, this will be fixed for the next build. This bug only affected 2019.3, which I guess is why no-one else hit it (an IntelliJ API accepts a List in recent versions, but in 2019.3 was a varargs call).#2021-02-1306:38alex-eberts@U0567Q30W thanks for the update and good news regarding that bug! #2021-02-1307:48cfleminghttps://github.com/cursive-ide/cursive/issues/2504#2021-02-1114:18markaddlemanPathom - particularly Pathom3's smart maps - is figuring larger in my codebase. I'd love cursive to understand keywords that are "defined" as part of a Pathom resolver so I can hotlink to their definition#2021-02-1123:35cflemingCan you show an example of how this works, or link to some doc/examples?#2021-02-1303:33wilkerluciohello, Pathom author here 🙂 @U0567Q30W you can find docs for this here: https://pathom3.wsscode.com/docs/resolvers#2021-02-1303:33wilkerlucioaltough, I believe if we want to index resolvers we have a few open questions about what and how much to index#2021-02-1303:34wilkerlucioI think would be interest to index the presence of an attribute in an "output" as a definition of it (an output attribute means that this resolver can expose this data, this is what I think makes most sense to navigate to)#2021-02-1303:34wilkerluciothis would have to be open to many definition points, as the same attribute may appear in many different resolvers#2021-02-1303:35wilkerluciothe output may be explicit (::pco/output key in the configuration map of the resolver), or implicit (in case the last statement of the resolver definition is a map, this is documented on that same page)#2021-02-1315:58markaddlemanThanks @U066U8JQJ for stepping in 🙂 I agree that mapping an attribute to the resolvers that produce it would be a great first step#2021-02-1115:58heliosHow do you sort your namespace require/imports with cursive?#2021-02-1116:05imremanually or with idea's string manipulation plugin 😞#2021-02-1116:05imreI think there is a gh issue about it#2021-02-1120:23Shantanu KumarI manually segregate the requires into 3 sections - 1. clojure.*, 2. third-party lib namespaces, 3. app namespaces. I maintain alphabetic order within each section, again manually. Any pointers to automate this would be great.#2021-02-1120:26danierouxI install the ideavim plugin, select the requires and run :'<,'>!sort on it.#2021-02-1120:26danieroux… not elegant, but it works#2021-02-1120:32AJ JaroI was also irritated by this so I created a https://plugins.jetbrains.com/plugin/13222-clojure-namespace-sort The insides of the plugin aren’t great, but it works decently#2021-02-1121:53vermaCould possibly be done with babashka+clj-rewrite also I believe.#2021-02-1206:56Shantanu Kumar@UGMAVSMUM I tried installing your plugin but it doesn’t turn up in plugin search. I’m on Ultimate 2020.3#2021-02-1209:07Jordan RobinsonI personally use https://github.com/greglook/cljstyle which orders them for me, as a file watcher task#2021-02-1209:07imreooh file watcher task! can you share how you configure that?#2021-02-1209:08Jordan Robinsonyeah sure, one second...#2021-02-1209:08Jordan Robinson#2021-02-1209:09Jordan Robinsonit's the closest I've been able to get to prettier in js#2021-02-1209:10Jordan RobinsonI hope I explained how to set it up with that screenshot but let me know if not, I've been meaning to write a blog post on it really#2021-02-1209:13imreThank you! Does this not trigger the "file was modified extrnally" dialog?#2021-02-1209:15Jordan Robinsonit doesn't seem to for me, no#2021-02-1209:16imreGreat stuff thanks!. I'll give it a go#2021-02-1214:21AJ JaroOh this looks interesting @UC3B7UJF2! Thanks for sharing!#2021-02-1514:35helios@UGMAVSMUM i was able to use your plugin 🙂 do you have it on github?#2021-02-1514:37AJ Jaro@U0AD3JSHL Yep, https://github.com/mustangJaro/antandreAny improvements to it would be fantastic! I know it’s not written the best#2021-02-1122:35stuartrexkingThis is going to seem silly, but how does Tony kill to the end of the form here? https://youtu.be/3dZK5seIaVI?t=1238#2021-02-1122:36vermaSomething like kill-sexp-to-end perhaps, let me check which exact paraedit command it is#2021-02-1122:37vermaI think straight up "Kill"#2021-02-1122:37vermaI am not sure what the default binding for it is, but I think its this one:#2021-02-1122:40stuartrexkingKill and Kill Sexp both work. Now how to paste like he did…#2021-02-1122:43stuartrexkingThank you @U052521SY#2021-02-1122:50stuartrexkingYeah, I can’t figure out how to paste it into place like he does in that example. If any one can point me to the action…#2021-02-1123:13alex-eberts@U3FKR3KDF I’m pretty sure that Tony is using a vim plugin with Intellij (I believe it’s IdeaVim) so it could be a vim command that he’s using…#2021-02-1123:16stuartrexking@U0G3C3USJ I’m using IdeaVim. I’ll ask Tony directly.#2021-02-1123:38cflemingStraight up Kill should indeed work, and just normal paste should paste it back wherever you want it.#2021-02-1123:39cfleming(however as reported in another thread, in the very latest build Kill seems to only kill to the end of the line, not the end of the form as it should).#2021-02-1123:39cflemingThat will be fixed in the next build.#2021-02-1205:00cflemingActually, I can’t reproduce that, never mind.#2021-02-1205:05cfleming@katox You reported in another thread: > Another thing that stopped working in the latest build is that kill stopped working on multi-line strings. The workaround is to to join the lines, then kill. I just checked the code, and nothing has changed here in forever. I think this has always worked like that.#2021-02-1219:43katoxBad memory then, sorry. I'd expect it to behave like in a sexp so likely projecting...#2021-02-1209:25jsyrjalaIs this a known problem: REPL tabs are unnamed#2021-02-1209:26jsyrjalaHere I have three REPLs running, but their tabs are empty. It would be nice to have some text e.g repl configuration name in them.#2021-02-1210:07Stuarthmm, mines show names. Are you setting a name in the config?#2021-02-1210:07Stuart#2021-02-1210:10jsyrjalaYes#2021-02-1210:17jsyrjalaUsing now IDEA 2020.3.2 and latest Cursive, the issue has been some time now, I don’t remember when this started.#2021-02-1214:58Jeff EvansMine also show the correct names#2021-02-1220:08cflemingNames should definitely be shown. @U1G5P6G0L can you email me your log file to <mailto:/cdn-cgi/l/email-protection|/cdn-cgi/l/email-protection>?#2021-02-1220:40jsyrjalaYes, but how/where to find it? The log file#2021-02-1222:14Jeff EvansI believe it’s Help/Show Log in … and it’s called idea.log#2021-02-1508:55jsyrjalaI just sent the email#2021-02-1213:48danmIs there a way I can get Cursive to 'recognise' defspec forms (https://clojure.org/guides/test_check_beginner#_defspec) as tests that I can run with 'run test under caret in repl' and suchlike? At the moment I have to switch to the namespace and manually call the spec in question, which is not a massive hardship it's just I'm used to the shortcuts by now (also the manual run doesn't set the gutter icons on any (is ...) forms in the defspec like 'run test under caret' or 'run all tests in namespace' do (but that's slow when the namespace contains a lot of defspec tests)#2021-02-1220:09cflemingI’m not sure there is. I’ve been meaning to look at this for a while, I think this probably needs to work in a slightly different way due to the phases (running, shrinking etc)#2021-02-1909:11Zak SinghYou can resolve it as `deftest`. The last option of `Resolve as` is `Specify...` and let you type the name of the var you want. Just type `deftest` and you’re good to go — https://cursive-ide.com/userguide/macros.html#2021-02-1912:17danmYou know, I was going to say "That doesn't work", because I tried it before and it didn't seem to where it did for other macros I'd told Cursive to interpret as defn, but it looks like it now is working, without me having to re-specify. Fills the gutter icons and everything. All I've done is restart the IDE (which I didn't have to for the other ones), so :man-shrugging::skin-tone-2: , but it's working so hurrah! Ta both#2021-02-1213:49danmI tried to tell Cursive to recognise/treat defspec like deftest, and that didn't seem to work, and I have to admit beyond that is beyond my current Cursive-fu#2021-02-1217:11vermawill cursive work with shadow-cljs style imports of npm modules? .. like in the sense jump to definition etc.?#2021-02-1220:10cflemingNot at the moment, but this is something I’m hoping to improve soon. It’ll be subject to the limitations of how insane JavaScript is though.#2021-02-1220:26vermahaha, thanks for letting me know and thanks for Cursive! 🍻#2021-02-1219:16alex-ebertsI have “Prettify stacktrace elements with folding” checked in the Cursive settings but stacktraces in the REPL do not appear to be folded (I’m assuming that a folded stacktrace will show the full error and then a folded stacktrace). What should a “folded” stacktrace look like?#2021-02-1220:12cflemingWhat the prettifying does is fold the Java-y bits and replace them with more Clojurefied versions, e.g. replace package names with namespaces, class names with demunged fn names etc.#2021-02-1220:13cflemingIt doesn’t work for the printed error objects at the moment unfortunately, since it’s regex based and they’re more subject to formatting.#2021-02-1221:53alex-eberts@U0567Q30W Thanks for the clarification!#2021-02-1219:18alex-ebertsHere’s what I’m seeing with “Prettify stacktraces with folding” set to “on”:#2021-02-1219:26alex-ebertsAnswering my own question here: I think I know what’s going on here. I have a REPL command which restarts my server and which calls tools-ns/refresh which is returning the error. Pressing the “print last stacktrace” button shows a prettified stacktrack with the error at the end as expected.#2021-02-1219:27alex-eberts#2021-02-1414:13devurandomIs there a way to print values nicely from code running in a REPL? Ideally I would like to have structural folding and the likes on the output. println just does not cut it and prn does not either.#2021-02-1419:46StuartHave you tried the reveal repl? You could probably extend reveal to do what you want. https://vlaaad.github.io/reveal/#2021-02-1421:10devurandomThanks, I will take a look. For Cursive, do you use the clojure.main approach or the nREPL approach?#2021-02-1418:40Takis_Hello is something changed to cursive and cant find java classes on a mixed lein project with
:source-paths      ["src/clojure"]
:java-source-paths ["src/java"]
if i compile with lein it works but i see them as unresolved symbols in Clojure code and as errors in Java code
#2021-02-1419:36aratareIs the project sdk set?#2021-02-1419:50Takis_yes#2021-02-1419:51Takis_i dont know if its me,but it was fine , i will create a new project with lein and try the code there also#2021-02-1419:56Takis_it worked in the new project , i dont know what is wrong i will see , thank you#2021-02-1420:28Takis_its the folder name,if i change the name of the folder it works anyway , its not cursive related#2021-02-1419:41FraHi, I'm using Cursive in Intellij and I have some unresolved symbols coming regarding other dependencies. It's a bit annoying because I would like to jump into the libraries' code for example. What am I missing with Cursive settings? Thanks#2021-02-1419:43Jeff EvansAre those symbols themselves defined via macros? You might need to do some of this setup. https://cursive-ide.com/userguide/macros.html#2021-02-1507:04armedHi, is there any way to bind REPL to Idea workspace on branch switching? I work on master and dev branches and each have separate launched local/remote REPLs. Sometimes I forget to focus on specific REPL tab and send code from e.g. master to dev and vice versa.#2021-02-1507:17seriogaI would make two separate working copies / idea projects to work with branches without switching :-)#2021-02-1508:10armedMaybe I should try that workflow thanks for suggestion. Anyway Idea already has workspaces and linking workspace to REPL seems reasonable feature for Cursive.#2021-02-1523:21cflemingIf I understand correctly, you’d like the active REPL to be recorded as part of the workspace, is that correct? So that when a workspace is restored, which REPL is active might get changed?#2021-02-1613:59armedHi, @U0567Q30W, yes that what I was thinking. Thanks for great plugin, by the way. #2021-02-1517:20Jeff EvansIs there a way to make auto-formatting only touch lines I’m actively editing? Editing the bottom of a file still results in some stuff near the top (untouched) being reformatted. I presume it’s tied in with structural editing, since if I turn that off, then this behavior stops.#2021-02-1517:31katoxI don't think it is related to structural editing. Java code behaves the same. You can select the block explicitly though. Then it won't touch anything else.#2021-02-1517:32Jeff EvansTo be clear, I’m not referring to an active Edit/Reformat operation or anything like that.#2021-02-1517:33Jeff EvansIt’s an active editor window aggressively doing it even with no typing. Ex: I use the Git commit window to try to roll back the superfluous change (with the “revert” arrow), and the editor immediately undoes that again.#2021-02-1517:33Jeff EvansUnless I disable structural editing, in which case that reversion sticks.#2021-02-1517:33dpsutton> There’s a better way: we can use ⌥⇧⌘L or Ctrl+Alt+Shift+L, to bring up the reformatting options. We can say we only want to format the lines of the file that have been changed, and leave everything else alone. Now when the file is formatted, it only changes the lines that we’ve touched and nothing else#2021-02-1517:34dpsuttonhttps://blog.jetbrains.com/idea/2020/06/code-formatting/#2021-02-1518:21Jeff Evansyeah, I was positive I had that option enabled. but in any case, trying it now shows that only “Whole file” is enabled. the others can’t be selected, weirdly#2021-02-1518:21dpsuttonare you using parinfer or paredit?#2021-02-1518:21Jeff EvansI guess they become active if there is VCS changed text, which makes sense#2021-02-1518:22Jeff Evansbut that just underscores that whatever is happening, happens even to unchanged lines 🤷:skin-tone-2:#2021-02-1518:22Jeff Evansparinfer at the moment#2021-02-1518:22dpsuttoni think that might be the cause of it. it uses indentation semantically which is terrible. and the only way for it to work is to make sure everything is "right"#2021-02-1518:22Jeff Evansit’s actually initialize! in driver.clj that it keeps happening to 😉#2021-02-1518:22dpsuttonif you switch to paredit i suspect you might have more luck?#2021-02-1518:22dpsuttonha#2021-02-1518:23Jeff EvansI may try that. I’m still noodling between the two to figure out which one gels more#2021-02-1523:18cfleming~Paredit~ (edit: I mean parinfer, ugh) is very nice, but it does require the whole file to be formatted at the moment. It should be possible to only require it per top-level-form, but I haven’t done that yet.#2021-02-1523:20cflemingOne thing to note is that parinfer will only modify the file once, once the indentation is consistent it then will only touch changed portions, as you’d expect. But that does require that all your code be formatted according to its (reasonable, IMO) requirements, which might not be feasible in teams where teammates are not using it.#2021-02-1523:45dpsuttonmy use of the word terrible there was way harsh and out of line. the consistent formatting is a drawback but only if your codebase has a few drawbacks of its own. I didn't mean to come off like that and I apologize.#2021-02-1523:59cflemingNo worries! Formatting is something that raises strong opinions 🙂. Which is one reason that when I write the One Language To Rule Them All, it will have a gofmt-like thing from day one, and will probably refuse to compile if not formatted correctly 🙂#2021-02-1616:38heliosis there a way to stop these warnings?#2021-02-1618:03genekimHow do people safely move functions from one namespace to another? I notice that I’m making a big mess of my code right now, delaying moving functions that really should live somewhere else. Some of these functions don’t have tests (or have tests for any of their callers), so I fear (maybe irrationally) that I’m not getting some sort of feedback that I’ve broken something, due to missing changing a caller. How do you all safely do these operations? (I feel like even if I had, say, kaocha watch running all the time like I love doing, it’d still miss some of these types of errors — in other words, it wouldn’t catch it at compile time. Is that incorrect?) If these errors can’t be typically caught at compilation time during test runs, would something like clj-kondo catch these errors? (I’ve been meaning to try clj-kondo for a year, but this use case would push it to the very top of my list!) THANK YOU!#2021-02-1618:27borkdudeYes, clj-kondo will probably catch this#2021-02-1618:28borkdude@U6VPZS1EK#2021-02-1618:29genekimThat’s so fantastic, @U04V15CAJ! Excited to try this out — and congrats and kudos on all the amazing tools you’re creating! 🎉🎉🎉#2021-02-1618:30borkdudeNote that clj-kondo might also have false positives regarding unresolved-vars if you define them using custom macros, but you can usually solve this using a config. Hop by in #clj-kondo if you need help with this. See https://github.com/clj-kondo/clj-kondo/blob/master/doc/editor-integration.md how to set it up with IntelliJ, but you can also just run it from the command line.#2021-02-1618:34borkdudeIf you choose to set up an editor with clojure-lsp (e.g. Calva) then you will also get clj-kondo for free and navigation / renaming, etc also works#2021-02-1618:40genekimThat’s freaking amazing. Thank you — I’ll be surely posting my experiences in #clj-kondo soon!#2021-02-1621:15cfleming@U6VPZS1EK I usually do this by doing a Find Usages on the function I’m going to move and pinning the results in the Find toolwindow. Then I move the function and fix the usages by stepping through the find results. Cursive will also mark usages which no longer resolve as @U07S8JGF7 pointed out. I’m planning to have a single refactoring option for this but there’s an intermediate step which needs to happen first.#2021-02-1622:17genekimOh, that’s so freaking smart, @U0567Q30W — I will be sure to use that technique immediately as well. Thank you!!! So helpful!!!#2021-02-1622:22cflemingI actually use this technique a lot for other sorts of refactorings too - if I add or remove a parameter from a function, for example. Often I’ll find something else that needs fixing and I’ll do another find usages and open it in a new tab in the Find toolwindow, so I build up a list of to-do lists and then just work through them all.#2021-02-1622:27borkdudeI'm glad we're getting this in emacs now too with clojure-lsp. Finally catching up with Cursive I guess :)#2021-02-1622:48potetmYeah, I actually had to use that refactoring method the other day.#2021-02-1622:48potetmGoes pretty fast if you learn the key bindings 🙂#2021-02-1622:52genekimOkay, I’m definitely biting on that one, @U07S8JGF7 — which bindings/commands are you referring to? Seems incredibly high potential!#2021-02-1622:52potetm“Next/Previous Occurrence”#2021-02-1700:06genekimFlipping awesome!#2021-02-1708:46heliosI second exactly what @U0567Q30W said. Copy over the function and change the usages of the old one (pinning find usages to bottom pane), one by one, and then just delete the old.#2021-02-1618:12potetmSo, first off, the compiler will tell you if a symbol cannot be resolved. So just compiling all namespaces will tell you if a var is missing.#2021-02-1618:13potetmCursive also highlights it like so#2021-02-1618:14potetmBut to the broader question: I usually keep everything in a single, massive namespace to start.#2021-02-1618:15potetmOnce things solidify and the file becomes burdensome to navigate, then you can start migrating out chunks. At that point, it will be much more clear what goes where.#2021-02-1618:15potetmPro tip: Section headers in comments go a long way toward making navigation easier.#2021-02-1618:16potetme.g.
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Metrics                                                                    ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
#2021-02-1718:09mishaPSA: if you have unbalanced " in you comments – parinfer will stop working for entire(?) file, e.g.:
{:foo :bar} ;; "baz
#2021-02-1719:00cflemingYes, this is a known issue with the parinfer algorithm#2021-02-1806:55mishaI knew about it too, but forgot, and wasted a bunch of time. Hoped this reminder might spare somebody some frustration #2021-02-1908:04Caseyhey there 👋 I'm working with fulcro and pathom using the fulcro-template. Out of the box fulcro's defsc seems recognized as a "def-like" macro. Guardrails' >defn wasn't but using the 💡 popup I could tell Cursive to resolve it as a defn. However, with pathom's defresolver macro in the same file, the 💡 menu only gives me spell checking options. Is there a way to resolve that macro as a defn too?#2021-02-1908:06Casey... and all of a sudden the resolve as option appears. Huh, maybe intellij wasn't done indexing? In any case, its working now, nevermind. Sorry for the noise.#2021-02-1908:11CaseyBeen awhile since I used intellij+cursive, gotta remember to give it time to index 🙂#2021-02-1908:13CaseyOh, man, and I remember my biggest beef with ideavim+cursive: paredit doesn't work when using vim commands.#2021-02-1909:17Zak SinghIs there any way to deal with these unresolved symbols inside of this defspec macro? I’ve added a symbol resolution to resolve defspec to deftest, and one for prop/for-all to let, but I still get the red squiggly errors#2021-02-1913:00dazldIs View expansion broken for projects using shadow-cljs? I get the following error expanding (identical? {} {})
------ REPL Error while processing ---------------------------------------------
(cljs.core/load-file "/Users/danpeddle/Library/Application Support/JetBrains/IntelliJIdea2020.3/plugins/clojure-plugin/lib/runtime.jar!/cursive/riddley/compiler.clj")
can only load .cljs and .cljc files
{:file-path "/Users/danpeddle/Library/Application Support/JetBrains/IntelliJIdea2020.3/plugins/clojure-plugin/lib/runtime.jar!/cursive/riddley/compiler.clj"}
ExceptionInfo: can only load .cljs and .cljc files
	shadow.cljs.repl/repl-load-file* (repl.clj:290)
	shadow.cljs.repl/repl-load-file* (repl.clj:282)
	shadow.cljs.repl/repl-load-file (repl.clj:330)
	shadow.cljs.repl/repl-load-file (repl.clj:328)
	shadow.cljs.repl/process-read-result (repl.clj:517)
	shadow.cljs.repl/process-read-result (repl.clj:497)
	shadow.cljs.repl/process-input (repl.clj:681)
	shadow.cljs.repl/process-input (repl.clj:659)
	shadow.cljs.devtools.server.worker.impl/eval17164/fn--17167 (impl.clj:754)
	clojure.lang.MultiFn.invoke (MultiFn.java:234)
	shadow.cljs.devtools.server.util/server-thread/fn--16793/fn--16794/fn--16802 (util.clj:284)
	shadow.cljs.devtools.server.util/server-thread/fn--16793/fn--16794 (util.clj:283)
	shadow.cljs.devtools.server.util/server-thread/fn--16793 (util.clj:256)
	java.lang.Thread.run (Thread.java:832)

Error initialising macroexpansion
#2021-02-1913:07thhellerlooks like you are trying to load a .clj file? hmm or rather that cursive is trying to?#2021-02-1919:46favilaI’ve had this problem for a while now (months?) where I can’t interact with the dialog that shows macroexpansion.#2021-02-1919:47favilaHas anyone else experienced this?#2021-02-1920:07cflemingI haven’t had any reports, but I also don’t use that view much and it’s hard to make automated tests for, so it may be broken.#2021-02-1920:08cflemingI’ll take a look and see if it works for me.#2021-02-1920:43kennyYes. I’ve had this too. #2021-02-2023:10cflemingI’ve just tried this, and I’m seeing the following exception thrown:
java.lang.StackOverflowError
	at com.intellij.serviceContainer.ComponentManagerImpl.getService(ComponentManagerImpl.kt:471)
	at com.intellij.codeWithMe.ClientIdService$Companion.tryGetInstance(ClientIdService.kt:13)
	at com.intellij.codeWithMe.ClientId$Companion.getCurrentOrNull(ClientId.kt:77)
	at com.intellij.codeWithMe.ClientId$Companion.isCurrentlyUnderLocalId(ClientId.kt:60)
	at com.jetbrains.rdserver.ui.popup.bePopups.impl.BackendBePopupFactory.getChildPopups(BackendBePopupFactory.kt:137)
	at com.intellij.openapi.ui.popup.JBPopupFactory.getChildFocusedPopup(JBPopupFactory.java:208)
	at com.jetbrains.rdserver.ui.popup.bePopups.impl.BackendBePopupFactory.getChildFocusedPopup(BackendBePopupFactory.kt:156)
	at com.intellij.openapi.ui.popup.JBPopupFactory.getChildFocusedPopup(JBPopupFactory.java:212)
#2021-02-2023:11cflemingIs that what you are both seeing as well? This must be fairly new since it seems to be a problem with Code With Me, probably trying to share the macroexpand results with other clients.#2021-02-2023:14kennyI’m on my Mac laptop right now and just tried. The popup won’t even appear now. I’m getting a different exception.#2021-02-2023:14kenny#2021-02-2023:16cflemingCould you try to expand this form and see if it does the same thing?
(defn x [a]
  (+ 1 a))
#2021-02-2023:17cflemingJust to have something simple as a baseline.#2021-02-2023:17kennyThat one opens the window. The window isn’t intractable. Same error in the logs.#2021-02-2023:17cflemingThe NPE?#2021-02-2023:17kennyNo, yours.#2021-02-2023:18kennyTo get mine, I tried macroexpanding my-macro in a comment form:
(defmacro my-macro
  [x]
  `(int? ~x))

(comment (my-macro 1))
#2021-02-2023:18cflemingOk, thanks. I’m going to have to ask JetBrains about that. Your NPE looks like a bug in the expander code itself. Are you able to share what you were trying to expand?#2021-02-2023:18cflemingGreat, thanks, let me try that.#2021-02-2023:21cflemingDo you think it would be ok to open the macroexpander in a toolwindow, perhaps in a tab in the REPL one? I think for Code With Me, they’re planning to automatically sync toolwindows so that might make it easier.#2021-02-2023:23kennyIs that like how the test diff opens in a window?#2021-02-2023:23cflemingNo, it would open in a tab in the REPL toolwindow, like multiple REPL sessions do now.#2021-02-2023:24kennyOh. That seems wrong haha.#2021-02-2023:24kennyI probably want my active repl session in view while I have the macroexpand.#2021-02-2023:25cflemingYeah, that was what I was thinking. The popups are really a pain though, and not very flexible from a user point of view. Perhaps in a new editor, like the other code editors?#2021-02-2023:26kennyWhat’s a new editor?#2021-02-2023:26cflemingI’d have to try that and see how it would work. A few people have requested that the REPL itself be shown in an editor tab rather than a toolwindow.#2021-02-2023:27cflemingLike a standard code editor, that would be open in a tab.#2021-02-2023:27cflemingIntelliJ does that for some diffs now, rather than opening them in a new window, although I haven’t managed to figure out when it actually does that.#2021-02-2023:28kennyOh, yeah a new editor seems fine. The knobs for configuring the macroexpand go at the top? Kinda like markdown support?#2021-02-2023:28cflemingRight, exactly.#2021-02-2023:29cflemingSo then you could switch to them using “Recent files” and the like too.#2021-02-2023:29kennyI always work with my repl opened in “Window” View Mode on a separate monitor. Switching to a regular editor tab does seem more general.#2021-02-2023:30cflemingRight, doing that you could have two repls side by side. My one issue with it is it then becomes more confusing which one is “active” when you send forms to it.#2021-02-2023:31kennyYeah, you’d definitely need some way of marking a repl as active.#2021-02-2023:31cflemingI reproduced your issue BTW: https://github.com/cursive-ide/cursive/issues/2510#2021-02-2023:32kennyThe one thing that could be problematic with a new editor for macroexpand is usually you’d want the pre-expanded code in context. If macroexpanding opens you into a new tab, you lose that.#2021-02-2023:33cflemingYeah, that’s true. I wonder if I could actually do the macroexpansion inline inside the editor with the new inlay stuff - that might be the best option if I can make that work in a non-confusing way.#2021-02-2023:34kennyOh, interesting. Where would the macroexpand knobs go?#2021-02-2023:35cflemingInline in the editor itself. IntelliJ uses that itself these days for code review comments in the diff views - you get Swing controls embedded in the editor itself.#2021-02-2023:35cflemingI’ll give that a try, since I’m working on some inlay stuff right now anyway.#2021-02-2023:35cflemingIf I have something to try I’ll let you know so you can try it out.#2021-02-2023:37kennyCool. People have been asking for inline for as long as I’ve been using Cursive haha. Seems like a good poc.#2021-02-2023:37kennyCurious what it looks like. Is there a public screenshot somewhere of the code review inline thing?#2021-02-2023:37cflemingYeah, IntelliJ finally has the infrastructure for it. I’m dying to get the test diffs inline too.#2021-02-2023:38kennyhttps://www.jetbrains.com/help/upsource/discussion-comments.html#posting-comments?#2021-02-2023:39cflemingI don’t think that’s it because Upsource is an online tool.#2021-02-2023:39cflemingI can’t find one, though.#2021-02-2023:40kennyOh haha. I thought it’s style didn’t quite match.#2021-02-2023:42kennyAnyway, happy to try it out. Inline seems like a powerful new UI concept. Curious how it’ll work with large data structures.#2021-02-2023:44cflemingI’ll let you know when I have something.#2021-02-2000:15jasmithI am trying to get a clojurescript environment set up on a macos machine. Cursive seems not to be working with the latest IDEA: every Clojure keyword in a source file shows up as cannot be resolved . I was able to get a remote Cursive REPL to work with shadow-cljs. The REPL works fine, just the editing is off. Any suggestions? Thanks!#2021-02-2001:58cflemingTry this: https://cursive-ide.com/userguide/eap/troubleshooting.html#help-lots-of-symbols-don-t-resolve#2021-02-2021:06jasmithI will take a look. Thanks!#2021-02-2021:36jasmithGreat! That helped fix the issue.#2021-02-2016:56FraHi, apologies for the stupid question but I’m new to Cursive and Clojure. I have found the shortcut to load the top-level form in the REPL from the Cursive cheat sheet, but I can’t find anything to load any inner form on its own, or to load only the form the cursor is in. Is this because the inner form depends from the environment of the top-level one? Thanks#2021-02-2017:24Kari MarttilaNope. You can send any form to REPL.#2021-02-2017:25Kari MarttilaIn IntelliJ -> Settings -> Keymap -> Send Form Before Caret to REPL.#2021-02-2017:36Kari MarttilaEvery clojurian has a hot key for that functionality.#2021-02-2017:49FraI can imagine, thanks very much @U76D9RZRR#2021-02-2017:49FraI’m trying to get things right with my configuration#2021-02-2017:51FraI don’t know why the Wrap with ( shortcut stopped working on my Mac, it must have been an update because it used to work.#2021-02-2017:51Kari MarttilaNo problem. 🙂 There are no "stupid questions". Just ask here or in #beginners channel if you have any questions - people here at Clojurians slack are very helpful and friendly.#2021-02-2017:52Kari MarttilaI don't quite get what you are meaning by Wrap with ( ...#2021-02-2017:53Kari MarttilaI guess you are using paredit or parinfer. I guess parinfer is easier for a newcomer. • http://danmidwood.com/content/2014/11/21/animated-paredit.htmlhttps://shaunlebron.github.io/parinfer/ #2021-02-2017:54Kari Marttila... if you are not using paredit or parinfer you definitely should start using either of them.#2021-02-2017:55Kari MarttilaIf you are using IntelliJ IDEA / Cursive, see the window lower right corner -> Structural style.#2021-02-2017:56Frayep sorry, I meant the shortcut for Intellij that comes with Structural editing#2021-02-2017:57Kari MarttilaAh, I get it now. 🙂 There really is a command Wrap with ()#2021-02-2017:57Kari Marttila... never used it myself.#2021-02-2017:57Frayep, command+shift+9 used to work wrapping the for with additional parens, but at some point is stopped working. Usually, this happens when there’s a conflict with another macbook shortcut.#2021-02-2017:57Frathanks for the links to paredit and parinfer 👍#2021-02-2017:59Kari MarttilaThanks for introducing me this new functionality Wrap with - I need to assign it some nice hotkey. 🙂#2021-02-2017:59Kari MarttilaExperimenting with it... so it wraps the next form with parens the cursor is...
#2021-02-2018:01Kari Marttila... do I need it? Not sure. I usually just add () and then slurp forward... (using paredit)#2021-02-2018:04Kari MarttilaWhen you want to have a coffee break you might enjoy reading "Metosin's Favorite Editors" - relates a bit to what you are doing right now. 🙂 https://www.metosin.fi/blog/metosin-favorite-editors/#2021-02-2018:16Frathanks! 🙂#2021-02-2020:39cfleming@UF8BN5KJS Try rebinding that action. A few people have mentioned that in recent IntelliJ versions the keybinding actually needs to be Cmd-Shift-( rather than Cmd-Shift-9. I didn’t experience that myself, so I’d be interested to know if that fixes it for you.#2021-02-2022:09Fra@U0567Q30W omg this has actually fixed it!#2021-02-2022:09Frathank you so much#2021-02-2022:09Frawhat’s the best way to document this misbehaviour?#2021-02-2022:27cflemingSo, I’m not sure. I think what I probably need to do is to change how the actions are bound in the plugin, but I need to check that. I’ll ask in the JetBrains forum.#2021-02-2022:32cfleming@UF8BN5KJS Which OS are you on? I just double checked, and my action is bound to Cmd-Shift-9. Since you’re talking about command, are you on macos?#2021-02-2109:51Fra@U0567Q30W yes Catalina 10.15.7#2021-02-2109:51Fra(apologies for the late reply)#2021-02-2017:27Kari MarttilaIn certain repos I get a long listing of @#Cursive#TestSupport#@ ... when Run Testst in Current NS in REPL . Is there some configuration causing this? (IntelliJ Ultimate 2020.3.2 & Cursive 1.10.1-eap2-2020.3)#2021-02-2017:38Kari MarttilaAah, I think I found it in Google. This is a cljc file and I found some old reply in the clojurians slack google cache:
Unfortunately, the Cursive test integration currently only works with Clojure, not CLJS.
#2021-02-2020:40cflemingI think that should work with the CLJC tests run from Clojure, but not from CLJS, right. Another thing that can cause that is if you’re using a test runner which runs tests in background threads.#2021-02-2020:11mike_ananevGot some problems in Idea 2020.3 & Cursive (stable or EAP) and latest clojure/tools//cdn-cgi/l/email-protection2.790 Symptoms: can't see any modules in Clojure Deps tab in Idea. Also can't start remote repl. Downgrading to clojure/tools//cdn-cgi/l/email-protection solves the problem.#2021-02-2020:41cflemingI’ll take a look at that, thanks.#2021-02-2021:13Alex Miller (Clojure team)It is possible that the cache file format change is not properly picked up in the cursive scenario - rm ing your .cpcache dir would help if that’s the case, but just guessing#2021-02-2021:13Alex Miller (Clojure team)Would only matter if using main or JVM opts#2021-02-2021:14cflemingI don’t directly use the cpcache, I just hit the t.d.a API.#2021-02-2021:14Alex Miller (Clojure team)Well, not that then#2021-02-2021:15Alex Miller (Clojure team)Unless you’re calling the scripts nses #2021-02-2021:16Alex Miller (Clojure team)High level change log is at https://clojure.org/releases/tools#v1.10.2.790#2021-02-2021:17Alex Miller (Clojure team)The first 3 items there are mostly in the bash stuff and the last one is just printing warnings, so not sure what it would be#2021-02-2021:48cflemingOk, I’ll take a look next week, if I figure it out I’ll let you know.#2021-02-2203:51cflemingI’ve reproduced this, it’s definitely something that has changed in the latest t.d.a, I’ll investigate it tomorrow and hopefully get a fix out: https://github.com/cursive-ide/cursive/issues/2511#2021-02-2203:52cflemingSelecting an earlier version, either on the command line or explicitly in Cursive using the “Use tools.deps directly” option should be a workaround.#2021-02-2205:01Alex Miller (Clojure team)Well please let me know what it was as I'm surprised behavior has changed#2021-02-2111:43thhellerAny ideas what could cause a keyboard shortcut to stop working? I have paredit "Kill" bound to ctrl+k but for some reason is stopped working with the idea+cursive update I made recently. I checked the keybindings and it is there with no conflict. I can bind it to another key and that works but ctrl+k does not. any hints on where to look?#2021-02-2111:47thhellerrestarting and quitting all other apps doesn't fix it either#2021-02-2113:34thhellertracked it down to ideavim I guess. at least it works when that is disabled.#2021-02-2113:36thhellerah. guess ideavim keybinds are configured elsewhere and don't show up in the normal place. fixed now, sorry for the noise.#2021-02-2115:17emilaasa:actionlist can be useful for seeing ideavim bindings#2021-02-2117:30potetm@thheller FWIW I had that exact problem when I upgraded as well.#2021-02-2117:31potetmSuper confusing. The “disable vim” button at the bottom of the window was super helpful in figuring it out.#2021-02-2211:42Jakub Holý (HolyJak)Hi folks! How do you prevent mixing up clj and clojurescript repls and sending code (especially from .cljc files) to the wrong ones, any tips? @cfleming would it be perhaps possible to have different color backgrounds for clj x cljs repl? I know the name of the repl is written above it but I needed it rarely and thus normally just ignore it so it is impossible to spot that I am in the "wrong" repl.#2021-02-2212:10Kari MarttilaI have a Dygma Raise macro for switching repl, i.e. one hotkey in my Dygma Raise keyboard.#2021-02-2216:26Jakub Holý (HolyJak)Thank you! Though my problem is not switching but noticing which repl I am in#2021-02-2219:26Kari MarttilaAah, ok. I use names like "backend" and "frontend" for different repls, but still occasionally send e.g. Clojure code to frontend (Clojurescript) repl. I have the macro hotkey to quickly switch to the right repl.#2021-02-2217:17R.A. PorterWell. I’m completely borked this morning and can’t figure out why, or how to fix it. All my Clojure projects are blowing up and losing their deps files. I had enabled Kondo earlier so suspect that has something to do with it, but I’ve disabled and I’m still crapping out with this exception: #2021-02-2217:17R.A. Porter
Error resolving /Users/rporter/projects/ridehealth/services/ridehealth.fltmatch/deps.edn: 

java.lang.NullPointerException
	at cursive.deps.relocate$with_deps_relocation.invokeStatic(relocate.clj:35)
	at cursive.deps.relocate$with_deps_relocation.invoke(relocate.clj:31)
	at cursive.deps.relocate$with_relocation.invokeStatic(relocate.clj:57)
	at cursive.deps.relocate$with_relocation.invoke(relocate.clj:43)
	at cursive.deps.project$project_details$fn__1234.invoke(project.clj:153)
	at clojure.core.protocols$fn__8183.invokeStatic(protocols.clj:168)
	at clojure.core.protocols$fn__8183.invoke(protocols.clj:124)
	at clojure.core.protocols$fn__8138$G__8133__8147.invoke(protocols.clj:19)
	at clojure.core.protocols$seq_reduce.invokeStatic(protocols.clj:31)
	at clojure.core.protocols$fn__8170.invokeStatic(protocols.clj:75)
	at clojure.core.protocols$fn__8170.invoke(protocols.clj:75)
	at clojure.core.protocols$fn__8112$G__8107__8125.invoke(protocols.clj:13)
	at clojure.core$reduce.invokeStatic(core.clj:6833)
	at clojure.core$reduce.invoke(core.clj:6815)
	at cursive.deps.project$project_details.invokeStatic(project.clj:129)
	at cursive.deps.project$project_details.invoke(project.clj:76)
	at clojure.lang.Var.invoke(Var.java:388)
	at org.projectodd.shimdandy.impl.ClojureRuntimeShimImpl.invoke(ClojureRuntimeShimImpl.java:124)
	at org.projectodd.shimdandy.impl.ClojureRuntimeShimImpl.invoke(ClojureRuntimeShimImpl.java:117)
	at cursive.shim.ShimBootstrap$Shim.apply(ShimBootstrap.java:53)
	at cursive.deps.DepsProjectDetails$doGetDetails$details$1.invoke(Project.kt:162)
	at cursive.deps.DepsProjectDetails$doGetDetails$details$1.invoke(Project.kt:84)
	at cursive.shim.ShimProvider.withShim(Shim.kt:110)
	at cursive.deps.DepsProjectDetails.doGetDetails(Project.kt:161)
	at cursive.deps.DepsProjectDetails.doGetDetails(Project.kt:84)
	at cursive.build.BuildSystemProjectDetails.getProjectDetails(BuildSystem.kt:42)
	at cursive.build.BuildSystemProjectsManager$reimportAllProjects$$inlined$synchronized$lambda$1.run(BuildSystemManager.kt:148)
	at cursive.build.BuildSystemUtil$runTask$1$1.run(BuildSystemUtil.kt:93)
	at com.intellij.openapi.progress.impl.CoreProgressManager$TaskRunnable.run(CoreProgressManager.java:962)
	at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcessWithProgressAsync$5(CoreProgressManager.java:472)
	at com.intellij.openapi.progress.impl.ProgressRunner.lambda$submit$3(ProgressRunner.java:235)
	at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$2(CoreProgressManager.java:178)
	at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:658)
	at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:610)
	at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:65)
	at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:165)
	at com.intellij.openapi.progress.impl.ProgressRunner.lambda$submit$4(ProgressRunner.java:235)
	at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1700)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
	at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:668)
	at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:665)
	at java.base/java.security.AccessController.doPrivileged(Native Method)
	at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1.run(Executors.java:665)
	at java.base/java.lang.Thread.run(Thread.java:834)
#2021-02-2217:18borkdudeI'm not sure what clj-kondo would have to do with this, since it doesn't do anything with deps.edn#2021-02-2217:19R.A. PorterI don’t think it did. It was just the only change I had made.#2021-02-2217:19borkdudeMaybe it's something in your deps.edn causing this?#2021-02-2217:20R.A. PorterI’ve tried other projects that haven’t been touched recently and get the same error.#2021-02-2217:21Jordan RobinsonI used to find if everything suddenly stopped working it was because snap updated my intellij (I have since stopped using snap)#2021-02-2217:21R.A. PorterI’m still on 2020.3.2.#2021-02-2217:24Jordan Robinsonah sorry, it was a long shot anyway#2021-02-2217:22R.A. PorterI’ve been an IJ user for 20 years and a Cursive user for about two. But right now, I’m super close to throwing it in the trash and re-learning emacs.#2021-02-2217:24R.A. PorterAh. Wait…I may have made one other update external to IJ.#2021-02-2217:25R.A. Porterbrew upgraded clj. >_<#2021-02-2219:47alex-ebertsHi @coyotesqrl - you’ve probably already figured this out but there appears to be a problem with Cursive and clojure 1.10.2.790 : https://github.com/cursive-ide/cursive/issues/2511#2021-02-2219:48R.A. PorterYep. Once I realized Clojure had updated, I remembered seeing that post the other day. Thanks!#2021-02-2223:50mikejcusackI just came to check to see if this had been reported. Was wondering what was going on. I resolved it temporarily by downgrading to previous version until the fix is released. 😃#2021-02-2219:48alex-ebertsI ran into this myself yesterday evening but solved the problem by downgrading clojure with clojure homebrew tap: https://clojure.org/news/2020/02/28/clojure-tap#2021-02-2220:37cflemingYes, sorry about that issue, I reproduced it yesterday and hopefully will be releasing a fix today.#2021-02-2220:53Alex Miller (Clojure team)is it something I broke?#2021-02-2221:03cflemingIt’s the same deps issue I mentioned yesterday in the other thread.#2021-02-2221:09Alex Miller (Clojure team)I know, just wondering what it was#2021-02-2223:25cflemingLooks like as-canonical was deleted in favour of canonicalize#2021-02-2300:28Alex Miller (Clojure team)Ahhh. They were actually duplicates and I did some cleanup. I did do some looking to see if anyone would be affected but can’t see yours of course. Sorry about that...#2021-02-2300:56cflemingNo worries. I’m checking to see if I can run some sanity check tests when you check something in to deps, but it’s looking tricky.#2021-02-2300:57cflemingI’m not even sure why I was using as-canonical since I used canonicalize in a different spot to check for the functionality being present.#2021-02-2304:55Alex Miller (Clojure team)these releases are typically available for at least a few days as prereleases before I officially release - I usually announce those on #tools-deps and #releases#2021-02-2304:55Alex Miller (Clojure team)tracking that would probably at least give you a heads up#2021-02-2304:56Alex Miller (Clojure team)you could programmatically track it by watching https://github.com/clojure/homebrew-tools/tree/master/Formula or https://github.com/clojure/brew-install/blob/1.10.2/devel.properties#2021-02-2307:51cflemingOk, thanks - I’m trying to figure this out at the moment. So everything that’s under releases at Github is an official release, correct?#2021-02-2308:03cflemingThanks, I’ll try tracking Formula using the atom feed and see how that works out.#2021-02-2313:13Alex Miller (Clojure team)I'm going to add back in that as-canonical method (undoc'ed) to cut down on version mismatch failures#2021-02-2221:44kennyWhat was the last working version of Clojure CLI + Cursive? 1.10.2.786?#2021-02-2221:48Alex Miller (Clojure team)the prior stable release was 1.10.2.774#2021-02-2221:49Alex Miller (Clojure team)so if you're going to pick one, I'd pick that one https://clojure.org/releases/tools#2021-02-2301:07cfleminghttps://twitter.com/CursiveIDE/status/1364018625728847874 (@coyotesqrl, @kenny, @alex-eberts and others)#2021-02-2303:32kennyProblem fixed for me. Thanks for the quick update!#2021-02-2314:22Alex Miller (Clojure team)Additionally, the latest version of Clojure CLI 1.10.2.796 also fixes the issues so upgrading either should address this - this one was on me, apologies#2021-02-2314:34borkdudeAnd probably brew, automatically upgrading things when you don't ask for it ;)#2021-02-2320:46Daniel WellmanHave there been any changes about how to work with lein v projects recently? I have a project I’ve been working with for several weeks and just in the last few days I’ve done something that prevents me from starting a new REPL in Cursive, though I can connect to a remote one fine. I get an error like this: ERROR - intellij.openapi.progress.Task - resources/version.edn (No such file or directory) .FileNotFoundException: resources/version.edn (No such file or directory)`. I have an existing workaround in prep-tasks in the format described here: https://github.com/roomkey/lein-v/issues/26#2021-02-2321:03cfleming@U01LG1KAC65 I don’t think anything has changed in any of that code for ages. I’ll see if I can reproduce this and fix it properly.#2021-02-2322:20Daniel WellmanThank you — it may be my workaround which is no longer necessary — I had this, per that GitHub issue for lein-v:
:prep-tasks [~(when (System/getenv "PWD") ["v" "cache" "resources" "edn"])]
I will look and see if this is no longer necessary in my setup. The other thing I had to do was documented in here (for opening the project the first time), which I believe is unrelated to the current issue I’m seeing. https://github.com/cursive-ide/cursive/issues/1999
#2021-02-2323:12cflemingI’ll take a look at that one too, thanks.#2021-02-2323:52Daniel WellmanThanks - I tried the pre-tasks without the check and still yields an error, so I think it’s behaving similarly to the lein-v issue posted at the start of this thread.
:prep-tasks [["v" "cache" "resources" "edn"]]
#2021-02-2404:50cfleming@U01LG1KAC65 Ok, I’ve fixed both #1999 and also lein-v/#26, so they (and other cases) should hopefully work without workarounds now. I’m not sure which release that will make it into since it’s a change to a fairly sensitive part of the lein integration. I’ll probably release 1.10.1 and then get this into the first release of the 1.10.2 EAP.#2021-02-2413:57Daniel WellmanThank you so much! Please let me know if I can assist in any way. I appreciate your quick help here - I’m relatively new to Clojure, so this change will remove one little hurdle as I get acclimated. It’s a big help for me.#2021-02-2416:11favilaI have a large monorepo full of deps edn modules and unfortunately some of them have the same directory name (not full path, just name). This causes cursive/intellij to error silently. Is there any way around this short of renaming the dirs? manually renaming the module in project structure doesn’t seem to stick.#2021-02-2417:49favilaI’m also having a problem where vars across :local/root deps.edn dependencies cannot be resolved, but their namespaces can (i.e. I can control-b the namespace and appear in the right one). Same monorepo project.#2021-02-2417:55favilaPossibly related: I have deps with no names. Here’s one of the deps.edn project which has a dependency on two other projects in the same monorepo (they’re sibling directories)#2021-02-2419:37cflemingI’ve never seen that, I’ll see if I can figure out how that might happen. What do the dependencies for those two look like in the deps.edn file?#2021-02-2419:46favilawith considerable trimming, it looks like this:
{:aliases
  {:backend-defaults
   {:default-deps
    {io.clubhouse.module/logging
     {:local/root "../logging", :deps/manifest :deps},
     io.clubhouse.module/dev-shared
     {:local/root "../dev-shared", :deps/manifest :deps}}},
   :test
   {:extra-paths
    ["test"],
    :extra-deps
    {io.clubhouse.module/dev-shared nil}}},
  :paths
  ["src" "resources"]
  :deps
  {io.clubhouse.module/logging nil}}
#2021-02-2419:46favilaMaybe the :backend-defaults alias is the problem and should be pulled up#2021-02-2419:46favilaI’ll try that#2021-02-2419:47favilathat alias is always active in the “aliases” panel of the clojure deps tool window#2021-02-2419:50favilawoops, my mistake, default-deps is only allowed in aliases#2021-02-2420:01favilayeah, that’s definitely it. If I inline the local/root coordinates those empty deps entries go away. This also fixes name resolution. Probably at project-setup time that alias is not enabled.#2021-02-2420:02favilaI.e. this works:
{:aliases
  {:backend-defaults
   {:default-deps {}},
   :test
   {:extra-paths
    ["test"],
    :extra-deps
    {io.clubhouse.module/dev-shared {:local/root "../dev-shared", :deps/manifest :deps}}}},
  :paths
  ["src" "resources"]
  :deps
  {io.clubhouse.module/logging 
     {:local/root "../logging", :deps/manifest :deps}}}
#2021-02-2420:27cflemingThanks, I’ll try to reproduce that with those examples.#2021-02-2420:31favilaThis also fixes the “namespace not in scope” problem when reloading in the repl#2021-02-2500:30cflemingSo the problem seems to be that when deps are pulled in through :default-deps, deps doesn’t normalise the paths to absolute paths. This using your first (broken) example:
~/d/c/f/main> clj -Stree -A:backend-defaults:test
org.clojure/clojure 1.10.2
  . org.clojure/spec.alpha 0.2.194
  . org.clojure/core.specs.alpha 0.2.56
io.clubhouse.module/logging ../logging
io.clubhouse.module/dev-shared ../dev-shared
#2021-02-2500:32cflemingUsing your second (working) example:
~/d/c/f/main> clj -Stree -A:backend-defaults:test
org.clojure/clojure 1.10.2
  . org.clojure/spec.alpha 0.2.194
  . org.clojure/core.specs.alpha 0.2.56
io.clubhouse.module/logging /Users/colin/dev/cursive-bugs/favila-deps-issue/logging
io.clubhouse.module/dev-shared /Users/colin/dev/cursive-bugs/favila-deps-issue/dev-shared
#2021-02-2500:34cflemingHere, the two libs come in via :extra-deps and top-level :deps, and they are both absolute. Either way, for robustness the Cursive fix is easy, I should just absolutise those even if deps doesn’t.#2021-02-2500:35cflemingcc: @U064X3EF3 in case this is of interest.#2021-02-2500:41favilaThis is ringing a bell. I think I had to write some sed to mess with the classpath dumped out of clj tools. I’ll have to look up the details, it might be the same issue#2021-02-2500:52cflemingYeah, I guess the classpath will only work when the Java process is invoked from the project directory.#2021-02-2503:59Alex Miller (Clojure team)I can look at that#2021-03-0103:18cfleminghttps://github.com/cursive-ide/cursive/issues/2517#2021-03-0107:17cfleming@U09R86PA4 I’ll try to get the fix for this out in an EAP tomorrow.#2021-03-0121:01favilaFWIW, :override-deps seems to have the same problem 🙂#2021-03-0121:54cflemingOk, I’ll fix that too 🙂#2021-03-0122:58cflemingActually, the same fix works since it just absolutises all the lib paths now.#2021-02-2419:33Alex Miller (Clojure team):local/root dependencies will not force a cache recompute when deps change - that has to be forced with -Sforce#2021-02-2419:33Alex Miller (Clojure team)not sure if that's what you're seeing, but a good thing to check#2021-02-2419:34cflemingI don’t think that caching is the issue here, since Cursive only uses t.d.a and the caching happens in the script (IIRC)#2021-02-2419:34Alex Miller (Clojure team)true#2021-02-2419:35cflemingI need a better way of handling duplicate names, too - I’m still not sure what to do about that.#2021-02-2622:16Jeff Evansthis isn’t Cursive specific, I don’t believe, but I figure people here might know… is it just me, or are all the in-scope vars null when walking up the stack in the IntelliJ debugger? they’re only populated in the bottom-most frame (i.e. directly on the breakpoint). I presume this is a side effect of how the Clojure runtime works, but just in case there’s any sort of optimization level that can be tweaked, that would make debugging a lot more pleasant.#2021-02-2622:33dpsuttoncheck out this article about locals clearing#2021-02-2622:33dpsuttonhttps://cursive-ide.com/userguide/repl.html#starting-a-debug-repl#2021-02-2622:39Jeff Evanswhoa, nice. that was easy! guess I just need to run this in the remote REPL just after attaching:
(alter-var-root #'clojure.core/*compiler-options* 
                update :disable-locals-clearing not)
#2021-02-2622:40Jeff Evanser, actually, that’s too late… hmm#2021-02-2622:46Jeff EvansI basically need to find some way to run that before everything else gets loaded, I think#2021-02-2623:02dpsuttonI thought you just restart the repl with that option set#2021-02-2623:03Jeff Evanswell, I’m using a remote REPL in this case#2021-02-2623:03dpsuttonOh I see. Running it in docker or something?#2021-02-2623:03Jeff Evansuh… running lein repl in Metabase 😆#2021-02-2623:04dpsuttonAh. Then just let cursive start it up. Not a remote connection then#2021-02-2623:05Jeff Evansthat works some of the time, but not all (ex: driver loading)#2021-02-2623:07dpsuttonThen I’m out of cursive knowledge at that point :)#2021-02-2623:08Jeff Evansyeah I think basically if you let Cursive launch it, then it must do this alter-var-root invocation for you#2021-02-2623:09Jeff EvansI suspect there is some way to do it that Clojure just reads, i.e. https://clojure.atlassian.net/browse/CLJ-860#2021-02-2623:19Alex Miller (Clojure team)https://clojure.org/reference/compilation#_locals_clearing#2021-02-2623:19Alex Miller (Clojure team)-Dclojure.compiler.disable-locals-clearing=true#2021-02-2700:19Jeff EvansThanks, Alex. Exactly what I was hoping for. Will give it a shot on Monday.#2021-02-2802:35Jeff Evansactually, had a chance to try it out tonight, and yeah. this is going to be a game changer. have a nice rest of the weekend!#2021-02-2716:09ikitommiis there a way to get remove maven repos indexed once for all projects? for some reason (cursive update?), the repos need to be reindexed a lot.#2021-02-2716:10ikitommi
Unindexed remote maven repositories found.
			The following repositories used in your projects have not been indexed yet: 
			
			
            ...
#2021-02-2720:58cflemingI’m actually not sure about this - the repo indexing is an IntelliJ thing. I’ll see if I can figure this out. It’s hard for me to tell if this is happening more than usual because I reset my IDE instances a lot.#2021-02-2802:23Jeff EvansYeah, I get that very frequently, too. Even if I do the Update operation on all of them.#2021-03-0119:10markaddlemanfwiw, IntelliJ informs me of unindexed repositories every time it starts. I tried invalidating caches and restarting but that does not seem to improve the situation.#2021-03-0107:16cfleminghttps://twitter.com/CursiveIDE/status/1366285811398836225#2021-03-0113:20reefersleepCursive’s “navigate to definition” for e.g. spec keywords or re-frame keywords is wonderful, and I use it all the time. In my work project, we previously had a wrapper around spec definitions that took care of doing something else along with the spec definition, and that broke the navigation. I just wanted to see if perhaps there is some solution to this problem already, like being able to “register” your project specific (e.g.) spec-defining wrappers with Cursive somehow. Is that a thing?#2021-03-0114:23Jeff Evans@reefersleep https://cursive-ide.com/userguide/macros.html#2021-03-0114:40reefersleep@jeffrey.wayne.evans brilliant! I wasn’t aware it worked like that.#2021-03-0115:20reefersleep@jeffrey.wayne.evans do you know if this shareable?#2021-03-0115:20reefersleepbetween developers in a team#2021-03-0115:20reefersleepSo that not every one has to configure stuff like this individually.#2021-03-0115:25Jeff Evansyes, in fact I just found this out recently, but it’s lost to Slack history. give me a little while and I’ll dig it up again#2021-03-0115:25Jeff Evans#2021-03-0115:26Jeff Evansjust click the gear icon there and Export, I think (haven’t actually tried it yet)#2021-03-0122:46reefersleepLovely!#2021-03-0118:03mikejcusackIs it possible to modify sending forms to the REPL? For example, wrapping something in a tap.#2021-03-0119:45seriogaYou can create custom REPL command with such functionality.#2021-03-0119:47cflemingRight, see https://cursive-ide.com/userguide/repl.html#repl-commands - you can create custom commands according to your needs#2021-03-0119:54mikejcusackThanks!#2021-03-0121:32mikejcusackHave Reveal hooked up and tapping forms before sending working. Glad it was that simple!#2021-03-0121:54cflemingNice, glad it’s working!#2021-03-0119:45seriogaYou can create custom REPL command with such functionality.#2021-03-0119:46cfleming@jeffrey.wayne.evans @reefersleep In the config pane in Jeff’s screenshot, if you change the “IDE” scheme to “Project” then the configuration will be shared in the project files and can be checked into VCS etc.#2021-03-0122:46reefersleepBrilliant!#2021-03-0200:14cjmurphyFor 'Load File in REPL' this is the description: "The first is Tools-&gt;REPL-&gt;Load file in REPL. This will always load the current file, but it will also check the transitive namespace dependencies of the current file and will load them in dependency order first if any of them are out of date." Is there any way to make it load only the current file?#2021-03-0200:36cflemingYes, Preferences | Languages &amp; Frameworks | Clojure | REPL Options | Load out-of-date file dependencies transitively#2021-03-0200:47cjmurphyCool, thanks Colin.#2021-03-0219:16p-himikJust wanted to mention that Cursive still sets the clojure.libfile system property in REPL but seems like it could be removed now: https://clojurians.slack.com/archives/C03S1KBA2/p1614712229459100?thread_ts=1614708484.442600&amp;cid=C03S1KBA2#2021-03-0220:33ToddSo does Cursive work best with CE or Ultimate? I have a license for all the JetBrains things but didn’t know if Ultimate has things that get in the way of Cursive.#2021-03-0223:04salami use Cursive with both the Ultimate (at work) and the Community (for personal fiddling) editions and haven’t noticed any difference. #2021-03-0220:34ToddAlso looking for some good guidance on REPL Driven Development with Cursive and its tools#2021-03-0223:03salamyou may check this video out: https://vimeo.com/230220635#2021-03-0307:47mikejcusackThat was a helpful video. I also find https://www.youtube.com/watch?v=gIoadGfm5T8 helpful. What I think would be more helpful is an explanation of the differences between switching namespaces or staying in the user namespace.#2021-03-0220:43manutter51I’m using Cursive with Ultimate, works great.#2021-03-0313:59mikejcusackIs there a way to get cljsjs function resolution to work? For things like (.useState js/React 0) it is saying that .useState cannot be resolved.#2021-03-0320:52cflemingNot at the moment sorry, but I’m planning improvements in this area.#2021-03-0320:53mikejcusackI did realize that changing it to (js/React.useState 0) doesn't throw the false positive#2021-03-0320:53mikejcusackBut (js/document.getElementById ...) does throw the false positive#2021-03-0314:04dnolenminor thing - dotted aliases get a warning when defining a REPL using deps.edn - it works but it's a bit confusing#2021-03-0314:04dnoleni.e. foo.bar#2021-03-0314:10Alex Miller (Clojure team)aliases are keywords and according to the reader https://clojure.org/reference/reader, "They cannot contain '.' in the name part, or name classes."#2021-03-0314:35imreWhat exactly does 'name classes' mean in that sentence?#2021-03-0314:40imreI'm probably missing something obvious#2021-03-0314:45Alex Miller (Clojure team):java.lang.String#2021-03-0314:46imreas in they should not match the name of a class?#2021-03-0314:46Alex Miller (Clojure team)yeah#2021-03-0314:47Alex Miller (Clojure team)reduce and java.lang.String are both symbols but follow different paths in resolution so class names are special cases. I assume keywords disallow class names for some place where this collides, but I don't actually know where. iow, I'm not totally sure why this restriction exists.#2021-03-0314:48imreI see, TIL 🙂 I still wonder why the doubling down there matters. If a keyword doesn't contain a period, it cannot be a class name either?#2021-03-0314:48Alex Miller (Clojure team)I guess you'd be more likely to run into a problem with destructuring keyword to symbol (let [{:keys [java.lang.String]} m] ...)#2021-03-0314:49Alex Miller (Clojure team)the period restriction I think is primarily intended to push hierarchical naming to namespaces, not in names#2021-03-0314:50imreThat's a good point re :keys. On that note, which one is more idiomatic, :keys [foo] or :keys [:foo]?#2021-03-0314:50Alex Miller (Clojure team)the former#2021-03-0314:51imre👍:skin-tone-3: thank you Alex#2021-03-0314:51Alex Miller (Clojure team)keywords were primarily (only?) allowed in :keys originally to support autoresolved keyword resolution#2021-03-0314:52Alex Miller (Clojure team)using ::keys or ::alias/keys etc is now preferred#2021-03-0318:37seriogabut this harder to copy/paste or grep, unfortunately... https://clojurians.slack.com/archives/C0744GXCJ/p1614783163120500?thread_ts=1614780607.115600&amp;cid=C0744GXCJ#2021-03-0314:10Alex Miller (Clojure team)so I think that's actually a correct warning#2021-03-0314:11Alex Miller (Clojure team)@dnolen some reason you're not using namespaced aliases instead? :my/alias instead of :my.alias ?#2021-03-0314:12dnolenhrm ok, I don't think I realized that dot was restricted to the namespace part#2021-03-0314:13Alex Miller (Clojure team)not sure that's actually enforced anywhere#2021-03-0316:09borkdudeI also recently learned about that restriction. Honestly I think a lot of people are just using this without knowing this restriction. Tracking an issue about that here: https://github.com/clj-kondo/clj-kondo/issues/1179#2021-03-0321:44Jakub Holý (HolyJak)Hi @cfleming! What is the status of support for navigating to keywords? Mr. @smith.adriane is using namespaced keywords in #membrane for https://github.com/phronmophobic/membrane/issues/16#issuecomment-790070882 (i.e. an intent is [::some-kwd] and there is (defeffect :the.ns/some-kwd ...) ) is it possible to jump from the former to the latter? is/will there be a general support for that or does Cursive require per-framework extension? Thank you!!!#2021-03-0321:50phronmophobicIt looks like https://cursive-ide.com/userguide/macros.html might have an answer. It seems like you can tell cursive how to resolve a symbol for a given macro. There's already built in support for the re-frame macros, I wonder if membrane could piggyback on one of those.#2021-03-0323:14cflemingYes, I think so. I think resolving them as one of the re-frame forms should work. I think I’ll also add a generic keyword def that can be used for this purpose, since the re-frame ones will also affect the icon that’s shown in the structure view etc.#2021-03-0323:29cfleminghttps://github.com/cursive-ide/cursive/issues/2519#2021-03-0418:20Jakub Holý (HolyJak)awesome!#2021-03-0607:29raspasov@ajarosinski I just found your https://plugins.jetbrains.com/plugin/13222-clojure-namespace-sort/versions , very nice!#2021-03-0612:52AJ JaroWow! Great! Thanks for the affirmation!! It's not fancy but it does the job#2021-03-0706:37raspasovFor sure does :)#2021-03-0607:33robert-stuttafordhi @cfleming 😄 finally trying Cursive out in anger. wondering if there's a way to prevent the formatter from indenting map values that begin on the next line? we have a large mature codebase, and this is causing whitespace wars and frustration in our team 😅
;; what I want
{:long-key-over-here
 (let [something :worth-its-own-line]
   something)}

;; what I get
{:long-key-over-here
                     (let [something :worth-its-own-line]
                       something)}
#2021-03-0607:38raspasovSettings→Editor→Code Style→Clojure #2021-03-0607:42raspasovActually… perhaps I don’t have it configured to get what you want, when I have multiple keys in the map; I am not sure 🙂 sorry#2021-03-0607:44raspasovTry under Settings→Editor→Code Style→Clojure-&gt; General remove checkbox “Align map values”#2021-03-0608:18cfleming@U0509NKGK Ugh, no, currently not I’m afraid. I’ve been meaning to fix this for the longest time, I’ll try to get it in the next EAP. As raspasov says, disabling the alignment altogether might fix it too - depends whether you want the alignment for other entries or not.#2021-03-0609:19robert-stuttafordthank you @U050KSS8M and @cfleming 🙂#2021-03-0609:42cfleming@U0509NKGK If you’re still having problems with that or anything else, let me know#2021-03-0612:01mikejcusackI'm confused by this because in my editor I get what you want#2021-03-0612:03mikejcusackTurning off "align map values" indeed works#2021-03-0612:04mikejcusackIn general I have Align reader conditional values and One space list indent enabled#2021-03-0612:44robert-stuttafordthanks @U01NYKKE69G - i'm literally in the first couple days, so still exploring!#2021-03-0612:44robert-stuttafordthanks @cfleming - will do 🙂#2021-03-0621:29cflemingYeah, the only case that won’t work at the moment is if you generally want map entries aligned, but don’t want that to happen when there’s a newline between the key and the value. If you don’t want any of them aligned then you’re good to go.#2021-03-0712:13Kifah#2021-03-0718:50mikejcusackThat error is correct. The namespace isn't matching the directory structure. If you click the suggestion for it the proper directory structure will be created. In this case would be src/cursive_shadow_cljs/core.cljs.#2021-03-0712:14Kifah#2021-03-0718:54mikejcusackThose deps are out of date. Clojure is at at 1.10.2 and ClojureScript at 1.10.773.#2021-03-0712:14Kifah#2021-03-0718:56mikejcusackTry File -&gt; Invalidate Cache / Restart#2021-03-0720:43cflemingThat looks like it might be a network error of some kind? I’m not sure what “Cannot reconnect” means otherwise.#2021-03-0712:14Kifah#2021-03-0718:57mikejcusackYou want the clojure and clojurescript deps in :deps at the root rather than a dev alias extra dep.#2021-03-0719:04mikejcusackHere's an example deps.edn for a shadow-cljs project with reagent pulled in:
{:deps {org.clojure/clojurescript {:mvn/version "1.10.773"}
        reagent/reagent {:mvn/version "1.0.0"}}
 :paths ["src"]
 :aliases {:dev {:extra-deps {binaryage/devtools {:mvn/version "1.0.2"}}}
           :shadow {:extra-deps {thheller/shadow-cljs {:mvn/version "2.11.13"}}
                    :main-opts ["-m" "shadow.cljs.devtools.cli"]}}}
#2021-03-0719:05mikejcusackI'd recommend following the official user guide for current configuration: https://shadow-cljs.github.io/docs/UsersGuide.html#2021-03-0806:30robert-stuttafordis there a way to make IntelliJ also highlight occurrences of Datalog variables?#2021-03-0814:28mikejcusackI don't believe so. There's nothing special about them as far as Clojure is concerned. They're just regular symbols in a vector.#2021-03-0820:30cflemingRight. I could add special handling for symbols starting with ?, but I’m not sure what the scope should be - current file? Top-level form? I’m also not sure if variables with that naming convention are used in other ways.#2021-03-0820:34mikejcusackThose are my questions as well#2021-03-0910:27robert-stuttafordafaik ?anything is a valid Clojure symbol, so i'd say the scope would be the same as any other Clojure symbol#2021-03-0910:27robert-stuttafordi think core.logic uses this convention as well#2021-03-0910:28robert-stuttafordyou could stop quoting your Datalog queries if you had a def for each ?thing 🙂#2021-03-0919:33mikejcusackI don't think that would be a good idea#2021-03-0919:57cflemingYes, ?anything is a valid symbol. But symbols on their own don’t have a scope, the scope is implied by the thing (fn, macro, datalog query, core.logic) using them. I have a similar problem with hiccup support - since everything is data, there’s nothing to say what is a datalog query in the code unless you pass an explicit data structure to a function which is well-known to accept one.#2021-03-1007:04robert-stuttaford@U01NYKKE69G of course, it's a terrible idea 🙂 my point was, it would work because ?these ?are ?just ?symbols#2021-03-0809:50aratareHi there. I’ve come across some weird behaviour but not sure why it’s happening. So if I start a REPL with cursive when first start Intellij, I get Suppressed exit with no extra info. lein compile doesn’t make any difference. But if I run lein repl in a terminal then exit it, then suddenly cursive will allow me to start a REPL perfectly fine again. Has anyone seen anything like this? Thanks in advance.#2021-03-0814:29mikejcusackWhat's your repl launch configuration?#2021-03-0814:31aratarePretty much the standard one#2021-03-0814:31mikejcusackWhat is it literally#2021-03-0820:20cflemingThis sort of thing can be caused by lein plugins - are you using any?#2021-03-0905:18aratare@U0567Q30W Just two actually: lein-cloverage and lein-eftest#2021-03-0905:19cflemingI wonder if Cloverage might be causing that. Is the project.clj anywhere I can look at, or is it private?#2021-03-0905:20aratareSure thing. Here it is https://github.com/aratare-jp/epsilon-clj/blob/master/project.clj#2021-03-0905:20aratareAh I missed another one: lein-virgil#2021-03-0905:21cflemingThanks, I’ll try to import that and start a REPL to reproduce, I won’t get to it today though.#2021-03-0905:21aratareSure thing. Thanks a lot 🙂#2021-03-0905:21aratareIf you want I can make an issue with a bit more info?#2021-03-0905:22cflemingThat would be great, thanks.#2021-03-0905:38aratarehttps://github.com/cursive-ide/cursive/issues/2521#2021-03-0906:15cflemingThanks!#2021-03-0910:30robert-stuttaforddoes Cursive support a gesture where by i move a form to a new let binding, in the closest (inner most parent) let form? similarly, is there a gesture for introducing and lifting let bindings further and further up? i.e. these from clj-refactor: https://github.com/clojure-emacs/clj-refactor.el/wiki/cljr-introduce-let https://github.com/clojure-emacs/clj-refactor.el/wiki/cljr-move-to-let https://github.com/clojure-emacs/clj-refactor.el/wiki/cljr-expand-let#2021-03-1004:11cflemingYou can introduce a let using Extract Variable, however amazingly I don’t seem to have that documented. Refactor -&gt; Extract/Introduce -&gt; Variable. You first select the form you want to extract, then select the level you want to introduce the let at.#2021-03-1007:02robert-stuttafordok nice! i'll give it a whirl!#2021-03-1007:36cflemingOne thing I should also point out - if you extract to an existing let the binding will be added to that one as you’d expect.#2021-03-0912:51robert-stuttaforddoes Cursive support form-wise selection? i know you can expand/contract, but say i had three forms in a row i wanted to select and then cut, without using the mouse or selecting lines (with shift-up/down-arrow) is this possible?#2021-03-0912:54imreHere's a discussion about that. There are workarounds but it could be better https://github.com/cursive-ide/cursive/issues/997#2021-03-0912:58robert-stuttafordthanks @U08BJGV6E!#2021-03-0913:00robert-stuttafordyeah that sticky thing will drive me swiftly crazy 😂 seems like it's still on the roadmap#2021-03-0913:14imreI use the sticky stuff, it gets the job done, but what I commented about still stands unfortunately#2021-03-0923:20cflemingI actually look at this periodically, but it’s unfortunately still hard due to the discussed problems integrating it into IntelliJ’s expand/shrink selection. But I promise to look at it again in this EAP cycle.#2021-03-1007:03robert-stuttafordthank you Colin!#2021-03-0913:21imreColin, is these any chance these would be addressed in the near future? Should I break it out into a separate issue? https://github.com/cursive-ide/cursive/issues/2097#issuecomment-776189685#2021-03-0923:17cflemingI’ve filed this, and fixed it for the next EAP: https://github.com/cursive-ide/cursive/issues/2523#2021-03-1004:08cfleminghttps://twitter.com/CursiveIDE/status/1369500239875350528#2021-03-1004:08cfleming@favila and @imre this release fixes the issues you were asking about.#2021-03-1009:42imreYou're a gent, Colin, thank you!#2021-03-1017:45favilaDefinitely fixed, thanks!#2021-03-1018:25favilahm, actually I take that back. I seem to be having classpath problems with run configurations now. Some items are not in the runconfig classpath which the equivalent clojure deps reports#2021-03-1018:27favilaI’m going to try a downgrade and see if that fixes#2021-03-1018:43favilaNo. The issue seems to be that the transitive deps of a dep which is mentioned in an :override-deps isn’t included in the run-config classpath#2021-03-1018:43favilathis didn’t work at all before so I can’t really compare#2021-03-1018:44favilathe overrided-dep may also have to be a :local/root dep?#2021-03-1018:46favilathe workaround I’m using now is just not to override these. It’s possible I can just remove them outright. I think the important thing is the result differs from clojure -A[same-aliases] -Spath#2021-03-1102:08cflemingOk, looks like fixing the first bug exposes a second one. I’ll take a look at that ASAP#2021-03-1004:56cflemingOh, and @etldan too.#2021-03-1014:51Daniel WellmanThank you Colin!#2021-03-1021:44Daniel WellmanI just installed the EAP and can confirm that it opens the project with lein-v version numbers. Thank you, this removes a little hurdle for me, and I’ll take all the help I can get. :)#2021-03-1010:21aratareHi there. Is there a way to run tests with code coverage inside cursive? I’ve created a new leiningen run configuration but apparently Run ... with Coverage doesn’t work because of Deferred configurations cannot be run with standard runners. Thanks in advance.#2021-03-1021:03cflemingThere isn’t, unfortunately. I tried to get this going a while ago but IntelliJ’s coverage UI is very class focused and doesn’t work for Clojure. It’s a much larger job than I had hoped to get it working.#2021-03-1101:04aratareAh bugger. Thanks for answering 🙂 I’m using cloverage so it’s not that big of a loss but still was hoping I can get some nice code coverage in the IDE so I know what I’m missing.#2021-03-1118:05conanHi, I've always run Cursive on Windows alongside WSL, but I'd really like to move my project files into the WSL2 filesystem for performance reasons. JetBrains stated here that WSL2 support for each language would have to be done separately, so I'm wondering whether there are any plans to support WSL2 in Cursive? https://youtrack.jetbrains.com/issue/IDEA-171510#focus=Comments-27-4155034.0-0#2021-03-1119:35cflemingYes, I would like to. It’s complicated by two things - I don’t use Windows, and it’s not clear what I have to do to fix it. But I can try to figure out what to do and see if I can get an idea of how much work it would be.#2021-03-1201:43aratareI was trying out WSL2 so I can confirm that it’s already working fine with Cursive. You just need to open the correct project and IntelliJ/Cursive will automatically handle things for you. The experience was pretty good from what I recall.#2021-03-1217:02conanDid you run cursive in windows wsl?#2021-03-1217:02conanWindows or wsl#2021-03-1217:05aratareIntelliJ on Windows with the project on wsl2#2021-03-1217:09aratareWhen you open a new project you have the option to select the wsl2 filesystem, which means you can open wsl2 project with IntelliJ on Windows. Just make sure that there's a valid jdk on your wsl2.#2021-03-1220:56mikejcusackThere is a special network path to access WSL directories: \wsl$#2021-03-1506:38cflemingThat sounds great. I’d be interested if that completely solves the problem for Clojure projects or if anything else is required.#2021-03-1509:56conanHa! My whole intellij hangs if i try that it seems#2021-03-1509:56conanI'll investigate#2021-03-1509:57aratare@U053032QC Try with a dummy lein project first to see if it's working I reckon#2021-03-1518:09conanI've got it working. It breaks when I try to use a WSL2-based JDK, that was the issue. Indexing is slow and my REPL start times also seem down, but everything is working nicely. So I guess currently the choice is between Cursive performance (project on the Windows filesystem) and Linux performance (project on the WSL2 filesystem). It would be great to be able to start an nREPL from linux and connect to it in intellij without having to use a remote configuration.#2021-03-1523:09aratareWhich Jdk were you using on wsl2, if you don't mind me asking?#2021-03-1121:54cfleminghttps://twitter.com/CursiveIDE/status/1370131007458799617#2021-03-1205:39robert-stuttafordhey @cfleming probably a question you get all the time, but.... how's inline eval coming along? this is probably the thing that i'm feeling the most pain on, after a week or so, now that i've moved past the nails-on-chalkboard experience of relearning keyboard shortcuts 😁#2021-03-1209:17imreWhat editor are you coming from and why did you switch? Also, have you thought about rebinding?#2021-03-1210:03raspasovI know that’s not the same, but there’s “Send Top Form to REPL”#2021-03-1210:44robert-stuttafordEmacs, because i'm tired of waiting for it to render large blocks of text, and restarting it after it crashes. probably both fixable, but i don't have the bandwidth to learn elisp nor learn how to navigate elisp-oss-world heh#2021-03-1210:44robert-stuttafordI use the send-to-repl stuff @U050KSS8M - but it's not the same. i want that lighttable experience!
#2021-03-1210:45robert-stuttafordrebinding: i tried the emacs bindings briefly but when i couldn't cut or paste i noped out of there#2021-03-1210:45robert-stuttafordi've learned enough to get by now, incl the structural editing stuff#2021-03-1210:57raspasov@U0509NKGK understood 🙂 I’ve seen the inline eval in videos and people doing it… for me the REPL is perhaps even better, because it’s more “permanent”; allows you to search for the output, etc. I almost always keep the REPL open. But I realize people have different preferences. Also, I use almost 100% custom key binding for everything; suits the ergonomics of my hands the best, I feel like. Re: IntelliJ pro tip I just found literally 30 min ago: “Always Select Opened File”#2021-03-1210:57raspasov“Always Select Opened File” is literally amazing 🙂#2021-03-1210:58raspasov#2021-03-1210:58raspasovIt works for any file, both in your projects and in libraries.#2021-03-1211:52robert-stuttafordI was looking for that yesterday. You're a saint!#2021-03-1211:53robert-stuttafordon permanence of repl: yeah, in emacs, you can eval-then-paste-output into your buffer, and you can print to the repl. i used all three daily#2021-03-1216:06raspasov@U0509NKGK cheers 🙂 I randomly found that it existed yesterday after ~6 years of IntelliJ#2021-03-1217:07raspasovAnother super-awesome thing (which I don’t see many people use in videos, etc) is Tools > REPL > Sync Files in REPL#2021-03-1217:07raspasovJust make a keybinding for it and trigger it any time you make a change… No more eval-ing functions one by one!#2021-03-1217:08raspasovI keep seeing people eval-ing one-by-one and I feel like it’s a waste of time.#2021-03-1217:18aratareIs that any different from reloading the files?#2021-03-1218:51raspasovEval-ing achieves the same effect, but Tools > REPL > Sync Files in REPL … figures out for you which files have changed and just reloads them. You don’t need to keep the “state” of your REPL in your head. As far as I can tell, it just keeps track of changed files and calls (load-file …) https://clojuredocs.org/clojure.core/load-file … on each changed file.#2021-03-1506:33cfleming@U0509NKGK Sorry for the delay, I’ve been off-grid camping over the weekend. So my usual answer to that question is “sometime soon” which unfortunately often turns out to be a lie. However in this case I am actually working on a proof of concept so I can confidently say that it might actually be “soon” :-)#2021-03-1506:36cfleming@U050KSS8M @U013F1Q1R7G Right, sync basically works out which files you’ve changed and loads them all in dependency order. Load file also does that, except only starting with the file that you’re loading (i.e. that file and all its dependencies will be loaded if modified). sync will do that for all files, even if the current file doesn’t depend on them.#2021-03-1506:38aratareI see. I have a habit of loading files whenever I make any changes so I haven’t had a chance to use sync yet#2021-03-1506:55robert-stuttaford@cfleming you tease! 😆 seriously, that sounds fantastic, mate. sending you lots of Lisp energy from the Netherlands. good luck!#2021-03-1506:58robert-stuttafordI habitually use load-file when making changes too, and eval-leftmost-form when doing stuff from inside (comment) blocks (like testing db code)#2021-03-1509:09cfleming“Send top form to REPL” will work in comment blocks too, it sends the topmost form inside the comment, not the comment itself.#2021-03-1510:22robert-stuttaforddo you mean the one that is bound to cmd-shift-p, @cfleming?#2021-03-1510:23robert-stuttafordi don't see a 'topmost' item here#2021-03-1510:23robert-stuttafordwhen i use cmd-shift-p, it evals the comment form#2021-03-1512:36imre@U0509NKGK that behaviour depends on where your caret's at. If you are somewhere inside (def db ... ) then cmdshiftP would eval the def. From your screenshot I'm assuming you are just after the def form.#2021-03-1613:00robert-stuttafordtx!#2021-03-1620:29cflemingRight, the name of the command in the menu is customised to show what it will actually do, but one is “Send top form” and the other is “Send form before caret”.#2021-03-1205:39robert-stuttafordhttps://github.com/cursive-ide/cursive/issues/391#2021-03-1214:09borkdudeCan someone using Cursive perhaps review this PR? https://github.com/clj-kondo/clj-kondo/pull/1214#2021-03-1317:40p-himikIs there a way to ignore "X cannot be resolved" warnings for the whole file?#2021-03-1404:10mikejcusackI believe it's only able to be done project-wide.#2021-03-1418:02Azzuritewhat has to happen for automatic require/autocomplete to work? I don't understand why it's picking up some libraries I've been using but not others#2021-03-1420:50mikejcusackAre the maven repos indexed?#2021-03-1422:38Azzuriteyes#2021-03-1418:02Azzuriteand new ones are never picked up#2021-03-1421:18dazldwhen loading a file/namespace into the repl, is there any way to make cursive reload any namespaces that require that one too?#2021-03-1421:34mikejcusackBest thing is to use clojure.tools.namespace.repl/refresh for that#2021-03-1421:44dazldthank you, that looks perfect.#2021-03-1422:07borkdudeyou can also just use (require '[the-ns] :reload-all)#2021-03-1422:07borkdudein the repl#2021-03-1422:21dazldthanks, i’ll give that a go too#2021-03-1422:39Azzuriteand also cursive has the possibility under "tools -> REPL" to add a REPL command, i.e. code that gets executed in the current REPL, which you can then bind to a keyboard shortcut or add to a macro#2021-03-1522:11cflemingYou can also use Tools | REPL | Sync files in REPL, as recently discussed: https://clojurians.slack.com/archives/C0744GXCJ/p1615790200178200?thread_ts=1615527556.163100&amp;cid=C0744GXCJ#2021-03-1523:26dazld@U0567Q30W thanks - almost exactly what I wanted, but unfortunately the other way around - I want to reload namespaces that depend upon the one I’m working on - I’m working on some macro related stuff, and want the consumers of the macro to reload, so they get the new behaviour. it’s pretty dull having to go through each of the consumers and reload them..#2021-03-1523:29dazldThe clojure.tools.namespace.repl/refresh approach and the (require '[the-ns] :reload-all) approaches both didn’t end up working out. I think the require... approach is reloading dependencies of the namespace (..right?), so not quite right, and the namespace.repl/refresh thing just didn’t seem to work - suspect it was a problem with retained vars in some places, but even restarting the system as part of it didn’t work.#2021-03-1523:29dazld(wall of text, apologies)#2021-03-1523:29cflemingYeah, there are some other use cases like this too - things like updating protocols and multimethods.#2021-03-1523:33dazldall three of those are some of the most fun bits of clojure too!#2021-03-1523:41dazldAs a suggestion, some kind of tree reload might be great, both backwards with dependencies, and forward with dependents.#2021-03-1523:42cflemingYeah, I can see that being useful. It would be pretty easy to accidentally reload your whole app, though, although I suppose that’s what you want if you’re changing some fundamental macro at the bottom of the pile.#2021-03-1523:43dazldIt’s a trade off, for sure. #2021-03-1523:49borkdudeReloading your entire app is pretty easy: (require your.main :reload-all)#2021-03-1523:49borkdudeI use this a lot from the REPL actually when I make such changes#2021-03-1523:51dazldHave unplugged now, but will try that later @U04V15CAJ thanks#2021-03-1523:52dazldEven a single level of dependents would be handy to reload, without traversing the whole tree..#2021-03-1523:59dazld“Reload direct dependents” would work great, the more I think about it. If I know I need to go further, navigate and execute that command iteratively is straightforward.#2021-03-1620:53mikejcusackhttps://clojure.org/guides/repl/enhancing_your_repl_workflow#writing-repl-friendly-programs#2021-03-1620:54mikejcusackThere is also clojure.tools.namespace.repl/refresh-all , which seems like what you're looking for#2021-03-1508:48simongrayIn the past, there used to be lightbulb that appeared when had the caret close to the beginning of a function/macro head, e.g. (|match [....] ....). This allowed me to pick a custom indentation level for e.g. the core.match/match macro. I think I was able to select it from the “context actions” menu when right-clicking too. Doesn’t seem to be around anymore?#2021-03-1509:11heliosPress Alt+Enter to open the context menu, regardless of the light bulb#2021-03-1509:11helios(depends if you can open the context menu there)#2021-03-1509:31simongrayNope, like I said the capability is gone#2021-03-1509:54raspasov@U4P4NREBY check (macOS?): Preferences > Editor > Intentions > Search for “Clojure” > Enable all checkboxes#2021-03-1509:55raspasovAlso check File > Power Save Mode (make sure it’s not enabled)#2021-03-1509:55raspasov(actually Power Save Mode probably doesn’t matter)#2021-03-1509:56raspasovBut first one does.#2021-03-1509:57simongraythey were all enabled and power save mode wasn’t on 😞#2021-03-1510:00raspasovHmm#2021-03-1510:01raspasovDid you try: File > Invalidate Caches/Restart ?#2021-03-1510:18simongraygonna try that in a moment and see if it has any effect. Thanks for taking your time to help, btw.#2021-03-1511:46raspasovOf course! 🙂 Hope it helps… I accidentally disabled the Intentions once and it took me probably 15 min to find it in the Preferences. But I’m not sure why it’s not working for you in this case.#2021-03-1512:22simongraystill not working after invalidating caches and restarting… this is so strange#2021-03-1512:24simongrayok, now I figured out the issue. It works with my own functions/macros, but not the ones in Clojure core - and apparently core.match/match is considered part of Clojure core despite being a library and the default indentation is not implemented correctly (it vertically aligns every form) and can’t be changed.#2021-03-1512:25simongrayI need it to match the official indentation: https://github.com/clojure/core.match#example-usage#2021-03-1512:25simongraybut Cursive seems to disallow it#2021-03-1518:22conanI've found that for symbols which cannot be resolved, you won't get the lightbulb. If you stick a (declare match) or something before it, you can get the lightbulb, then you can delete the declare#2021-03-1518:34conanmay not be your issue, but i often get caught out by things that don't resolve for some reason#2021-03-1520:17cfleming@U4P4NREBY That’s definitely not the case, Cursive doesn’t treat core forms as special in any way. My money is on conan’s suggestion - can you navigate from a usage of match to the declaration of it?#2021-03-1700:53potetmholy hara i just found the macroexpand shortcut and I’m 😹#2021-03-1701:46Jeff Evansmind elaborating on this?#2021-03-1702:00cflemingI really need to document that thing.#2021-03-1702:01cfleming@U0183EZCD0D Tools | REPL | View macroexpansion… will give you a popup interactive macroexpander for the macro form under the caret.#2021-03-1702:02cflemingI’ve been working on it a bit recently, some people have had problems with the popup, so YMMV until I get that fixed.#2021-03-1702:20Jeff Evans🤯#2021-03-1708:36imreoh, this seems to be working again#2021-03-1708:37imreFirst time I had success with it in months#2021-03-1709:43cflemingThat’s odd, I wonder if it’s something in IntelliJ that has changed - certainly the Cursive part of that hasn’t changed in ages.#2021-03-1712:12imreNot sure. I couldn't get the window to appear until today. It still opens on another monitor, not the on my intellij is on and I can't seem to be able to move it#2021-03-1715:56Jeff Evansyeah this is going to be really awesome for me. I am noticing that in some cases, this is all that shows up. some kind of plugin issue?#2021-03-1719:41cflemingThat looks like a bug, yeah. What are you trying to expand?#2021-03-1720:16Jeff Evansin this particular case, https://github.com/metabase/metabase/blob/master/src/metabase/models/collection/root.clj#L17#2021-03-1720:17Jeff Evanswhich is: https://cljdoc.org/d/potemkin/potemkin/0.4.5/api/potemkin.types#defrecord+#2021-03-1720:26cflemingThanks, I’ll try to reproduce that.#2021-03-1700:53potetmI’m wondering if there’s any way to copy that buffer to the clipboard#2021-03-1701:59cflemingDoes normal C+P not work?#2021-03-1702:39potetmlike, cmd+p?#2021-03-1702:40potetmThis buffer is more like an autocomplete buffer#2021-03-1702:40potetmI’m unable to focus it at all.#2021-03-1702:41potetmIt could be that I’m also using ideavim(?)#2021-03-1703:41cflemingSorry, no, I meant normal cut + paste. I’ll try that to see if it works.#2021-03-1716:44imreI'm finding that I'm unable to interact with the macroexpansion popup in any way actually#2021-03-1716:44imrebut at least it now appears#2021-03-1701:31onetomWhat's the current recommended way to run CLJS REPL using Cursive? Tubular client?#2021-03-1701:57cflemingThere’s no one good answer to this, it depends on what your CLJS process is doing. But I think the closest I can come to a good universal answer is “use shadow”. Shadow always uses nREPL which makes your CLJS REPL behave almost completely like a CLJ one.#2021-03-1701:59cflemingIf you do want a tubular-like thing, https://github.com/vlaaad/remote-repl seems to be a better option.#2021-03-2211:31onetomI was not aware of vlaaad's remote-repl. thx!#2021-03-1709:50aratare@cfleming I have a feature request: Is it possible to have send form ... to REPL to work a bit more seamlessly with multiple REPLs? It would be nice to have two sets of send form, one will just send it to whatever REPL is currently active/selected, and another set will display a popup asking for which REPL to send the form to, and will switch automatically to that REPL so I can see the evaluation.#2021-03-1715:08AzzuriteI think I found out how automatic require/autocomplete works... you need to write one manual (:require [library :as shorthand]) in one of your files and after you did that, you can then use shorthand (and only that) for autocomplete/autorequire. I would've hoped it worked more like normal intellij where it simply indexes everything... that sucks#2021-03-1720:03cflemingMy apologies, I meant to reply to your message the other day and somehow dropped it. Yes, currently Cursive relies on having an example, this is because it needs to know which alias you’d like to use for a particular namespace. Cursive does index everything, but it seemed dangerous to automatically assume that e.g. the last segment of the namespace should be used as an alias.#2021-03-1721:32Azzurite@cfleming maybe I'm missing something, but why can't it work (almost) exactly like it does in standard intellij? Have a look at https://www.jetbrains.com/help/idea/auto-completing-code.html#invoke-basic-completion, or short summary follows: press ctrl+space once, get suggestions for all directly accessible vars/methods. Hit ctrl+space twice, it shows inaccessible but importable vars/methods. Hit ctrl+space thrice, it suggests everything. Currently, in cursive, only the first completion works out-of-the-box. No automatic require necessary because it is already required. The second completion is currently packaged within the first completion, and only happens when you already have an example. But it could work like this: 1. Premise: Let's say I don't have an example :require already but I want to use`integrant.core/init-key` (which is added as library to my project but never used yet) 2. I enter init-k and press ctrl+space once. Nothing appears. 3. I press ctrl+space a second time. It shows integrant.core/init-key in the completion list (like this: https://i.imgur.com/KVbrvg1.png) 4. I press enter. It automatically :requires integrant.core (no :as) and replaces my typed init-k with integrant.core/init-key (like this: https://i.imgur.com/kgrE8hC.png) Second use-case, same premise: 1. I type ig/init-k and press Ctrl+Space. Nothing appears. 2. I press Ctrl+Space again. integrant.core/init-key is suggested (like this: https://i.imgur.com/BQrU41L.png) 3. I press enter. ig/ is not equal to integrant.core/ , so I want an alias for integrant.core called ig It adds a :require [integrant.core :as ig] and replaces ig/init-k with ig/init-key (like this: https://i.imgur.com/ItvGpYS.png) All seems very simple and straight-forward to me, and I'd hope that you could reuse everything from the way the java completion works. Would only need to add the ig/ handling while expanding.#2021-03-1721:43AzzuriteOr abstractly speaking: I don't really see why it matters to have an example or not - just let the user write anything before the /, and use whatever was written before the / as the :as and the namespace of whatever was selected in the list as the namespace to :require#2021-03-1721:47AzzuriteThe third usecase would be a duplicate :as, but which could also be easily handled. Let's say I already have :require [integrant.core :as ig] . When I now type in/init-key and select integrant.core/init-key from the completion list, it changes my in/init-key to ig/init-key and leaves the existing :require untouched#2021-03-1721:51AzzuriteI think this would be really valuable for Cursive, for any new project this would save a lot of time (it would've saved me a lot of time already) - and as a user coming from java I'm incredibly annoyed by it not working like it does with java#2021-03-1722:34cflemingThanks for the detail, I like the idea of defaulting the alias based on the use at the completion point. I’ll look at implementing that.#2021-03-1722:37cflemingI’ve been meaning to do the same for static method invocations, if I type MyClass/met|, currently that doesn’t work in Cursive if MyClass is not imported yet.#2021-03-1800:04Azzuritecool! I'm looking forward to it! the standard intellij autocomplete is so amazing and I really hope you can get that working. Like even in your example, what I usually do in java isn't to write MyClass/met| but I write something like MyC/| and MyClass/met| will be one of the first results#2021-03-1800:05Azzuriteif you save 80% of characters while typing it really boosts your productivity#2021-03-1801:48cflemingRight, unfortunately that won’t work for Clojure if I’m relying on the name of the symbol qualifier to get the new alias name.#2021-03-1917:18mikejcusackYeah, gotta remember that Clojure's notion of symbols makes that more difficult than Java where there IntelliJ can know something is a class/interface just due to naming convention.#2022-09-0717:06Jeffrey BayI added a related issue that I think is even simpler: https://github.com/cursive-ide/cursive/issues/2728#2021-03-1715:25R.A. PorterI see that the release of IJ 2020.3.3 is finally out and I’d like to upgrade to it but I’ve slowed my upgrade cadence since becoming a FT clojure dev. I used to run EAPs of IJ but that’s now too much underlying change since I depend on Cursive + IJ to work in concert. I assume that 2020.3.3 is a safe upgrade?#2021-03-1715:34imreI upgraded sometime in the past 48 hours and found no issues so far#2021-03-1715:34imreand macroexpansion started working again after months but I'm unsure whether that was due to the upgrade#2021-03-1715:35R.A. Porter👍#2021-03-1717:19Mark WardleHi all. Is there an option within IntelliJ or cursive to use a specific alias when editing code within a deps.edn project? I can obviously run a REPL with any alias, but I have a few aliases which add external libraries and so I get warnings about ‘class cannot be resolved’ when I know at runtime it will be resolved by some extra dependencies in the alias definition. Am I missing something in the project set-up page? I have found some global settings (my project settings pane appears empty) but putting things in there doesn’t seem to have an effect.#2021-03-1717:22Mark WardleIt’s only a minor issue; the simplest fix is to just temporarily alter my deps.edn to include the needed dependencies in the main list while developing that module.#2021-03-1720:00cflemingYou can do this, see here: https://cursive-ide.com/userguide/deps.html#working-with-aliases#2021-03-1721:54Mark WardleBrilliant. Thank you. Assumed I was missing something. Many thanks. #2021-03-1923:21hlshipWe're experimenting with converting from project.clj to deps.edn in our very, very large, multi-module project. So far, I haven't managed to get it to work at all; using "New project from existing sources" and then choosing the root folder of my multi-project, Cursive finds no deps to import. Does there need to be a top-level deps.edn file for this to work? What would that look like exactly? IDEA 2020.3, Cursive 1.10.1-2020.3.#2021-03-1923:41hlshipUpdate: Downloading a fresh copy of my project from Git, into an entirely new folder, worked. Cursive may be storing some project-specific data outside of the project itself -- I had tried deleting the .idea directory of my existing project.#2021-03-1923:44hlshipThen I found out I can't re-create my original project.#2021-03-1923:44hlship#2021-03-1923:48hlshipNow I'm into ~/Library/Caches/JetBrains/IdeaIC2020.3 looking for things to delete.#2021-03-1923:52hlshipOk, got my original project working again with Leiningen after finding and deleting all .iml files in my workspace.#2021-03-1923:54cflemingI think the best way to try this out would be to migrate module by module. So I’d pick a leaf module from your tree, un-register it with Leiningen and then File | New… | Module from existing sources and add the deps.edn.#2021-03-1923:54hlshipJeez! Sorry to spam this! I thought I had started a fresh thread. It's been that kind of day.#2021-03-1721:20cschepI don’t know if this is a jetbrains thing or cursive specific thing but I figured I’d ask. I would love to use multiline editing to select these lines, then hold shift and hit alt->right arrow to select the entire first expression, but expressions with hyphens get split.#2021-03-1721:20cschep#2021-03-1721:37Azzuritethat doesn't look like valid clojure to me, is there something wrapping all this? it could be that it doesn't understand that these are identifiers and thus does not select the whole thing#2021-03-1721:21cschepis there a way to say hyphen’s don’t split words?#2021-03-1721:21cschepi noticed that double click on a word with a hyphen selects the whole thing#2021-03-1721:29cschepi dunno maybe i don’t want to do that.. does anyone have a preference either way?#2021-03-1721:31imreI'd try expand selection#2021-03-1721:32imre@cschep ^#2021-03-1721:32cschepi’m not familiar with that#2021-03-1721:33cschepany insight?#2021-03-1722:06imresorry, it's extend selection, an intellij default command#2021-03-1722:07imreworks extremely well in clojure#2021-03-1722:23dazldthink it’s alt-up / down by default?#2021-03-1809:11imreIt appears so on the mac#2021-03-1816:12cschepawesome, thanks!#2021-03-1914:37octahedrionhow do I stop Cursive indenting ; comments inside (comment) blocks when I type them on a new line ? It never used to do it. Also inside (comment)s if I delete to go up a line, that line is now indented where it wasn't before#2021-03-1917:23mikejcusackThose settings are in the code style for Clojure in IntelliJ settings#2021-03-1917:23mikejcusackNot sure which specific one is causing that#2021-03-1917:23mikejcusackCan you provide a complete example?#2021-03-2012:04octahedrionI already have "Default to indent only" and "Force Only Indent for all forms" selected#2021-03-2217:00onetomI was just looking for this today too#2021-03-2316:40octahedrionactually I found it's the same for any form inside a (comment) block. I can't work out how to stop it indenting forms#2021-03-2316:41octahedrionI don't want Cursive to help me with formatting unless I explicitly ask it to#2021-03-1915:45imreCursive's static analyzer seems to have an issue with the following, marking the .set calls inside the threading macros (complaining about the missing last arg):
(doto some-object
  (.set "RequiredField" required-field)
  (-> (.set "OptionalField1") (->> (some->> optional-field-1)))
  (-> (.set "OptionalField2") (->> (some->> optional-field-2))))
which is a weird way of saying
(.set some-object "RequiredField" required-field)
(some->> optional-field-1 (.set some-object "OptionalField1"))
(some->> optional-field-2 (.set some-object "OptionalField2"))
some-object
In contrast, clj-kondo seems to be okay with it.
#2021-03-1917:25mikejcusackWhy is this so nested to begin with?#2021-03-1917:39imreWell, I wanted to see if I can turn the code in the second block into a doto and this is what I ended up having to do#2021-03-1920:32cflemingclj-kondo actually expands the macros, so it’ll be able to see that that’s ok. I can check what’s happening there, but no guarantees of much effort being spent to support code like that, sorry 🙂#2021-03-1922:21imreDon't spend time on it, it isn't a particularly useful pattern anyway 😁 Just posted it as I found it interesting#2021-03-1923:55cfleming@hlship we should start a new thread here for your issue since it’s not related to the problem in the other thread.#2021-03-1923:56hlshipYes, as I noted, I didn't realize I was posting on the existing thread. I think I'm actually in good shape now that I deleted all the .iml files, and the deps.edn issue might have been resolved the same way.#2021-03-1923:56hlshipI've got like 30 windows open across two monitors and I feel like I'm going a little bit blind.#2021-03-1923:57cflemingOne thing I’m not sure of is how well the inter-module deps will work if you’re mixing lein and deps projects. I had to do a lot of trickiness to make that work with lein, and deps has its own way of doing that bit. I think what that means is that things might not work totally correctly until the project is fully migrated - this will probably manifest as having to install your deps projects into your local maven repo so lein can find them.#2021-03-2000:00cflemingAssuming you’re planning to use :local/root for your deps dependencies, I think you’d be best to convert the project from the leaves to the root.#2021-03-2220:22hlshipWe're intending to do a full switch-over from lein to deps, we won't be mixing them. I can imagine making Cursive support something so odd would be painful!#2021-03-2220:24hlshipBut, yes, looking forward to :local/root because we often have code changes in a library module and tests in an application module and not having to lein sub install between would be nice (when testing from command line, rather than w/ Cursive).#2021-03-2001:43aratareSorry for the repost. Just wondering if this is possible or not since this is the one feature I find myself wanting the most surprisingly especially when I have a CLJ and CLJS REPLs opened all the time. I think this was also brought up a while back by someone else. Thanks in advance 🙂#2021-03-2105:45cflemingI’ve been thinking a bit about this. The problem is that there are lots of different combinations of variants on the send to REPL commands that people might want, and it ends up being a combinatorial explosion of commands I’d have to provide. I think the approach is going to be to allow people to build the commands that they want using REPL commands (https://cursive-ide.com/userguide/repl.html#repl-commands), so I’ll look at adding a new option to those that will allow this.#2021-03-2105:46aratareThat would be awesome. Really appreciate it! 🙂#2021-03-2012:07octahedrionhow I make Cursive get documentation ? I just get a popup saying "Fetching Documentation..." forever ok found it you have to go to Languages & Frameworks > Clojure > Documentation Options then click Update. I'd prefer old documentation to none, or at least tell us how to fix it#2021-03-2105:42cflemingI’ve had a few people report this, it seems to be a problem parsing the file downloaded from ClojureDocs. Is your system language set to English or something else?#2021-03-2316:39octahedrionEnglish#2021-03-2022:50ericdalloHello cursive users! Is there anyone who can help me understand how https://cursive-ide.com/userguide/macros.html#customising-symbol-resolution works exactly? 🧵#2021-03-2022:50ericdalloI'd like to implement it on clojure-lsp (#lsp): https://clojurians.slack.com/archives/CPABC1H61/p1616261170035400#2021-03-2022:51ericdallome and @U04V15CAJ would like to understand when Cursive suggest the "resolve macro as" popup#2021-03-2022:51ericdalloif it's always or only on specific cases#2021-03-2023:54AzzuriteI mean so far I've noticed it on each and every macro, but of course I can't know for sure as I don't have the source code 😄 since it's a completely manual step every user can decide for themselves where adding it makes sense#2021-03-2100:04ericdalloIt makes sense! I confirmed it here as well: https://clojurians.slack.com/archives/CPABC1H61/p1616281418052900?thread_ts=1616261170.035400&amp;cid=CPABC1H61 Thank you for the reply @UCULU82G3!#2021-03-2100:24Jeff EvansThere's also a settings menu where they can be set and imported/exported#2021-03-2105:40cflemingYes, that’s correct, this is offered on all macros, since Cursive can’t tell if they’re being resolved correctly or not.#2021-03-2215:31nonrecursivehey y'all, is it possible to specify which nrepl version cursive will use?#2021-03-2215:34nonrecursivethe larger question is, how can you specify nrepl middleware when using cursive + deps.edn?#2021-03-2215:42imre.nrepl.edn in the project root is what I use#2021-03-2215:43imreglobal one also works#2021-03-2216:10nonrecursivethanks 🙂#2021-03-2220:25cflemingYep, that’s the preferred way, Cursive will obey that.#2021-03-2216:45onetomThe default Cmd-' (single quote) shortcut for the raise action is not doing anything for me sometimes. I'm not sure what breaks it and what makes it work again. If I run raise from the action menu, it works. Had anyone else experienced such an issue?#2021-03-2220:25hlshipWould it be possible for Cursive to devote part of the REPL window to a progress bar when running tests in a namespace? Currently, we get an ephemeral popup only after tests complete.#2021-03-2220:59Ronny LøvtangenIf I use an alias for :extra-paths in a deps project, the CLJ REPL in Cursive can’t find the sources.
:clj-paths ["src/clj"]
:server {:extra-paths [:clj-paths]}
If I don’t use an alias, it works as expected.
:server {:extra-paths ["src/clj"]}
It works fine from the command line, and the project window in IntelliJ marks the folder correctly as source folder. Only experiencing an issue in the REPL. Maybe no support for using alias in :extra-path yet?
#2021-03-2221:18cflemingAre you specifying the alias when running the REPL?#2021-03-2221:37Ronny LøvtangenI’ve specified dev,server here#2021-03-2221:39Ronny LøvtangenIf I replace
:server {:extra-paths [:clj-paths]}
with
:server {:extra-paths ["src/clj"]}
it works fine, so I guess I have specified the alias ok. The difference seems to be specifying extra-paths with a keyword rather than a string
#2021-03-2222:07cflemingOk, I’ll take a look at that.#2021-03-2222:25Ronny LøvtangenThanks :thumbsup:#2021-03-2300:23onetomdoesn't :extra-paths [:clj-paths] mean :extra-paths [["src/clj"]]?#2021-03-2307:01Ronny LøvtangenIf it is replaced as-is, yes, but the tool probably treats it differently. According to https://clojure.org/reference/deps_and_cli, that’s the syntax for using alias names in paths. It works fine from CLI.#2021-03-2313:07borkdudeJust curious, is cursive running with a modified version of tools-deps internally?#2021-03-2323:54cflemingNo, Cursive has two options - use the CLI tools (which really just runs -Sdescribe to get the version and install location, then grabs the uberjar and uses that) or use tools.deps directly, in which case it downloads it from Maven.#2021-03-2313:29sbI have a prep task `
"yarn-install" ["shell" "yarn" "install"]
in the project.clj.. with
[lein-shell "0.5.0"]
but that isn’t run as in repl.. try to find packages.json from root.. (if I understand good) any idea how to fix it?
#2021-03-2313:35sb.IOException: Cannot run program "yarn" (in directory "/"): error=2, No such file or directory at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1128) at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1071) at java.base/java.lang.Runtime.exec(Runtime.java:592) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:566) at clojure.lang.Reflector.invokeMatchingMethod(Reflector.java:167) at clojure.lang.Reflector.invokeInstanceMethod(Reflector.java:102)#2021-03-2407:15cflemingThe problem here is that the CWD of the IntelliJ process is not the same as when running lein from the command line. You’d probably need a way to help shell to find the yarn command since the path will probably be wrong, and also a way to specify to yarn which directory it should install in - I don’t know if that’s possible.#2021-03-2409:42sbOk, thank you!#2021-03-2313:32sbI understand I can add in Cursive setup at “Before launch” NPM script (install). My question is, is that possible run the original project.clj w/ lein shell?#2021-03-2321:58denik@cfleming could cursive get a tap> UI? I’ve been falling back on shadow-cljs inspect but some of my projects don’t require CLJS, even http so it feels a little extra#2021-03-2323:57cflemingYou mean like a data inspector?#2021-03-2409:37thhellerhttps://clojureverse.org/t/status-update-inspect-cljs-eval/6074#2021-03-2409:37thhelleryeah its a data inspector#2021-03-3114:35denikyes!#2021-03-2323:25caleb.macdonaldblackAny idea why a second double quote is not being automatically inserted when editing a CLJS file in parinfer mode?#2021-03-2323:34AzzuriteThere is no difference for me between CLJ and CLJS, both work and insert a second " when I type only one#2021-03-2323:36AzzuriteMaybe check the "Editor->General->Smart Keys" section in the intellij settings#2021-03-2405:18caleb.macdonaldblackSmart keys in the editor looks fine. It’s something that has come and gone periodically. It will go for months not working, then suddenly work, then not working again. It’s very odd#2021-03-2408:16cflemingI’ve never experienced this, and while I don’t do it a lot I do edit CLJS from time to time, always using parinfer.#2021-03-2408:16cflemingI’m not sure what to try, I’ll have a look at the code tomorrow to see if there’s anything I can think of.#2021-03-2416:06eraserhdParinfer shouldn't be doing anything, AFAIK. When quotes are unbalanced, parinfer will leave the file untouched until the user fixes quotes.#2021-03-2323:25caleb.macdonaldblackCLJ files in parinfer mode work.#2021-03-2323:25caleb.macdonaldblackAlso a CLJS file in paredit or structural off works too#2021-03-2323:26caleb.macdonaldblackIt’s just CLJS with parinfer causing issues#2021-03-2323:27caleb.macdonaldblackThis is frustrating because as soon as brackets or quotes are mismatched in parinfer, there is heaps for lag in the editor. So if type one quote, I’m lagging until I close it. So I have to type to quotes and then move my cursor back one space to be inside the quotes.#2021-03-2400:54JAtkinsDoes IJ render markdown in the quickdoc window for clojure? I’m not sure if that would fall to the IJ team or to cursive, but it’d be nice to have#2021-03-2408:17cflemingNo, but I have a plan to do that in the near future.#2021-03-2415:40onetom+1 im backqouting symbols and keywords as a reflex already in docstrings, just like in commit messages...#2021-03-2415:42onetomhttps://www.reddit.com/r/Clojure/comments/ci1wr9/cursive_matching_bracket_highlighting_changed/ this bracket highlighting seems to be broken again in IntelliJ 2021.1 Beta... what would be the most effective way to report it to them? new issue on their youtrack and link the previous fix? https://youtrack.jetbrains.com/issue/IDEA-211720#2021-03-2416:04imreIs there a way to have intellij open the diff view as an editor tab?#2021-03-2416:10imreAnd now, something completely different: I found that the project-level spelling dictionary doesn't seem to work in my projects. No matter how many times I tell idea to save a word to that dict, the next time I open the project it's gone. Is this a problem with - me (probably) - cursive - idea ?#2021-03-2417:35onetomi was just about to look into how this is handled, because i want to share via version control some of the spellings. it's very sad if i can't do that 🙂#2021-03-2420:34imreLet me know how you get on. I'm hoping the error is on my side.#2021-03-2504:07Vincent CantinHi. When using a dark background with the rainbow parenthesis bundled in Cursive, the dark blue color is difficult to see, it does not contrast enough with the dark background. Could it be possible to make it less dark?#2021-03-2504:35cflemingYou can configure these at Preferences | Editor | Color Scheme | Clojure#2021-03-2504:36Vincent CantinSuper upper cool, thank you ! sheepy#2021-03-2504:37Vincent Cantin#0000FF -> #7070FF#2021-03-2504:09Vincent Cantin(The human eye is more sensitive to contrast of luminosity, less to contrast of colors. Blue is the color we perceive the least)#2021-03-2510:11Jordan Robinsonwhen testing, is there any way to open the tooltip or show difference window without having to mouse over the test?#2021-03-2510:11Jordan RobinsonI couldn't find a keyboard shortcut or anything but it might be that I couldn't figure out the name#2021-03-2510:16imreI don't think there is. See https://github.com/cursive-ide/cursive/issues/2229#2021-03-2510:20Jordan Robinsonah that's a shame, thanks for the info though#2021-03-2510:52imreThere are some related issues on gh and you can also find earlier conversations on this channel, like https://webcache.googleusercontent.com/search?q=cache:LyqrHCeONfkJ:https://clojurians-log.clojureverse.org/cursive/2020-06-23+&amp;cd=4&amp;hl=en&amp;ct=clnk&amp;gl=hu#2021-03-2511:44Jordan Robinsonahh okay, so you can actually open the tooltip by binding something to view -> error description in intellij at least#2021-03-2511:44Jordan Robinsonbut it doesn't show the show difference window#2021-03-2511:44Jordan RobinsonI guess that's something#2021-03-2514:33kennyYou should be able to click the yellow gutter icon to open the diff. #2021-03-2516:07imregutter doesn't work when there is more than one failure on the same line, such as when you use clojure.test/are or clojure.template/do-template#2021-03-2518:00thelittlesipperIs there a way to start an nREPL from IntelliJ and have it spin up figwheel-main? I know you can do it with a clojure.main REPL - but why not with an nREPL? I get a “no ack received error” everytime I try#2021-03-2518:04Jeff Evansquite possible that you just need to increase the timeout#2021-03-2518:04Jeff Evans#2021-03-2519:15thelittlesipperUnfortunately that did not do the trick :( What’s weird is that if I delay when I call (fig/start “dev”) - then the nREPL connects just fine. `(thread (Thread/sleep 3000) (fig/start “dev”))`#2021-03-2519:17thelittlesipperActually, just running (fig/start “dev”) in a separate thread solved it. No need for the delay.#2021-03-2605:10Vincent CantinIs it possible to have more places where we can use the "code folding"? I need something like that to edit large hiccup-based render functions.#2021-03-2605:28Vincent CantinCurrently, I have code folding handles only near the def and defn.#2021-03-2605:31Vincent Cantinoh .. I found this related issue https://github.com/cursive-ide/cursive/issues/2042#2021-03-2606:10alex-eberts@U8MJBRSR5 IntelliJ also recognizes blocks bounded by ;; region and ;; endregion which is a decent workaround. #2021-03-2701:09AJ JaroWhoa @U0G3C3USJ I didn't know that!! Thanks for sharing!!#2021-03-2800:43jIs it possible to use clojure 1.10 with cursive? I noticed that we can only download up to clojure version 1.9:#2021-03-2800:44cflemingOh, I haven’t updated that - I’ll fix that. Yes, you can, I’d recommend using the Clojure Deps project type, which will allow you to manage your dependencies.#2021-03-2800:44cflemingThat will come with Clojure 1.10.x by default.#2021-03-2800:44jThanks @U0567Q30W!#2021-03-2800:46jHow do I switch to Clojure Deps project type?#2021-03-2800:47cflemingYou can either create a new project and select that option in the wizard, or you can create a deps.edn file in the root of your project containing {} and then right click it in the project view and “Add as Clojure Deps project”.#2021-03-2800:48jI added deps.edn and it works perfectly! Thanks again! 🙂#2021-03-2811:43AzzuriteUsing deps.edn also lets other devs not using intellij+cursive work with your project 🙂#2021-03-2919:45kendall.buchananI recently switched from Vim (with vim-fireplace)—the feature I miss more than anything is the ability to paint the output of a form into the buffer itself, rather than having to open the REPL window (or keep it open). Any suggestions?#2021-03-2920:24cflemingI’m slowly working on this, I’ve been working with JetBrains on some problems with it. But it’s getting there so I’m hopeful this will be in a version soon.#2021-03-3021:37kendall.buchananFantastic!! Thanks for letting me know.#2021-03-2920:32royalaidHey @cfleming, I think I may have hit another corner case in with regards to :refer-clojure and :rename#2021-03-2921:14cflemingI think in this case you don’t want the :exclude, right? You just want to rename the referred symbol?#2021-03-3109:27henryw374what tricks do people have for cursive when you have macros that generate a bunch of symbols? I know you can teach intellij in simple cases as described here: https://cursive-ide.com/userguide/macros.html#2021-03-3109:31imreSubscribing to this. I am unaware of a way to do this now.#2021-03-3109:33imrehttps://www.youtube.com/watch?v=kt4haSH2xcs#2021-03-3109:34thhellernot the answer you are looking for probably but disabling all "unresolved symbol" warnings works for me 😉#2021-03-3109:35imrealso, https://github.com/clj-kondo/clj-kondo/blob/master/doc/hooks.md#2021-03-3109:38henryw374thanks I'll have a read of that. btw There was a bit of discussion in the recent defn cast about kondo and cursive and the overlap in some bits of functionality#2021-03-3109:38imreThanks, I'll look that up#2021-03-3120:35cflemingOne thing that’s not documented yet is the new Resolve as: None which will disable the warnings locally inside that macro form. This works well for DSL-style macros which define a lot of local symbols, but doesn’t help for macros which define global var-style ones.#2021-03-3112:10manutter51I wonder if it would be useful/practical to have something like the following:
;;@resolve with-my-wrapper :as let
(defmacro with-my-wrapper [bindings & body]
  ,,,)

(with-my-wrapper [foo bar]
  (do-stuff))             ;; <-- Cursive now knows to treat this like a `let` expression
#2021-03-3112:12manutter51Kind of like Java annotations, except it would be IDE-specific and wouldn’t affect how the code actually runs. Cursive would just check comments for a leading ;;@resolve and then do the same thing as when you select Resolve As via the GUI.#2021-03-3112:15manutter51Pros: automatically configures Cursive correctly when sharing code; alternative to generating stubs; avoids needing to regenerate stubs for same source#2021-03-3112:15manutter51Cons: ???#2021-03-3116:30onetom- how would u "annotate" 3rd-party libs? fork them and use :git/url, instead of :mvn/version? - how about closed source stuff, like datomic, where u only have access to the AOT compiled class files? - as u said, it's an IDE-specific solution; it wouldn't work with most teams, because they are typically not homogenous editor-wise. - using comments is a horrible hack, as we saw in other instances, like javadoc. it#2021-03-3116:33onetom- it's also not easy to process programmatically, because u would need to write a character level parser for the comment strings, as opposed to using the already existing clojure parser - u r also losing reflection capabilities, so for example editor tooling can't query a running clojure process about these formatting settings#2021-03-3112:32StuartI have a clojurescript project that when I open in IDEAJ and Cursive on my linux box it all works fine, but when I open it on windows it yellow underlines everything: What could I be missing between my linux install and windows install? It builds and runs fine, hot-realoading works etc. It's just cursive doesn't seem to like it. On Linux I do shadow-cljs pom to create the pom.xml and load that as the project file, did same on windows and it made no difference.#2021-04-0101:58cflemingThere are some suggestions of things to check here, does that help? https://cursive-ide.com/userguide/eap/troubleshooting.html#help-lots-of-symbols-don-t-resolve#2021-03-3113:32helios@cfleming bug report. If deps.edn has a map with extra keys, then cursive complains about The following errors were found during project resolve: /path/to/deps.edn: : nodename nor servname provided, or not known. Example broken edn
'{org.clojure/clojurescript {:mvn/version "1.10.844"
                               #_:git/url ""
                               #_:sha "3fdaabedb1343f434b6cb4f75fa28e748f96eff0"
                               #_#_:local/root "/Users/mk/Downloads/clojurescript/"
                               #_#_:local/root "/Users/kommen/work/clojurescript/"}}
#:org.clojure{clojurescript {:mvn/version "1.10.844", "" "3fdaabedb1343f434b6cb4f75fa28e748f96eff0"}}
#2021-03-3113:32heliosnote that :git/url and :sha only have one #_ so the https line is not commented, neither the value of the sha itself#2021-03-3113:33heliosputting #_ #_ fixed everything 🤷#2021-03-3116:21onetomwhy the shrug emoji? is it not clear why do u need 2 #_ forms?#2021-03-3121:43jcsims#_ only comments the very next form, so it ended up being a map with key "" and value "3fdaabedb1343f434b6cb4f75fa28e748f96eff0" - not sure how that's parsed#2021-03-3121:43jcsimsi.e. :git/url and :sha are the only things commented out#2021-03-3121:44jcsims(in the first two lines)#2021-03-3123:29cflemingThat’s right - that’s what helios’s original comment shows at the end, the resulting map. Oddly, deps itself accepts this so I’m not sure why it would fail with Cursive since Cursive is getting that error back from deps. I’ll try to reproduce this and see if I can figure it out.#2021-04-0100:31cflemingInterestingly, even though the CLI doesn’t produce an error, it doesn’t produce the right result either:
~/d/c/helios-deps-problem> cat deps.edn
{org.clojure/clojurescript {:mvn/version "1.10.844"
                               #_:git/url ""
                               #_:sha "3fdaabedb1343f434b6cb4f75fa28e748f96eff0"
                               #_#_:local/root "/Users/mk/Downloads/clojurescript/"
                               #_#_:local/root "/Users/kommen/work/clojurescript/"}}⏎
~/d/c/helios-deps-problem> clojure -Stree
org.clojure/clojure 1.10.3
  . org.clojure/spec.alpha 0.2.194
  . org.clojure/core.specs.alpha 0.2.56
~/d/c/helios-deps-problem> clojure -Spath
src:/Users/colin/.m2/repository/org/clojure/clojure/1.10.3/clojure-1.10.3.jar:/Users/colin/.m2/repository/org/clojure/core.specs.alpha/0.2.56/core.specs.alpha-0.2.56.jar:/Users/colin/.m2/repository/org/clojure/spec.alpha/0.2.194/spec.alpha-0.2.194.jar
#2021-04-0100:32cflemingI’d have expected it to pick up clojurescript and just ignore the map entry it doesn’t understand. @U064X3EF3 might know why that is.#2021-04-0100:36Alex Miller (Clojure team)#_ is not valid edn #2021-04-0100:36Alex Miller (Clojure team)And deps.edn is read with the the edn reader#2021-04-0100:36Alex Miller (Clojure team)Not sure if that’s a clue#2021-04-0100:36cflemingOh, interesting, I had forgotten that. Shouldn’t that produce a read error then?#2021-04-0100:39Alex Miller (Clojure team)Actually I’m wrong!
#2021-04-0100:39Alex Miller (Clojure team)The discard sequence is part of edn#2021-04-0100:43Alex Miller (Clojure team)I don’t recognize that error, don’t know what that is#2021-04-0100:43cflemingOk, I’ll try to debug this later and report back.#2021-04-0101:50cfleming@U0AD3JSHL I’m not seeing an error with this. Cursive imports without the CLJS dep but that’s because Deps doesn’t return it, as detailed above. I’m using CLI tools 1.10.3.810.#2021-04-0101:53cflemingThat error seems to be something to do with ssh. Do you have something in your user deps file which might cause deps to do something with ssh? The most likely candidate would be something with git and the new git shell integration, but that’s getting outside the realms of my deps CLI knowledge.#2021-04-0102:00Alex Miller (Clojure team)The error was about Maven so that doesn’t match up#2021-04-0102:02Alex Miller (Clojure team)That deps.edn above is wrong - missing the outer map with :deps key#2021-04-0102:10onetomin the original message the map had a quote, so i assumed it wasn't the whole deps.edn#2021-04-0102:29cflemingUgh, you are absolutely right, I’m not paying attention. If I add the outer map and :deps, both Cursive and CLI do the right thing. I can’t repro the initial error.#2021-04-0106:55heliosyes, sorry, it wasn't the whole deps.edn 🙂#2021-04-0106:55helioswas just the culprit part of a larger deps.edn that worked fine#2021-04-0214:41onetomSo, the matching-paren highlighting seems broken again in the upcoming IntelliJ 2021.1 I've added a comment to the ticket which reported the same error 2 years ago: https://youtrack.jetbrains.com/issue/IDEA-215291 Would be good to raise awareness of this problem, because it's super annoying in Clojure, where it's very common to have adjacent parens.#2021-04-0419:49cflemingUgh, bummer. I’m away with my family over Easter but will look at this when I’m back.#2021-04-0215:21AdieI have registered cursive with intellij. I now want to run the tests of one of my clojure services. How do I run the tests using cursive?#2021-04-0215:48Daniel WellmanHi Adie, you can either: 1. Use the standard IntelliJ “Run Tests…” option if you have a test file open, which will compile the Cursive code then run the test. If your project takes a while to compile, this is a slower option. 2. However, if you have a REPL session running, you can also run the tests via the Tools > REPL > Run Tests … options (there are few to either run the tests in the current namespace, the test function under the cursor, or re-run the last test command). This test output is put in the gutter/margin of the test source file, unlike the first option which uses the standard IntelliJ test runner. It’s very fast and I try to use this mode all the time. Here’s some background on the second option: https://cursive-ide.com/userguide/testing.html#2021-04-0216:03mokrHi, after a complete reinstall of IntelliJ 2020.3 + Cursive on MacOS, where I deleted all preference, application support and cache directories as well, I struggle with IntelliJ forgetting what I did in my previous session. More specifically I get this dialog:
Unindexed remote maven repositories found.
			The following repositories used in your projects have not been indexed yet: 
			
			
			If you want to use dependency completion for artifacts in these repositories,
			Open Repositories List, select the required repositories and press the "Update" button
			You can disable this notification.
I scan both indexes and everything looks good. After a restart I get the same message. Any ideas?
#2021-04-0217:46Jeff Evansmany others in this channel have reported the same (this prompt always appears on restart). I’ve personally seen it too#2021-04-0303:56aratareThis is mainly for autocompletion if I recall correctly. E.g. when you use gradle or maven and you want a library, IntelliJ can help you by autocompleting the proper library.#2021-04-0303:56aratareI just disable this completely since it’s harmless and doesn’t add anything particularly useful.#2021-04-0314:21mokrThanks, good to know that it is not just my setup at least. I saw Tony Kay use this autocomplete in one of his many great videos on Fulcro, so I was hoping to do the same as part of upping my IntelliJ/Cursive skills.#2021-04-0314:24aratareYou can just follow the instruction in the popup and update it manually. I used to use it for a bit, but found it not really useful because it might find a bunch of libraries with the same name, so I’d still have to go and double check the author anyway.#2021-04-0318:34mokr@U013F1Q1R7G Maybe I wasn’t clear enough, but the “I scan indexes and everything looks good” is that manual step. I’ve manually transitioned them from “never” (indexed) to current time several times, but a restart clears it, triggering the popup once again on the next start. So, IntelliJ has a severe case of amnesia it seems 🙂#2021-04-0403:16aratareMy bad then#2021-04-0216:27isakIs it possible to add custom colors/backgrounds to source code in Cursive/IntelliJ? For example, if I have this keyword in my code, I'd like to change the appearance of text like "mt-2" and "p-2" (Tailwind classes for margin-top and padding) so they are easier to spot.
[:input.mt-1.p-2.border.border-gray-300.rounded-sm.bg-white ...
#2021-04-0419:50cflemingI don’t think there’s any good way to do this, sorry. The issue is that those classes are just part of a normal keyword, even identifying them as hiccup isn’t totally trivial.#2021-04-0514:59isakAh, ok :thumbsup::skin-tone-2:#2021-04-0416:37indyWow, one more tailwind feature request. The jetbrains tailwindcss plugin has autocomplete/suggestions for tailwind classes when adding it to an HTML tag's class attribute. Can this be extended to hiccup?#2021-04-0419:51cflemingThe problem here is since It’s All Data, it’s hard to reliably identify what’s hiccup and what’s not.#2021-04-0420:45indyRight. There doesn't seem to be any action to manually invoke the suggestions. Is it possible to do that? But I guess that is IntelliJ's realm?#2022-10-2000:57Jared LangsonThis is also a feature I am interested in. Regardless of if it requires manual invoking, it would still be useful. @U0567Q30W#2021-04-0517:42cbchello, i'm new and i'm trying to use shadow-cljs with cursive, is it possible to get command completion for js libraries that were installed via NPM? i'm currently using the pom.xml, as detailed here: https://shadow-cljs.github.io/docs/UsersGuide.html#_cursive#2021-04-0615:59bbqbaroni’ve found cursive + lein checkouts to be a little unpredictable. it seems sometime as if there’s some hidden state, or there’s something i’m very subtly doing wrong/differently in each case. does anyone else have data on this? tips/arcana? it unfortunately seems to boil down to “sometimes it works and sometimes it doesn’t”, which i know isn’t very useful. when it doesn’t work, i don’t get errors. rather, it seems as if the checked-out project is added to my intellij workspace (such that its namespaces show up when opening a namespace — twice, in fact — and its files are in my left-hand Project display pane). weirder, changing the checked-out source does change the REPL behavior. cursive, however, goes to my .m2 jar, if any, when asked to jump to the definition of the checked-out code, and, when i open the source files from the checked-out project, cursive is not willing to reload them, with It is not in scope for the module used to start the REPL.#2021-04-0615:59bbqbaronif any of this is familiar, any info would be great!#2021-04-0616:01bbqbaronFWIW, the checked-out project seems to be added to my intellij state by cursive, so it does, fundamentally, recognize that checkouts exist. it’s not just blithely ignoring them such that they only have any effect on the lein repl itself.#2021-04-0706:44heliosIs there a way to have cursive be able to resolve babashka projects? For example, babashka.curl and other namespaces are always unresolved#2021-04-0707:35heliosor js stuff? https://cln.sh/MgHBrt#2021-04-0707:35helios(or at least to not complain about those)#2021-04-0707:40borkdudeYou can add a deps.edn with these libs #2021-04-0901:57cflemingThere isn’t a way to get this to work automatically at the moment, sorry - I’m planning to add an SDK type which will help with this.#2021-04-0901:57cflemingThere’s an issue discussing problems with bb: https://github.com/cursive-ide/cursive/issues/2516#2021-04-0714:18R.A. PorterI see that IJ 2021.1 is released. I used to be aggressive about upgrading and often ran on the EAPs, but because they like to make little changes that break Cursive I’ve become much more gun shy. Were the betas/RCs running well with Cursive so that I can assume it’s safe to upgrade today, or would it be better to wait a few weeks?#2021-04-0714:54imreI haven't upgraded yet as a few other plugins I use aren't compatible yet. However there was this a few days ago: https://clojurians.slack.com/archives/C0744GXCJ/p1617374485142900#2021-04-0718:44salami just upgraded intellij idea to 2021.1 and got the java.lang.Throwable: Non-idempotent computation: it returns different results when invoked multiple times or on different threads exception as a pop-up notification when opening every existing deps.edn project. i'm not sure if it breaks anything but figured i should report it here in case Colin is interested in fixing it (stacktrace attached).#2021-04-0719:16rcruppI upgraded to 2021.1 also and my remote repl configuration stopped working. Error stated that "REPL run configuration is incorrect - no module selected" when I attempted to run it.#2021-04-0719:40rcruppLike all things, it works now after invalidating the project caches and restarting#2021-04-0902:24cflemingI’ve been using 2021.1 since the start of the EAP and it’s been working well for me. The idempotence check isn’t new in 2021.1, that’s been there for a while now.#2021-04-0902:31salami see. i am greeted with this error message whenever i open an existing deps.edn project. it would be nice it didn't show up in the first place if it doesn't have any impact on the functionality/stability of the ide/cursive.#2021-04-0902:37cflemingYes, this is unfortunate, and I’m not sure what the implications are since it doesn’t seem to affect anything that I can see. Fixing it is also a significant engineering effort at this stage. I’m going to talk to JetBrains about it and see if I can disable the message in the meantime.#2021-04-0714:49Ilari TuominenI just updated and then remembered that I haven’t bought a new Cursive license, I can safely say that Cursive 1.10.0 does not work with Idea 2021.1. Is upgrading cursive the only path for me now?#2021-04-0901:59cflemingRight, 2021.1 support was added in 1.10.1. You’ll have to upgrade Cursive in that case, yes.#2021-04-0715:07Endre Bakken StovnerIn IdeaVIM, how can I make * search for the whole term? Currently, if the cursor is above create in create-jobs it looks for create not create-jobs.#2021-04-1403:05kendall.buchananI’ve wondered the same thing :man-shrugging:#2021-04-1819:53seriogaConfigure iskeyword#2021-04-2316:29Endre Bakken StovnerDanke!#2021-04-0715:08Endre Bakken StovnerIs there a refactoring that allows me to rewrite (deeply (nested (function calls))) into (-> (function calls) nested deeply)#2021-04-0715:14imrethread form and unthread form#2021-04-0715:53Endre Bakken StovnerThanks!#2021-04-0719:35Kari Marttilahttps://blog.jetbrains.com/idea/2021/04/intellij-idea-2021-1/ => is it safe to install (i.e. will Cursive work with this new version)?#2021-04-0719:36Kari MarttilaAah, someone already tried... maybe not yet installing it. 😀#2021-04-0719:48Jeff EvansI have two machines so I’ll be a guinea pig on one of them#2021-04-0720:04Jeff Evansfirst observation: Recent Projects disappeared#2021-04-0720:04Jeff Evansalthough that may happen with every major update. I can’t remember#2021-04-0720:09Jeff Evansand my Cursive specific keyboard shortcuts disappeared 😞#2021-04-0720:11Jeff Evansalthough IntelliJ sync restored those, phew#2021-04-0810:33onetomi haven't experienced any of those issues. (im on latest macOS Big Sur 11.2.3 (20D91) and cursive 1.10.2-eap2-2021.1)#2021-04-0810:36onetomthe paren highlighting has definitely changed back to that undesirable state where it was in 2018 😞 if my caret is at the position of | in an expression like (xxx (yyy)|), then the 1st open paren is highlighted, instead of the 2nd open paren as the matching one.#2021-04-0810:48onetomim getting some cursive exceptions though, but those seem to be the same one i was getting on earlier versions of intellij too, so i think it's specific to my actual project. for the record, here is the exception:
java.lang.Throwable: Non-idempotent computation: it returns different results when invoked multiple times or on different threads:
  class cursive.psi.impl.synthetic.ClJavascriptAlias != class cursive.psi.impl.synthetic.ClNamespaceAlias
  which is class of Namespace alias http (org.httpkit.client) and Namespace alias http (org.httpkit.client)
  which is element of 
#2021-04-0902:01cfleming@U086D6TBN I’m not seeing that paren problem, it’s working fine for me and no-one else has reported that.#2021-04-0902:01cflemingAnd yes, the non-idempotent thing is an ongoing problem, not 2021.1 specific.#2021-04-0902:36onetomgreat to hear that the paren thing is not reproducible. most likely it's caused by some plugin then! i will do some bisecting on my plugins!#2021-04-0902:37cflemingI’m interested to hear if you figure out which one it is!#2021-04-0918:22wilkerlucioone more data point: to me the parens are working as expected#2021-04-0919:08wilkerlucioone very subtle detail I noticed (maybe not from the last IntelliJ, but using Intellij with BigSur): the cursor, specially the Text cursor, seems like instead of having the “clicking point” in the middle (as it is in the rest of the OS) it is positioned at the top left corner of the icon (like if it was a pointer cursor)#2021-04-0919:09wilkerluciodid anybody else experience that? I noticed this after having a bunch of selections that I though I was starting at a specific char, but off by one, many times#2021-04-1011:40octahedrionquick documentation is broken for me since the update: colour scheme doesn't follow dark mode, and popup randomly shows up as docked then stops showing at all until restart#2021-04-1014:24octahedrionreverted#2021-04-1205:21onetom@U0567Q30W i've just installed an IntelliJ CE 2021.01 from scratch and only added Cursive stable as a dependency and the highlighting works as expected. I've upgraded Curisve to 1.10.2-eap2-2021.1 and highlighting still works. On my main config, even after removing the Rainbow Brackets plugin, the highlighting is still buggy. Here is my IntelliJ config, with all the plugins listed at the end. Maybe having a glance over them would give u an idea which one might interfere with Cursive:
IntelliJ IDEA 2021.1 (Ultimate Edition)
Build #IU-211.6693.111, built on April 6, 2021
Licensed to Tamas Herman
Subscription is active until November 26, 2021.
Runtime version: 11.0.10+9-b1341.35 x86_64
VM: Dynamic Code Evolution 64-Bit Server VM by JetBrains s.r.o.
macOS 11.2.3
GC: G1 Young Generation, G1 Old Generation
Memory: 4096M
Cores: 16
Registry: ide.allow.merge.buttons=false, ide.settings.move.mouse.on.default.button=true, suppress.focus.stealing.disable.auto.request.focus=true
Non-Bundled Plugins: AceJump (3.7), IdeaVIM (0.66), Key Promoter X (2021.1.1), Org4Idea (0.4.1), Shell Process (1.3.2), YAML/Ansible support (0.11.2), com.4lex4.intellij.solarized (2.3.0), com.intellij.plugins.watcher (211.6693.44), com.paperetto.dash (3.3), de.dieploegers.develop.idea.shellfilter (3.0.3), de.netnexus.camelcaseplugin (3.0.8), io.protostuff.protostuff-jetbrains-plugin (0.13.0), nix-idea (0.3.0.6), org.intellij.RegexpTester (1.0.8), org.jetbrains.plugins.localization (211.6693.44), org.jetbrains.plugins.rest (211.6693.44), mobi.hsz.idea.gitignore (4.0.4), name.kropp.intellij.makefile (211.6693.108), AWSCloudFormation (211.6693.108), org.plugin.dot.id (1.2), org.toml.lang (0.2.144.3766-211), com.github.pshirshov.bytecodeeditor (0.2.1), zielu.gittoolbox (203.5.3), com.intellij.plugins.html.instantEditing (211.6693.111), com.cursiveclojure.cursive (1.10.2-eap2-2021.1), com.jetbrains.plugins.jade (211.6693.65), com.dmarcotte.handlebars (211.6693.44), PlantUML integration (5.1.0), Pythonid (211.6693.115), aws.toolkit (1.25-211), net.ashald.envfile (3.2.1), ru.meanmail.plugin.requirements (2021.3-211), org.asciidoctor.intellij.asciidoc (0.32.35)
Kotlin: 211-1.4.32-release-IJ6693.72
#2021-04-0722:03Lone Rangerhail mary: there's no chance Cursive has a cljs debugger, is there?#2021-04-0902:04cflemingSadly, no, sorry.#2021-04-0917:02Lone RangerNo worries. Seems really elusive thinking-face#2021-04-1011:50gscaccoHi all. If I select some part of a s-expression including parenthesis (even not balanced) and press del, cursive deletes the selection generating a not-balanced s-expression. From here I can't find any way to re-balance parenthesis. Is there a way to solve this problem ? Thanks#2021-04-1011:56raspasovDon’t select expressions manually; I personally use “Extend Selection”#2021-04-1011:57raspasov(with a keyboard shortcut attached, ofc)#2021-04-1012:03gscacco👍#2021-04-1012:06simongrayuse parinfer#2021-04-1014:41dpsuttonIf using paredit you can insert a new balanced pair of parens and then highlight and delete one to leave you with the desired paren to help balancing. But the advice to never get into this state is the more correct way to manipulate forms#2021-04-1014:46simongrayAll I know is that as long as I keep auto-indenting while using parinfer, I can quite casually highlight and delete most stuff and It Just Works(tm) 😉#2021-04-1108:47armedSometimes I manually select closing paren, copy it to buffer and paste somewhere else to achieve balance. I know it’s dirty technique, but works. #2021-04-1207:56katoxthe dirty solution to unbalanced parens with cursive paredit is just copying and pasting closing parens#2021-04-1213:16raspasovIn addition to “Extend Selection” + backspace, you can also simply “backspace”; With paredit (what I use) it always does the right thing (at least from my perspective); But I agree coming from another language it can be tempting to hold Shift + arrow keys to select portions of the code; Just don’t 🙂 It can take a few weeks to break that muscle memory; I’ve forgotten those times so much that now it’s super hard to code without at least “Extend Selection” in another language; For example, XCode doesn’t have “Extend Selection”, so if I have to write Swift, I use AppCode (by IntelliJ) and use Extend Selection, copy/paste/delete all the time (since there’s no easy+proper structural movement).#2021-04-1315:44Endre Bakken StovnerHow do you comment a form in cursive?#2021-04-1315:45imre#_#2021-04-1315:45imreThis applies to all of clojure, not only cursive though#2021-04-1315:45imreSo I might have misunderstood your question#2021-04-1315:46Endre Bakken StovnerAh, so there is no comment form like in emacs.#2021-04-1315:47imreThere isn't an intellij action for it, no#2021-04-1315:47imreThere's an open issue however https://github.com/cursive-ide/cursive/issues/1047#2021-04-1315:58Endre Bakken StovnerGood to know!#2021-04-1316:01Jeff EvansI mean, the block comment action works. It just prefixes all the lines which isn't always nice. Parinfer does the right thing though#2021-04-1316:06imreHmm. block comment action is disabled for me no matter whether I'm in paredit or infer#2021-04-1316:06Jeff EvansThat's strange... I'm using it on a regular basis#2021-04-1316:07Jeff EvansVia the keyboard shortcut anyway#2021-04-1316:13imredo you have anything selected when you invoke it?#2021-04-1317:29Jeff Evanswell yeah… I don’t see how else you’d use it#2021-04-1317:30Jeff Evanspushing ⌘/#2021-04-1317:58raspasovYou can record an IntelliJ macro (nothing to do with Clojure macros) https://stackoverflow.com/questions/9638895/rubymine-shortcut-to-insert/9639266#9639266#2021-04-1317:58imreThanks for the explanation. Although I believe that still triggers the line comment action#2021-04-1317:58raspasov(before 1. make sure you’re actually inside an Sexprs) 1. Edit | `Macros` | `Start Macro Recording`#2021-04-1317:59raspasov2. Navigate | Structural Movement | Move backward out of Sexpr#2021-04-1318:00raspasov3. Type #_ whenever the cursor is (should be at the beginning of an Sexprs)#2021-04-1318:00raspasov4. Edit | `Macros` | `Stop Macro Recording`#2021-04-1318:00raspasov5. Give your “macro” a name#2021-04-1318:01raspasov6. Go to Keymap and assign a keyboard shortcut for it#2021-04-1318:01raspasovJust tried it, it works! It’s a nice idea.#2021-04-1318:01raspasovYou can be anywhere inside an Sexprs, press your shortcut, and comments out the whole form via #_#2021-04-1318:07raspasovYou can add “Format Code” as a last action of your macro, then it looks even better 🙂#2021-04-1413:55Endre Bakken StovnerThanks!#2021-04-1315:44Endre Bakken StovnerComment out that is#2021-04-1317:42Phil ShapiroI use comment. It’s not specific to cursive but works very well. https://clojuredocs.org/clojure.core/comment#2021-04-1418:49wilkerluciohello, I’m having a strange issue, on the latest cursive and intellij, trying to do a rename, but the IDE is stuck at “Looking for usages”, its been like that for many minutes now#2021-04-1418:56wilkerlucioWhen I do a regular Find Usages on the same keyword, I got some partial results, and the search never ends#2021-04-1418:56wilkerluciowith other keywords it works fine, seems like the name name is part of the problem#2021-04-1419:06Jeff Evansit’s my observation that the rename refactoring is paranoid/finds too many references, especially for “common” names like that#2021-04-1419:06Jeff Evansnot just in Cursive, but even in the built-in Java world#2021-04-1419:06wilkerlucioyup, small names are horror for refactorings 😛#2021-04-1419:07wilkerluciobut even when it takes long, it eventually finishes#2021-04-1419:07wilkerlucioin this case, it seems to always get stuck at the same place, I guess there is some bug, something broke there, and then it got stuck =/#2021-04-1419:23jacekschaeif you didn’t already try to exclude some folders, this help me with the same thing you are experiencing#2021-04-1419:26wilkerlucioall compiled things are excluded, I also trying doing a find usages limiting the scope (I made a custom scope and ensure I only had clj sources), but still the same result#2021-04-1419:26wilkerlucio(its around 30 min running now, and not finishing)#2021-04-1421:03cfleming@U066U8JQJ What are you trying to rename? A symbol/keyword/something else?#2021-04-1421:09cflemingCould you take a thread dump and mail it to me? https://intellij-support.jetbrains.com/hc/en-us/articles/206544899. I suspect it will show “somewhere in the bowels of IntelliJ” but you never know.#2021-04-1514:04wilkerlucio@U0567Q30W sent#2021-04-1604:59baibhavbistaHello, I had a question regarding using Ultimate vs Community version of IDEA with Cursive. Does anyone know what (if any) features I will not get if I use the community version? Would love answers about what features you all regularly use that would not be possible in the community version.#2021-04-1605:45cflemingThere are no Cursive features that require the Ultimate edition at the moment. Obviously you would not have the IntelliJ features (web stuff is probably the main one people miss) but Cursive will be exactly the same in both.#2021-04-1605:45cflemingThat may change in the future, especially around better JS support for CLJS, but that’s still unknown at this point.#2021-04-1606:59baibhavbistaThank you for the clear answer 😄#2021-04-1618:28raspasovUltimate has nicer support for exploring JS stuff around React, etc. Been using Ultimate for a couple of years, but as far as I remember the Community didn’t “understand” JS files very well or at all. If you just focus on server side Clojure, you’re just fine with Community most likely (since Community has almost identical pure Java support with Ultimate, as far as I remember). I would start with Community and see if you miss anything. Relatively painless to upgrade.#2021-04-1618:30raspasovYou should be able to copy over your custom settings, etc over to Ultimate without much issue. I don’t recall any problems.#2021-04-1620:07imre@cfleming I read that there's a new version out but my intellij doesn't seem to see it. I'm on 1.10.2-eap2-2020.3#2021-04-1620:20imretried checking for updates a number of times but no luck#2021-04-1903:41cflemingHmm, I'm not sure - I just checked the repo page, and it should definitely be there even for EAP users.#2021-04-1909:38imreThanks for checking. Managed to update now via idea properly#2021-04-1621:54kennyIs there a Cursive setting that lets you have autocomplete prefer (or only) use unaliased keywords even if an alias for that ns exists?#2021-04-1903:41cflemingThere isn't at the moment, but it's something I've considered.#2021-04-1915:21kennyI’ve really started to dislike aliases for keywords. The only alternative is to type the whole thing out. It’d be great to have this as an option 🙂#2021-04-2023:00cflemingI'm curious - why don't you like them?#2021-04-2200:10kennyThey tie data to code. Copy pasting code does not work. Renaming a namespace breaks all keywords (bad if that data went into a DB).#2021-04-2200:11kennyI've started to think of them as an anti-pattern.#2021-04-2200:12kennyIt's really hard to move away from it when autocomplete so strongly wants me to use them, haha.#2021-04-2200:28cflemingInteresting. I’m actually planning to fix the copy paste issue, for keywords and also for symbols referring to vars. In the case of data, systems wouldn’t store them as aliased anyway normally, would they? I’d assume they’d be using a semantic kw object with ns and name parts. The alias thing is really just a reader shortcut, and doesn’t exist in e.g. EDN.#2021-04-2200:30kennyIt is recommended for all data stored in Datomic to be qualified keywords. Data is inputted and outputted in keywords.#2021-04-2200:30cflemingSure, but what I mean is that Datomic won’t store it with the alias, it’ll store it with the full ns/name combo, right?#2021-04-2200:31kennyOh, haha. Yes - that is correct. The reader always expands first.#2021-04-2200:35kennyIt still seems to be mixing my data with my code. I have no need to require a namespace simply to refer to my data (I'm assuming that's the thought on how to fix it). I only want to work with the data.#2021-04-2200:56cflemingI’m not proposing a solution, just trying to understand the problem better. Is there a case where the aliasing causes a problem? I get the copy/paste issue. Renaming namespaces shouldn’t be a problem, renaming aliases might if Cursive doesn’t handle that properly.#2021-04-2619:33kennyThis isn’t a problem with Cursive, just aliases. I don’t like that it’s depending on the context of the namespace. Since it’s just data, I prefer to have it be exactly that — no implicit context involved. #2021-04-1800:41Joe R. SmithI've noticed for some time now that Cursive's pretty printed REPL output is really narrow, e.g.:
([:db/retractEntity
  [:reminder/id
   #uuid"2f2c5f85-f0e4-4aea-b1e9-de0c6d51d19b"]]
 [:db/retractEntity
  29827551438457744]
 [:db/retractEntity
  36429019251607655])
Is this configurable somewhere?
#2021-04-1800:41Joe R. Smithanother more extreme example:
[1
 2
 3
 4]
#2021-04-1903:47cflemingThat seems strange, and is definitely not what I'd expect. Is this with an nREPL REPL? What is your editor right margin set to? Sorry, my computer is in the shop so I can't look up the exact setting.#2021-04-1920:07Joe R. SmithYes, it's an nREPL REPL#2021-04-1920:09Joe R. SmithAnother data point- it only does this on my Apple Silicon Mac Mini w/ the ARM build of IntelliJ. I'm not at home right now so I can't check versions, but will when I get home.#2021-04-2009:00cflemingHmm, that's tricky - I don't have an Apple Silicon machine to repro on. I may well have one soon though, if my computer is actually dead.#2021-04-2106:47golanweissHi, I’m using deps, and each time after initial project scanning, Cursive overrides my definitions for my modules’ source root, test root, resources etc. Seems it takes what is in the deps.edn under :paths and marks each of them as source root. Is this a known issue? is there a workaround?#2021-04-2107:25cflemingNo, that's how it should work, and it's also how all the other integrations (e.g. Maven) work. If you're using a build integration to manage your module, then you need to put the config into your module file (deps.edn in this case) and that will be reflected in the IDE setup.#2021-04-2107:47golanweissThanks for the quick response. what do you mean exactly? Can you give me an example of what to put in the deps.edn? There’s only :paths and adding “test” there doesn’t help.#2021-04-2107:47golanweissI think the correct behavior should be to keep user decisions of the IDE and not override them.#2021-04-2107:48golanweiss> If you’re using a build integration to manage your module I did not understand what do you mean exactly. This is just a clojure deps monorepo project in IntelliJ.#2021-04-2122:44cflemingWhen you use a build system like Lein, Deps or something like Maven, then the details of the corresponding IntelliJ module are updated to match the details from the build file. So if you want the details reflected into IntelliJ to change, you need to update your build file rather than updating the configuration in the IDE. This means that things you want marked as source roots need to be either under :paths or under :<alias>/:extra-paths.#2021-04-2109:25Ronny LøvtangenMy src/clj folder ends up being marked as test source, not source. I have src/cljc in :paths and adds src/cljs and src/clj through :extra-paths in different aliases.
{
 :paths ["src/cljc"]
  ...

 :aliases {
           ...
   :server {:extra-paths ["src/clj"]
            ...
   :test {:extra-paths ["test" "src/clj"]
Is it last alias that wins? How does Cursive figure out that a path should be test source, does it look at the alias name?
#2021-04-2110:20Janne SauvalaThese are configured by IntelliJ, so if you click that folder, open the menu, select “Mark Directory as…” and then change the type which one you want it to be#2021-04-2110:21Janne SauvalaI think Cursive doesn’t affect to how these directories are marked in IntelliJ 🙂#2021-04-2110:51imreCursive does mark them#2021-04-2110:51imreBring up your "clojure deps" tool window#2021-04-2110:52imreunder aliases, select the ones you need for development#2021-04-2110:52imrein my experience that affects what cursive will see as dev/test roots#2021-04-2110:53imrewrt how cursive decides whether something should be a dev or a test root, I don't know#2021-04-2110:55imreI guess one could circumvent this by not having the same path in more than 2 aliases and then combining those aliases when running the tests#2021-04-2110:55imrebut that might not work in your case#2021-04-2111:50Ronny Løvtangen@UJZ6S8YR2 I can use “Mark Directory as…” to change the type. But Cursive will change it back after a while.#2021-04-2111:54Ronny Løvtangen@U08BJGV6E I have both aliases checked in “clojure deps” tool window. I can try to move alias ‘server’ after ‘test’ to see if it’s an order issue.#2021-04-2111:55imreThose are inside an unordered map so I doubt that would help. I'd imagine Cursive has some logic along the lines of "if the path appears in an alias that looks test-y then it will be marked a test path"#2021-04-2111:55imreBut if it does help, all the better#2021-04-2111:55Janne SauvalaOh okay, good to know that Cursive controls also that :thumbsup::skin-tone-2:#2021-04-2111:58Ronny LøvtangenCombining aliases is an option, but then we need to change our build script that expect all projects being able to run tests with clj -A:test#2021-04-2111:59imreyeah, that's what I had in mind#2021-04-2112:00imre@U0567Q30W should be able to shed some light on the underlying logic. I don't see anything flawed with your project config so it would be ideal if the ide could accommodate it#2021-04-2112:23golanweissActually I started asking exactly about this issue https://clojurians.slack.com/archives/C0744GXCJ/p1618987662223900#2021-04-2112:35Ronny LøvtangenYes, but I want Cursive to take control, similar to how IntelliJ works with other types of projects. Just need to configure my project such that Cursive does the right thing#2021-04-2122:49cflemingThe problem with this is that deps doesn’t provide a way to specify that something is a test path. Here’s what Cursive does currently: 1. Anything from :aliases/:test/:extra-paths is marked as a test root. 2. If you have other source roots (either from :paths or some :extra-paths), if you have manually marked those as a test root then Cursive will continue to respect that.#2021-04-2122:50cflemingThe use case which is not handled by this is if you have a root in :aliases/:test/:extra-paths which you have manually marked as a normal source root - I think this is Ronny’s case. I’d have to go through the logic with a fine tooth comb, but I don’t think there’s a good way to allow a path under the :test alias to be a normal source root.#2021-04-2122:57cflemingOne way to think about this is: when Cursive syncs the project to the module, it has to decide how to mark each root. Imagine that your server alias instead looked like: :server {:extra-paths ["server-sources" "src/clj"] .... Presumably in the IDE you would select both the server and test aliases (like this: https://cursive-ide.com/userguide/deps.html#working-with-aliases) because you’d want all of the folders “server-sources”, “src/clj” and “test” from the two aliases to be marked as roots. In that case, how should Cursive mark the “src/clj” folder? It’s inherently ambiguous.#2021-04-2205:30imreOne way perhaps could be that paths that are in aliases/test/extra-paths and also under aliases/somethingelse/extra-paths could be handled per point 2. Approaching another way: only paths that only appear in the test alias would be automarked as test source roots#2021-04-2205:31imreOf course this could break another edge case#2021-04-2206:29Ronny LøvtangenMakes sense to only mark paths that are exclusively in :test alias as test source. Test classpath needs, by nature, to include source under test, and tools-deps doesn’t provide a way to inherit paths from other aliases, only from the top level :paths. If I include src/clj in the top level :paths it will also be part of the ClojureScript part of our build, which I am trying to avoid. Of course there is the possibility to invoke test with more aliases to combine the needed classpath, something like clj -A:clj-src:test , but there is something nice about expecting all projects to run tests with the simple clj -A:test#2021-04-2207:46golanweiss@U0567Q30W > 2. If you have other source roots (either from `:paths` or some `:extra-paths`), if you have manually marked those as a test root then Cursive will continue to respect that. This is great, indeed works! Can it be done also for “Resources root”? Right now if I put the “resources” folder under :path it override-marks it with “Source root”, and if I put in :extra-paths it just clears my marking.#2021-04-2209:35cflemingYeah, I’m not sure about making that change, since it’s very hard to predict what it might break. I guess the effect would be limited to the IDE (i.e. it won’t break anything for deps itself), and the workaround would just be to manually mark those cases as tests.#2021-04-2209:37cfleming> Can it be done also for “Resources root”? Right now if I put the “resources” folder under :path it override-marks it with “Source root”, and if I put in :extra-paths it just clears my marking. In :extra-paths it will also mark as a source root if the alias is selected to be synced as described in the doc link above. Cursive doesn’t support resource paths for deps, because deps itself doesn’t support them - it only has the concept of “things which are on the classpath”. I wouldn’t even worry about the test marking (since deps doesn’t support that concept either), except that some things in IntelliJ rely on it.#2021-04-2109:49octahedrionis there a way to add middleware to Cursive's nREPL server ?#2021-04-2110:57flowthingCursive respects .nrepl.edn: https://nrepl.org/nrepl/usage/server.html#server-configuration#2021-04-2119:21dangercoderHas anyone tried to use https://github.com/kkinnear/zprint or cljfmt with Cursive? The way we keep our code style consistent right now with Cursive is pull-requests and a “code formatting standard” which follows the community style guidelines. I would much like to use a formatting tool instead, I did see someone who had a intellij clojure codestyle that resembles cljfmt: https://gist.github.com/d-t-w/a239dfca4f57b7ff6f38c895b7f45405.#2021-04-2210:46borkdudeAre there any clj-kondo users that can help @jtlocsei?#2021-04-2213:18Kari Marttila@jtlocsei I use clj-kondo with Cursive (using LSP) and it should just work. Do you see the little green ball in bottom right info area saying that connection to LSP server is established? Are you sure the path to your clj-kondo standalone jar is correct? Are you sure you are using stanalone version? I could have a screen sharing session with you but unfortunately I was suddenly hospitalized last weekend and now mostly laying in bed without my gallbladder and a huge incision carve in my belly and cannot sit. 😀#2021-04-2213:20Kari MarttilaAh... I missed that he already got it working with LSP.#2021-04-2222:32tobias@U76D9RZRR I appreciate your offer of help! I got it working before I saw your comment but your comment was still useful because I hadn't noticed the green ball with the connection info. Occasionally the LSP fails to load so it's handy to be able to restart it from the green ball. Good luck with the recovery from your surgery! It sounds like a big surgery.#2021-04-2307:16Kari MarttilaHeh, I am happy I was able to help anyway. 😀#2021-04-2307:33borkdude@U76D9RZRR Take care!#2021-04-2307:42Kari MarttilaI will! Thanks!#2021-04-2211:15borkdudeHe just let me know that it works using the LSP plugin#2021-04-2309:00cyppanAm I the only one having strange Cursive behavior since the last 16/04 update..? I have files that don’t recognize any var and Clojure core functions randomly, protocol implementations not recognized either. I have to remove the :require part from the namespace and then re-adding them progressively to make it work again. I’ve also tried removing the .idea folder and reimporting the project without success...#2021-04-2309:39cflemingThat sometimes happens after updates, generally File -&gt; Invalidate indexes and restart… will fix that.#2021-04-2309:43cyppanthank you good to know, I’ve reinstalled cursive and it works now but I’ll try that next time 👍#2021-04-2309:44cflemingMore suggestions here too: https://cursive-ide.com/userguide/eap/troubleshooting.html#help-lots-of-symbols-don-t-resolve#2021-04-2405:34kennytiltonDoes that ^^^ need sth for shadow-cljs.edn? I just finally got Cursive going for that using https://ghufran.posthaven.com/setting-up-a-reagent-clojurescript-project-with-shadow-cljs-and-cursive#2021-04-2714:38katoxIt seems to be related to the "idempotent computation" dialog. It could be that only one of resulting values is saved and that could lead to corrupted indexes. It used to be quite rare but with recent IDEA versions and Cursive I need to "restart and invalidate" on daily basis. If you re-run indexing you're more likely to avoid this race condition (speculating).#2021-04-2501:11alex-ebertshi @cfleming, In code that has lots of ‘:keywords’, I often hit the semi-colon which jumps me to the default line comment position (which is fine). Unfortunately, hitting undo often returns me to several characters before the mistake occurred which can be annoying. I noticed that a previous issue had been closed on github: https://github.com/cursive-ide/cursive/issues/583. Should this issue be fixed? I’m using paredit on IJ #IC-203.7148.57, with cursive version 1.9.4. Thanks!#2021-04-2708:27cflemingYes, I think this should have been fixed. I’ll check to see if I can figure out why it’s regressed.#2021-04-2819:28alex-eberts@cfleming Thanks! Please let me know if I can help with any debugging.#2021-04-2506:08roklenarcichas anyone had a problem with the recent version, where the Leiningen tab stopped working… in that it shows no project and no dependencies?#2021-04-2622:36cflemingDo you see that in all projects, or just a specific one? Does re-adding your project (right click in project view, select “Add as lein project”) work?#2021-04-2708:49roklenarcicI had to invalidate cache#2021-04-2512:11seriogaYes, it is very annoying https://clojurians.slack.com/archives/C0744GXCJ/p1619313091251300#2021-04-2600:04kennyIn Cursive 1.10.2-2021.1, it seems IntelliJ's intelligent spell checker no longer works. Screenshot 1 is Cursive 1.10.2-2021.1. "togehter" used to be underlined in green with the inspection saying "Type: In word 'togehter'".#2021-04-2600:08kennyWorking example from 1.10.1-eap3-2020.3.#2021-04-2600:10kennyUpdating to Cursive 1.10.2-2020.3, breaks the spell check.#2021-04-2600:14kennyfyi, https://github.com/cursive-ide/cursive/issues/2538#2021-04-2708:30cflemingThanks for the issue, I’ll take a look.#2021-04-2622:03Jeff EvansIs it just me, or is debugging extremely difficult? Line based breakpoints are close to useless (even if you set -Dclojure.compiler.disable-locals-clearing=true). Because of the way the Clojure compiler works, I suppose, the context in which you hit each line varies drastically. Sometimes, symbols are in scope at that particular “hit” and other times, not. So that makes it difficult to even set conditions on your breakpoints (because very often the symbol you want to write some condition on isn’t available, yielding an error). I don’t think this is necessary a Cursive issue, but since I’m using IntelliJ/Cursive with OpenJDK debugger (as I suspect many are), it seems like the closest channel. Anyone have similar experience? How are you managing it?#2021-04-2708:31cflemingIt’s occasionally a little flakey, but it’s not usually that problematic. I’d be interested in seeing a screenshot of the debugger in a case where you’re not seeing locals you think you should be.#2021-04-3003:39kennytiltonIt is "just you", in the sense that you choose to do interactive debugging. Just pour in the print statements, sit back and see the bug appear: https://tilton.medium.com/the-mind-is-a-terrible-thing-cc2ca0293095#2021-04-3007:42cflemingI’d respectfully disagree with that, I do use print debugging sometimes, but I also spend significant time in the debugger too - both are useful. The debugger is also significantly more useful in languages like Java, it’s unusually finicky in Clojure (for various reasons, including the relative immaturity of Cursive).#2021-04-3014:59Jeff Evansyeah, an interactive debugger can be indispensable in certain cases. other times, adding some print statements helps fix the issue. and of course, we have the REPL which is extremely powerful. a technique I just “rediscovered” (since I figured it out like a year ago, then forgot) is to call (def crazy-value …) from the debugger evaluator window, which will put that thing into your local namespace to play around with at your leisure.#2021-04-3021:36Jeff Evanssadly, what I’m finding lately is that attaching the debugger and setting a few line breakpoints (even unconditional) slows down the program execution by 100x or 1000x, and if that happens, it’s unusable#2021-04-2623:06Alex Miller (Clojure team)in general, you'll get a "step" for each expression - sometimes it helps to keep that in mind if you're walking through (or even to break up the code into more lines temporarily to make it clearer#2021-04-2623:07Alex Miller (Clojure team)generally I only use the debugger when I'm interacting closely with an inscrutable Java API so I can walk across the interface#2021-04-2623:07Alex Miller (Clojure team)usually for Clojure code it's easier to just interactively evaluate code from the source#2021-04-2701:13Jeff EvansYeah using the REPL more is clearly superior. But sometimes you're in 20 calls deep, with some data from the DB in scope, and just want to see what keys are there (or whatever). I think breaking up stuff more is probably a good approach. Especially in the middle of a let#2021-04-2702:44phronmophobicSome posted this the other day. Maybe it’s a good fit https://github.com/gfredericks/debug-repl#2021-04-2708:16Ronny LøvtangenFor that use case, I prefer using https://github.com/vvvvalvalval/scope-capture Rather than stopping at a break point, you “record” all variables in scope and can use REPL to inspect those variables afterwards.#2021-04-2715:09TrevorI'm sure this has been asked before, but I'm curious what would be the best thing to do to get intellisense for typescript libs? Compilation is much more straightforward now with shadow-cljs, but would be cool if I could get the ability to leverage cursive's ability to auto-import typescript libraries like I can import clojure(script) libraries. My first thought is that I take a stab at generating a bunch of clojurescript namespaces with wrapper methods and defs using the typescript compiler to give me an AST from .d.ts files (or even just ts files). But with cursive is there something even better I could generate? Something that would expose the actual typescript lib's API instead of my wrapper code? (Definitely a lot of work I'm sure, but sounds like a fun side-project)#2021-04-2720:09cflemingThat’s basically what I’m planning to do (have support based on .d.ts files), but I’ll write a parser for them in Java or Kotlin since the format is not as complex as full typescript.#2021-04-2802:56TrevorUnsure if this is helpful (typescript -> Kotlin) . https://github.com/Kotlin/dukat Anything I can do to help? Would be so neat to have bindings for Phaser :) #2021-04-2909:46cflemingI’m not sure about that, I’ll take a look, thanks!#2021-04-2821:28alex-ebertsDoes anyone know if dependency autocompletion is supported for deps.edn projects as described in this blog post? https://www.deps.co/blog/whats-new-in-cursive-1.5.0/#2021-04-2821:29alex-ebertsI’ve verified that I have maven repos in my preferences. When I use the “Generate” command the “Artifact Search” dialog is stuck on “Loading…”#2021-04-2821:31alex-eberts#2021-04-2821:59danielcomptonHey, I can take a look at generating these files, it’s not currently supported#2021-04-2821:59danielcomptonI need to do maven indexing#2021-04-2822:07alex-eberts@U051KLSJF Many thanks! Let me know if I can help at all…#2021-04-2901:25cfleming@U0G3C3USJ Just to check, are you using http://Deps.co as your repository, or is this just a standard deps.edn project?#2021-04-2901:29alex-ebertsI’m not using http://deps.co. It’s a standard deps.edn project. #2021-04-2901:30cflemingOk, sadly that means I can’t foist this off on @U051KLSJF 🙂.#2021-04-2901:31cflemingWhich version of Cursive are you using? Do you have custom repos in your deps file?#2021-04-2904:52alex-ebertshi @U0567Q30W I’m running Cursive 1.9.4-2020.3 at the moment but there’s nothing blocking me from upgrading to the newest version of Cursive if necessary.#2021-04-2912:25octahedrionhas anyone got breakpoints working with the latest Cursive ?#2021-04-2914:51Jeff Evansworking for me on IJ Ultimate 2020.3, Cursive 1.10.2-2020.3#2021-04-2915:43octahedrionI'm on the same versions except IJ CE#2021-04-2915:53octahedrionok I've got it. Breakpoints don't work in a namespace if you eval code in that ns using "send form to REPL"#2021-04-2915:55octahedrionyou have to eval code from another namespace because otherwise it can't find the information needed and the breakpoint turns into a grayed-out icon#2021-04-2915:57octahedrionso it looks like breakpoints are limited to code outside the namespace from which you're evaluating code#2021-04-2920:28cflemingNo, that’s not right - the main problem is generally line numbers in the generated code, which can change if you’re editing and sending only parts of a namespace (i.e. with send form).#2021-04-2920:29cflemingIf you’re debugging a namespace, I always recommend re-sending the whole file to ensure all the line numbers are correct.#2021-04-3007:55octahedrionI tried that (select-all, send to REPL) many times in different ways and it didn't work for me. Then I tried doing (use :reload this-namespace) in my (comment) block in the same file and it worked!#2021-04-3010:52cflemingSelect all and send is not the same thing, you want to use Tools -&gt; REPL -&gt; Load file in REPL which uses load-file and correctly creates the line numbers in the bytecode. Or require :reload will work too, anything that causes the whole namespace to be loaded using load-file.#2021-04-3011:00octahedriongot it. It works#2021-04-3011:08octahedrionthanks for your help!#2021-04-3017:47jacekschaeWhat is the way to move a package and rename ns correctly? I felt like this was working yet now I can’t get it to work? Any ideas?#2021-04-3021:33cflemingIntelliJ 2021.1.1 is out. As described in this blog post, it had a bunch of index corruption bugs which have possibly provoked the problems that some users have been having. @katox I’d be interested to know if this fixes the need to invalidate constantly that you were having. https://blog.jetbrains.com/idea/2021/04/intellij-idea-2021-1-1/#2021-05-0107:52katoxOh, thanks for pointing that out. Hopefully it'll go away. I'll update and keep an eye on it for a while.#2021-05-0305:40gklijsI think I had some. At least cursive was giving errors, even for non Clojure projects.#2021-05-0317:56katoxSomething is still not quite right. For instance I deleted a file (+ committed the change into git) and after about an hour the indexer wanted to access it anyway:
java.lang.Throwable: Invalid file: file:///home/katox/...rules.clj (invalid)
	at com.intellij.openapi.diagnostic.Logger.error(Logger.java:161)
	at com.intellij.psi.impl.file.impl.FileManagerImpl.findFile(FileManagerImpl.java:351)
	at cursive.psi.impl.synthetic.ClNamespace.lambda$getContainingFile$0(ClNamespace.java:95)
	at com.intellij.openapi.application.impl.ApplicationImpl.runReadAction(ApplicationImpl.java:830)
	at cursive.psi.impl.synthetic.ClNamespace.getContainingFile(ClNamespace.java:95)
	at org.jetbrains.idea.maven.dom.MavenDomUtil.isMavenFile(MavenDomUtil.java:110)
	at org.jetbrains.idea.maven.dom.MavenModelDocumentationProvider.getMavenElement(MavenModelDocumentationProvider.java:106)
	at org.jetbrains.idea.maven.dom.MavenModelDocumentationProvider.getMavenElementDescription(MavenModelDocumentationProvider.java:61)
	at org.jetbrains.idea.maven.dom.MavenModelDocumentationProvider.getElementDescription(MavenModelDocumentationProvider.java:55)
	at com.intellij.psi.ElementDescriptionUtil.getElementDescription(ElementDescriptionUtil.java:17)
	at com.intellij.usageView.UsageViewUtil.getType(UsageViewUtil.java:59)
	at com.intellij.find.findUsages.PsiElement2UsageTargetAdapter.getLongDescriptiveName(PsiElement2UsageTargetAdapter.java:244)
	at com.intellij.find.impl.ShowRecentFindUsagesGroup.getChildren(ShowRecentFindUsagesGroup.java:43)
	at com.intellij.ide.util.gotoByName.GotoActionModel.lambda$collectActions$1(GotoActionModel.java:388)
	at com.intellij.util.SlowOperations.allowSlowOperations(SlowOperations.java:64)
	at com.intellij.ide.util.gotoByName.GotoActionModel.collectActions(GotoActionModel.java:388)
	at com.intellij.ide.util.gotoByName.GotoActionModel.collectActions(GotoActionModel.java:400)
	at com.intellij.ide.util.gotoByName.GotoActionModel.collectActions(GotoActionModel.java:400)
	at com.intellij.ide.util.gotoByName.GotoActionModel.collectActions(GotoActionModel.java:400)
	at com.intellij.ide.util.gotoByName.GotoActionModel.buildActions(GotoActionModel.java:114)
	at com.intellij.ide.util.gotoByName.GotoActionModel.<init>(GotoActionModel.java:107)
	at com.intellij.ide.util.gotoByName.GotoActionModel.<init>(GotoActionModel.java:99)
	at com.intellij.ide.actions.searcheverywhere.ActionSearchEverywhereContributor.<init>(ActionSearchEverywhereContributor.java:55)
...
#2021-05-0611:11katoxOther than that I had no corrupted indexes since the bugfix update.#2021-05-0620:22cflemingGreat to hear it’s improved. That’s still an IntelliJ bug there, hopefully they’ll fix more of them in future releases.#2021-05-0620:22cflemingIf you can be bothered, it would be useful to file an issue in YouTrack about that.#2021-05-0315:21imre@cfleming does Cursive do anything funky with cljfx/javafx? I seem to have run into an issue when trying to launch Reveal from a Zulu Java 8-based Repl but only when that's launched from Cursive. I created a hopefully minimal repro case at https://github.com/imrekoszo/reveal-zulu#2021-05-0316:37imreA workaround is to launch the repl from the command line and connect to it from Cursive (nrepl in my case)#2021-05-1313:23imreEnded up recording this as https://github.com/cursive-ide/cursive/issues/2549 as it's still present in 2021.1#2021-05-1322:58cflemingThanks, I’ll take a look. I assume this is on an M1 mac?#2021-05-1406:52imreNo, intel#2021-05-1406:52imreAnd thank you#2021-05-1407:04cflemingInteresting, why the Zulu in that case?#2021-05-1407:29imreI found that it wasn't working with oracle 8 so I tried zulu. Same symptoms, but zulu can be easier installed on the command line#2021-05-1407:29imreSo I ended up putting that into the repro#2021-05-1407:30imreStrange that the error only happens when the repl is launched from within cursive, not when I attach to the process launched from the cmdline#2021-05-1408:00cflemingThat is very weird.#2021-05-1408:22imreLet me know if anything is unclear about the problem description and I'll try to clarify it#2021-05-1812:26imreI dug into this a bit and found that when starting the repl from cursive, /Users/ikoszo/.m2/repository/cljfx/cljfx/1.7.12/cljfx-1.7.12-jdk11.jar is passed to java as part of the classpath#2021-05-1812:27imreWhile if I do a -Spath in the project, I get /Users/ikoszo/.m2/repository/cljfx/cljfx/1.7.12/cljfx-1.7.12-jdk8.jar in its place#2021-05-1812:27imrenote jdk8 vs jdk11#2021-05-1812:28imreThe Cursive behaviour seems to be the same regardless of whether I run the repl with 'use deps' or 'use intellij project classpath'#2021-05-1812:29imreAnother difference is that all the jdk jars are explicitly passed in the classpath when running from Cursive:
/Users/ikoszo/.sdkman/candidates/java/8.0.282.fx-zulu/zulu-8.jdk/Contents/Home/jre/lib/charsets.jar
/Users/ikoszo/.sdkman/candidates/java/8.0.282.fx-zulu/zulu-8.jdk/Contents/Home/jre/lib/crs-agent.jar
/Users/ikoszo/.sdkman/candidates/java/8.0.282.fx-zulu/zulu-8.jdk/Contents/Home/jre/lib/ext/cldrdata.jar
/Users/ikoszo/.sdkman/candidates/java/8.0.282.fx-zulu/zulu-8.jdk/Contents/Home/jre/lib/ext/dnsns.jar
/Users/ikoszo/.sdkman/candidates/java/8.0.282.fx-zulu/zulu-8.jdk/Contents/Home/jre/lib/ext/jaccess.jar
/Users/ikoszo/.sdkman/candidates/java/8.0.282.fx-zulu/zulu-8.jdk/Contents/Home/jre/lib/ext/jfxrt.jar
/Users/ikoszo/.sdkman/candidates/java/8.0.282.fx-zulu/zulu-8.jdk/Contents/Home/jre/lib/ext/legacy8ujsse.jar
/Users/ikoszo/.sdkman/candidates/java/8.0.282.fx-zulu/zulu-8.jdk/Contents/Home/jre/lib/ext/localedata.jar
/Users/ikoszo/.sdkman/candidates/java/8.0.282.fx-zulu/zulu-8.jdk/Contents/Home/jre/lib/ext/nashorn.jar
/Users/ikoszo/.sdkman/candidates/java/8.0.282.fx-zulu/zulu-8.jdk/Contents/Home/jre/lib/ext/openjsse.jar
/Users/ikoszo/.sdkman/candidates/java/8.0.282.fx-zulu/zulu-8.jdk/Contents/Home/jre/lib/ext/sunec.jar
/Users/ikoszo/.sdkman/candidates/java/8.0.282.fx-zulu/zulu-8.jdk/Contents/Home/jre/lib/ext/sunjce_provider.jar
/Users/ikoszo/.sdkman/candidates/java/8.0.282.fx-zulu/zulu-8.jdk/Contents/Home/jre/lib/ext/sunpkcs11.jar
/Users/ikoszo/.sdkman/candidates/java/8.0.282.fx-zulu/zulu-8.jdk/Contents/Home/jre/lib/ext/zipfs.jar
/Users/ikoszo/.sdkman/candidates/java/8.0.282.fx-zulu/zulu-8.jdk/Contents/Home/jre/lib/jce.jar
/Users/ikoszo/.sdkman/candidates/java/8.0.282.fx-zulu/zulu-8.jdk/Contents/Home/jre/lib/jfr.jar
/Users/ikoszo/.sdkman/candidates/java/8.0.282.fx-zulu/zulu-8.jdk/Contents/Home/jre/lib/jfxswt.jar
/Users/ikoszo/.sdkman/candidates/java/8.0.282.fx-zulu/zulu-8.jdk/Contents/Home/jre/lib/jsse.jar
/Users/ikoszo/.sdkman/candidates/java/8.0.282.fx-zulu/zulu-8.jdk/Contents/Home/jre/lib/management-agent.jar
/Users/ikoszo/.sdkman/candidates/java/8.0.282.fx-zulu/zulu-8.jdk/Contents/Home/jre/lib/resources.jar
/Users/ikoszo/.sdkman/candidates/java/8.0.282.fx-zulu/zulu-8.jdk/Contents/Home/jre/lib/rt.jar
/Users/ikoszo/.sdkman/candidates/java/8.0.282.fx-zulu/zulu-8.jdk/Contents/Home/lib/ant-javafx.jar
/Users/ikoszo/.sdkman/candidates/java/8.0.282.fx-zulu/zulu-8.jdk/Contents/Home/lib/dt.jar
/Users/ikoszo/.sdkman/candidates/java/8.0.282.fx-zulu/zulu-8.jdk/Contents/Home/lib/javafx-mx.jar
/Users/ikoszo/.sdkman/candidates/java/8.0.282.fx-zulu/zulu-8.jdk/Contents/Home/lib/jconsole.jar
/Users/ikoszo/.sdkman/candidates/java/8.0.282.fx-zulu/zulu-8.jdk/Contents/Home/lib/packager.jar
/Users/ikoszo/.sdkman/candidates/java/8.0.282.fx-zulu/zulu-8.jdk/Contents/Home/lib/sa-jdi.jar
/Users/ikoszo/.sdkman/candidates/java/8.0.282.fx-zulu/zulu-8.jdk/Contents/Home/lib/tools.jar
#2021-05-1812:34imreThe former difference is sus#2021-05-1812:34imreI added this info to the ticket#2021-05-0315:50Jeff Evansis it actually useful to submit the stack traces from the UI when a Cursive error occurs?#2021-05-0316:59imreI sure hope so cause I use it often 🙂#2021-05-0317:16Jeff Evanssame. but if it ends up being pure noise, then I’d stop#2021-05-0320:33cflemingIt’s definitely useful. I don’t always look at each one individually, but the repo aggregates them so I get an idea of which errors happen in which versions, and how frequently.#2021-05-0323:13hlshipIs there a way to debug namespace reloading? I have ns T that depends on ns A and ns B; B also depends on A. However, when I change A I only see T reloading (as in, I added println’s to ns B so I could see when it reloaded). T is a test, B is test utilities, A is production code.#2021-05-0411:02cflemingAre they all in the same module?#2021-05-0411:02cflemingAre you using deps or lein?
#2021-05-0616:22hlshiplein - this is when I'm working on lacinia: https://github.com/walmartlabs/lacinia#2021-05-0700:39cflemingOk, can I reproduce using that repo? Which namespaces are A, B and T?#2021-05-0400:35raspasovThis is nothing super critical but I’ve always wondered: why do certain, say, (defn …)’s show as “white”/in use when they are in fact unused? It seems that if the name of the defn is short, then it actually doesn’t autodetect used/unused.#2021-05-0410:57cflemingYes, your guess is correct. Basically, this inspection is a best effort - if it says that something it’s unused, then it’s unused, but if it doesn’t it still might be unused. This is because checking references is an expensive operation.#2021-05-0410:59cflemingSo the way this works is that under the hood IntelliJ breaks files down into words, and it has a very fast word search. Generally something like Find Usages will search for all the instances of the word of the name of something, then will check to see if that word is in a string or a comment, and if not it will try to resolve each one to see which are actually references to the thing you’re looking for. This is why a lot of operations are much more expensive for things with short common names.#2021-05-0411:00cflemingIn this case, the inspection has a hard-coded limit (10 IIRC) - if the word appears more than that number of times, we don’t even bother trying to check references since it would slow everything down too much.#2021-05-0411:01cflemingThe moral of the story is, don’t call your functions things like ns, let, or whatever 🙂#2021-05-0500:09raspasovUnderstood, thank you for the detailed explanation!#2021-05-0500:12raspasovDoes that also apply to (:require [… :as alias1]) ? (I assume, yes)#2021-05-0500:17raspasovDo you know if there’s a way to tune that from the user perspective to make the search “more accurate”, potentially at the cost of performance? (I am generally pretty happy with the perf. when using a good laptop and charging it)#2021-05-0700:41cflemingNo, there’s no tweakable knob there sorry, I’m using parameters recommended by JetBrains. I’m hesitant to add a config for that since people could inadvertently break the performance of their IDE for non-obvious reasons.#2021-05-0400:36raspasovActually, maybe not…#2021-05-0420:11wilkerluciothis is interesting, I made a different try that cause it to mark as unused:#2021-05-0420:11wilkerlucioseems like it also cares about the tokenized words, if there are small words between tokens, its the same as a full small name#2021-05-0420:12wilkerlucioon a bit more testing, seems like if "every word" is small, the problem remains, but one part of the symbol is a longer word, them it detects unused#2021-05-0420:13wilkerlucio#2021-05-0500:07raspasovYes, it happens frequently enough but I can’t spot a pattern.#2021-05-0500:10raspasov@U0567Q30W posted an explanation in the other sub-thread https://clojurians.slack.com/archives/C0744GXCJ/p1620088501297700#2021-05-0515:44conanHi, I'm no longer able to start a REPL for a project on a WSL2 filesystem. All instances of Intellij hang completely! I've tried using several JDKs defined in both Ubuntu and in Windows. What do I need to do to start a REPL? I'm using leiningen and all the latest everything.#2021-05-0515:45conanI've tried closing the project, deleting the .idea directory and all .iml files, removing all JDKs and starting again. I've tried this on both my home and work laptops.#2021-05-0515:53conanThis is the log from when I started the IDE to after I clicked start on the REPL run configuration, nothing else#2021-05-0521:29acim1I'll drop a line here before going into Kaocha channel, which looks to be pretty sparse/just watched by the maintainer (in case it's a "no duh" thing). Is there way to get Kaocha testing/results integrated in IDE, or is Kaocha something people strictly run on the command line?#2021-05-0521:34imreNo full integration afaik, but you can set up repl commands and run it in the repl:#2021-05-0521:34imre
(do
  (require 'clojure.spec.alpha 'expound.alpha 'kaocha.repl)
  (binding [clojure.spec.alpha/*explain-out* expound.alpha/printer]
    (kaocha.repl/run-all)))
#2021-05-0521:35imreand for the current repl ns#2021-05-0521:35imre
(do
  (require 'clojure.spec.alpha 'expound.alpha 'kaocha.repl)
  (binding [clojure.spec.alpha/*explain-out* expound.alpha/printer]
    (kaocha.repl/run)))
#2021-05-0521:35imreat least these are what I use#2021-05-0521:35acim1Ah, I see. Thanks!#2021-05-0521:37imreIt would be extremely awesome to have full integration though#2021-05-0604:03cflemingYes, no full integration yet sorry.#2021-05-0607:31onetomIs Cursive using the .cpcache now? It seems to be starting REPLs a lot faster than before.#2021-05-0609:46cflemingIt’s not, I’m not sure why that might be faster. I do plan to implement caching for that, Cursive does it for project sync in deps projects these days.#2021-05-0612:12Alex Miller (Clojure team)Depending what you’re doing, I have made some perf improvements in clj (particularly for git deps and/or pom deps)#2021-05-0711:39Lennart BuitHeya, we are trying to use code with me with IntelliJ and Cursive, but at some point editing just completely stops working for both the host and the guest. Does that ring a bell with anyone?#2021-05-0721:06cflemingI haven’t used Code With Me, but as far as I understand, I can’t really interact with it much as a plugin developer. I think the best thing would be to file a YouTrack issue at https://youtrack.jetbrains.com/issues/IDEA and tag me (username lemming).#2021-05-0723:01Lennart BuitYeah we were wondering whether parinfer was messing with it. Kinda was hoping it rang a bell with anyone#2021-05-0808:09cflemingThat’s entirely possible, yeah. So are you just using it for the editors? There’s an open YouTrack issue about the REPL: https://youtrack.jetbrains.com/issue/CWM-1921#2021-05-0808:10cfleming(prompted by this post: https://intellij-support.jetbrains.com/hc/en-us/community/posts/360010345139-Extending-Code-With-Me-)#2021-05-0921:27Lennart BuitYeah we were just sharing editors. REPL would obviously be cool, but the editor already starts breaking if you multiplayer too hard#2021-05-0921:07royalaidThis is probably low on the ladder but are there any plans to suppprt babashka repls? It would be great to not have to learn calva #2021-05-1001:09cflemingYes, definitely - I would like this myself, and I see a lot of people using babashka out there. It’s tricky to do right unfortunately, but there may be an 80/20 that I could do with less effort. There’s an issue here in case you find things not already listed: https://github.com/cursive-ide/cursive/issues/2516#2021-05-1001:28royalaid👍 I will see if I can contribute anything and if not I will just watch the issue on GH, thanks as always for all the hard work Colin#2021-05-1013:04henryw374fyi I've used tubular to give me cursive repl to babashka https://github.com/mfikes/tubular#2021-05-1103:31cflemingYes, https://github.com/vlaaad/remote-repl is another (possibly simpler) option#2021-05-1118:25royalaidI have used both that the experience is extremely suboptimal#2021-05-1009:18Kari MarttilaIs it safe to download IntelliJ IDEA 2021.1.1? I.e.: no issues with Cursive?#2021-05-1010:44raspasovWorks on my machine: IntelliJ IDEA 2021.1.1 (Ultimate Edition) Build #IU-211.7142.45, built on April 30, 2021 Runtime version: 11.0.10+9-b1341.41 x86_64 VM: Dynamic Code Evolution 64-Bit Server VM by JetBrains s.r.o. macOS 11.3.1#2021-05-1014:04Kari MarttilaOk! Thanks!#2021-05-1021:40Jeff Evansobservation: don’t use IntelliJ’s magic wand for resolving merge conflicts when Parinfer is turned on. or at least check the results very carefully#2021-05-1103:39cflemingWhen are you finding this? In the diff view?#2021-05-1114:20Jeff Evansyeah they call it “Automatically”: https://www.jetbrains.com/help/idea/resolve-conflicts.html#CRLF_warning#2021-05-1114:21Jeff Evansanyway it seems to basically trash the form, if you add indentation. like, suppose you have:
(let [x 1]
  (inc x))
and then in a later commit, you wrap that entire tree in a new if or something. then it can end up as
(let [x 1])
(inc x)
#2021-05-1114:18jffryIs there some way to limit the width of the dialog that shows up for Tools > REPL > Search REPL History? Sometimes if I have a blob of data copied from somewhere, I'll (def input "string-that-is-hundreds-or-thousands-of-chars-long") for convenience. And now the Search REPL History dialog expands to fill all available space. The dialog is resizable but does not remember its size / position between invocations. I searched preferences and found nothing. This has been a low-key annoyance for a while across multiple IDEA/Cursive versions, but I'm currently on the latest (1.10.2-2021.1)#2021-05-1408:03cflemingYeah, this is annoying. I can think of two options, of which I might end up doing both. The obvious one would be to limit the size of the dialog to something sensible, and the other would be to allow entries to be deleted from the history by pressing backspace in the history editor. That would be useful for other things as well, there’s been a case where someone got xml-incompatible unicode in a history item and then lost all their history when IntelliJ tried to save it.#2021-05-1412:36jffryThanks! I think limiting width will always be needed because people may have long history entries they don't want to delete. Maybe it's as simple as remembering how wide it is when user resizes it and using that width the next time it comes up, but I have no idea what level of control IntelliJ gives you.#2021-05-1421:25cflemingI’ll look into that, there must be a way to control that. I developed that thing ages ago, it’s entirely possible I didn’t really know what I was doing when I made it.#2021-05-1118:26royalaidIs there a way to tell cursive that a alias should be associated with a specific namespace?#2021-05-1120:09imreNot sure about your usecase there but I have a feeling it's clojure you have to tell that to#2021-05-1120:13royalaidNo, its cursive because when I autocomplete a namespace in cursive in adds the wrong require at the top of the file#2021-05-1201:44cflemingCan you give me an example of Cursive adding the wrong require?#2021-05-1211:09imreI suppose then it's along the lines of typing (s/def then auto-requiring, and depending on the position of the stars in the night sky it will either require spec or schema.#2021-05-1215:12royalaidSimilar yeah, it’s a namespace that we have internally that wraps Pathom#2021-05-1215:35imreI usually get a popup on auto-require when there are multiple namespaces in my project offering the same name#2021-05-1215:35imreIt doesn't seem to work 100% but it does most of the time for me#2021-05-1217:12royalaidYeah I just want to tell cursive what it should do instead of it having to divine my intentions#2021-05-1217:12royalaidSimilar to indentation config#2021-05-1217:13royalaidI think it has to do with the fact that we use the same namespace alias and macro names#2021-05-1217:13royalaidand this trips up cursive#2021-05-1217:13royalaidbut that is just a guess#2021-05-1223:27cflemingI see. And you want to use one of them everywhere, or you want to be able to specify in which contexts which gets used?#2021-05-1303:09royalaidI would even be happy with just being able to say for this project use this alias when auto-requiring#2021-05-1303:09royalaidhaving further customization might be useful in niche cases but would say it isn’t super important#2021-05-1122:39steveb8nQ: is there a problem with Cursive and relative paths in deps.edn aliases?#2021-05-1122:39steveb8nI get “Manifest type not detected when finding deps..” when using relative paths for override deps in aliases. works fine outside of Cursive#2021-05-1122:40steveb8nworkaround is to use absolute paths but that doesn’t transfer across machines#2021-05-1200:03cflemingHmm, that error used to come up all the time but hasn’t been seen for a while now. I’ll try that and see if I can reproduce.#2021-05-1200:06cflemingCan you give me an example of the sort of form which is giving you problems?#2021-05-1201:35steveb8nsure. here’s the contents of the alias…#2021-05-1201:35steveb8n
{:override-deps {nextdoc/components-portable {:local/root "../components-portable"}
;                                      nextdoc/terse-schema        {:local/root "../terse-schema"}}}
#2021-05-1201:36steveb8nworks in terminal/tests/CI. only Cursive fails#2021-05-1201:36steveb8nif I switch to absolute paths, works everywhere#2021-05-1201:43cflemingOk, and you have other deps projects at those locations, I guess? Does it work if you add :deps/manifest :deps alongside the :local/root entry?#2021-05-1201:43cfleming(you shouldn’t have to, but that might be a workaround)#2021-05-1201:59steveb8nI did try that. no luck unfortunately#2021-05-1202:00steveb8nI found this which may be related https://clojure.atlassian.net/browse/TDEPS-74#2021-05-1202:02steveb8nI’ve updated to the latest tools.deps.alpha but no luck there. is this lib bundled in Cursive i.e. you might have an older version bundled?#2021-05-1202:03cflemingNo, but you might need to go to the deps settings and refresh there to make sure that Cursive has the latest version picked up.#2021-05-1202:03steveb8nnot super urgent but useful for anyone doing mono-repos. seems to be all the rage these days (for good reason)#2021-05-1202:09Alex Miller (Clojure team)does it work outside cursive?#2021-05-1202:10cflemingYes, sounds like it does.#2021-05-1202:10Alex Miller (Clojure team)I want to say this same thing has been reported re cursive before#2021-05-1202:10cflemingYeah, that error used to be quite frequent but hasn’t been reported for ages now.#2021-05-1202:11cflemingBut I suspect that it’s just not resolving the path correctly, so deps can’t find the deps.edn to infer the project type from.#2021-05-1202:24steveb8nyes, running Kaocha tests from terminal using the same alias works fine#2021-05-1202:30steveb8ncorrection: using :deps/manifest :deps does change the behaviour. Cursive no longer borks during deps refresh but paths not set correctly i.e. namespace requires fail when loading#2021-05-1202:31steveb8nthe failure in that case is a cljc ns in one of the projects. not sure if it’s specific to cljc files#2021-05-1202:36steveb8nthe cljc files in the upstream project are not “in scope for the module used to start the REPL”#2021-05-1202:37steveb8nI checked and the alias is included in the run config#2021-05-1202:37steveb8nI guess we getting to a very specific use-case here#2021-05-1205:47cflemingI don’t think so, I think it’s all the same root cause, which is definitely a valid and useful use-case which should work.#2021-05-1207:58steveb8nok. what’s the best way for me to provide a repro or debug logs?#2021-05-1210:35cflemingI’ll have a go at reproducing with the example you sent, and if I can’t make that work I’ll let you know.#2021-05-2005:27cflemingI can reproduce this, it’s definitely a problem with Cursive, due to the fact that Cursive doesn’t invoke deps with the CWD set to the project directory.#2021-05-2005:27cflemingI’ll hopefully get that fixed tomorrow.#2021-05-1214:01AJ JaroI thought at one point I was able to click directly from an Exception in the run tool window using lein to a defined namespace. However, now when the filename is common like core or util, it brings up a menu to select the proper one. The whole namespace is printed out in the Exception so I would imagine the link to the file could be determined, but I know it’s not always as easy as it seems Is there an issue/feature request filed for this already?#2021-05-1301:36cflemingI don’t think there is, but this is something I’ve been meaning to fix for a while. This works correctly in the REPL, but hasn’t worked properly in the run toolwindow for Reasons, basically. I’ll take a look at fixing this.#2021-05-1313:31AJ JaroThanks @U0567Q30W! Would you like me to create a GitHub issue for it?#2021-05-1409:24tengstrandI’m working on https://github.com/polyfy/polylith/issues/66 in the Polylith project. In that branch we have switched to use :deps when specifying which bricks to include in a project, e.g. in the https://github.com/polyfy/polylith/blob/issue-66/projects/poly/deps.edn project. It would be nice to switch to :extra-deps even in the root https://github.com/polyfy/polylith/blob/issue-66/projects/poly/deps.edn but right now I don’t want to do that, because I use Cursive and I problem I have is that Cursive doesn’t recognise the source code that is included using :extra-deps it only works when using extra-paths . It works in other IDE:s that I have tried, e.g. Calva, because they treat everything that is accessible from the REPL as code (this is my theory at least). It would be really nice if Cursive could support this too, so that src directories will be “green” even when they are defined as`extra-deps.` If this worked then all projects, development included, could be configured in the same way which would produce less code and be more consistent. What do you think @cfleming?#2021-05-1409:27tengstrandHere is how it looks like when using :extra-paths and when using :extra-deps.#2021-05-2015:21tengstrandI also created https://github.com/cursive-ide/cursive/issues/2554 issue.#2021-05-1414:14folconHey, has there been a regression around sending top form to REPL? It used to not send the comment block, so you could do this, where | is my caret:
(comment
  (identity coll)|)
Which now sends:
(comment
  (identity rows))
=> nil
Instead of:
(identity rows)
=> [1 2 3 4 5]
#2021-05-1414:18imreIn your case I'd use the send form before caret command#2021-05-1414:19imretop form works as you'd expect inside a comment when your caret is within (identity coll)#2021-05-1414:19imrebut not when it's directly in the comment form#2021-05-1414:19imreThat's been like that ever since ~I use cursive~ correction: ever since I started sending forms to the repl in cursive 🙂.#2021-05-1414:57folconThat's interesting, in my experience cursive was aware if it was in a comment block and would not send the comment as part of the form...#2021-05-1414:58folconWhich I would have expected as that's basically the standard workflow of using rich comments...#2021-05-1414:59folconI mean if this is the new behaviour fine, but it's pretty useful to be in a let block within a comment and not have to jump to the top most form to send it via send form before caret... I might be in the minority however 😃...#2021-05-1415:10imreI think you misunderstand me. Probably I wasn't clear enough.#2021-05-1415:10imreStanding here and issuing send top form:
(comment
  (identity |coll))
Should still send (identity coll) to the repl
#2021-05-1415:12imreBut if you're outside of the 'top' form you are trying to send, then from that position the correct 'top' from is indeed the comment#2021-05-1415:14imreI use this all the time#2021-05-1415:14imreIf I'm within a let block within a comment, I'll use send top and it'll send the let#2021-05-1415:15imreIf I'm just outside (after) the let block, I need to use another command, 'send form before caret to repl'#2021-05-1415:15imreAnd I haven't seen the behavior change in the past 4+ years in this regard#2021-05-1419:05pezWhen would you ever want the comment form to be sent?#2021-05-1419:19imreI don't think I'd want that but the behavior is more consistent this way imo#2021-05-1419:21imreFor a command named 'send topmost form', I'd be rather surprised if that worked like 'send form before caret' under certain conditions#2021-05-1419:23Alex Miller (Clojure team)this is why the principle of least surprise is a fallacy. people are surprised by different things#2021-05-1420:32pez@imre , however, you would never get the surprise, since you wouldn't try to send the comment form. 😎#2021-05-1420:46pezAlso, with the cursor at the top level, near some form. What should be sent if top level is requested? If we think of (comment …) as creating a new top level (since no-one wants to send comment forms anyway) it can send the same thing as would be sent in the top level case. Which, I think should be something, rather than nothing.#2021-05-1421:13cflemingMy intention was definitely that this should work as @folcon expected, since I also can’t imagine when you’d ever want to sent the comment.#2021-05-1421:15dpsutton
(comment
  (fire-missiles!)
  |
  (+ 1 1))
what is intended here, with | being cursor?
#2021-05-1421:17dpsuttoni implemented this feature in clojure-mode, and luckily emacs's idiom is last sexp almost all the time. so i would fire missles in emacs#2021-05-1421:19emilaasaIsn't it possible to just ignore the comment form completely? As if you were in the "root"#2021-05-1421:20emilaasaTreat it the same as:
(fire-missiles!)
|
(+ 1 1)
#2021-05-1421:26cflemingI’m not sure what would be intended, but yes, it should be treated as if the user were at top level, so probably nothing should be sent.#2021-05-1423:05folconI did an update and the behaviour seems to be what I expected 😃...#2021-05-1423:06folconThanks for chiming in @cfleming 😃...#2021-05-1509:57Ivan KozI'm trying to run shadow-cljs + deps.edn project from intellij, how to setup run configuration properly? currently starting it from console {:dev {:main-opts ["-m" "shadow.cljs.devtools.cli" "watch" ":app"]}} clj -M:dev#2021-05-1511:07Ivan Kozalright for now, clj -M:dev is a shell script in run config#2021-05-1512:27Ivan KozNo documentation, nor code completion for JS function is that a normal thing? https://gyazo.com/4c6f436efb54fc811b69be0efcde59a6.png https://i.gyazo.com/c84645fe9cd28dc64dae0720a9aa0ebb.png#2021-05-1512:31raspasovOff-topic: what is the theme?#2021-05-1512:32thhelleryes, that is normal. support for JS completion is pending.#2021-05-1512:47raspasovThere is some basic support, but yes, in general it’s not like for JVM Clojure.#2021-05-1512:48raspasov(this is in the paid IntelliJ, don’t remember if that makes a difference, I think it has “more” web support)#2021-05-1512:50raspasovThings like those don’t resolve properly (but compile OK).#2021-05-1512:53Ivan Kozalso can't navigate to definition with ctrl+click#2021-05-1513:08raspasovYes. That would be part of the same process, I believe.#2021-05-1512:31Ivan Kozmaterial ui + custom editor theme#2021-05-1512:31raspasovNIce.#2021-05-1512:32Ivan Kozdo you need it?#2021-05-1512:33raspasovThank you 🙂 I’ll look at material UI.#2021-05-1512:37Ivan Kozhere material ui settings, and editor theme#2021-05-1512:41raspasovThanks!#2021-05-1622:33tony.kayJust wondering: does anyone really want the focus stolen from the editor when starting a REPL? It just occurred to me, after 5 years of using Cursive, that I get annoyed every time I start a REPL and I suddenly have to grab the mouse and re-focus the editor…and everyone else I know does as well. I think most of us send our commands from the editor. Perhaps worth a fix?#2021-05-1623:19markaddlemanPiling onto this: I'd be happy with an option to eliminate the input area from the repl entirely. As it is, I shrink it to the smallest size possible#2021-05-1701:15cflemingYes, the focus thing is something I’ve been meaning to fix forever - I’ll look to do that now. Hiding the input area (possibly even by default) is also something I’ve considered, especially once I get inline evaluation done - I’m working on that now, but I’ve had to have a detour to work on my website.#2021-05-1701:20cflemingThere’s a very indignant (with good reason!) issue in the tracker which I have assigned to the current milestone about the focus issue: https://github.com/cursive-ide/cursive/issues/1579#2021-05-1701:33aratare@U0CKQ19AQ iirc you can press esc to return back to the main editor. In fact, if you’re in any of the editors (project, structure, lein, etc.), pressing ESC will return you back to the main editor (the one that you write code with)#2021-05-1713:58tony.kayI use IdeaVIM. Esc puts me in edit mode in the little input window#2021-05-1714:02tony.kayAh, but a second escape does bring me back to editor. Never thought to try it twice in a row (not sure why..guess I just didn’t think it would matter)#2021-05-1716:17dvingoChiming in on hiding the input UI. For beginners hiding the REPL input may be very confusing.. so I would be sure to document how to find it.#2021-05-1722:14cflemingYes, I’m definitely a bit torn on that one. If I do end up doing that, it will definitely be configurable, and I’ll think about how to best communicate the change.#2021-05-1712:56roklenarcicIs there some way to make your run configuration automatically use deps aliases selected in deps tab?#2021-05-1712:56roklenarcic#2021-05-1712:56roklenarcicThis requires me to name every single alias, and it might be out of sync with what I have selected in my deps tab#2021-05-1713:23imre@roklenarcic 'run with intellij classpath'#2021-05-1713:58roklenarcicThanks, I guess in the past I was using it in a way that didn’t work for me#2021-05-1714:07imreI think I sometimes need to do a 'refresh deps projects' after changing what's ticked in the list for ij to pick those changes up#2021-05-1713:28octahedrionwhy is that some namespace aliases don't show their symbols in autocomplete ?#2021-05-1803:51cflemingThey should all do, do you have an example of one that doesn’t?#2021-05-1814:29octahedrionyes e.g. if I (require '[clojure.tools.namespace.parse :as np]) I don't get any autocomplete for (np/) whereas if I do for (clojure.tools.namespace.parse/)#2021-05-1910:40octahedrionwhat's stranger is that I sometimes get autocomplete for a completely different namespace. For example I have required datomic.client.api :as d but when I ctrl-space for (d/) I get completions for kixi.stats.distribution#2021-05-1922:38cflemingDoes File -&gt; Invalidate Caches and Restart help this? It sounds to me like your indexes are funky somehow.#2021-05-1923:48cflemingAlso, which version of IntelliJ are you on? If you’re on 2021.1 and haven’t upgraded to 2021.1.1 yet, I think they had a bunch of indexing bugs which were fixed in the point release.#2021-05-2108:32octahedrionI tried invalidate caches & restarting but same problem. It happens with one project and not another. I suspect it's because I'm using libraries in my REPL from ~/.clojure/deps.edn which are not in my project's deps.edn#2021-05-1714:17raspasovDoes anybody know if there’s a way to “cycle” through a number of commands in IntelliJ ?#2021-05-1714:19raspasov(I know there’s specific commands to cycle through some items, but I think a generic “cycle” that is you define can be useful)#2021-05-1714:25imrelike a macro?#2021-05-1714:26imreif it's the same n commands you want to cycle through in the same order, then you could record a macro#2021-05-1714:31raspasovYes, I know macros, but they always run all the commands from start to finish. As I typed this, I realized it’s probably harder to implement in practice that I initially thought.#2021-05-1714:31raspasovMy idea was to replicate the “Alt+Tab” experience in say, MacOS where it jumps to the previous active window.#2021-05-1714:37raspasovFor example, if you cycle: “Jump to REPL Editor” “Focus Editor” … you’d be able to assign one shortcut to those and that would be convenient. But I realize that it’s hard to do, because IntelliJ has to keep the state of where the focus is at the moment.#2021-05-1714:38raspasovNot “hard” but not super trivial like I thought for the first 30 seconds 🙂#2021-05-1714:38imrethere's a Jump to Last Tool Window command#2021-05-1714:39imreand esc puts you back in the editor#2021-05-1714:40imreif that's your usecase#2021-05-1714:40raspasovOh, I know 🙂#2021-05-1714:41raspasovThe Escape is too annoying to hit because of Apple keyboard decisions 😂 (first world problems)#2021-05-1714:41imreI guess I hit my limit of knowledge then 🙂#2021-05-1714:42imrebut I also think esc can be rebound to something more convenient#2021-05-1714:42raspasovI tried that, for some reason it does not work reliably (at all?)#2021-05-1714:42raspasovFor example, if I add an additional shortcut in Keymap for “Escape” it actually doesn’t jump back to source, for example. So it’s weird.#2021-05-1714:43raspasovHence my “cycle shortcuts” idea 😆#2021-05-1714:43imregotcha#2021-05-1714:43raspasovIn any case, I added two different shortcuts, CMD+1, CMD+2 for those two commands. It works fine.#2021-05-1714:44raspasovI am just complaining. Back to work! 🙂#2021-05-1715:57Phil ShapiroNot sure it’ll help you, but I use Find Action for tasks like this all the time. I hit command-shift-a to bring it up, type a few letters to select the command, and hit return. Much faster than using the mouse. #2021-05-1720:36raspasov@UQL85PT29 For sure. I try to eliminate most mouse “activity”.#2021-05-1720:36raspasovIn actions that I do on a daily/hourly basis.#2021-05-1803:54cflemingI think you’re right that cycling is hard to do in a general way because it often depends on the current state. I went through a long bout of soul-searching on this with the REPL jumping commands, i.e. should there be one that cycles between input, output and code editor, or should there be 3 absolute jumps? In the end I decided on the absolute jumps. In my case since I’m implementing the command determining the current state is not hard, but the user still has to mentally take the current state into account when using the command, and in the end I decided it was more predictable to have absolutes.#2021-05-1822:12raspasov@U0567Q30W Thanks for the input! I think specifically the switch between editor and input is super common and there will be very little overhead of keeping track of where I am at the moment. Perhaps it makes sense to add a separate action if it’s easy on your side to determine the current state. “Switch between REPL input and code editor” or something like that. But if you want to keep them only separate, I understand. It’s not a huge difference, still works well enough for my use case.#2021-05-1720:42Mateusz MazurczakHas anybody here switched from emacs/vim to cursive? What did you like more?#2021-05-1720:49thhellerI switched from emacs when cursive first came out. never going back 😛#2021-05-1721:24Mateusz MazurczakWhat made you stay with cursive or move out of emacs?#2021-05-1721:24thhellergot tired of my emacs config breaking and having to configure every little thing manually#2021-05-1721:25thhellercursive just works and does what I want#2021-05-1721:25thheller(I also have used IntelliJ for many years before in my Java days so it was an easy choice)#2021-05-1721:54Mateusz MazurczakI guess I’m in a similar position as you back then, thank you for your feedback#2021-05-1800:06Matheus GomesHi, everyone. The symbol resolution is a really cool feature, is there any way to create a custom resolver so I can use at Resolve something as...?#2021-05-1803:57cflemingDo you mean for some custom form? There isn’t at the moment, but it’s something I’ve long planned to allow. Unfortunately I have to refactor some of the oldest code in Cursive before that happens, and that has taken a long time to get to.#2021-05-1814:23Matheus GomesNice! Looking forward to this feature, thanks for the explanation#2021-05-1809:59scarytom@cfleming have you had any complaints about performance recently? Our dev team (8 full-time cursive users) are all noticing significant slow-downs. This is all pretty anecdotal, and I appreciate that isn't very helpful. I'm just fishing at the moment. Speaking personally, my IntelliJ is just freezing for a few seconds at a time fairly frequently as I navigate around the Clojure code.#2021-05-1810:48cflemingNo, I haven’t - is there anything in particular that seems to provoke it?#2021-05-1810:55cflemingIf you could get it to be somewhat reproducible, could you send a performance snapshot? Details here: https://intellij-support.jetbrains.com/hc/en-us/articles/207241235-Reporting-performance-problems#2021-05-1810:56cyppanI experience that too, intellij freezes a lot lately, I’m often forced to kill it (I open multiple projects in several tabs _ on Mac)#2021-05-1810:57cfleming@U0CL38MU1 If it freezes, you should find some directories with automatically-generated thread dumps in your logs directory. If you find any, could you zip them up and email them to me at <mailto:/cdn-cgi/l/email-protection|/cdn-cgi/l/email-protection>?#2021-05-1811:32cyppanoh good to know, I’ll do that thank you#2021-05-1813:13scarytomthanks for the fast response. I'm not sure we are doing anything in particular to provoke this. I'll have a look at the article you link and see if I can capture something for you. I very much understand how difficult it can be to nail down this kind of thing.#2021-05-1813:13scarytomcc/ @U0FR9C8RZ#2021-05-1822:15raspasovI have only very recently have noticed rare (2-3 times a day perhaps) freezes of 2-3 seconds each where the whole editor freezes. It almost feels like some sort of s”Stop the world GC” is running within IntelliJ. Definitely nothing dramatic. 99.9% of the time everything is fast as usual.#2021-05-1822:21cfleming@U050KSS8M Could you check for the automatically-generated thread dumps in your logs directory? (https://intellij-support.jetbrains.com/hc/en-us/articles/206544899-Getting-a-thread-dump-when-IDE-hangs-and-doesn-t-respond)#2021-05-1900:51raspasovThose?#2021-05-1901:50cflemingYes, them!#2021-05-1909:08raspasov@cfleming emailed#2021-05-2021:31steveb8nI'm seeing this too. Not sure if it's cursive or the ide. Doesn't seem to be indexing#2021-05-2109:17cfleming@U0510KXTU Do you get the generated thread dumps? Can you email them over if so?#2021-05-2110:17steveb8nI'll try and catch the next one#2021-05-2111:36cflemingThey should be in your log directory from previous stalls.#2021-05-2206:37steveb8nemailed you one#2021-05-2206:56henryw374I switched back to 2020.3 and the freezing has gone. phew! It was starting to drive me crazy#2021-05-2511:15cfleming@U051B9FU1 Interesting, thanks - which IntelliJ version were you on previously? Had you upgraded to 2021.1.1? They fixed a lot of indexing bugs there, but I don’t know if it also addressed performance.#2021-05-2511:22henryw374It was 2021.1. I hadn't tried going to 2021.1.1 yet#2021-05-2011:32helioshow can i get a Babashka repl in cursive? :thinking_face:#2021-05-2011:33heliosah i saw the thread, coming soon#2021-05-2016:44henryw374in run with deps in aliases it complains that compiler.test.run is not a valid alias name, because of the dots - but cursive seems happy with it elsewhere.#2021-05-2016:44henryw374so.. I guess it is valid. This is from the clojurescript project deps.edn#2021-05-2016:49imreaccording to the clojure docs, keywords aren't supposed to contain periods in their name part https://clojure.org/reference/reader#_literals#2021-05-2016:49imrewhich was a TIL for me about 2 months ago#2021-05-2016:58henryw374thanks didn't know that. @U050B88UR can the Clojurescript deps.edn aliases be changed? It seems the names are not valid (keywords containing dots) and Cursive doesn't allow them 😞#2021-05-2018:14Ivar RefsdalHi. I tried evaluating (send to repl) (println "\r1111\r222") and it outputs:
1111
222
whereas in regular clj/clojure it will output 2221. Is there any way to support the \r character in Cursive REPL?
#2021-05-2019:45pezReplete gives the same as Cursive. Just noting. #2021-05-2019:46thumbnailI looked into this issue a while back. Apperantly it's an IntelliJ issue. It might be this one https://youtrack.jetbrains.com/issue/IDEA-147282#2021-05-2107:13Ivar RefsdalThe run console is not the same as the REPL console?#2021-05-2107:14Ivar RefsdalI found this answer from 2017: https://stackoverflow.com/a/42473920#2021-05-2107:21thumbnail> The run console is not the same as the REPL console True, but i figured they might be pretty similar (at least it wouldn't work out of the box). Good find on the SO answer though!#2021-05-2109:44Ivar RefsdalI opened an issue: https://github.com/cursive-ide/cursive/issues/2555 🤞#2021-05-2312:37Azzuritejust be prepared for it never being supported 😄 I'm not bashing Cursive/cfleming, there's just a huge backlog of things to do so the ETA for that may be "never"#2021-05-2317:18Ivar RefsdalSure I agree the backlog is huge. However other people may know it's been requested if nothing else.#2021-05-2502:47cflemingIt’s sad but true. However there may be a workaround now - Cursive does have some limited support for ANSI codes. I just tested this, and this works in Cursive:
(println (str "Hello" \u001b "[1KWorld"))
#2021-05-2502:48cflemingHowever it doesn’t do exactly the same thing in the terminal - in the terminal it erases the Hello with spaces but doesn’t move the caret to the start of the line.#2021-05-2502:50cflemingHowever the ETA for “make Cursive a full terminal emulator” is definitely “never” 🙂#2021-05-2508:55Ivar RefsdalExcellent @U0567Q30W ❤️ Thanks! That's all I need for using progrock#2021-05-2512:44helios@cfleming In our main project folder we have a couple of "subprojects" where our babashka code lives. It seems that Cursive doest not remember some folders marked as source. I need to manually "Add to sources" every time (or mark them with the right-click menu). 😞 any hint why? Main clojure stuff works fine#2021-05-2521:33cfleming@U0AD3JSHL As @U0183EZCD0D said, these will have to be configured in your project.clj or deps.edn file, otherwise Cursive will un-mark them on every sync.#2021-05-2521:35cflemingIf you don’t want them added by default, you could have the paths in an alias/profile, and just use that when syncing with Cursive.#2021-05-2522:35d5pI have a similar problem with a project set up similar to ring - a parent project using lein sub with a series of subprojects , used to all load and resolve fine in cursive but last few versions it never remembers/sets the source roots, and gets confused with the checkouts/#2021-05-2522:40cfleming@U0HJCPF3J Is your project something I can look at, or are you able to set up a simple test repo in a similar config?#2021-05-2523:26d5pyou can see the behaviour with the main ring project (i.e just check out https://github.com/ring-clojure/ring and open up the top level project) , my project is configured identically with lein sub and a series of sub projects#2021-05-2513:52Jeff EvansIs it Lein or deps? Either way, those will need to be marked as source roots in the build file.#2021-05-2516:36Jakub Holý (HolyJak)Hi! Is there a problem with requiring cljc from inside a cljs file? In my .cljs I have (:require [com.wsscode.pathom.connect :as pc :refer [defresolver]]) , which is a .cljc file. When I command-click on the ns, I get to a .js file compiled from it. Cursive complains later on in the file that it does not know defresolver . // @alex-eberts You experienced something similar, right?#2021-05-2516:52alex-ebertsI do remember that happening but I just tried command-clicking on a defresolver in a clj namespace and cursive navigated correctly to the definition. :man-shrugging: I’ll keep an eye open for when it happens again.#2021-05-2516:42thhellersounds like you probably have the output path of your CLJS build on the classpath?#2021-05-2516:44Jakub Holý (HolyJak)That is correct, I guess resources/public/js/ is on the classpath. Which I actually want, since I use the classpath to serve the JS when requested by the browser.#2021-05-2516:48Jakub Holý (HolyJak)Removing the js output from the classpath results just in Cmd-click on the namespace not doing anything (just telling me "No usages found..."). The referred var still cannot be resolved.#2021-05-2516:50Jakub Holý (HolyJak)Mystery solved, kind of. Pathom was not on the classpath (somehow, shadow-cljs did not complain about it and compiled the ns anyway.)#2021-05-2516:58thhellerpathom is always on the classpath since shadow-cljs uses it internally 😉#2021-05-2518:34Jakub Holý (HolyJak)Ah, that explains it. Thank you!#2021-05-2516:50Jakub Holý (HolyJak)Mystery solved, kind of. Pathom was not on the classpath (somehow, shadow-cljs did not complain about it and compiled the ns anyway.)#2021-05-2517:01markaddlemanAny thoughts on incorporating clj-kondo configs into Cursive's syntax understanding? I'm seeing more projects including appropriate kondo configs . I'm hopeful that the kondo konfigs will help cursive link attribute keywords used in Pathom 3#2021-05-2521:52cflemingHow would you like this to work? I’m not sure how Cursive would use these.#2021-05-2609:27borkdudeit helps in so far that if you integrate clj-kondo linting inside Cursive then people would see the correct warnings#2021-05-2609:27borkdudebut I can imagine this would be a big step and doesn't integrate with the way IntelliJ works#2021-05-2615:38markaddleman> How would you like this to work? It's a good question. I'm not very familiar with with konfigs - I am assuming there is enough information to determine the "source" of a symbol/keyword and, thus, that would be enough information to wire up Intellij's Find Usages feature.#2021-05-2616:54markaddleman> but I can imagine this would be a big step and doesn't integrate with the way IntelliJ works Thanks. I guess it was more wishful thinking than anything else 🙂#2021-05-2621:05cflemingI still don’t quite understand. As I understand it, the clj-kondo integration should show the warnings in the editor already, right? And when there’s a warning in the editor, you should be able to use the normal Cursive find usages feature at that point?#2021-05-2621:07borkdude> As I understand it, the clj-kondo integration should show the warnings in the editor already, right? This is correct. The other point seems logical too.#2021-05-2621:07borkdudeBut Cursive also emits syntax warnings on its own.#2021-05-2621:07borkdudeAnd these are not informed by any clj-kondo configuration#2021-05-2621:08borkdudeAnd that was what the question was about: could clj-kondo configuration inform Cursive's own understanding of the syntax, somehow#2021-05-2621:09cflemingSo is the proposal to control the IntelliJ inspections via the clj-kondo config, i.e. enable and disable the roughly equivalent inspections based on the config? Or to somehow use the clj-kondo analysis results?#2021-05-2621:11borkdudeI don't think anyone has made a proposal, Mark was just asking about thoughts. I don't have any thoughts on this, but I would be open to help you out with something, if you needed it from the clj-kondo side.#2021-05-2621:13cflemingOk, I’ll wait and see what Mark suggests. I’d be interested to know what the issue around attribute keywords is, for example.#2021-05-2621:16borkdudeWell, the config for pathom3 is pretty basic: https://github.com/wilkerlucio/pathom3/blob/master/resources/clj-kondo.exports/com.wsscode/pathom3/config.edn I think the same can be accomplished in Cursive with "resolve macro as" if I remember correctly.#2021-05-2621:17cflemingAh, ok, yes, that should be easy.#2021-05-2520:00zZMathSPCan anyone help me with repl in intellij using wsl?#2021-05-2609:29folconWhat issue are you having? You need to have ports open, but what I've found useful to do is just use repl within wsl, so for example lein repl then connect to the nrepl port from cursive using the remote repl option 😃...#2021-05-2611:18zZMathSPthanks!!#2021-05-2615:26Erik B GoodHey, I was wondering whether there were some renderers that came with Cursive. For instance, when I am debugging, vectors look like in the first picture. I noticed one could add custom renderers like in the second picture. Thanks!#2021-05-2721:50cflemingYes, Cursive does use some renderers internally, and it could probably do with more. If there are types that you’d like to see presented differently, I’m interested to know about them. I’d have to check the vector case though, I usually see them presented as lists.#2021-06-0409:02folconTo be honest nice ways of showing more complex stuff in ways that can be expanded, using nav and datify would be cool. I've never really used REBL that much, but if it was to a degree available in cursive that would be amazing...#2021-06-0411:34cflemingI’m actually planning that soon, with inline rendering.#2021-05-2718:50Jeff EvansI have a Lein project, within a larger project (think of it as a separate module). I notice that when adding this subproject project.clj to the Leiningen Projects, it only partially works. The namespace warning goes away, and I can click required namespace prefixes to navigate, etc. But I can’t click prefix/fn-name (i.e. an actual function within the namespace that prefix is for). It’s strange. And even local symbols can’t be navigated to (i.e. the name in a let binding for instance). Basically, everything is “Cannot find declaration to go to”, even stuff in clojure.core. Have tried reloading Lein projects, closing and reopening the IntelliJ project, etc. to no avail. Has anyone else seen this behavior before?#2021-05-2718:52Jeff Evansactually, perhaps I need to start over with this: https://cursive-ide.com/userguide/leiningen.html#working-with-multi-module-projects#2021-05-2718:59Jeff Evansah yes, indeed, wiping out the existing project and recreating in this way solved the problem! Too bad I forgot to back up my REPL history though. 😢#2021-05-2913:59apbleonardWhen vars are "unused" they turn grey. Can the same be sensibly done for keywords (even if that just meant it was only grey when the keyword was only used once in the entire project, say)? It could save a lot of mistyping.#2021-05-3006:45p-himikDoubt that. Keyword search is very slow when the keyword has a generic name, even if it has a namespace. E.g. a look up of :random-string/name is just as slow as the one of :name. But maybe things could be changed to make it faster.#2021-05-3022:28onetomIntelliJ 2021.2 EAP is out and it seems Cursive doesn't support it yet. Do I see it correctly?#2021-05-3022:28cflemingYes, that’s right - I’ll look at that today.
#2021-05-3104:59cflemingEAP supporting this is out now.#2021-05-3104:59cfleminghttps://twitter.com/CursiveIDE/status/1399228633550516229#2021-06-0103:40onetomunfortunately, im only getting an empty window when IntelliJ 2021.2 EAP is trying to load my previously open project. it starts showing a progress bar to load the project, but that popup just disappears and leaves a completely empty window behind, with not toolbar or tool-window controls or status bar. if i open an other recent project (the clojurescript source code for example) i just get a new empty window too. i tried invalidating the caches, but it did not change anything, i still behaved the same after restart#2021-06-0104:00onetomi suspect, it's related to the fact that i had to reinstall my nix after upgrading to the latest macOS update, so neither the clojure cli path, nor the java sdk paths are valid anymore.#2021-06-0104:22onetomi've updated the path to Clojure CLI, but that wasn't sufficient.#2021-06-0104:30cflemingIf you create a new project, does that create successfully?#2021-06-0104:51onetomnope. i've done the following:
cd /tmp
git clone ~/some/project
rm -rf project/.idea
rm $(fd .iml project/)
idea-eap /tmp/project
and i've just ended up with an empty window
#2021-06-0104:53onetomi got these files created in /tmp/project/.idea/:
-rw-r--r--   1 onetom  wheel   176B Jun  1 12:49 ClojureProjectResolveSettings.xml
-rw-r--r--   1 onetom  wheel   622B Jun  1 12:49 misc.xml
-rw-r--r--   1 onetom  wheel   879B Jun  1 12:49 workspace.xml
where the ClojureProjectResolveSettings.xml is:
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
  <component name="ClojureProjectResolveSettings">
    <currentScheme>IDE</currentScheme>
  </component>
</project>
#2021-06-0105:10onetomi've tried something even simpler:
$ mkdir deps-skeleton
$ cd deps-skeleton
$ echo '{}' > deps.edn
$ idea-eap .
and I got a dialog, titled Error Loading Default Project, with a content saying java.lang.StackOverflowError and an OK button.
#2021-06-0105:11onetomand this dialog appeared right on top of the splash screen#2021-06-0105:12onetomthis sounds like something which should be reproducible#2021-06-0105:13onetomI'm on macOS 11.4 (20F71) and the latest 2021.2 EAP IntelliJ Ultimate, I could download through the JetBrains Toolbox#2021-06-0105:13onetomand Cursive 1.10.3-eap1-2021.21#2021-06-0105:17cflemingCan you email me your log file?#2021-06-0105:17cfleming<mailto:/cdn-cgi/l/email-protection|/cdn-cgi/l/email-protection>#2021-06-0105:18cflemingHelp-&gt;Show log in Finder#2021-06-0106:57cflemingThis is the SOE:
2021-06-01 13:09:21,558 [  52221]  ERROR - llij.ide.plugins.PluginManager - java.util.concurrent.ExecutionException: java.lang.StackOverflowError 
java.util.concurrent.CompletionException: java.util.concurrent.ExecutionException: java.lang.StackOverflowError
	at java.base/java.util.concurrent.CompletableFuture.encodeThrowable(CompletableFuture.java:314)
	at java.base/java.util.concurrent.CompletableFuture.completeThrowable(CompletableFuture.java:319)
	at java.base/java.util.concurrent.CompletableFuture$UniRun.tryFire(CompletableFuture.java:787)
	at java.base/java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:506)
	at java.base/java.util.concurrent.CompletableFuture$AsyncRun.run(CompletableFuture.java:1742)
	at java.base/java.util.concurrent.CompletableFuture$AsyncRun.exec(CompletableFuture.java:1728)
	at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:290)
	at java.base/java.util.concurrent.ForkJoinPool.awaitQuiescence(ForkJoinPool.java:2984)
	at com.intellij.idea.StartupUtil.start(StartupUtil.java:286)
	at com.intellij.idea.Main.bootstrap(Main.java:117)
	at com.intellij.idea.Main.main(Main.java:83)
Caused by: java.util.concurrent.ExecutionException: java.lang.StackOverflowError
	at java.base/java.util.concurrent.CompletableFuture.reportGet(CompletableFuture.java:395)
	at java.base/java.util.concurrent.CompletableFuture.get(CompletableFuture.java:2022)
	at com.intellij.openapi.project.impl.ProjectManagerExImpl.openProject(ProjectManagerExImpl.kt:73)
	at com.intellij.platform.PlatformProjectOpenProcessor$Companion.doOpenProject(PlatformProjectOpenProcessor.kt:128)
	at com.intellij.platform.PlatformProjectOpenProcessor.openProjectAndFile(PlatformProjectOpenProcessor.kt:251)
	at com.intellij.ide.CommandLineProcessor.doOpenFile(CommandLineProcessor.java:90)
	at com.intellij.ide.CommandLineProcessor.doOpenFileOrProject(CommandLineProcessor.java:61)
	at com.intellij.ide.CommandLineProcessor.lambda$openFileOrProject$5(CommandLineProcessor.java:313)
	at com.intellij.ide.lightEdit.LightEditUtil.computeWithCommandLineOptions(LightEditUtil.java:241)
	at com.intellij.ide.CommandLineProcessor.openFileOrProject(CommandLineProcessor.java:309)
	at com.intellij.ide.CommandLineProcessor.processOpenFile(CommandLineProcessor.java:258)
	at com.intellij.ide.CommandLineProcessor.processExternalCommandLine(CommandLineProcessor.java:158)
	at com.intellij.idea.IdeStarterKt.loadProjectFromExternalCommandLine(IdeStarter.kt:207)
	at com.intellij.idea.IdeStarterKt.access$loadProjectFromExternalCommandLine(IdeStarter.kt:1)
	at com.intellij.idea.IdeStarter.openProjectIfNeeded(IdeStarter.kt:145)
	at com.intellij.idea.IdeStarter.main(IdeStarter.kt:79)
	at com.intellij.idea.ApplicationLoader$startApp$3.run(ApplicationLoader.kt:185)
	at java.base/java.util.concurrent.CompletableFuture$UniRun.tryFire(CompletableFuture.java:783)
	... 8 more
Caused by: java.lang.StackOverflowError
	at java.base/java.lang.String.indexOf(String.java:1691)
	at kotlin.text.StringsKt__StringsKt.indexOf(Strings.kt:1099)
	at kotlin.text.StringsKt__StringsJVMKt.replace(StringsJVM.kt:81)
	at kotlin.text.StringsKt__StringsJVMKt.replace$default(StringsJVM.kt:79)
	at com.intellij.ide.plugins.IdeaPluginDescriptorImplKt.pluginPathToUserString(IdeaPluginDescriptorImpl.kt:491)
	at com.intellij.ide.plugins.IdeaPluginDescriptorImpl.toString(IdeaPluginDescriptorImpl.kt:485)
	at java.base/java.lang.String.valueOf(String.java:2951)
	at java.base/java.lang.StringBuilder.append(StringBuilder.java:168)
	at com.intellij.ide.plugins.cl.PluginClassLoader.toString(PluginClassLoader.java:487)
	at java.base/java.lang.String.valueOf(String.java:2951)
	at java.base/java.lang.StringBuilder.append(StringBuilder.java:168)
	at com.intellij.serviceContainer.ComponentManagerImplKt.doLoadClass(ComponentManagerImpl.kt:1452)
	at com.intellij.serviceContainer.ComponentManagerImplKt.access$doLoadClass(ComponentManagerImpl.kt:1)
	at com.intellij.serviceContainer.ComponentManagerImpl.loadClass(ComponentManagerImpl.kt:804)
	at com.intellij.serviceContainer.BaseComponentAdapter.getImplementationClass(BaseComponentAdapter.kt:38)
	at com.intellij.serviceContainer.BaseComponentAdapter.getComponentImplementation(BaseComponentAdapter.kt:31)
	at com.intellij.serviceContainer.MyComponentAdapter.toString(MyComponentAdapter.kt:65)
	at com.intellij.serviceContainer.BaseComponentAdapter.getImplementationClass(BaseComponentAdapter.kt:41)
	at com.intellij.serviceContainer.BaseComponentAdapter.getComponentImplementation(BaseComponentAdapter.kt:31)
	at com.intellij.serviceContainer.MyComponentAdapter.toString(MyComponentAdapter.kt:65)
#2021-06-0106:58cflemingThat doesn’t seem to be Cursive related at all, as far as I can tell.#2021-06-0106:59cflemingIt looks like something is funny with your IntelliJ install, but I’m not sure what that might be.#2021-06-0111:40onetomthank you for having a look! next time i will be able to debug 1 step further. indeed, on another machine, the configuration of the same jetbrains user and the same code repo, on the same code branch, does not exhibit the same behaviour. i did notice that despite having the configuration synced via a jetbrains account, i still have different sets of plugins on different machines, so the issue mostly likely stems from such difference, cause by some rogue plugin...#2021-05-3117:00wilkerluciohello, not a specific Cursive issue, but maybe somebody here knows it. My intellij stopped being able to find executables in my machine, things like bb and clj-kondo, I have File Watcher that uses clj-kondo, but since I upgrade IntelliJ it stopped working, IntelliJ says the executable is not available, but in a normal terminal it works fine, any ideas how to fix it?#2021-05-3121:52cflemingYeah, deps now shells out to git and that actually worked which surprised me. The CWD of IntelliJ is inside the app somewhere, and env vars from your shell environment don’t usually get propagated to it correctly. I’m not sure why this would have broken though, can you use a full path to the executable?#2021-06-0115:24wilkerlucioin some cases I can, but not all#2021-06-0115:24wilkerlucioI think somebody else open a issue about this: https://youtrack.jetbrains.com/issue/IDEA-269715#2021-06-0115:29wilkerluciofor anyone having this issue, seems like it fixes itself if I start IntelliJ from the terminal, instead of clicking on the dock icon#2021-06-0120:07raspasovI think this happened to me as well for clj-kondo. What I think fixed it was using a full path to clj-kondo#2021-06-0120:08raspasovFull path under “Program:”#2021-06-0120:32wilkerluciofull path solved this problem to me, but them I had issues with my git hooks#2021-06-0120:32wilkerlucioand those I cant use full path because come from team shared files#2021-06-0120:33wilkerluciostarting from terminal made all work fine#2021-06-0115:24wilkerlucioI think somebody else open a issue about this: https://youtrack.jetbrains.com/issue/IDEA-269715#2021-06-0102:33zebuWith my leiningen project, when I start the repl, it won’t accept any commands typed into it and there is a message saying “this view is read only”. Also I can’t find any commands in the ide to send forms to the repl#2021-06-0102:41zebuthis is on windows, cursive 1.10.2-2021.1, java 1.8, intellij 2021.1.1 community edition, build 211.7142.45 (april 30). project opened using the open project, and pointing to the project.clj file#2021-06-0104:31cflemingCan you send a screenshot of your REPL toolwindow? It sounds like your REPL is not starting correctly.#2021-06-0104:35zebu#2021-06-0104:54zebu#2021-06-0105:17cflemingYou can’t use the lein run config like that, you’ll need to use the REPL run config type as described here: https://cursive-ide.com/userguide/repl.html#2021-06-0105:59zebuThat worked, thanks Colin#2021-06-0105:03onetomI'm trying to version control the Clojure Code Styles settings for a project, because we had to set the formatting of defmulti to Indent manually, but I have no idea where does that configuration go to. I've changed the Editor / Code Style / Clojure / Scheme: to Project, then Opt-Enter Configure indentation for clojure.core/defmulti and set it to Indent and grep -r defmulti .idea doesn't yield anything, although .idea/codeStyles/codeStyleConfig.xml does reflect my choice of "formatting scheme":
<component name="ProjectCodeStyleConfiguration">
  <state>
    <option name="USE_PER_PROJECT_SETTINGS" value="true" />
  </state>
</component>
#2021-06-0105:07onetomThere is a little cog next to the Code Style / Scheme drop-down, which lets me export the config into a code style XML or an EditorConfig file, but it offers to save it to ~/Project.xml by default, which sounds odd. I wouldn't think that I should do such manual export for being able to version control these settings, but then where is this config stored?#2021-06-0120:12borkdude@wilkerlucio if the filewatcher doesn't work out, you can also try the lsp approach for clj-kondo#2021-06-0321:06wilkerluciocool, I didn't tried it yet, maybe its time#2021-06-0321:16borkdudeI mean this one: https://github.com/clj-kondo/clj-kondo/blob/master/doc/editor-integration.md#lsp-server-1#2021-06-0321:16borkdudebut of course you could also give clojure #lsp a chance#2021-06-0321:16wilkerlucioyes, I just finished the setting up, looks cool, gonna see if I notice any differences from the file watcher setup#2021-06-0401:51wilkerluciowhen editing large files I notice a significant performance hit when the LSP is active#2021-06-0401:52wilkerlucioI guess its verifying things as I type, while the file watcher only does it when I save#2021-06-0217:53Rob HaisfieldCan I run a Reveal REPL in Cursive? https://vlaaad.github.io/reveal/ Edit: I actually found this but still curious to see opinions about the experience. https://vlaaad.github.io/reveal/#cursive#2021-06-0218:00Rob HaisfieldActually, for some reason, the option to Run with Deps is grayed out for me so I can’t follow the instructions#2021-06-0218:49R.A. PorterDo you have a deps.edn configured? That looks like you have a leiningen-based project (`project.clj`).#2021-06-0306:08onetom@rob370 i did setup reveal in a project which im using from cursive, but hasn't actually utilized the reveal window a lot, because the extra mental overhead of switching to the reveal window, instead of just looking at the built-in cursive window, somehow is too much. otherwise, reveal seems to work just fine... don't forget to create a .nrepl.edn next to your deps.edn, containing something like {:middleware [vlaaad.reveal.nrepl/middleware]}. then if you are annoyed by the opening reveal window, u can just turn it off by #_ commenting the vlaaad part.#2021-06-0310:00ikitommiis there a way to define a new qualified keyword source (e.g. like s/def is?)#2021-06-0312:46Kari MarttilaIs it safe to migrate to the newest IDEA 2021.1.2 (i.e. no issues with Cursive)?#2021-06-0312:53mike_ananevI'm using IDEA 2021.1.2. No errors found, yet.#2021-06-0312:57Kari MarttilaOk. Thanks!#2021-06-0319:02tamasjungCould anybody confirm if macro expansion is working/broken with recent versions? (tried several combinations, currently Cursive: 1.10.3-eap1-4-g139ba476, IJ 2021.1.2, Big Sur, for me the macro expansion window opens but throws a StrackoverflowError and none of the components, like toolbar buttons respond to mouse click)#2021-06-0319:19imreTried just now, it doesn't work.#2021-06-0319:19imreI got a NRE#2021-06-0319:20imreIt's been in limbo for quite a while now tbh#2021-06-0320:06lspectorIs there a way to start up a standalone Clojure REPL, without having an open project?#2021-06-0320:22potetmdepends on what you want. The clj command does that.#2021-06-0320:39lspectorI meant in IntelliJ/Cursive. Is there a way to do that there?#2021-06-0320:42potetmAh, I didn’t notice the room I was in. Not that I know of.#2021-06-0320:45lspectorHuh -- yes, I see I can do it in Cursive's Terminal pane (click on the terminal tab and then type clj). But I assume this is just an OS terminal so clj would have to be installed, and we'd have none of the benefits of being in Cursive.#2021-06-0320:46lspectorSo the more complete question is whether we can start a Cursive Clojure REPL in Cursive without a project.#2021-06-0403:18cflemingMore generally, there’s basically no way to do anything in IntelliJ without a project. The only thing you get without a project is the welcome splash screen.#2021-06-0403:19cflemingThe only thing that’s really possible at the moment is the new LightEdit mode (https://blog.jetbrains.com/idea/2020/04/lightedit-mode/), but as far as I know that’s pretty experimental at this stage.#2021-06-0415:49lspectorThanks @U0567Q30W. Should it be possible for me to get LightEdit mode working with a .clj file now? I tried dragging a projectless .clj file to IntelliJ in my MacOS dock, and it opened but I wasn't able to evaluate anything.#2021-06-0703:15cflemingI’m actually not sure, I haven’t tried LightEdit yet, I’m not sure if Cursive requires anything to support it. Why do you not want a project?#2021-06-0817:04lspectorI am trying to provide the simplest, most friction-free way for newcomers (often undergrad CS majors who have never seen Clojure before) to get from zero to a working REPL, so they can start to learn Clojure and gradually come to understand enough to take advantage of more of Cursive's features. I know it may be hard to grok for most people here, but the process of creating a project and starting a REPL can be pretty confusing to the newcomers, and while the docs are excellent in some respects they make lots of assumptions about background knowledge and present more information than is helpful to these new users, e.g. about different kinds of REPLs, Run Configurations, build tools, etc. The closer it can get to "install IDEA and then Cursive, and then select X to start a REPL" the better it will be. Separately, I often want a REPL for myself to do a quick calculation or play with an idea, and creating/opening dummy projects for this sort of thing is a bit of a drag. But the real thing I'm after here is onboarding new users.#2021-06-0817:07lspectorOf course there are other ways to get a quick REPL, but they mostly have annoying weaknesses (e.g. for multiline input), or they're not trivial to start up, and in any event they're not on the path that I want my students to be on, which is the path to using Cursive.#2021-06-0411:51onetomI keep experiencing a namespace loading issue, which seems to be sensitive to timing. I change a file and if I quickly press Cmd-Shift-L or M, not all my changes are reflected in the REPL process. It started to manifest more often lately, so I hooked up clojure.tools.namespace/refresh and kaocha to a Cursive REPL command and assigned a shortcut to it, hoping to improve the situation. The result is total chaos. If I use Cmd-Shift-L and refresh in alternation, my changes won't be reflected in the REPL anymore. Has anyone using ctnr/refresh successfully from Cursive? Has anyone experienced missed loading of changed files? How should I approach the problem of creating a minimal reproducible example?#2021-06-0412:03onetomwe are at the point, where we have to keep restarting the REPL way too often, because we just can't trust test results anymore. this is the REPL command definition, which I used rather successfully for months, but exhibits a timing issue:
<repl-command name="ginoco Kaocha" executionType="EXPRESSION" commandText="(time ((requiring-resolve 'kaocha.repl/run) :unit))" executeBefore="SYNC_ALL" executionNs="REPL_CURRENT" inNamespace="" saveAll="true" />
I change a character in my test code, trigger the REPL command with a shortcut, but faster than ~700ms, then the changed file is not reloaded, but the tests still run with the previous version of the code, yielding misleading test results :(
#2021-06-0412:08onetomthe new REPL command looks like this:
<repl-command name="ginoco Kaocha" executionType="EXPRESSION" commandText="(do (try (require 'gini.kaocha) (catch Exception ex))&#10;    (clojure.tools.namespace.repl/refresh)&#10;    (time ((requiring-resolve 'kaocha.repl/run) :unit)))" executeBefore="SYNC_ALL" executionNs="REPL_CURRENT" inNamespace="" saveAll="true" />
they (require 'gini.kaocha) is just configuring the stack trace filters, but not available in every REPL, that's why the try-catch around it.
#2021-06-0703:17cflemingI’ll try to reproduce this - Cursive does save all files before executing these commands, but it’s possible that IntelliJ takes a while to flush to disk? I’m not sure.#2021-06-0703:25cflemingIn terms of a repro test case, anything I can run would be helpful. Perhaps just a project set up like yours with a simple test (= "Hello" "Hello")? Then it should be possible to change one of the strings and run the test quickly to see the problem.#2021-06-0707:57onetomit seems the problem is that the current file is not always correctly identified as a modified file. so if my REPL command is configured to Before executing: Sync all modified files, then i modify my test source and run my (time ((requiring-resolve 'kaocha.repl/run) :unit)) REPL command, my current test state might not be loaded into the REPL process. the missing Loading test/ns/xxx_test.clj... done lines in the REPL tool window correctly reflect what happens.#2021-06-0707:58onetomso, this phenomena is observed without using ctnr/refresh#2021-06-0708:22onetom@U0567Q30W i've emailed you a video recording which demonstrates the issue. i think for now i can work around the problem by just using the Before executing: Load current file and try to remember to press Cmd-Shift-M, if I modified dependent files, but haven't reloaded them manually.#2021-06-0708:28onetompushed the repo, which I used to record the video demonstration here: https://github.com/onetom/cursive-reload-issue#2021-06-0710:50onetomI have one more suspicion; Kaocha itself, since it's not exactly a trivial piece of software. I'm also experiencing something which makes no sense at all. I previous version of my test runs somehow, when I'm only editing and letting the Cursive REPL command load the current file and run kaocha. after manually switching over to the test namespace an load it with Cmd-Shift-L, it finally gets updated in the REPL process. (and I'm not changing the name of the deftest; I know that's a common cause for phantom tests; this is a different situation)#2021-06-0412:11imreI use ctnr/refresh-all but not as part of a repl command#2021-06-0412:15imrehowever, I think you need to use the :after to execute something after the refresh#2021-06-0412:15imre
(repl/refresh-all :after `start)
#2021-06-0414:29bnstvnwhat does it take to have the Add dependency to project.clj command/action work? ( i believe i never saw anything in the search popup)#2021-06-0704:29cflemingYou’re right, that seems to be broken, I’ll look at that.#2021-06-0712:14bnstvnthank you#2021-06-0608:39indyCursive is amazing, thank you. I have this feature request, though not sure how feasible it is. The ability to tap a variable (using say some shortcut) and after I run the code, I should be able to see information about the tapped variable (in maybe a modal or tooltip) eg. the value itself, its type, the changed versions of the variable if any (and maybe diff the versions), be able to def the variable and so on. I know I can use the debugger or something like https://github.com/vvvvalvalval/scope-capture or simply add-taps and tap> or just def the variable. But I thought it would be really convenient if the IDE gave me this ability out of the box. I understand the runtime of the plugin will be different from that of the code, so not sure how this might work, but maybe it could hook into the REPL for this. I’m also aware of tools like REBL, Reveal and Portal but they require me to switch to it which I rarely do when using IntelliJ + Cursive because everything I want can be done inside the IDE. Don’t really want visualisations (or navigating a web page), just an IDE super tap would be really cool. Would love to help in any way if this is possible.#2021-06-0619:17indyI think I can emulate something close to this with REPL commands and IntelliJ macros for now#2021-06-0703:33cflemingOne of the things I’m working on is better data structure visualisations, and that will probably be tied into tap in some way.#2021-06-0617:02pbailleHello, I would like to tweak clojure's syntax highlighting a bit, is it possible with cursive ?#2021-06-0619:16indyJump to Colors and Fonts action#2021-06-0619:17indyWhile the caret is on whatever you want to customize#2021-06-0703:34cflemingRight, if you want to customise more than what is offered there let me know.#2021-06-0706:25pbaille@UMPJRJU9E, @U0567Q30W thank you a lot, I will try this and let you know !#2021-06-0706:28pbailleOk it seems that it is the same that what I've found in the preferences. Two things that I would like to customize for example would be : • quoted symbols • argv bindings. Is it possible ?#2021-06-0706:30pbailleI also noticed that clojure core symbols are highlighted even when contained in comments. I would like to fix that.#2021-06-0706:30pbailleIs there some kind of tmLanguage.json file somewhere ?#2021-06-0803:33cflemingNo, there isn’t, unless there’s an IntelliJ plugin which could colour things on top of what Cursive does.#2021-06-0709:58defaI’d like to debug a process on a remote machine using breakpoints but can not get the debugger to connect properly to the remove JVM. I have a nrepl remote REPL running successfully but connecting a debugger with IntelliJ IDEA “Remote JVM Debug” run stetting does not work. I have to tunnel the remote JVM socket using SSH port forwarding, maybe that is the problem?#2021-06-0711:38mike_ananev@defa when you start a REPL (remote process) you should put to :jvm-opts parameter
"-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005"
#2021-06-0711:39mike_ananevand tell Idea to connect to debuger port 5005#2021-06-0714:17defaThanks, @mike1452, I already did that but it seems that the debugger takes a couple of minutes (!) to connect. Not sure what this is or was but not it is working. Kind of. Thanks.#2021-06-0714:17defaUnfortunately I encountered a heisenbug… now that I’m able to debug the problem, it has gone away.#2021-06-0714:48Jeff Evansyeah, it can be incredibly slow when the Java debugger gets involved, from my experience. I recommend waiting until your process is fully warmed up, before the error state (or whatever you’re trying to debug), then connect the debugger#2021-06-0714:48Jeff Evansand disconnect/reconnect it liberally#2021-06-0715:36Ian FernandezHello, my company moved to bazel builds for our Clojure/JVM-based projects. How do I configure Cursive / IntelliJ to recognize my classpath again?#2021-06-0718:33tanzoniteblackhow are you liking bazel? How is it set up to work with Clojure?#2021-06-0718:33tanzoniteblackif you don’t mind me asking#2021-06-0718:39Ian FernandezRight now the support for bazel on IntelliJ is very very bad, the company moved from deps.edn to bazel and it broke at lot of IntelliJ classpath loading stuff#2021-06-0718:39Ian Fernandez😅#2021-06-0718:39Ian Fernandezgoto var definitions are impossible for some part of the code#2021-06-0802:51cfleming@U9ABG0ERZ I know next to nothing about bazel (except that IntelliJ didn’t seem to support it well, as you’ve found). Are you able to set up a simple project that I could use to test this?#2021-06-0913:58Ian FernandezI'll try to setup a project 🙂#2021-06-0716:53thhellerthere is a bazel plugin for intellij I think#2021-06-0718:38Ian Fernandezyeah, there's a bazel plugin for IntelliJ but it does not loads the java classpath from the build#2021-06-0718:40Ian Fernandez😅#2021-06-0718:40Ian FernandezI can connect a REPL from IntelliJ but it doesn't detect modules on IntelliJ 😞#2021-06-0719:29katoxIt seems that cursive doesn't like the latest tools.deps that come with Clojure (https://clojure.org/guides/getting_started#_installation_on_linux)... `clj -Sdescribe => {:version "1.10.3.855" ...};#2021-06-0719:45imrewhat cursive version are you on? I'm on 1.10.3-eap1-2021.1 with latest clojure and it's grand#2021-06-0720:31katoxThe same EAP + 2021.1.2. I can make it work by "use deps directly" but it it worked with the older version (it broke when I updated the clj tooling)#2021-06-0802:50cflemingHmm, that’s odd, I’ll look at that.#2021-06-0803:41cflemingI can’t reproduce this. That error message is produced when this var doesn’t exist, which it does in this version (and doesn’t on very old versions of deps): https://github.com/clojure/tools.deps.alpha/blob/tools.deps.alpha-0.11.922/src/main/clojure/clojure/tools/deps/alpha/util/dir.clj#L25#2021-06-0803:42cflemingIf you look in Preferences | Build, Execution, Deployment | Build Tools | Clojure Deps do you see the correct version reported?#2021-06-0807:11katoxIf I switch it back on it says#2021-06-0807:11katox#2021-06-0808:31cflemingAnd it definitely doesn’t work with those settings?#2021-06-0809:00katoxNo, it won't starrt the REPL if I leave it on.#2021-06-0809:01katox#2021-06-0823:42cflemingThat’s really weird. I can’t reproduce that, and I don’t have a plausible theory for how it could happen. I’ll look at the code to see what debug logging might be there, otherwise I’ll have to add some.#2021-06-0907:39cflemingDoes your project have tools.deps on its classpath for some reason?#2021-06-0908:15katoxit is not on the classpath, it is in the project root. I have no idea what's wrong where but it is not a corrupted project file. I found a 6mo old untouched deps project that did the same. If you had some debug build I can try to run it here if it helps.#2021-06-0808:25AzzuriteI installed clojure.tools on Windows through scoop, but I can't use it with Cursive because the output of the clj -Sdescribe command contains invalid escape sequences:
$ cmd-clj.exe -Sdescribe
{:version "1.10.3.855"
 :config-files ["C:\Users\***\scoop\modules\ClojureTools\deps.edn" "C:\Users\***\.clojure\deps.edn" "deps.edn"]
 :config-user "C:\Users\***\.clojure\deps.edn"
 :config-project "deps.edn"
 :install-dir "C:\Users\***\scoop\modules\ClojureTools"
 :config-dir "C:\Users\***\.clojure"
 :cache-dir "C:\Users\***\.clojure\.cpcache"
 :force False
 :repro False
 :main-aliases ""
 :repl-aliases ""
 :exec-aliases ""}
because C:\Users\... contains \U... (I know, switch to Linux...)
#2021-06-0808:31cflemingHmm, that sounds like a deps bug really, since the output is supposed to be edn but isn’t readable. I’d be interested to hear if that’s something that might be fixed there - I’m not sure what Cursive could do about that.#2021-06-0812:26Alex Miller (Clojure team)Yeah, it’s a bug #2021-06-0815:00Azzurite❤️#2021-06-0812:37LitewhatHello! I have a problem with connecting to a remote REPL running on WSL from Cursive running on Windows. Every time it says "Connection refused". Do you have any idea why is it happening?#2021-06-0812:44borkdudeCan you connect using other tools, e.g. lein repl :connect ?#2021-06-0814:34Litewhat@U04V15CAJ Unfortunately I cannot#2021-06-0814:36borkdudePerhaps there is something here https://blog.michielborkent.nl/2020/07/26/remote-wsl2-clojure/ I have some powershell script that does stuff with ports in the Windows firewall, etc#2021-06-0814:37borkdudeNot sure if that is related though. Perhaps your REPL isn't listening on the wildcard address / public IP address of wsl(2)#2021-06-0815:24Litewhat@U04V15CAJ I’ve check the script you had in the video. So I proxied only a port on which the repl is listening on WSL but still cannot connect to it#2021-06-0815:26Litewhat> Not sure if that is related though. Perhaps your REPL isn’t listening on the wildcard address / public IP address of wsl(2) I’ll check that soon#2021-06-0815:58LitewhatLooks like it’s not listening on wildcard address and I’m not sure how to do it :thinking_face:#2021-06-0816:03borkdudewhat are you using, nREPL? how are you starting it?#2021-06-0816:10LitewhatI’m using leiningen in WSL. I’m starting it with lein repl#2021-06-0816:15borkdudeSee lein repl --help how to configure the host and port#2021-06-0817:24LitewhatChecked that unfortunately when I’m setting host to 0.0.0.0 then the repl is running but I can see that it’s listening on 127.0.0.1. Also I have a postgres container which is listening on 0.0.0.0… Weird.#2021-06-0817:26borkdudeunfortunately.... it's working?#2021-06-0817:30borkdude@UCMM72RT4 This works for me:
$ lein repl :start :host 0.0.0.0 :port 1337
nREPL server started on port 1337 on host 0.0.0.0 - 
#2021-06-0817:30LitewhatI’m sorry I wrote wrong#2021-06-0817:31LitewhatChecking yours#2021-06-0817:46LitewhatGood point @U04V15CAJ thank you! I used positional arguments which was wrong… So it says for me that nREPL is running on 0.0.0.0:5555. Now I can connect via lein repl :connect but I cannot with Cursive :thinking_face:#2021-06-0817:54Litewhat@U04V15CAJ solved! I restarted and invalidated cache and now I’m super happy to connect from Cursive 🙂#2021-06-0819:54borkdudecool!#2021-06-0812:53favilaHello! I’m running into an issue again where I’m in a monorepo, multiple directories have the same bare name and are deps.edn projects, and because they have the same base dirname I can’t import them as modules at the same time. I’m wondering if any workaround for this problem as emerged in the past few months (I think) since I last encountered it?#2021-06-0812:54favilaTo be more concrete: services/foo/deps.edn and modules/foo/deps.edn are different deps projects in the same intellij project#2021-06-0812:55favilaI can only have one of them as an intellj module at a time because the module name for both is “foo” and I don’t think I can control that.#2021-06-0820:49salamhave you tried manually adding and renaming those modules with the same (inferred) name in Project Structure / Project Settings / Modules ? you can add them one at a time and rename them following a naming convention (e.g., services-foo, modules-foo).#2021-06-0820:51salamhttps://stackoverflow.com/questions/29495060/multiple-intellij-maven-modules-with-same-name#2021-06-0900:36favilaCursive seems to control the module settings—the next ”import changes” will reset the names #2021-06-0904:37salamyou're right. we seem to have lost the ability to rename modules in this particular case where modules in different directories share the same name... 😞 Cursive threw 5 unhandled exceptions when i attempted to import and rename such modules...#2021-06-0904:46salamhttps://github.com/cursive-ide/cursive/issues/2391#2021-06-0814:46Jeff Evanshopefully I explained this well, but adding a sub Lein project after the fact is somehow not working as well as the initial recursive import: #2021-06-1117:32Jeff Evansleft a comment… I think the problem may have been Maven fighting with Lein#2021-06-0815:57kendall.buchananAnyone running Cursive/IDEA on the Apple M1? Thoughts on how well it performs?#2021-06-0818:04danierouxSnappy, blazing, joy inducing.#2021-06-0821:41kendall.buchananFantastic. On a Macbook Pro or Air?#2021-06-0822:48danierouxBoth. I have a 16G Air as my personal machine and a Pro as work machine#2021-06-0913:26onetomi've seen it on my colleague's machine. it's almost as good as my 8-core i9 27" iMac with 80GB RAM.#2021-06-1419:08Nicolas Estrada@cfleming hi, is there any way to use babashka's nREPL without having noisy completion errors?
(+ 1 2)
=> 3
Error updating completions:
: Could not resolve symbol: cursive.repl.runtime/completions cursive.repl.runtime REPL:1:2
#2021-06-1503:26cflemingSadly not, but I’m working on babashka for a release soon.#2021-06-1509:07Nicolas EstradaIf there was any way I could contribute or lend a hand, let me know 😉 I'm in an elixir shop now and babashka is my only clojure work I'm going atm#2021-06-1602:46onetomi would be happy to test babashka support too. im not using babashka extensively yet, partially because of the lack of cursive support. but also because some of the datomic tooling doesn't work in babashka and i think functionalbytes/rmap or redelay didn't work either.#2021-06-1419:47Ian FernandezHi, there is a way to make parinfer not angry when I'm using
(defn a 
  [{:keys [a
           b]}]
  ,,,,)
#2021-06-1419:47Ian Fernandezlike for the keys destructuring in vector alignment#2021-06-1419:47Ian Fernandez?#2021-06-1419:48Ian Fernandez#2021-06-1422:30cflemingIf you delete the closing ], parinfer will fix it up.#2021-06-1500:19Ian Fernandezit stay like this, there's an option to align it?#2021-06-1503:26cflemingYeah: https://cursive-ide.com/userguide/formatting.html#2021-06-1513:07Ian FernandezI couldn't find an option for this type of identation#2021-06-1521:51cflemingIf you reformat your code, it should lay it out like that.#2021-06-1523:31Ian Fernandeznope, it always space to right#2021-06-1523:31Ian Fernandezit doesn't align at the same length#2021-06-1523:34cflemingAre you using a font with ligatures? Is that f there actually an fn or something similar?#2021-06-1600:24Ian Fernandezdefn#2021-06-1600:25Ian Fernandezaw#2021-06-1600:25Ian Fernandezit's the prettify symbols mode#2021-06-1600:25Ian Fernandezthanks#2021-06-1419:48Ian Fernandezright now is making this 😞#2021-06-1420:24Matthew TwomeyHey all, new to both clojure and cursive. I’d like to add a custom task to my project (lein template) in intellij (e.g. so that it shows in the leiningen task list), but it seems like no matter what I do, that task list is “immutable” 😉 Does anyone know if it’s possible?#2021-06-1420:25Matthew TwomeyIn other words, I’d like this kibit task (which works on the command line) to show up in this menu:#2021-06-1503:28cflemingRight, there’s no good way to do this right now, sorry. This is because lein makes it hard (and slow) to get the list of tasks. One thing you can do is create a leiningen run configuration which will execute that task.#2021-06-1500:47manutter51Hi @mtwomey, check out this answer on Stack Overflow: https://stackoverflow.com/questions/31175396/define-project-specific-tasks-in-leiningen#2021-06-1502:58Matthew TwomeyThanks, I am able to create the task and us it with lein from then command-line, but it doesn’t show up as a task in intellij / cursive - that’s what I’m trying to solve?#2021-06-1514:38Matthew TwomeyJust a follow on to this (in case someone comes across it later): It appears this isn’t possible with Cursive, as least at present: https://github.com/cursive-ide/cursive/issues/60#2021-06-1502:58Matthew TwomeyThanks, I am able to create the task and us it with lein from then command-line, but it doesn’t show up as a task in intellij / cursive - that’s what I’m trying to solve?#2021-06-1508:56thumbnailWhere do I enter the cursive license? I'm renewing one but can't find the option 😅#2021-06-1509:04thhellerin the help -> register cursive menu#2021-06-1512:18simongrayI wonder why regular quoting does remove highlighting of unresolved symbols, while syntax-quoting doesn’t? The content is quoted in both cases, so should it really make a difference?#2021-06-1605:19cflemingPrimarily because syntax-quoting is mostly used for code, and quoting is usually used for data. However it’s true that often the code isn’t valid, the most egregious case being CLJS macros where there’s no good way to tell if the macro is designed to generate Clojure or CLJS. This is something that I’ve gone back and forth on, and I’m open to persuasion on not marking inside syntax quotes.#2021-06-1512:24Alex Miller (Clojure team)regular quoting will just leave the symbol unevaluated. syntax quoting resolves symbols to fully-qualified symbols, so here would resolve something like ?form to your-ns/?form . I think (?) what you're seeing there is that Cursive is marking your-ns/?form as an unknown var in your-ns.#2021-06-1512:24simongrayHm… that makes sense#2021-06-1512:24simongrayIs there no way I can unquote inside a quoted data structure?#2021-06-1512:25simongrayThe only reason I went with ` is because I would like to use ~#2021-06-1512:25Alex Miller (Clojure team)I think you're asking to not resolve those symbols?#2021-06-1512:25simongrayyeah, basically#2021-06-1512:26Alex Miller (Clojure team)if so, the typical way to do that in ` is to ~'#2021-06-1512:26Alex Miller (Clojure team)so ... ~'?form ...#2021-06-1512:26Alex Miller (Clojure team)which is terrible here of course :)#2021-06-1512:27simongrayyeah, but the only reason I am using ` is because I can’t unquote inside a regular quoted data structure. The other alternative is to quote every single symbol other than written-rep, which is tedious 😞#2021-06-1512:27Alex Miller (Clojure team)there are multiple options here#2021-06-1512:28Alex Miller (Clojure team)it's important to keep in mind that this is all data#2021-06-1512:31Alex Miller (Clojure team)
(into [:bgp ['?form :ontoloex/writtenRep written-rep]]
  '[[?form ...] ...])
#2021-06-1512:32simongrayYeah, that’s one way to do it 🙂#2021-06-1512:33simongrayBut it seems like a workaround. It sure would be great if one could unquote inside a quoted data structure 😉#2021-06-1512:33Alex Miller (Clojure team)well you can, that's ~#2021-06-1512:33Alex Miller (Clojure team)it's the symbol resolution that you don't want#2021-06-1512:34Alex Miller (Clojure team)another option is the little-used https://clojure.github.io/clojure/clojure.template-api.html#2021-06-1512:35Alex Miller (Clojure team)you can use apply-template for something like this I believe#2021-06-1512:39Alex Miller (Clojure team)
(clojure.template/apply-template '[x] 
  '[:bgp
    [?form :ontolex/writtenRep x]
    [?word :ontolex/canonicalForm ?form] 
    ;; etc
    ] 
  [written-rep])
#2021-06-1512:40simongray
(apply-template '[written-rep]
                       '[:bgp
                         [?form :ontolex/writtenRep written-rep]
                         [?word :ontolex/canonicalForm ?form]
                         [?word :ontolex/evokes ?synset]
                         [?synset :ontolex/lexicalizedSense ?wordsense]
                         [?wordsense :ontolex/isSenseOf ?other-word]
                         [?other-word :ontolex/canonicalForm ?other-form]
                         [?other-form :ontolex/writtenRep ?other-rep]]
                       [written-rep])
#2021-06-1512:40simongraythis does work, but it’s a little ugly 🙂#2021-06-1512:41simongrayMaybe a macro that quotes every symbol starting with a ? is in order?#2021-06-1512:42simongraythough that doesn’t help with cursive highlighting 😛#2021-06-1512:44simongraynevermind, I think Aristotle actually supports a bindings map, so I’ll just use that#2021-06-1512:44simongraythanks for helping out anyway, @alexmiller!#2021-06-1512:45simongrayAnd for introducting me to apply-template.#2021-06-1514:38Matthew TwomeyJust a follow on to this (in case someone comes across it later): It appears this isn’t possible with Cursive, as least at present: https://github.com/cursive-ide/cursive/issues/60#2021-06-1515:22JoelI see an old git ticket for this bug I get a lot when loading files into REPL: (https://github.com/cursive-ide/cursive/issues/1286)
Error updating class definitions:
Execution error (NullPointerException) at java.util.concurrent.ConcurrentHashMap
Is this considered unfortunately "normal"?
#2021-06-1602:25onetomi've pasted the code example in the ticket into one of my freshly opened REPL tool windows and it did not print any exceptions.#2021-06-1602:26onetomIm on the Jun 8 2021 IntelliJ Ultimate EAP, with Cursive 1.10.3-eap1-2021.2#2021-06-1602:29onetomah, if I send the expression from the editor, then the error appears.#2021-06-1519:19Jeff Evansthe default auto-import does (for instance): (:import (java.time LocalDate)) is there a way to tell it instead to do (:import java.time.LocalDate) (this is to adhere to our internal style guidelines)#2021-06-1602:41onetomthere is a Preferences / Editor / General / Auto Import dialog, but it only shows settings for a few languages and Clojure is not on the list. if this style choice ever becomes an option, i would probably expect to find it within this dialog.#2021-06-1605:21cflemingThere’s no option for this at the moment, but I have (somewhat) short-term plans for improving all the namespace rewriting stuff to make it more configurable and just all around better.#2021-06-1520:17indyIs it possible to add vars also in the breadcrumb navigation? I use breadcrumb navigation all the time when I'm writing JS. Navigating between functions becomes much faster and I can also quickly see all the vars in the ns at a glance without opening the Structure pane.#2021-06-1601:17salami use “⌘ F12” (Navigate | File Structure) to get an overview of the current namespace.#2021-06-1602:23onetom+1 for Cmd-F12, because it allows narrowing by simply starting to type a substring of the identifier you are looking for#2021-06-1603:05indyThis is exactly what I was looking for. Thank you. It would be nice if this can also be made part of Breadcrumb navigation (`Jump to navigation bar`) like in other langs.#2021-06-1605:21cflemingI’ve asked in the JetBrains slack how to do this.#2021-06-1605:45indyNice, thank you :)#2021-06-1602:18onetom@cfleming i was reporting an issue with paren highlighting back in april: https://clojurians.zulipchat.com/#narrow/stream/180378-slack-archive/topic/cursive/near/233632162 i've found the cause of the phenomena! Preferences / Editor / General / Appearance / Use block caret if it's ON, the highlighted matching paren is the unexpected one. if it's OFF, then it works as advertised. i tried to find a related github issue to note this finding there, but i couldn't.#2021-06-1602:21onetomi had this cursive doc page open on my machine for some reason: https://cursive-ide.com/userguide/repl.html and i've noticed that in the animated images, the caret was a bar, not a block. that gave me the idea#2021-06-1605:21cflemingHmm, interesting - have you searched in YouTrack? That sounds like an IntelliJ issue to me.#2021-06-1705:44onetomAdded a comment here: https://youtrack.jetbrains.com/issue/IDEA-215291#focus=Comments-27-4965809.0-0#2021-06-1605:07shinichyIs there any way to see the detail of a test failure in REPL? I know I can see them in a tooltip, but it’s a little hassle to navigate to the test code.#2021-06-1704:11onetomthis has been discussed before, but unfortunately there is no way to do that now. what i didn't know though, is that it's slightly easier to get to the test failure if your gutter is on and click the fail-icon there. u don't have to hover and wait at least for the dialog with the link to the diff.#2021-06-1704:13onetomotherwise, i've hooked up kaocha.repl/run to a REPL command and then assigned it to Cmd-R to conveniently run tests. it was not a great choice of keyboard shortcut because i often restart the REPL accidentally 🙂 but other than that, it's a pretty pleasant workflow.#2021-06-1704:14onetomi wish i wouldn't need to carry a koacha setup around for every project, but that's the best i could come up so far#2021-06-1704:15onetomhere is a related issue: https://github.com/cursive-ide/cursive/issues/2229#2021-06-1704:18onetombtw, do u know that you can run clojure tests using the same machinery provided to other languages in intellij? u have to create a run configuration for the tests u want to run and wait for your clojure app to start up, so it's slower than a repl-based approach, but it's also cleaner, because u are guaranteed not to have any misleading REPL state affecting your tests. it's documented here: https://cursive-ide.com/userguide/testing.html#test-runner#2021-06-1705:27shinichyYes, the problem is starting up a REPL in my test is very slow because of a lot of initial setups.#2021-06-1705:27shinichykaocha.repl/run approach sounds interesting. I’ll try it. Thanks!#2021-06-1705:29shinichyI didn’t know that there’s already an issue. Yes, checking a diff is also another pain point. I don’t want to use my mouse to check the test result basically.#2021-06-1622:16Ian Fernandezanyone knows how to print diffs on IntelliJ when using Nubank Matcher Combinators?#2021-06-1700:38kennyI will just manually run the test in the REPL and inspect the printed output. Don't know if there's a better way.#2021-06-1704:24onetomand unfortunately the output is not as nice as using the built-in kaocha support for the = matcher. i was just asking about this on the kaocha channel the other day and got this response: > actuallyalys_slack: I think we could use better documentation for matcher-combinator support. I'll write up an issue. this was my question: https://clojurians.zulipchat.com/#narrow/stream/180378-slack-archive/topic/kaocha/near/241149364#2021-06-1712:51tobiasAre things that I println to the REPL output window stored in a log file somewhere? I performed a long-running computation (several hours) and println'd the results to the REPL with the intention of copy-pasting them once the computation was completed, but IntelliJ froze after the computation was complete and copy-paste doesn't work. I'm hoping that I can find the results in a log somewhere instead of running the whole computation again. (Note to self: next time persist the results to disk!)#2021-06-1713:22tobiasNever mind, I managed to export my results by selecting all the text in the REPL and choosing File | Print and printing to PDF, then copy-pasting from the PDF. Phew.#2021-06-1714:03Jeff Evansso, you managed to save the answer to Life, The Universe, and Everything. nice#2021-06-1722:05tobiashaha yup!#2021-06-1715:05gregCursive colours as comments anything following ; char (within a line) and forms following #_. Is there a way of colouring (comment) forms as comments?#2021-06-1804:52emilaasaAnother perspective - some people write a large percent of their code inside comment blocks and appreciate that it is highlighted like normal code.#2021-06-1903:44onetomuse #_(comment ,,,), so even if the #_ is removed accidentally, the program inside won't run, when you load the file.#2021-06-1903:51onetomI'm one of those people, who write a lot of code inside comment blocks and I think it's nuts not to do so, because it's just too easy to accidentally load a source file, full of top-level code, which might be side-effecting. I guess most of the time it would throw some exception and most expressions would be just impure, but not side-effecting, but still feels unnecessary risk. I can imagine that others' tooling doesn't make it easy to accidentally load a namespace, but wouldn't that mean that accessing such a basic operation is not as easy as possibly can be?#2021-06-2920:02gregoh right, I haven't thought about #_ in front of (comment... ). Thanks#2021-06-1719:28Ian FernandezError handling response - class java.lang.IndexOutOfBoundsException: Wrong line: 233. Available lines count: 171 Why I'm getting this error on running tests?#2021-06-1821:02cflemingI’m not sure, it does look like the error Jeff posted. What do your tests look like? Are you using any odd test forms, or just deftest?#2021-06-1816:09Jeff Evansrelevant? #2021-06-1902:02emccueIDK what the criteria are for being added to the macro expansion whitelist#2021-06-1903:21cflemingYou mean the stub generation?#2021-06-2019:34emccueyeah#2021-06-2210:58cflemingSo this isn’t user-configurable yet, but I’d like to make it so. Let me take a look at what would be involved there.#2021-06-1902:03emccuebut my brother is a biologist and I am trying to move him to techascent/tech.ml.dataset from R so I can help him more with his papers#2021-06-2119:38joshkhClojure + life sciences = win. shameless plug for my previous (and very much loved and open source) company, http://intermine.org. their latest webapp is in Clojure, as are its supporting API library and data table app. Clojure is such a good fit for working with biological datasets. 🥳#2021-06-2120:41salamfor some reason, i can no longer open a project that has three modules as Deps projects. whenever i open it, i get the java.lang.IllegalStateException: ModifiableRootModelBridgeImpl was already committed or disposed and com.intellij.serviceContainer.AlreadyDisposedException: Already disposed: Module: '[NAME_REDACTED]' (disposed) followed by Unable to save settings: Failed to save settings. Please restart IntelliJ IDEA error and IntelliJ IDEA becomes totally unusable. has anybody else run into this? my environment:
IntelliJ IDEA 2021.1.2 (Ultimate Edition)
Build #IU-211.7442.40, built on May 31, 2021
Runtime version: 11.0.11+9-b1341.57 x86_64
VM: Dynamic Code Evolution 64-Bit Server VM by JetBrains s.r.o.
macOS 11.4
GC: ParNew, ConcurrentMarkSweep
Memory: 1979M
Cores: 12
Registry: scala.erase.compiler.process.jdk.once=false
Non-Bundled Plugins: String Manipulation (8.15.203.000.3), com.cursiveclojure.cursive (1.10.3-eap1-2021.1), org.intellij.scala (2021.1.21)
Kotlin: 211-1.4.32-release-IJ7442.2
#2021-06-2120:44salamneither cache invalidation nor re-creating the project (i.e., deleting .idea directory, *.iml files) resolves this issue.#2021-06-2121:41cflemingHmm, no, I’m not sure what might be going on there. There have been changes in the latest IntelliJ versions to the ways that modules are synced, but I’ve not seen this one. Do you have a full stack trace in the log? Help | Show log in Finder/Explorer#2021-06-2121:41cflemingIs this a project I can look at, or is it a work one?#2021-06-2121:51salami can send you the log file. unfortunately, this is a work-related project whose code i cannot share with you.#2021-06-2122:03salamoh, actually, i was able to reproduce this problem with the following minimal, reproducible example (each of the modules only has an empty deps.edn):
~/tmp/test_project
❯ tree
.
├── idea.log
├── module_1
│   └── deps.edn
├── module_2
│   └── deps.edn
└── module_3
    └── deps.edn

3 directories, 4 files
#2021-06-2122:05salam#2021-06-2122:12salami'm not sure if this is redundant now that we have a MRE but here is the truncated log file just in case.#2021-06-2123:16cflemingThanks, I’ve managed to reproduce the problem with that repo setup.#2021-06-2204:45salamthis is currently blocking us from working in this repo since there's no workaround either. when can we expect a fix to be released?#2021-06-2205:03cflemingI’m not sure, I can do an EAP release as soon as I’ve identified the problem. Hopefully tomorrow.#2021-06-2210:52cflemingOk, I’m still investigating this. It’s been reported a handful of times in the error tracker but it’s obviously a fairly rare corner case because it hasn’t come up much at all. However I’m almost certain that it’s due to a platform change (or possibly a bug) in IntelliJ 2021.1. So if you need a workaround tomorrow, my suggestion would be to try downgrading to 2020.3, I suspect that the bug will not be present there. I haven’t had a chance to try it myself though, sorry - it’s getting late here.#2021-06-2304:01cflemingI’ve filed this: https://github.com/cursive-ide/cursive/issues/2563#2021-06-2200:10caleb.macdonaldblackAny ideas why “requiring” my namespaces is so slow for me in the repl? using (require '[some.namespace]) can take around 800ms for a namespace that isn’t that big and doesn’t require any other files other than external libs#2021-06-2201:43cflemingThat’s probably a question for #clojure, unless it’s very slow in Cursive and fast in a normal REPL.#2021-06-2200:10caleb.macdonaldblackstarting my whole project in the REPL takes over a minute#2021-06-2202:31Alex Miller (Clojure team)one thing you can try is to add :verbose true to your require - that will dump each ns as it loads. if one namespace is particularly slow (mostly commonly due to heavy macro usage), you can often just spot it by eyeball#2021-06-2211:25bnstvnin the Cursive REPL, whenever a huge datastructure is printed,the keybinding for “Interrupt Current Evaluation” doesn’t work for me. The keybinding does work in the eval phase, and with mouse click I can stop the printing as well. anybody have seen this?#2021-06-2414:49potetmhmmm… it looks like autocomplete doesn’t work for clojure.data.xml aliased keywords#2021-06-2423:12cflemingHow does that work behind the scenes? Does it populate a namespace with things introspected from the schema, or something similar?#2021-06-2423:59cflemingActually, I just dug through the code a bit. Looks tricky, indeed.#2021-06-2500:48potetmYeah, it creates a namespace of xmlns.{url-encoded xmlns} and then aliases that in *ns*.#2021-06-2414:50potetm(xmln/alias-uri 'soap "")
#2021-06-2414:51potetmNot sure if there’s anything to be done about it. The namespace and alias are set up dynamically.#2021-06-2414:51potetmI suppose I could actually make a corresponding namespace file and require it normally….#2021-06-2414:51potetmfeels pretty :sadface:#2021-06-2423:11cfleminghttps://twitter.com/CursiveIDE/status/1408201082979766276#2021-06-2506:37onetomwow, im getting exceptions like this after the upgrade:
Caused by: java.io.FileNotFoundException: Could not locate clojure/core__init.class, clojure/core.clj or clojure/core.cljc on classpath.
i will try to downgrade now
#2021-06-2506:39onetommy non-shared run configurations are present in the run popup, but project specific ones don't appear. that's one manifestation of this error probably#2021-06-2508:25cflemingI’m not seeing that with the release installed from the plugin repo, and no-one else has reported that. Can you send me the full stack trace from your log?#2021-06-2609:56Adrian SmithThis is a long shot & not exactly idiomatic but found myself wanting to do this recently, is it possible to use the debugger to pause execution at a particular break point then use the repl to experiment in context of the break point?#2021-06-2614:33Jeff EvansYes absolutely. I do it often#2021-06-2614:34Jeff EvansThe only catch is you need to require the namespaces first in the REPL to evaluate them in the expression window#2021-06-2705:38cflemingRight, you can use the evaluate expression window, but not the main REPL window. I’d like to fix that, so that the REPL can be used as a fancier evaluate, but that’s not there yet.#2021-06-2705:41cflemingThere are complications, such as whether the REPL should take into account the currently selected stack frame or whether it should evaluate always in the top frame. That affects completion etc.#2021-06-2712:49Adrian SmithAh I didn't know about the expression window, this is great thank you#2021-06-2711:02aratareHi @cfleming, this was brought up a while back but I’m not sure if it’s been fixed now. Currently I’m working on a project that hasn’t been opened in 2 months, and when I try to run a REPL I’m met with the dreadful Surpressed exit with no other information whatsoever. Has this been fixed? If not, is there anyway I can get some more information to try to understand what’s causing this to occur? Thanks in advance.#2021-06-2721:58cflemingSo I suspect that this is caused by a lein plugin. Is this a project I can look at, or is it a work one? If it’s one I can’t see, which plugins is it using?#2021-06-2801:14aratare@cfleming Sure thing. I’m working on this one https://github.com/aratare-jp/epsilon-clj#2021-06-2801:31cflemingOk, and how can I reproduce it? Just set up a REPL and run?#2021-06-2801:32aratareYep. Just right click the project and choose Run REPL#2021-06-2801:33aratareOne thing I’ve noticed is that this happens so randomly I can’t really give you a more concrete way to reproduce it. But of all the time that it did occur, it’s always caused by Run REPL.#2021-06-2801:35aratareWhen I tried it a couple of months back, running lein repl in a terminal would somehow make this go away. When I tried it yesterday, the error persisted even after multiple lein repl.#2021-06-2801:41cflemingYeah, I just tried it and it worked fine. Do you have any plugins in your user.clj?#2021-06-2801:42aratareNope. I tend to keep things in my projects instead.#2021-06-2801:42cflemingDo you have profiles selected in your run config?#2021-06-2801:43aratareActually yes. I was trying with dev yesterday.#2021-06-2801:43cflemingWhen I try with dev, I get:
Error loading nrepl.server: Could not locate nrepl/server__init.class, nrepl/server.clj or nrepl/server.cljc on classpath.
Error loading complete.core: Could not locate complete/core__init.class, complete/core.clj or complete/core.cljc on classpath.
Syntax error (ClassNotFoundException) compiling at (/private/var/folders/__/8l603gyx7t15k39pyjk0c0xr0000gn/T/form-init1414398454383792338.clj:1:1190).
nrepl.server
#2021-06-2801:47cflemingI think the problem is with lein-cloverage, here: https://github.com/cloverage/cloverage/blob/dba7d72547748cf494f2bbc784b8a70ed8d9901f/lein-cloverage/src/leiningen/cloverage.clj#L46#2021-06-2801:47cflemingBut I don’t know what would provoke the exception.#2021-06-2801:48cflemingI can try to track down why the error isn’t having more useful data output, but it would be really helpful to be able to reproduce it.#2021-06-2801:53cflemingOk, I fixed those errors by including nrepl and clojure-complete in the dependencies. Still no failure though.#2021-06-2801:54cflemingCan you email me your log file to <mailto:/cdn-cgi/l/email-protection|/cdn-cgi/l/email-protection>? Help | Show log in Finder/Explorer#2021-06-2801:54aratareThis is what I’m experiencing at the moment.#2021-06-2801:54aratareSure will do now.#2021-06-2802:00aratareSent#2021-06-2802:08cflemingThanks. So there’s nothing related in the logs unfortunately, but I think I see what the problem is with some of the exception data being lost.#2021-06-2802:09cflemingActually, looking at that line in Cloverage, it looks like it’s totally eating the exception data anyway.#2021-06-2802:10cflemingI also don’t understand how that might get invoked from just starting a REPL.#2021-06-2802:14aratareCorrect me if I’m wrong, but when you select profiles in the Leiningen tab in Cursive, that’s just for compiling stuff right?#2021-06-2802:14aratareBecause I have test checked as one of the profiles#2021-06-2802:15cflemingThat’s for what gets synced to the project. If you’re running your REPL with Leiningen, it shouldn’t matter.#2021-06-2802:15aratareWell other than that, I honestly have no idea why Cloverage would be invoked because I think I haven’t done any weird setup afaict.#2021-06-2802:16aratareBut if I intentionally invoke Cloverage with lein cloverage, it works fine 😅#2021-06-2802:19cflemingHang on, I’ll try to create a dev build with better logging, to see if that helps.#2021-06-2802:34aratareThanks a lot for looking into this 🙂#2021-06-2814:09potetmAre there any plans to get “Interrupt Current Evaluation” working for socket repls?#2021-06-2814:10imreI'm not sure that's possible, I think it's a feature of nrepl#2021-06-2814:11imrehttps://danielsz.github.io/blog/2021-05-12T13_24.html#2021-06-2814:12potetmIt’s possible. It’s a matter of what payload you use to set things up.#2021-06-2814:12potetmnrepl just wraps every execution on a thread, and it calls Thread/kill on cancelation#2021-06-2814:13potetmAt worst cursive would rely on the user to set up a specific :accept fn.#2021-06-2814:14imreI see. I'm probably not well-informed in the topic, I only based my initial comment on what I read in the article I linked#2021-06-2900:49cflemingCursive could do this, yes, since it implements a simple protocol over a socket REPL. However there are complications with that, as you might expect - each eval is then in a different thread and needs dynamic bindings propagated etc. Currently with socket REPLs the evaluations are strictly sequential, but once evals are in separate threads that’s no longer the case, and there is potential weirdness around that too. In general the idea with the socket REPL was to try to keep things simple, and I’m not sure whether that counts 🙂#2021-06-2900:51potetmYeah, I prefer the mental model for sure. Unfortunately, a great deal of my work involves starting an infinite loop of some sort, and being unable to run them without restarting a repl really stinks.#2021-06-2900:52cflemingCursive’s protocol is similar to pREPL, but it’s structured in both directions, not just on returns.#2021-06-2900:53cflemingYeah, I can see that. I guess one potential middle ground would be to use a single background thread for evals which could be cancelled. That would maintain the sequential nature, but would still require bindings to be maintained etc.#2021-06-2900:54potetmAren’t bindings mostly out-of-the-box via bound-fn*?#2021-06-2900:54potetmOr am I missing smth?#2021-06-2900:54potetmotoh, now that you say that, I could just take care to always kick those off in a future.#2021-06-2900:54potetmsomehow never occurred to me :derp:#2021-06-2900:55cflemingRight, you could always do it manually yourself, which is a bit fiddly but possible.#2021-06-2900:55potetmBut I also really like that middle ground that you mention, if you ever get around to it. No complicated session mgmt business. Just a dedicated solo thread pool.#2021-06-2900:57potetmIn the meantime I’ll try out being vigilant with my infinite loops. If I fail catastrophically, I’ll be sure to let you know 😉#2021-06-2900:57cflemingHere’s what the prepl server looks like BTW: https://github.com/clojure/clojure/blob/b1b88dd25373a86e41310a525a21b497799dbbf2/src/clj/clojure/core/server.clj#L191. It uses m/with-bindings: https://github.com/clojure/clojure/blob/b1b88dd25373a86e41310a525a21b497799dbbf2/src/clj/clojure/main.clj#L77#2021-06-2900:58cflemingBut as you can see, there’s really no thread management required at all, which keeps it really nice and simple.#2021-06-2900:58cflemingAnd no fiddly bindings management.#2021-06-2900:59cflemingCompare with this at your leisure :): https://github.com/nrepl/nrepl/blob/8223894f6c46a2afd71398517d9b8fe91cdf715d/src/clojure/nrepl/middleware/interruptible_eval.clj#L56#2021-06-2901:00potetmoh I know nrepl#2021-06-2901:00potetmI would never ask you to go there 😄#2021-06-2901:01potetmI was unlucky enough to have a serious run in with piggieback. The beast is real.#2021-06-2901:01cflemingHaha, I have to go there pretty regularly. Anyway, the answer is: it’s possible, but I’m not sure it’s desirable. I’d have to try a PoC and see how it ends up.#2021-06-2901:01cflemingWell, piggieback is a whole extra level of madness.#2021-06-2901:03potetmYeah, well. Consider it un-asked until I get back to you. I don’t think it’s crazy to pre-wrap in a future and self-manage.#2021-06-2901:03potetmI was kind of stuck in the mindset of, “Feature exists here. I want it there.”#2021-06-2901:04cflemingHehe, totally fair enough. Let me know if manually wrapping either doesn’t work or is unreasonably painful. You could potentially use REPL commands to make it easier.#2021-06-2909:26borkdude@U07S8JGF7 afaik, nREPL uses Thread#stop which has long been deprecated#2021-06-2909:28borkdudeI have a similar problem with the nREPL server of babashka. I can't use Thread#stop there because it's not supported anymore in the GraalVM JDK#2021-06-2909:29borkdudeSomeone on the graalvm slack suggested to me to use safepoints#2021-06-2909:29borkdudehaven't looked into it though#2021-06-2913:59potetmIt does use stop, but I’ve never had a problem with it.#2021-06-2914:00potetmAFAIK the biggest problem with stop is that it doesn’t release monitors — which aren’t really an issue in clojure.#2021-06-2914:01potetmat any rate, an interrupt would probably do#2021-06-2914:03borkdudean interrupt won't kill a thread running (doall (range))#2021-06-2922:09cflemingThere’s no way to kill that (or in general, any uncooperative REPL process) except Thread/kill#2021-06-2922:19borkdudeyou mean Thread#stop right#2021-06-2922:53cflemingYes, that one.#2021-06-2922:53cflemingBTW the problem is not actually that monitors are not released, it’s quite the opposite: > Stopping a thread causes it to unlock all the monitors that it has locked. (The monitors are unlocked as the ThreadDeath exception propagates up the stack.) If any of the objects previously protected by these monitors were in an inconsistent state, other threads may now view these objects in an inconsistent state. Such objects are said to be damaged. When threads operate on damaged objects, arbitrary behavior can result. This behavior may be subtle and difficult to detect, or it may be pronounced. Unlike other unchecked exceptions, ThreadDeath kills threads silently; thus, the user has no warning that his program may be corrupted. The corruption can manifest itself at any time after the actual damage occurs, even hours or days in the future.#2021-06-2922:54cflemingFrom here: https://docs.oracle.com/javase/7/docs/technotes/guides/concurrency/threadPrimitiveDeprecation.html#2021-06-2923:03cflemingThe risk is pretty low for a REPL IMO#2021-06-2923:14potetmAh yeah, that’s right.#2021-06-2902:59nodenameHi, I just allowed IntelliJ to update itself and now I have “Cursive Incompatible (since build 211.0 > IC-202.7660.26)“. I’m not being prompted to update Cursive though. Any help?#2021-06-2905:50salamyou may try uninstalling and then reinstalling Cursive.#2021-06-3023:14nodenameThat did it, thanks!#2021-06-2907:13octahedrionI have a repl which has been running for weeks and now if I resize it my machine goes into full takeoff and pinwheels for 5 minutes#2021-06-2908:34imrehave you tried clearing the repl output?#2021-06-2911:47octahedrionI wish I'd remembered before I had to wait#2021-06-2912:27imredid that fix it btw? was jus a wild guess, I remember clearing the output easing the load on my machine a few times#2021-06-3009:05octahedrionyes it does work. If I print a lot of data in the REPL, say around 1 minute's worth of scrolling, then it will slow subsequent window resizing to around 1 second lag on my machine. Clearing the output restores responsiveness#2021-06-3009:13imre👍:skin-tone-3:#2021-06-2911:37Björn EbbinghausIs there any way to make Cursive understand shadow-cljs :default syntax? Or at least mute this specific warning?#2021-07-0105:43cflemingThere isn’t at the moment, sorry, but I’m planning improvements in this area shortly.#2021-06-2912:17JoniAre there some known issues in the macroexpansion tooling of cursive? Seems like the opened window contains right stuff, but it can't be interacted with, so I can't scroll to view all of it or select any text or change any options in the window#2021-06-2912:27imreyes, it's not just your machine#2021-07-0105:44cflemingYeah, sorry, this window basically sucks and I haven’t had time to look at it.#2021-07-0105:47JoniOkey, it seems like a really powerful tool if I could just see all of the macroexpansion 😄#2021-07-0106:15cflemingIt’s definitely very powerful when it works 🙂#2021-06-3002:35Jeff Evansis it a known thing that you can’t see the testing contexts from the built in failure window? of course, I can see the diff, but if I have a doseq where 19/20 are passing, it’s not that useful unless I can see all of the contexts. If I simply run (my.ns/my-test) directly from the REPL, then of course I can see it in the output#2021-06-3013:12potetmYou can’t always do it, but usually you can refactor the test to be a single equality check.#2021-06-3013:14potetm(I agree with your ask. I’m only suggesting an interim—sometimes better—solution.)#2021-06-3013:15potetme.g.
;;instead of this
(doseq [[in out] items]
  (is (= out (foo in))))

;; do this
(is (= outs
       (map foo ins)))
#2021-06-3013:22Jeff EvansWell sure. But I mean, the data I'm asking about is clearly available so there is no theoretical reason it's can't be shown with the failures. It already shows the individual failure diffs#2021-06-3013:24Jeff EvansBut thanks for the suggestion#2021-07-0106:26cflemingJust so I’m clear, what sort of context would you want to see? How would you want to distinguish the different cases? In the case of something like (doseq [[in out] items] ...) there’s no good way to get just in and out, unless I’m misunderstanding something.#2021-07-0113:34Jeff EvansThe stuff from here: https://clojure.github.io/clojure/clojure.test-api.html#clojure.test/testing#2021-07-0113:35Jeff EvansIf you run the test as a function and get a failure, you will see it printed out#2021-07-0102:53nodenameI’ve joined a project in which the app is built using shadow-cljs. I use Cursive as my IDE. I’ve created a pom with the shadow-cljs pom command, AND I’ve copied its dependencies into a project.clj file. I thought this would make the requires in the source files resolve, but it seems not to have happened. For example in (:require [reagent.core :as r] I hover and get ‘r cannot be resolved’. Is there anything I can do to fix this?#2021-07-0109:51cyppanyou shouldn’t create a project.clj, shadow-cljs pom generates a maven file for you (pom.xml), so you should then import / open your repo as a maven project instead#2021-07-0116:32nodenameThanks, I have tried that and the same problem occurs. What could my problem be?#2021-07-0118:05nodenameIt doesn’t even recognize defn or let#2021-07-0118:23nodenameRefactoring is also fairly broken, do I conclude that Cursive just doesn’t work under shadow-cljs?#2021-07-0118:30cyppanit works for me, and I did what I’ve said you :thinking_face: (+ I’ve setup a java sdk for the project as usual)#2021-07-0118:32cyppanhere is the official doc https://shadow-cljs.github.io/docs/UsersGuide.html#_cursive#2021-07-0119:32nodenameYes I’ve seen that, and as I said I’ve tried it. That failure is what led me to think creating a project.clj might help.#2021-07-0120:10cyppanIf it is a intellij/cursive problem, you may try to delete the .idea folder and reimport the project as a maven one. Also in intellij you have a menu “file > invalidate caches” which have resolved similar problems for me in the past (clojure syntax not recognized)#2021-07-0120:59cfleming@U04V91K02 If you open the Maven toolwindow, do you see your pom registered there? If not, do things start working if you add it there using the + button?#2021-07-0121:19gregI had exactly the same problem a while ago, and I gave up on shadowcljs in Cursive. I will check it again soon#2021-07-0201:04nodenameI deleted the .idea folder and reimported the pom. Things seem to be operating normally now. Thanks all!#2021-07-0117:46Björn EbbinghausI get an unresolved symbol when calling a function defined in a protocol in another namespace. If I pull the protocol into the same ns, the symbol gets resolved.#2021-07-0117:51thhellerneeds to be protocols/tick since it is defined in that ns , same as you used the protocols/Updateable#2021-07-0117:53Björn EbbinghausThanks. Makes sense.#2021-07-0121:45gregI noticed that Cursive highlights incorrectly the code when using https://github.com/plumatic/plumbing conditional threading macros (like https://github.com/plumatic/plumbing/blob/6d713472f7324344545aa93597cb2a137b3404b3/src/plumbing/core.cljx#L308> , https://github.com/plumatic/plumbing/blob/6d713472f7324344545aa93597cb2a137b3404b3/src/plumbing/core.cljx#L301>>). Is there a way to handle it? Example:
(let [assoc-please (fn [r] (assoc r :b :B))]
  (-> {}
      (?> false (assoc :a :A))
      (?> true (assoc-please))))
#2021-07-0121:45greg#2021-07-0207:41imreyou can try resolving ?> as clojure.core/-> as described at https://cursive-ide.com/userguide/macros.html#customising-symbol-resolution#2021-07-0214:17gregRight, I forgot about this feature. Thanks. I will do it next time. Strange thing is that today I opened the IDE and these macros are no longer highlighted as yesterday. The highlighting works as I would expect (I wrote some incorrect forms to validate it). And these macros (?>, ?>>) are not added in the 'Symbol Resolution' mapping in the Preferences. How to explain that? Is the Cursive resolving macros to figure out correct highlighting?#2021-07-0216:30imreNot sure about that. Perhaps Cursive already knows about those specific macros just failed to look them up yesterday? Only Colin could answer that I suppose#2021-07-0219:52tony.kayHey @cfleming , related to Code With Me and Code Together: not sure if you thought of this or not, but both of those have the ability to share the terminal window on the network. I know it would not be terribly feature-rich, but if it is relatively easy to send stuff from the editor to a terminal, that might be a good way to use a REPL running in a terminal as an 80% soln for pairing.#2021-07-0504:45onetomI would be really happy with such a "fallback" solution too! It would similar to what https://github.com/clojure-emacs/inf-clojure does.#2021-07-0504:54onetomSuch an "escape hatch" would also allow running REPLs in custom ways. For example, I just wanted to provide some JVM properties to the remote nREPL client Cursive would start, but such option is only available for local REPL run configs. More specifically, I wanted the REPL client to go through a SOCKS5 proxy, so I can connect to Datomic Cloud ion server:
clj -J-DsocksProxyHost=localhost -J-DsocksProxyPort=8182 -M:nREPL:client --host entry.datomic-cloud-system-name.ap-
 --port 3001
This way, I would only need to do an ssh -D 8182 and don't worry about tunnelling individual ports. Another use-case would be to specify the NREPL_CONFIG_DIR (https://nrepl.org/nrepl/0.8/usage/server.html#server-options), so we can configure the nREPL client in different ways, BUT the remote REPL config doesn't have the environment config option either.
#2021-07-0505:09onetomIn fact, I've created a GH issue about this: https://github.com/cursive-ide/cursive/issues/2565#2021-07-0601:05cfleming@U0CKQ19AQ Interesting idea, and that might work well. I’d have to think about what it even means to have a REPL open on the terminal, since Cursive wouldn’t be starting the REPL at that point. I’m not sure how the user would indicate “I now have a REPL open in my terminal and I want all REPL commands to go there”.#2021-07-0601:06cfleming@U086D6TBN I’ll look at that too - I suspect the issue would be that Cursive doesn’t actually start a new process for the remote REPL client but runs it in-process (IIRC). However I may be able to pass that config directly to nREPL in that case.#2021-07-0605:26tony.kaySeems like send form to terminal would be sufficient...no matter what is running there. Just a new command altogether#2021-07-0608:49cflemingMaybe a new output option for REPL commands, then you could build the commands you needed.#2021-07-0800:16cflemingActually, apparently the latest EAP has support for using Code With Me with custom toolwindows like the REPL. I’ll add that and hopefully it’ll work!#2021-07-0505:09onetomIn fact, I've created a GH issue about this: https://github.com/cursive-ide/cursive/issues/2565#2021-07-0613:06gregI found a potential bug. If s/fdef is used, the Cursive highlights the instrumented method as unused.#2021-07-0613:12Björn EbbinghausIs there a way to manually set alias resolvers for namespaces? Like strclojure.string :as str . I sometimes get some weird proposals of libs I don't even use directly.#2021-07-0721:07cflemingThere isn’t at the moment, no, although it’s a good idea and it’s been requested from time to time.#2021-07-0617:45nodenameHello, I was having trouble getting Cursive to recognize my shadow-cljs project; I was helped in this thread https://clojurians.slack.com/archives/C0744GXCJ/p1625107985130100 to (seemingly) get everything working properly by deleting my .idea folder and reopening the pom generated by shadow; but I shortly discovered that I am unable to set breakpoints in Cursive! Clicking in the gutter does nothing; Toggle Breakpoint submenu is all greyed out. @cfleming?#2021-07-0619:00nodenameOr am I merely imagining that I could ever set cljs breakpoints in Cursive?#2021-07-0720:32lgesslerhi, I'm getting an error when trying to open a project by opening the deps.edn file: the message is Unknown alias key: :exec-fn and the only place :exec-fn occurs is in my :test alias (see reply). anybody got pointers?#2021-07-0720:32lgessler
:test
{:extra-paths ["src/test"]
 :main-opts   ["-m" "cognitect.test-runner"]
 :exec-fn     cognitect.test-runner.api/test
 :extra-deps  {com.cognitect/test-runner {:git/url ""
                                          :sha     "705ad25bbf0228b1c38d0244a36001c2987d7337"}
               thheller/shadow-cljs      {:mvn/version "2.12.5"}}}
#2021-07-0721:00cflemingDo you see that same error in deps on the command line, e.g. using clojure -Spath or something similar?#2021-07-0721:09lgesslerclj -M:test -d src/test seems to work fine, clojure -Spath also works fine#2021-07-0721:12cflemingWeird, since that error doesn’t seem to be a Cursive one. I’ll try to reproduce this in a bit.#2021-07-0721:13cflemingIs the rest of the deps.edn available somewhere or is this a work project?#2021-07-0721:38Alex Miller (Clojure team)that's an error from an old version of tools.deps (circa 0.8.x, about a year ago or older)#2021-07-0721:40Alex Miller (Clojure team)the exec stuff was added in the Clojure CLI in version 1.10.1.697, last September, so older than that. not sure if this is tools.deps in Cursive or an old Clojure CLI#2021-07-0721:42lgesslerfwiw, my CLI version:
$ clj --version
Clojure CLI version 1.10.3.855
#2021-07-0721:54Alex Miller (Clojure team)that should be fine (and explains why it works on command line), so I'd guess it's Cursive's use of older tools.deps?#2021-07-0722:00cflemingI suspect this might be https://github.com/cursive-ide/cursive/issues/2105, which is fixed in the latest EAP. @U49U72C4V if you’re not using the EAP already, could you try that to see if it helps? Instructions for how to do so are here: https://cursive-ide.com/userguide/index.html#eap. After doing that, go to Preferences | Build, Execution, Deployment | Build Tools | Clojure Deps and make sure the correct CLI version is show there, and then hopefully it’ll work.#2021-07-0722:06lgesslerI did the following: • Uninstall Cursive • Restart IntelliJ • Install Cursive 1.10.3-eap2-2021.1 • Restart IntelliJ, invalidating all caches • Open directory, right click deps.edn, click "Add as Clojure Deps Project" I'm still getting the same error though#2021-07-0722:42lgesslerI should mention: a fine workaround for now is to just comment out the exec-fn line, if only while i'm launching my intellij repl#2021-07-0723:51cflemingThat’s very strange. Could you try the following? Go to Help | Debug log settings… and enter #cursive.shim.Shim in the box that appears there. Then reproduce the problem and email me your log file to <mailto:/cdn-cgi/l/email-protection|/cdn-cgi/l/email-protection>? Log file is at Help | Show log in Finder/Explorer.#2021-07-0800:01lgessleremailed--hope I did the log right#2021-07-0800:08cflemingYep, that’s great, thanks. The cause is definitely that bug:
Version 1.10.3.855
Files /usr/local/lib/clojure/libexec/clojure-tools-1.10.1.536.jar <etc etc>
#2021-07-0800:10cflemingSo I think that upgrading Cursive has just not triggered the update to the classpath. Could you try the following - go to Preferences | Build, Execution, Deployment | Build Tools | Clojure Deps, click on “Use tools.deps directly” then Refresh and Download if required, then click apply and close the prefs screen. Then reopen it again, check “Use CLI tools” then apply, close and try again.#2021-07-0800:31lgessleryup, that fixed it!#2021-07-0800:31lgesslerthanks for the help 🙂#2021-07-0800:58cflemingGreat!#2021-07-0914:05souenzzoWould be nice to have some configurable color/visual feedback on the REPL I use many REPL's daily, some local, some remote, some with local-env, some with remove-env I would like to have different colors for them I expect that intellij API's may be difficult due themes and etc... some places that would help me (at least one of them): - backgorund color on the REPL - tab color, under the REPL name - => color on the REPL - color on the text input on the REPL - color of the Clojure ns: user on bottom-right We must select the color in "Edit Configurations" popup#2021-07-1100:17genekimHello! I’m using Cursive for Fulcro, and I’m getting unexpected indentation behavior… when first argument is on a separate line, it’s fine. But when it’s on the same line, indentation is far more than expected. Any thoughts? (I was pairing with @tony.kay, and he was surprised as well — I’m assuming that this means he didn’t see this behavior on his system.). Thanks in advance!#2021-07-1100:22polymerisYou can "teach" cursive how to indent stuff. With the cursor on top of dom/div, open the "intention actions" context menu (Alt-Enter on linux, not sure on other OSs), select "Configure indentation for dom/div...", and pick "Indent".#2021-07-1100:22polymeris(this menu)#2021-07-1100:26polymerisCursive should then remember how to indent that symbol, it's stored in the CodeStyle, I think. That said, sometimes I have to do that again after a while.#2021-07-1100:59potetm@U6VPZS1EK That’s the proper indentation. The rule is: All parameters to a function are aligned vertically. Since you put the first parameter on a new line, it gets the normal 2 space indentation, and all other parameters are alighted vertically beneath it.#2021-07-1101:00potetmYou can override this behavior like polymeris says.#2021-07-1101:22genekimAwesome! Thank you, all!!!#2021-07-1106:02thhellerin the Cursive settings Editor -> Code Style -> Clojure -> General you can set "Default To Only Indent". that IMHO is a better default and does what you wanted as a default, which you can still override for the exceptions if you want any.#2021-07-1106:20genekimOh, that’s lovely, @U05224H0W! Thank you! (And loving all you’re doing with shadow-cljs, too! 🙂#2021-07-1200:17Joe R. SmithI'm running Intellij 2021.1.3 and Cursive 1.10.3-eap2-2021.1, but have been seeing weird printing behavior for several versions of both intellij and cursive now on a clean install on a new Mac Mini M1 running MacOS 11.4. It only happens with nREPL local repls: What's even weirder is I have a friend w/ an M1 Mac, fresh install, no issues. It seems to be an nrepl configuration issue, but I don't know where that lives (I don't have a ~/.nrepl or anything like that I've configured).#2021-07-1205:34cflemingIf you go to Preferences | Editor | Code Style, what do you see in your right margin settings?#2021-07-1216:19Joe R. SmithI don't see a right margin setting, but these settings are identical to my other computers (which don't exhibit this issue):#2021-07-1220:41cflemingI think the problem is the “Hard wrap at 0” setting, looks like they’ve renamed that. If you set that to, say, 120, does that help?#2021-07-1220:45cfleming@U087E7EJW ^^#2021-07-1301:46Joe R. SmithThat fixed it! That's weird though, I have it set to 0 on my other computer and it also works fine. Thanks!!#2021-07-1306:18cflemingHmm, honestly I don’t see how it could work with that set to 0, although to be honest the code style stuff is so complex now that it’s super confusing - it’s possible there’s some language-specific override somewhere? Not sure.#2021-07-1314:55indyI used to be able to stretch the REPL window left or right using the Stretch to Left and Stretch to Right actions but they don't work anymore. They do work on other windows. I'm on the 1.10.2-2021.1. Can someone confirm if it is broken for them too?#2021-07-1315:09imreThey do work for me, I'm on 1.10.3-eap2-2021.1#2021-07-1315:09imreAnd my repl's view mode (cogwheel) is dock pinned#2021-07-1315:25indyThanks for checking. Okay, this is weird, I bumped cursive to 1.10.3-eap2-2021.1. It wasn't working on a running REPL. But on a REPL window that was just connecting or on one that isn't connected, it works. It also works when I click on stretch to left from the gear icon -> Move to menu. I'm on Mac 11.4 and IntelliJ IDEA 2021.1.3 (Ultimate Edition). Will probably wait for Colin to comment on whether something is wrong with my setup.#2021-07-1320:48cflemingWhat that looks like to me is that the action isn’t actually being triggered in your REPL toolwindows, since the shortcut isn’t shown below like it is with the other toolwindows. If you look under Preferences | Keymap and use the “Find Actions by Shortcut” button, do you have other actions bound to that key that might be active in the REPL toolwindow and not elsewhere?#2021-07-1402:52indyMmm, no REPL actions bound to it. It also doesn't work if I invoke the action, say, Stretch to Left from the Actions modal (Cmd+Shift+A), while my cursor is in the REPL window.#2021-07-1319:45AJ JaroIn the Project Explorer I can mark a directory as a Test Sources Root . I’ve done this a few times along with Resources Root and those are periodically reset to not being marked. It’s nice to have these color coded specifically and it’d be great to have that little feature fixed Is this a Cursive or IntelliJ feature?#2021-07-1319:54Jeff EvansIs it leiningen? This happens to me with leinengin anytime I “refresh lein project”. Similar behavior occurs in Java projects with Maven, if you “refresh Maven project”.#2021-07-1319:55Jeff EvansI think the “right way” to deal with it is to mark those directories as being resource roots in the particular build tool. Then it won’t get wiped out on refresh.#2021-07-1319:55AJ Jarohmm that could be @U0183EZCD0D! I’ll keep an eye on that.#2021-07-1320:44cflemingRight, if you’re using Leiningen, then the correct way to do it is to ensure that your directory is listed under :test-paths, either at the root or in a profile. That will mark the directory as a test root and it will be persistent. However, if you’re using deps, deps doesn’t actually have a way to mark a particular directory as a test root. In that case, Cursive will remember how you marked it and restore that state after a sync.#2021-07-1416:41salam> However, if you’re using deps, deps doesn’t actually have a way to mark a particular directory as a test root. In that case, Cursive will remember how you marked it and restore that state after a sync. this doesn't seem to be case, @U0567Q30W. i had just run into this problem and solved it by adding the path ("dev") to :extra-paths under an alias (`:dev`) and enabling that alias in the Clojure Deps tool window.#2021-07-1419:47kendall.buchananI believe you can also have it persist by doing it in here, correct?#2021-07-1419:47kendall.buchanan#2021-07-1419:47kendall.buchanan⌘+⇧+,#2021-07-1508:21cfleming@UDCGPTV9R I’m not sure we’re talking about the same thing - if I understand correctly you’re talking about adding a new source root, but I mean marking an existing source root as a test root (green instead of blue in the project view).#2021-07-1520:38cfleming@U0HJA5ZQT No, that will only mark it in the IDE, so in general it will be overwritten by the values from the project file on the next project sync. However the above caveat about deps holds - since deps doesn’t provide a way to distinguish test roots from source roots, if you mark them in the IDE Cursive will persist that across project syncs.#2021-07-1522:47salamoh, i'm pretty sure we are talking about the same thing: in Deps projects, directories that are manually marked as "Test Sources Root" (e.g., "test") / "Test Resources Root" (e.g., "test-resources") are unmarked upon re-opening/synchronization of the projects, unless they are explicitly listed under the :test alias in the projects' "deps.edn".#2021-07-1523:28salamhere's a demo video of this behavior:#2021-07-1605:24cflemingYou’re right, that does look like a bug, I’ll check that behaviour too.#2021-07-1902:17cfleminghttps://github.com/cursive-ide/cursive/issues/2570#2021-07-1402:16Yang XuHi, Anyone face Error encountered performing task ‘run’ with profile(s): ‘base,system,user,provided,dev,run’ problem?#2021-07-1402:17Yang XuMy os version is 11.3.1 Big Sur, In the other mac Catalia is ok#2021-07-1407:45cflemingThe “Suppressed Exit” thing generally means that a lein plugin has exited prematurely. Which lein plugins are you using?#2021-07-1409:37Yang XuSorry for I forget provider version info of lein. lein version : 2.9.6 cursive version: 1.10.2-2021.1#2021-07-1409:37Yang XuThere is a issue I consider related https://github.com/cursive-ide/cursive/issues/2521#2021-07-1508:17cfleming@U01JZJQ774L I meant which lein plugins are you using, i.e. in your :plugins field in project.clj.#2021-07-1402:18Yang XuI can start it via lein run successfully, but through cursive, it show me: Error encountered performing task ‘run’ with profile(s): ‘base,system,user,provided,dev,run’#2021-07-1403:36Jeff Evansthere must be more to the error message than that?#2021-07-1404:11Yang Xu#2021-07-1404:11Yang XuComplete detail#2021-07-1409:25thumbnailWhat’s the “include drivers” message about?#2021-07-1409:34Yang XuThese are some logic about Metabase, and I find some issues related about mine. But who can provider a fix solution?#2021-07-1409:34Yang Xuhttps://github.com/cursive-ide/cursive/issues/2521#2021-07-1413:15Jeff EvansWhat is the run configuration you're using? For Metabase, remote repl works far better than local. So start it from the command line and connect via the nREPL socket from Cursive#2021-07-1413:40Yang XuScreen Shot 2021-07-14 at 2.50.53 PM#2021-07-1414:06Yang Xu@U0183EZCD0D I am run it as Clojure application not REPL option#2021-07-1414:07Jeff EvansOh, I've never tried to do that. I always use the REPL to start and bring up the web server from there#2021-07-1414:09Yang XuDoes REPL is convince to debug? Can make breakpoint in code and show the variables?#2021-07-1414:10Jeff EvansYes I do that all the time#2021-07-1414:10Jeff Evans(I work at Metabase)#2021-07-1414:20Yang XuWow, Could you give some articles about run MetaBase on the REPL?#2021-07-1414:25Jeff EvansI have an internal wiki doc on the Cursive setup. I'll see if I can move it to the public one#2021-07-1414:28Yang XuThanks, If you’ve moved it please tell me, That must be helpful.#2021-07-1414:31Yang XuBut I am still curious why it cannot start at BigSur mac in my way, I consider maybe is a bug exist in BigSur? I have submit issue on cursive, but no response so far. And I find a similar issue: https://github.com/cursive-ide/cursive/issues/2521#2021-07-1415:22Jeff Evanshere: https://github.com/metabase/metabase/wiki/Cursive-IDE-Setup#2021-07-1415:22Jeff EvansI’m on Big Sur and I’ve never run into this error#2021-07-1421:06thumbnailHey @U0183EZCD0D, Thanks for publicizing the instructions! Although I think you edited the public wiki page with the the document is now public at <x> instead of the internal one 😅#2021-07-1421:22Jeff EvansOops.... I'll fix that#2021-07-1421:26Jeff Evansthanks for pointing that out#2021-07-1502:29Yang XuWhen I run it on the local REPL, it show “Error running ‘Local’: Error executing Leiningen configuration.” There must be a problem, Even though I’ve tried to reinstall IDEA,#2021-07-1504:15Yang XuMy mac come back to normal ,finally it make me sad a long time. The problem is there exist a bug with BigSur that about JAVA_CMD environment variable, But I already noted this problem and export this variable, the most deadly problem is I installed JENV to manage all jdks, and export is not which java path appropriate .😬 Yeah, @U0183EZCD0D you are right there must be more error information, I figure out this in log of IDEA.#2021-07-1504:18Jeff EvansI pretty much always use remote REPL for what it's worth. Much less hassle in the end#2021-07-1504:59Yang XuThank everyone help.#2021-07-1416:50salamdoes anybody know what this setting does? if my understanding is correct, it should automatically enable those aliases upon opening/synchronizing all Deps projects. if that's what it does, it doesn't seem to be working. in other words, i am still forced to manually enable (in the Clojure Deps tool window) an alias that's already listed there (in my case, dev).#2021-07-1508:20cflemingYes, those aliases should be enabled on new projects. I’ll check that tomorrow.#2021-07-1522:49salamwhat about existing projects?#2021-07-1604:59cflemingI think those are only the defaults for new projects.#2021-07-1605:42salamis there any reason they cannot be enabled by default for existing projects?#2021-07-1605:45salami mean, if i put an alias on that list, it should be enabled, by default, for any (existing or new) project (since it's a global setting) unless i override it in a project locally (via the Clojure Deps tool window).#2021-07-1609:07cflemingThe problem with that is; imagine you open a project and one of those aliases is not set. I don’t know if that’s a project that you opened subsequently to setting it as a default and manually un-set it, or if it’s one that you haven’t opened since you set that alias as a default. I could have some extra hidden field of ‘aliases which have been manually disabled’, but that then gets pretty complex and I’m not sure what the logic for that field should be when you set and un-set defaults.#2021-07-1902:13cfleminghttps://github.com/cursive-ide/cursive/issues/2569#2021-07-1707:33Yang XuDoes anyone have faced problem below with running deftest? 2021-07-17 15:29:56,100 [ 605392] ERROR - intellij.openapi.progress.Task - class cursive.runner.ClojureTestConfiguration$getRunProfileState$state$1 cannot be cast to class com.intellij.execution.configurations.RunConfigurationBase (cursive.runner.ClojureTestConfiguration$getRunProfileState$state$1 is in unnamed module of loader com.intellij.ide.plugins.cl.PluginClassLoader @38d3d3b0; com.intellij.execution.configurations.RunConfigurationBase is in unnamed module of loader com.intellij.util.lang.PathClassLoader @146ba0ac) java.lang.ClassCastException: class cursive.runner.ClojureTestConfiguration$getRunProfileState$state$1 cannot be cast to class com.intellij.execution.configurations.RunConfigurationBase (cursive.runner.ClojureTestConfiguration$getRunProfileState$state$1 is in unnamed module of loader com.intellij.ide.plugins.cl.PluginClassLoader @38d3d3b0; com.intellij.execution.configurations.RunConfigurationBase is in unnamed module of loader com.intellij.util.lang.PathClassLoader @146ba0ac) at cursive.testing$create_test_script.invokeStatic(testing.clj:18) at cursive.testing$create_test_script.invoke(testing.clj:18) at clojure.lang.Var.invoke(Var.java:393) at cursive.api.DelayedFn.invoke(DelayedFn.java:41) at cursive.runner.ClojureTestConfiguration$getRunProfileState$state$1.createDeferredParameters(ClojureTestRunner.kt:193) at cursive.runner.DeferredCommandLineState.cacheDeferredParameters(Deferred.kt:72) at cursive.runner.AbstractDeferredRunner$execute$1.run(Deferred.kt:104) at com.intellij.openapi.progress.impl.CoreProgressManager$TaskRunnable.run(CoreProgressManager.java:998) at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcessWithProgressAsync$5(CoreProgressManager.java:497) at com.intellij.openapi.progress.impl.ProgressRunner.lambda$submit$3(ProgressRunner.java:228) at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$2(CoreProgressManager.java:178) at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:688) at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:634) at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:64) at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:165) at com.intellij.openapi.progress.impl.ProgressRunner.lambda$submit$4(ProgressRunner.java:228) at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1700) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:668) at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:665) at java.base/java.security.AccessController.doPrivileged(Native Method) at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1.run(Executors.java:665) at java.base/java.lang.Thread.run(Thread.java:829) 2021-07-17 15:29:56,100 [ 605392] ERROR - intellij.openapi.progress.Task - IntelliJ IDEA 2021.1.3 Build #IU-211.7628.21 2021-07-17 15:29:56,100 [ 605392] ERROR - intellij.openapi.progress.Task - JDK: 11.0.11; VM: OpenJDK 64-Bit Server VM; Vendor: JetBrains s.r.o. 2021-07-17 15:29:56,100 [ 605392] ERROR - intellij.openapi.progress.Task - OS: Mac OS X 2021-07-17 15:29:56,101 [ 605393] ERROR - intellij.openapi.progress.Task - Plugin to blame: Cursive version: 1.10.2-2021.1 2021-07-17 15:30:26,862 [ 636154] INFO - .deployment.AsyncDevicesGetter - adb not found#2021-07-1719:48EddieI know tools.build is new, but I’m curious if anyone who has been playing with it has a workaround for “File build.clj is not under a source root” when including a build.clj file in the project root (and thus not specified as being on the classpath by the deps.edn).#2021-07-1721:12cflemingHmm, I can’t think of a good one, sorry. I’m going to look at tools.build soon though.#2021-07-1902:09rutledgepaulvi made a builds directory and put my build.clj in there and used extra-paths in my deps.edn alias to include builds on the classpath for that alias. builds are still excluded in the actual jar since the jar task in the build.clj file only considers the src dir. example: https://github.com/RutledgePaulV/ring-compression/blob/master/deps.edn#L5-L9#2021-07-1902:10rutledgepaulv(note that the originally stated problem is not only an issue for cursive, you also cannot invoke it from the CLI unless deps.edn includes a source path that contains the build.clj file)#2021-07-1919:41Eddie@U5RCSJ6BB As far as I can tell with the projects I have been migrating, tools.build will look for a build.clj file in the root of the project even if the project root isn't explicitly declared as being on the class path in the deps.edn. I don't think the project root is put on the classpath by default (otherwise why would we need to add any source directories, right?). Also, I can't find any mention that the build file has to be on the classpath to run tools.build with -T. I believe the flow is actually the opposite. Tools.build will construct the basis for the classpaths required for compilation/assembly by reading your deps.edn. I'm still learning about this new tool, so I could be wrong.#2021-07-1920:13rutledgepaulvi could definitely be wrong too 🙂 only played with it for a few minutes#2021-07-1814:23Mateusz MazurczakHi! I'm new to cursive. What's the recommended intellij version to use? Because I'm using 2021.1.3 and I get a lot of incorrect warnings (f.e. defn cannot be resolved)#2021-07-1814:49Mateusz MazurczakOr what version do you use that does not have this problem?#2021-07-1818:52kennytiltonI am on 2020.3.2. Got an example of where you are seeing that? Are you having IntelliJ do its indexing? There is a menu item Files/Invalidate caches and restart hack that might do something. When you created the project did you identify it as Leinengen or deps-managed?#2021-07-1820:41cfleming@U0281QDFE1X There’s a checklist of things to try for that here: https://cursive-ide.com/userguide/troubleshooting.html#help-lots-of-symbols-don-t-resolve. It’s not related to the version of IntelliJ.#2021-07-1822:37Mateusz Mazurczak@U0PUGPSFR Well I'm seeing it in every file that is .cljs (in .clj it's fine) I use deps, although I had to open the project from pom.xml so I can connect shadow-cljs in repl. Yeah I've run Invalidate caches and restart already @U0567Q30W I also checked the troubleshooting, before writing here, but nothing seems to help or relate to my problem.#2021-07-1822:40Mateusz MazurczakAnd it shows me that "cannot be resolved" for many different functions in .cljs files, like defn let fn nil?#2021-07-1822:40Mateusz MazurczakBut for example it has no problem with def#2021-07-1822:41cflemingHow did you create your project? By importing the deps.edn, or the pom.xml?#2021-07-1822:45cfleming@U0281QDFE1X ^^#2021-07-1822:49Mateusz MazurczakBy importing pom.xml. Okay it works! I've reinstalled the cursive, made sure that cljs alias is checked in, and it's not highlighting it anymore! Thanks for the help#2021-07-2006:41cjmurphyWhenever I Refresh (two rounded arrows) Clojure Deps I lose all the directories that have previously been marked as source. Is there a way to make my intentions stick?#2021-07-2007:08cflemingYes, you need to ensure that they’re declared in your deps.edn file. Then they’ll be restored on every refresh.#2021-07-2007:26cjmurphyOh thanks, that makes sense. I'm experimenting with Polylith and there's a lot of 'declaring in your deps.edn file' required.#2021-07-2008:09cflemingOh, I see - I actually have a couple of improvements scheduled for the next release cycle which are for Polylith#2021-07-2008:25cjmurphyLike auto-adding source directories to the development (root level) deps.edn file perhaps? Every time a new component this needs to be done. The polylith tool could do this itself but for the moment it doesn't. Personally I wish it did. So if you add a new component called database (`clj -M:poly create component name:database`) make sure this string: "components/database/src" is in [:aliases :dev :extra-paths].#2021-07-2009:07cflemingHmm, I’m not sure about that - that sounds like it might be a change better placed in Polylith itself, the issue I’m looking at is https://github.com/cursive-ide/cursive/issues/2554. It sounds like it might be related, but I don’t understand polylith well enough to be sure. I haven’t used it myself.#2021-07-2010:01cjmurphyI'm pretty sure he means 'not show up in blue' rather than 'not show up in green'. I think what's being said is that Cursive doesn't recognise extra-deps properly. It should be able to read from extra-deps and make the UI show the blue for the src directories.#2021-07-2010:04cjmurphyYes my wish is definitely for the Polylith tool. With Cursive as it currently is this would mean auto-adding to extra-paths. But with the Cursive bug fixed auto-adding to extra-deps instead.#2021-07-2010:25cjmurphy(By the way a component is a brick).#2021-07-2300:50Takis_hello can we have autocomplete with clojurescript/npm dependencies ? i think its not working or i am doing something wrong#2021-07-2301:08cflemingThere isn’t at the moment unfortunately, although it’s something I want to add.#2021-07-2322:27Takis_Thank you : )#2021-07-2300:50Takis_clojure/java autocomplete works very nice#2021-07-2708:02indyIs there a workaround for structural search for Clojure? I want to find usages of an overloaded function that is called with x number of arguments. A regex grep will be a pain, since I'll have to handle new lines and threaded forms.#2021-07-2710:01cflemingNo, there isn’t unfortunately. Searching for a particular arity is something that has been requested before.#2021-07-2710:02indyOkay, thank you.#2021-07-2714:10dpsuttonhttps://github.com/borkdude/grasp allows you to "grep" a codebase with specs that include arity counts#2021-07-2714:18emccueIt is sort of sidestepping the problem, but the easier migration would be to move all usages of the function to using a map with named params#2021-07-2714:18emccuethat way you don't need to narrow down anything and in the future you can search for the map's keys for future revisions#2021-07-2714:23indyI actually found an example that I can very easily build on https://github.com/borkdude/grasp/blob/master/examples/arg_vecs.clj. Thanks @U11BV7MTK#2021-07-2714:25indy@U3JH98J4R That's too big a diff, the function has 209 usages. And my need for refactoring is for quite a different purpose.#2021-07-2714:27indySince cursive uses static analysis to do it's thing and IntelliJ has a nice structural search, I was wondering if it was possible for Cursive to implement it for Clojure, but I'll hack around with grasp for now#2021-07-2801:37cfleminghttps://twitter.com/CursiveIDE/status/1420194536689586177#2021-07-2921:48polymerisWhat could be the reason I am not seeing an "Upgrade" button?#2021-07-2922:03polymerisAnyways... clicking on the button to install here worked: https://plugins.jetbrains.com/plugin/8090-cursive#2021-08-0201:40cflemingI’ve seen some discussion in the plugin developers’ slack that this is somewhat buggy in 2021.2#2021-07-2806:58d5phit this as an issue today https://github.com/cursive-ide/cursive/issues/2411 , no possible workaround ?#2021-07-2807:03d5pand this issue https://github.com/cursive-ide/cursive/issues/1741 is very similar to what has been plaguing me for a while, i think the most recent comment is about when it broke for me on mac as well - using lein checkouts gets things mangled with the modules and source roots etc#2021-07-2822:03gregI started using a REBL recently and I noticed the Cursive highlights REBL's symbols as not possible to resolve. The lib is AOTed, but is there anything I could do it disable these highlights? I'm using Cursive with Idea 2021.1 and deps.edn.#2021-07-2822:05cflemingI’ll probably have to add it to the stubs generation, I’ll try to look at that in the next day or two.#2021-07-2822:06gregOk, thanks! 🙇#2021-07-2822:06cflemingIs there anything special in your setup?#2021-07-2822:06cflemingI tried REBL out ages ago but haven’t used it since.#2021-07-2822:10gregI don't think so. • Regular Cursive (not EAP) + Idea 2021.1 • deps.edn • nREPL launched in the terminal, Cursive connecting when nrepl server created • nrepl-rebl as a nREPL middleware to launch REBL and send forms to REBL nrepl-rebl is better middleware for Cursive than nrebl.middleware. The former filters out Cursive special forms sent to REPL, the latter does not.#2021-07-2822:12greg> I tried REBL out ages ago but haven’t used it since. I've literally set it up last weekend. It is a bit weird in use, but I see it might be handy. I haven't tried Reveal and Portal yet, though#2021-07-2912:45Otto NascarellaHi there! Started using cursive for clojurescript… some of the js interop works fine when type annotated, but for some reason, some of it just do not work… js/Promise for example. Any tips?
#2021-07-2920:05salamthis is what the issue looks like:#2021-07-2920:12javiyeah, not sure why that is.. sorry#2021-07-3001:19cflemingSorry, I have plans to improve this but haven’t got to it yet.#2021-07-2917:54javiwhat do you mean by “does not work”? do you mean auto completion?#2021-07-2918:39Otto Nascarellanot really. I mean just being recognized#2021-07-3015:20Jem McElwainpossible to run deps.edn on wsl2? pointed to clojure in my wsl install, but getting is not a valid Win32 application when intellij tries to index#2021-08-0116:08Joe R. SmithCursive doesn't recognize the named fn arity of defmethod, e.g.:
(defmethod somemulti :dispatch-val 
  method-name 
  [arg1 arg2] 
  (method-body))
defmethod takes a fn-tail after the dispatch value and fn can have a name (symbol)
#2021-08-0116:32R.A. Porterhttps://github.com/cursive-ide/cursive/issues/899#2021-08-0123:56markaddlemanI'm using scicloj/tablecloth and it makes heavy use of an export macro. Here's an example:
(export-symbols tech.v3.datatype.datetime.base
                system-zone-id
                utc-zone-id
                system-zone-offset
                utc-zone-offset
                milliseconds-since-epoch->instant
                seconds-since-epoch->instant
                instant
                instant->milliseconds-since-epoch
                instant->seconds-since-epoch
                instant->microseconds-since-epoch
                microseconds-since-epoch->instant
                local-date-time->local-time
                local-time
                milliseconds-since-epoch->local-time
                local-time->instant
                local-time->seconds
                local-time->milliseconds
                seconds->local-time
                milliseconds->local-time
                instant->local-date-time
                zoned-date-time->instant
                zoned-date-time->milliseconds-since-epoch
                zoned-date-time
                instant->zoned-date-time
                milliseconds-since-epoch->zoned-date-time
                local-date-time->instant
                local-date-time->zoned-date-time
                local-date-time
                milliseconds-since-epoch->local-date-time
                local-date-time->milliseconds-since-epoch
                local-date
                local-date-time->local-date
                local-date->local-date-time
                local-date->days-since-epoch
                days-since-epoch->local-date
                local-date->instant
                local-date->zoned-date-time
                local-date->milliseconds-since-epoch
                local-time->local-date-time
                milliseconds-since-epoch->local-date
                duration
                duration->nanoseconds
                nanoseconds->duration
                duration->milliseconds
                milliseconds->duration)
Is there some magic to getting Cursive to understand this form?
#2021-08-0123:57cflemingI would have to look at that, probably. There are some similar macros that Cursive supports, but I’m not sure how that one works.#2021-08-0200:00markaddlemanThe first arg is a namespace and then var-arg list of symbols.#2021-08-0200:00markaddleman
(defmacro export-symbols
  [src-ns & symbol-list]
  `(do
     (require '~src-ns)
     
Here's the impl
#2021-08-0200:04cflemingCould you try resolving that one as cljs.core/import-macros? See here for how to do that: https://cursive-ide.com/userguide/macros.html#customising-symbol-resolution#2021-08-0200:08markaddlemanUnfortunately, it doesn't work#2021-08-0200:10cflemingSadly, I’ll have to look at it in that case.#2021-08-0200:12markaddlemanNo worries. I can open an issue if helpful#2021-08-0200:12cflemingYes please!#2021-08-0200:16markaddlemanHere you go: https://github.com/cursive-ide/cursive/issues/2573#2021-08-0200:16markaddlemanThanks!#2021-08-0200:17cflemingThanks!#2021-08-0201:28steveb8nQ: anyone else seeing the test assertion markers not working for cljc tests? @cfleming#2021-08-0201:28cflemingNot that I know of, no.#2021-08-0201:28steveb8nhappy to log a bug for this#2021-08-0201:28steveb8ncould be specific to my setup/versions#2021-08-0201:30steveb8ntest runs, repl output is correct. green markers appear in gutter and then disappear#2021-08-0201:30steveb8nso I can’t access the “difference” feature for failures#2021-08-0201:30steveb8nlog a bug?#2021-08-0201:30cflemingYes please#2021-08-0201:31steveb8nok#2021-08-0219:57genekimThanks for all your amazing work on Cursive — it’s been nearly bulletproof for years! A lingering mystery: On macOS, I have “Cmd-Shift-L” mapped to “Load File in REPL” — which works great, but for years, I’ve been wondering why if I have any text selected, it opens up a Safari browser window, with whatever I have highlighted as a search term. I don’t have Cmd-Shift-L accelerator set anywhere else in IntelliJ (see screenshot) — and if I have it as a shortcut in macOS somewhere, but I can’t find it.. Does anyone have any tips/suggestions? Thanks, all!#2021-08-0220:19Jeff Evanswow, small world. I had the exact same mapping and issue. check here (it’s the Search with Google one):#2021-08-0222:43genekimHoly cow! Thank you so much!! I’ve been searching for this for years!!! I’ll finally be able to stay in REPL-flow, as opposed to disgruntled “close Safari window AGAIN”!! 🙂#2021-08-0420:08Joe R. Smithhaha, I've experienced this for years as well and have just lived with it. Thanks!#2021-08-0311:50sbHi, I run Clojure + ShadowCLJS project via REPL (init via dev.clj). I can call successfully cljs part, but I can’t execute code or ns from cljs’s namespaces, from editor part (SHIFT+CMD+P). How is it possible solve with Cursive?
[:app] Compiling ...
[:app] Build completed. (1381 files, 2 compiled, 0 warnings, 0,59s)
(shadow.cljs.devtools.api/repl :app)
[0:0]~app.index=> 
#2021-08-0312:00sbI solved with that tutorial https://gist.github.com/akovantsev/44e2a0e10908785d1f40d3d3bcfff574#2021-08-0312:49cfleminghttps://twitter.com/CursiveIDE/status/1422540023207915520#2021-08-0316:49danmHmm... My Cursive has suddenly stopped accepting 'X in REPL" commands. It keeps telling me Dependency cycle: time.clj -> time.clj -> time.clj. The same commit is working fine for other people in their Cursives (and the deployed app is testing fine on CI and working fine), so I'm definitely suspecting some sort of local weirdness. Invalidate caches and restart doesn't seem to be fixing it. Any other suggestions?#2021-08-0317:04danmIt also keeps adding /dev as a content root every time I rescan Leiningen projects, and... why?#2021-08-0317:04danmIt's not mentioned anywhere in there...#2021-08-0317:05danmAhha, might have found it#2021-08-0320:14wilkerlucioI'm seeing an weird behavior when running tests on Cursive, the test markers disappear automatically after a second of running it. it helpers about 60% of the time I run the tests#2021-08-0320:15wilkerlucioalso sometimes the markers are there, then I scroll and they are gone#2021-08-0320:37cflemingCould that be https://github.com/cursive-ide/cursive/issues/2574?#2021-08-0323:18wilkerlucioyes, same problem#2021-08-0323:18wilkerlucioalso on cljc files, I didnt tested with clj only#2021-08-0419:28JAtkinsDoes the cursive formatter support 1 space indent for macros, and 2 space indent for functions?#2021-08-0419:50imreI don't think it does as a global rule like you describe#2021-08-0420:25donavan@U5P29DSUS actually means 2 space for macros with body and 1 space for functions#2021-08-0420:26JAtkinsCould it be done per symbol? I’m aware of indent vs function vs 1-9 can be done individually, but that only controls if args on following lines are aligned or indented if I understand correctly.#2021-08-0721:07cflemingYes, it can be done per symbol - indent is what you want for 2-space indentation.#2021-08-0721:22JAtkinsI’m trying to get 2 spc for macros, 1 spc for fns. Can that be done too?#2021-08-0800:39cflemingNot for all macros as a class, no, unfortunately - you’ll have to specify them one by one.#2021-08-0800:45JAtkinsWhat’s the way to change indent for different symbols? AFAICT the numeric options just change the number of args under the ‘function’ rule#2021-08-0802:52cfleminghttps://cursive-ide.com/userguide/formatting.html#code-style-settings#2021-08-0802:52cfleming“Indent” is the one you want for macros.#2021-08-0802:53cfleming“Function” just means that any number of parameters are aligned.#2021-08-0802:53cflemingOr, for some macro forms you might want the numeric values as described on that page.#2021-08-0723:47kennytiltonCan someone remind me why Cursive occasionally decides it cannot find definitions, including those of Clojure primitives? Not all, tho, are unresolved. Functions define in project source are OK. But not defn and prn, and not functions etc from required libs. I tried invalidating caches and restarting without any luck. The app builds fine and runs under shadow-cljs. In a similar project Cursive can find definitions with no problem. I have now re-built in a second directory from scratch and all symbols are resolved fine by cursive. This happens occasionally, just not often enough for me to remember the magic spell! Thx. 🙏#2021-08-0800:40cflemingDoes this list help? https://cursive-ide.com/userguide/troubleshooting.html#help-lots-of-symbols-don-t-resolve#2021-08-0806:29kennytiltonThx, @U0567Q30W! This is exactly the thing that so rarely comes up! Also, I forgot I had built this project by hand adding deps.edn and more from a walkthru tutorial. I guess I never noticed the dread unresolved symbols. I also never noticed the "Clojure Deps" toolwindow before. Been using Cursive for a decade. 🙂 This is the second RTFM in a week, I should skim the doc and see what else I am missing.#2021-08-0823:40cflemingWell, it comes up often enough that it has a dedicated doc section now 🙂#2021-08-0809:34folconThere was some discussion around REBL integration, I've not noticed any updates on that, just wondering if there's been any that I've missed? =)...#2021-08-0821:50cflemingI don’t think so, no. As far as I know, the best option is to use nREPL with one of the middleware options (I think https://github.com/rynkowsg/nrebl.middleware/ looks best, but I’ve not tried any of them). Is there more that you’d want in terms of integration?#2021-08-0823:36folconOh, I wasn't sure what was available, I just vaguely remembered you saying that you had something similar on your roadmap. If that's not the case fine 😃... I really enjoy just using cursive, so even if I'm using REBL it would have to fit with it for it to be somewhat useful 😃...#2021-08-0823:38cflemingYes, I’d like to add a data structure browser, and there’s scope for that to do some REBL-like things, but I haven’t developed anything along those lines yet, sorry.#2021-08-0916:23kendall.buchanan@U0567Q30W Are you still also working on a way to visualize the REPL output without having the REPL editor open?#2021-08-0920:38cflemingYes, I am!#2021-08-1010:25folconAh good to know#2021-08-0905:14Krishan VHey everyone, what is the keybinding for evaluating current form that my cursor is on? Alt Shift P evaluates the top level form but I cannot find the binding for current form#2021-08-0906:34indyYou can move your cursor to the end of the form, after the paren, like so (+1 2)| and invoke Send form before caret to REPL . There isn't a Send current form under caret to REPL, I'm guessing, since it'll be literals or symbols 95% of the time that'll be the current "form".#2021-08-0906:36indyOr you could just select the form you want to evaluate and call either Send form before caret to REPL or Send Top form to REPL.#2021-08-0908:49Krishan VThanks @UMPJRJU9E. I'll go with using Ctlr + W to semantically choose the form I want to evaluate and use Send Top form to REPL . Gets the job done :thumbsup:#2021-08-0908:55indyThere is expand selection and shrink selection, if you haven’t already used it, which works quite nicely with s-expressions and will allow you to easily select the desired form. #2021-08-0908:55danmCan anyone provide me with more insight as to why this happens: https://github.com/cursive-ide/cursive/issues/2266 ? I am not the original requestor, but my team all received the same sort of error from Cursive when we upgraded a library version (In our case it was time.clj -> time.clj -> time.clj. Again, turning off Load out-of-date file dependencies transitively seems to have fixed the error, but I don't understand why, or what is causing that error in the first place. It seems to be incorrect, as the code compiles and runs fine, and Emacs/CIDER doesn't have any issues.#2021-08-0909:47cflemingThis tends to be something funky with cljc. Do you know where the time.clj file comes from?#2021-08-0910:35danmI don't, unfortunately. This occurred in pure clj code, rather than cljc. The issue arose when we upgraded the version of manifold we were using from the one that caesium bundles to 0.1.9-alpha5 (via an exclusion on caesium in deps.edn and an addition of the new version)#2021-08-0920:43cflemingIf you use Navigate-&gt;File…, set the filename to time.clj and set the scope to “All Places”, what does it find?#2021-08-1308:51danmIt's finding a whole load of time.clj instances in libs, as well as the one in my actual project. It is finding 2 different versions of it in manifold (the lib we upgraded), both in the m2 cache, one for version 0.1.8 and one for 0.1.9-alpha5. Is it potentially getting confused between the two versions?#2021-08-1308:52danmGoing to try removing the old version#2021-08-1309:48danmHmm, even though I'm excluding the instance of manifold 0.1.8 it still gets pulled 😞#2021-08-1310:12cflemingWhere’s it coming in from? You should be able to see that in either your deps or lein toolwindow#2021-08-1310:17danmSo clj -Stree and the lein toolwindow both say it's within byte-streams, which in turn is within caesium, but that's what's excluded:
clj -Stree
...
com.github.arohner/manifold 0.1.9-alpha5-top
...
caesium/caesium 0.13.0
  . com.github.jnr/jnr-ffi 2.1.12
    . com.github.jnr/jffi 1.2.23
    . com.github.jnr/jffi$native 1.2.23
    . org.ow2.asm/asm 7.1
    . org.ow2.asm/asm-commons 7.1
    . org.ow2.asm/asm-analysis 7.1
    . org.ow2.asm/asm-tree 7.1
    . org.ow2.asm/asm-util 7.1
    . com.github.jnr/jnr-a64asm 1.0.0
    . com.github.jnr/jnr-x86asm 1.0.2
  X commons-codec/commons-codec 1.14 :use-top
  . byte-streams/byte-streams 0.2.4
    . primitive-math/primitive-math 0.1.6
    . clj-tuple/clj-tuple 0.2.2
    X manifold/manifold 0.1.8 :excluded
  . org.clojure/math.combinatorics 0.1.6
  X medley/medley 1.2.0 :use-top
  X com.taoensso/timbre 4.10.0 :use-top
...
#2021-08-1310:18cflemingActually, you could try this: go to Help | Diagnostic Tools | Debug Log Settings…. In the box that opens, enter #cursive.namespace. Then repro the problem and check your log (Help | Show Log in Finder/Explorer) for a “Dependency cycle” log that should have more information about the actual files involved.#2021-08-1310:18danmBut for some reason if I delete the directory for 0.1.8 from ~/.m2/repository it still pulls it in again the next time I run lein repl#2021-08-1310:18danmAah cool, will do#2021-08-1310:19cflemingBut wait - are you using lein or deps? Or are you using lein with dependencies from deps.edn?#2021-08-1310:20danmlein with dependencies from deps.edn at the moment#2021-08-1310:20cflemingI’d be interested to see that log entry as well.#2021-08-1310:20cflemingIf you do clj -Spath, does that appear on the classpath?#2021-08-1310:21danmThe 0.1.8 version? Nope#2021-08-1310:22danmJust reproing 🙂#2021-08-1310:22cflemingThat’s interesting. I wonder if that’s a bug in Cursive because it’s not expecting to receive excluded deps back in the tree.#2021-08-1310:23danmTo be honest, neither was I 😉#2021-08-1310:23cflemingHehe. Does it show up in lein classpath?#2021-08-1310:25cflemingOr lein deps-tree?#2021-08-1310:25danm... huh. It doesn't. At all. caesium is there, but no version of manifold, 0.1.8 or 0.1.9-alpha5, is mentioned (for lein classpath)#2021-08-1310:27cflemingIs your project imported into Cursive using lein or deps?#2021-08-1310:27danmlein#2021-08-1310:27danmOoh, that's interesting#2021-08-1310:28danmlein deps :tree output:
...
 [byte-streams "0.2.4"]
   [manifold "0.1.8"]
 [caesium "0.13.0" :exclusions [[manifold]]]
...
#2021-08-1310:28danmSo because manifold is a sub-import of byte-streams, it's not correctly outputting/handling the exclusion? Or is that just a display thing#2021-08-1310:29danmclj -Stree seemed to be interpreting it correctly#2021-08-1310:29cflemingOk, so I think that’s the problem. I’d have to go back and check the code, but from memory Cursive uses that to work out which libs to sync. Or at least the API under the hood that produces that tree. So with a bit of luck I might be able to shunt the blame onto the lein plugin 🙂#2021-08-1310:29cflemingAlthough it’s entirely possible that it’s a bug in Cursive and that’s just a visual thing.#2021-08-1310:30danmWell lein deps outside of Cursive also pulls in 0.1.8, so I would guess it's not just a display oddity?#2021-08-1310:30cflemingProbably not, no.#2021-08-1310:31cflemingThat’s very weird.#2021-08-1310:31cflemingAny luck with the log?#2021-08-1310:34danmJust getting one with minimal cruft. I had a load of IntelliJ namespaces at trace level in there before#2021-08-1310:35danmAhha!#2021-08-1310:36danm
2021-08-13 11:35:22,676 [  90382]  DEBUG -             #cursive.namespace - Dependency cycle /Users/meyersd/.m2/repository/com/github/arohner/manifold/0.1.9-alpha5/manifold-0.1.9-alpha5.jar!/manifold/time.clj -> /Users/meyersd/.m2/repository/manifold/manifold/0.1.8/manifold-0.1.8.jar!/manifold/time.clj -> /Users/meyersd/.m2/repository/com/github/arohner/manifold/0.1.9-alpha5/manifold-0.1.9-alpha5.jar!/manifold/time.clj
#2021-08-1310:36danmI could send the whole thing through if you think it'd be useful#2021-08-1310:36cflemingNo, that’s the interesting bit, thanks.#2021-08-1310:37cflemingSo it’s definitely getting confused between those versions for some reason#2021-08-1310:41cflemingOk, I need to go to bed - it looks to me to be a problem in the lein-deps plugin, but I can’t rule out a Cursive bug there. Could you create a small repro repo that I could look at (I’m assuming the real one is a work thing?) and then I can debug the API coming back from lein to be sure.#2021-08-1310:41danmCool, no worries, will do. Add to the existing issue I linked?#2021-08-1310:41danmOr is this potentially a different thing?#2021-08-1310:42cflemingGood question. Perhaps create a new one, and if it looks like the same problem I’ll link them. I’ve never seen this in clj-only files, it’s usually someone doing something funky with cljc like requiring macros from the same file or something like that.#2021-08-1019:19Jeff EvansAnyone have a good solution for switching back and forth between Lein and deps.edn? On our master branch, we have switched to deps.edn (yay!) but when I need to check out an older branch, where Lein is still in use, the tool window is gone. I know that I can basically nuke the entire IntelliJ project and start over, but that’s obviously too disruptive to do on a regular basis.#2021-08-1019:22R.A. PorterNot awesome, but you should just need to Add as Leiningen Project on the project.clj each time you have to switch to an older branch. Should be able to do that through either the context menu on the file or through the Leiningen tool window.#2021-08-1019:48isakHow about just having a git worktree checked out to the old branch?#2021-08-1021:17Jeff Evans@U01GXCWSRMW, thanks, this approach will get me through for now. Appreciate the response#2021-08-1021:41salamis there any plan to extend IntelliJ IDEA's built-in grammar/style checking support (provided by Grazie (https://plugins.jetbrains.com/plugin/12175-grazie), which, in turn, is based on LanguageTool (https://languagetool.org)) to Clojure(Script) source files?#2021-08-1022:39cflemingI’m actually not sure what’s required for that, I’ll investigate.#2021-08-1022:41cflemingLooks pretty straightforward, could you file an issue for that and I’ll fix it in the next EAP?#2021-08-1023:48cflemingActually, I filed https://github.com/cursive-ide/cursive/issues/2579, I’ll fix that now.#2021-08-1100:35salamoh, i didn’t see your earlier message. thanks a lot! #2021-08-1101:46cfleming#2021-08-1101:49cflemingI need to use it for a bit before releasing, there’s a system of exceptions which seem to be used to suppress common warnings that tend to appear in each language. I’m not sure yet why they’re different per-language, so I’ll use it myself for a bit and see if any of the suggestions are obviously annoying. There’s an issue at the moment in which docstrings require the support to be turned on for literals, i.e. they’re not recognised as documentation (there’s a system of scopes which can be turned on and off).#2021-08-1101:52salamsounds good, please take your time and release it whenever you feel comfortable doing so. 🙂#2021-08-1206:13cflemingThis now understands when a string is a docstring - by default Grazie is off for string literals, but on for doc, and Cursive will obey that.#2021-08-1206:13cfleming(note that the bare string literals aren’t annotated)#2021-08-1803:24cflemingThis is out now in the latest EAP.#2021-08-1102:01salamColin, since you’re around, i’m curious whether there’s any progress on this issue: https://github.com/cursive-ide/cursive/issues/1403 also, the built-in rule map is missing a few core symbols such as cond-> and cond->> .#2021-08-1102:34cflemingI’m not sure about the possibility of keeping the format config in the cljfmt file, I haven’t had a chance to investigate that. I’ll try to look at that soon.#2021-08-1220:03salamthe current approach for adding/changing indentation rules for symbols, in my humble opinion, is not quite user-friendly. we need to rely on [Option/Alt + Enter] to add a rule. in order to change one, we need to hunt it down among the long list of symbol+rule pairs in the Preferences/Settings dialog, which becomes a tedious and laborious process if you want to make Cursive's formatting match others' (e.g., cljfmt.) this in turn makes sharing and enforcing indentation rules another headache as you would have to change the rules manually for every one who is using Cursive. an alternative approach with a better developer ergonomics, in my humble opinion again, would be keeping indentation rules in a text file on disk (e.g., indents.edn) and point Cursive at it. and adding/changing rules would be a matter of editing that text file. with this approach, Cursive can keep its internal, default rule set immutable (e.g., no GUI to change it) and the only way to override it would be by editing that file (manually or via GUI). i don't know how difficult this is to implement but it would for sure fix a lot of problems that we have with current approach.#2021-08-1909:57cflemingIntelliJ doesn’t provide a very nice way to do that, unfortunately. There are some similar solutions in IntelliJ now, for things like EditorConfig, so I’ll take a look to see what their solutions look like.#2021-08-1116:17imreHmm. It seems I became unable to navigate to namespaces/symbols/files from deps.edn git dependencies. Has anyone experienced this? On 2021.1.3, tried with both latest eap and latest stable cursive.#2021-08-1116:24Alex Miller (Clojure team)If you’re using the new git dep coord format, cursive may need updating to understand it (not sure if it is doing anything there or just using tools.deps)#2021-08-1116:35imreWe use the old one actually#2021-08-1116:46Alex Miller (Clojure team)Ok, was just a stab in the dark!#2021-08-1116:46imreNot sure what's wrong really. I've gone all the way back to 1.10.2 but nothing's changed. Tried the invalidate caches dance at each downgrade as well#2021-08-1116:47imrenp, thanks for the tip!#2021-08-1116:49imreWhat's even stranger is that it appears navigation works for some of the git deps but not for others#2021-08-1208:13imre@U0567Q30W any ideas what could be wrong here or how I could find out more?#2021-08-1208:13imreoriginal: https://clojurians.slack.com/archives/C0744GXCJ/p1628698670072300#2021-08-1211:52imreone trouble I'm experiencing is now all the symbols that are defined in those git deps come up undefined, messing up formatting etc.#2021-08-1214:05imreupgraded to 2021.2 and latest cursive EAP, reimported the project, but no luck unfortunately#2021-08-1308:31cflemingI haven’t had a chance to try to repro this, sorry, I can’t think of anything obvious that should be different for git deps.#2021-08-1309:04imreIs there anything I could collect locally that might help?#2021-08-1309:31cflemingI’m not sure, I’ll try to look at this over the weekend and see if I can reproduce it. I’m not really sure what I would be looking for.#2021-08-1309:34imreThanks. What I haven't tried so far is nuking all of the idea project settings from the repo and trying again, but I'll do that next#2021-08-1313:07imreOkay, I did that but it didn't help#2021-08-1313:07imreBut, when I downgraded clojure tools from 1.10.3.933 to 1.10.3.855 it started to work again#2021-08-1313:17imreokay, I did some more investigation: snatched the classpath value being passed to java when I start the repl from cursive#2021-08-1313:19imreand when my system has clojure 1.10.3.933 - several git deps are missing from that classpath value#2021-08-1313:25imreclojure -Srepro -Spath -Sforce gives me the same classpath no matter which version of clojure I'm using#2021-08-1313:25imreso I'm guessing the problem is between Cursive and the cli#2021-08-1320:50cflemingOk, perhaps it is what Alex suggested then, some change in the git deps handling.#2021-08-1320:59imreNote that I don't use any new-style git dep coordinates. All of them are given as
groupid/libname {:git/url   "full-url"
                 :sha       "full-sha"
                 :deps/root "folder-name"}
#2021-08-1321:11cflemingOk, it looks like others are having similar problems though, so something must have changed there. I’ll try to repro this ASAP#2021-08-1803:23cflemingThe fix for this is out now in the latest EAP.#2021-08-1805:51imreThank you @U0567Q30W!#2021-08-1116:49imrein a seemingly random pattern#2021-08-1120:25David Caudillhello! I'm trying to set up a viable build target for Cursive on Windows and really struggling...is there any step by step documentation for windows?#2021-08-1120:48cflemingHi David, what are the problems you’re experiencing? Cursive should work in basically the same way on Windows as it does on other platforms.#2021-08-1120:50David CaudillSo it's a little tough for me to figure out what "layer" my problem exists at right now - i'm totally new to this.#2021-08-1120:51David CaudillI have cursive installed in IntelliJ CE, 2021.1.13#2021-08-1120:52David CaudillI have no build/run configurations and it's unclear to me what should be configured here#2021-08-1120:52cflemingHave you seen this? https://cursive-ide.com/userguide/first-repl.html#2021-08-1120:53David Caudillyes i have.#2021-08-1120:53cflemingDid that not work for getting a project running and a REPL?#2021-08-1120:53David Caudillmy problem is that i see no "Run REPL for new-project"#2021-08-1120:54cflemingOk. That has been happening recently and may be due to a platform problem, JetBrains have a bug logged about it.#2021-08-1120:54cflemingYou can create one manually using the steps here: https://cursive-ide.com/userguide/repl.html#2021-08-1120:55David Caudillthanks, I'll check this out#2021-08-1120:55cflemingI have to step away for a bit, if you’re still having problems drop them here and I’ll reply when I get back.#2021-08-1120:56David Caudillmuch appreciated!#2021-08-1121:31emccueIve also done cursive on windows#2021-08-1121:31emccueso if you have more general questions that aren't bugs i can help#2021-08-1121:33David CaudillThanks! I definitely will!#2021-08-1209:13ivyxjcHello! I delete some libs in ~/.m2/org/clojure/... , and when I reopen the project, I get the following error > Cannot execute - downloaded deps classpath not found: > /home/ivyxjc/.m2/repository/org/clojure/tools.deps.alpha/0.12.1019/tools.deps.alpha-0.12.1019.jar > /home/ivyxjc/.m2/repository/org/clojure/clojure/1.9.0/clojure-1.9.0.jar > /home/ivyxjc/.m2/repository/org/clojure/spec.alpha/0.1.143/spec.alpha-0.1.143.jar > ...... I have invalidate the IDE's cache and reinstall the plugin, but the problem is still there.#2021-08-1301:53cflemingIf you go to the deps settings at Preferences | Build, Execution, Deployment | Build Tools | Clojure Deps, what do you have configured there? Are you using CLI tools or tools.deps directly?#2021-08-1314:05wilkerluciohello, @cfleming, I love the test runner on Cursive, but currently it seems quite limited to only basics of clojure.test, I'm recently migrating to use the check library (https://gitlab.com/mauricioszabo/check), this library uses all the same constructs of clojure.test under the hood (its under deftest, and the reporters use the same do-report, as the is macro does), Cursive is able to correctly identify the test line and it's results as in the image attached (it gets green if the test is succeed). the real issue is that in this case I'm unable to see the error, clicking on the marker doesn't do anything (expect trying to add a debug point on that line). Also, if I run the check assertion directly (evaluating on the REPL), in case of error I get a nice diff report, but seems like Cursive does swallow that, and when I run from Cursive I get no report back. Could that be improved? If clicking on the ! just opened the reported data, it would be great!#2021-08-1400:24cflemingI’ll have a look and see if I can extend that. Cursive monkey-patches clojure.test at a pretty low level so these things sometimes are tricky, but I’ll see what I can do.#2021-08-1619:17wilkerluciofor anyone in the same situation, I notice I cna see the error report when mousing over the error with the red underscore, in the dialog it displays the result (a bit weird due to the ASCII color codes, but still readable)#2021-08-1909:58cflemingActually, could you file an issue about check support so I don’t lose it?#2021-08-2003:09kendall.buchananThis became true of even clojure.test for me after IDEA updated to 2021.2.#2021-08-2003:09kendall.buchanan(That I have to mouse over the redline in order to see the expected/actual results.)#2021-08-2003:25wilkerluciohttps://github.com/cursive-ide/cursive/issues/2584#2021-08-2005:02cfleming@U0HJA5ZQT That’s probably https://github.com/cursive-ide/cursive/issues/2574, which is fixed in the latest Cursive EAP#2021-08-1319:10markaddlemanI'm having trouble with Cursive + deps.edn + git coordinates. Whenever I supply a specific git coordinate in deps.edn (ie, :git/url and :sha), Cursive does not recognize that library and it does not get included in a launcher classpath. The same deps.edn file works flawlessly using clojure directly from the linux shell. Some (possibly) relevant info: • In Settings, I have selected "Use CLI tools" and the path points to the same location for clojure as I have from the shell • When I specify a git library in deps, I do not see it in the Project->External Libraries list but I do see all of my maven libraries there • clj -Sdescribe reports:
{:version "1.10.3.933"
 :config-files ["/home/markaddleman/.linuxbrew/Cellar/clojure/1.10.3.933/deps.edn" "/home/markaddleman/.config/clojure/deps.edn" "deps.edn" ]
 :config-user "/home/markaddleman/.config/clojure/deps.edn"
 :config-project "deps.edn"
 :install-dir "/home/markaddleman/.linuxbrew/Cellar/clojure/1.10.3.933"
 :config-dir "/home/markaddleman/.config/clojure"
 :cache-dir ".cpcache"
 :force false
 :repro false
 :main-aliases ""
 :repl-aliases ""}
• I have tried deleting ~/.gitlibs but that does not seem to help I'm not sure what additional information would be helpful to debug this problem
#2021-08-1319:34imrethis could be related https://clojurians.slack.com/archives/C0744GXCJ/p1628700544077600#2021-08-1319:18Jakub Holý (HolyJak)Hello! I am playing with https://github.com/cognitect-labs/day-of-datomic-cloud which uses <name>.repl files, which I mapped to Clojure. I use clojure.main type of REPL. Now when I Cmd-Shift-P, the current top form is not sent to the REPL. Is that something that simply does not work with clojure.main REPLs and I need to get a nREPL? 🙏 Update: I switched to an externally started nrepl but the same problem persists. Using the Tools > REPL > Send '..' menu has the same, i.e. none, result#2021-08-1319:37Jakub Holý (HolyJak)Associating .repl file with the Clojure file type and restarting IntelliJ fixed it (not all the steps might have been necessary thoug hte restart was likely crucial)#2021-08-1320:09markaddlemanDowngrading to 0.10.889 worked! Thanks!#2021-08-1319:37Jakub Holý (HolyJak)Associating .repl file with the Clojure file type and restarting IntelliJ fixed it (not all the steps might have been necessary thoug hte restart was likely crucial)#2021-08-1322:24lspectorDoes Cursive provide a way to break a long-running program, without having set a break point, and examine locals up and down the stack from the point of the break?#2021-08-1400:18cflemingYou’d have to have started the JVM process with the debug options set - there’s no way to stop the process otherwise.#2021-08-1415:36lspectorThat sounds promising. How do I start the JVM process with the debug options set? Then how do I trigger a break? Then how can I see the locals at the point of the break?#2021-08-1516:30p-himikPretty sure you just hit the Debug button in IDEA instead of the Run button to do that, assuming your run configuration supports it (i.e. IDEA knows that it's a Java application and not e.g. a bash script that's wrapped around it). Then, during the run time, you just hit the Pause button in the Debug panel. Locals should be there then - but you should also provide -Dclojure.compiler.disable-locals-clearing=true in advance.#2021-08-1516:31p-himikIt's pretty much identical to debugging a regular Java application.#2021-08-1517:13lspectorThanks @U2FRKM4TW! Where and how does one provide `-Dclojure.compiler.disable-locals-clearing=true` in advance?#2021-08-1517:14p-himikDepends on the way you run your code.#2021-08-1517:14p-himikIt's an option for Java. All the build tools out there support providing arguments to the java executable.#2021-08-1517:15p-himikAnd if you run it simply via Cursive REPL, then there's that small green bug icon.#2021-08-1517:15lspectorI'm using lein. So this goes in project.clj?#2021-08-1517:15p-himikYes.#2021-08-1517:15lspectorIn :jvm-opts? I'm always unsure of what goes in there...#2021-08-1517:16lspectorCurrently I have:
:jvm-opts ^:replace []
#2021-08-1517:16p-himikhttps://github.com/technomancy/leiningen/blob/master/doc/TUTORIAL.md#setting-jvm-options#2021-08-1517:17lspectorThat specification, I think, was to turn OFF some default configuration that we found out was slowing our runs... so I'm guessing I should change it to:#2021-08-1517:18lspector
:jvm-opts ^:replace ["-Dclojure.compiler.disable-locals-clearing=true"
#2021-08-1517:18lspectorI'll give that a shot.#2021-08-1517:18p-himikThat particular -D option is for debug only - don't use it in production.#2021-08-1517:19lspectorOkay thanks -- so I have to remove or comment it out in my project.clj when I'm done debugging? The consequence of not doing so is what?#2021-08-1517:20p-himikLein has profiles that can override certain options.#2021-08-1517:27lspectorHuh -- even with the locals clearing disabled, no matter when I pause it I don't see the frames or locals I'm expecting.#2021-08-1517:29p-himikWhat do you see? Can you share a screenshot of the Debug panel?#2021-08-1517:30lspector#2021-08-1517:30lspectorAll of my functions would be in "propeller" namespaces, and I should be nested within a couple of functions in there when I'm pausing.#2021-08-1517:31lspectorIf I poke around in that one frame I see some constants but nothing with a name that I recognize.#2021-08-1517:31p-himikAnd when you click on one of those non-grayed-out rows with propeller.core, do you get redirected to the main editor, with the line that's currently executed but paused being highlighted?#2021-08-1517:35lspectorIt always takes me to propeller.core, which doesn't even contain any code that I am running. I start my session (after pressing the Debug button) by switching into another namespace and running the -main that is defined therein.#2021-08-1517:39lspectorCould this message that I see in the Variables pane when I click on the propeller.core invokeStatic item have anything to do with it? Target VM is not paused by breakpoint request. Evaluation of methods is not possible in this mode#2021-08-1517:41p-himikI suspect it might be in a different thread then - there's a thread dropdown above the callstack, try looking in there. Take that message at face value - it's not that important to you. Is your code in some busy loop when you pause it? Or is it waiting on e.g. some future or an async operation or something like that?#2021-08-1517:42p-himikSo I just tested what I preached in one of my apps - a multi-threaded web service that I start in a similar via REPL during development. Pausing took me to the code that runs the REPL itself, kinda expected. Other threads were either something internal or something that had my code running that was waiting on something.#2021-08-1517:42lspectorIt's in a loop of intensive computation (running a genetic programming system), some of which is indeed multi-threaded. It's not waiting.#2021-08-1517:43p-himikAre you not able to find the relevant code by going through all the treads?#2021-08-1517:44lspectorFYI it's this system https://github.com/lspector/propeller that I'm running with
(require 'propeller.problems.valiant)
(in-ns 'propeller.problems.valiant)
(-main :population-size 100 :variation {:umad 1.0})
#2021-08-1517:44lspectorWhere would I see all of the threads?#2021-08-1517:45lspector(fixed the link above)#2021-08-1517:47p-himikI just found this busy code that I wrote specifically to try it on, running in one of the threads on my end, so it's definitely there:#2021-08-1517:47p-himik> Where would I see all of the threads? As I mentioned before - the dropdown above all the lines in the stacktrace.#2021-08-1517:47p-himikThe thing in red.#2021-08-1517:47lspectorwow that looks great! checking for threads dropdown...#2021-08-1517:52lspectorAh -- found that and now understand more! However, when I dig in, it's really hard to find actual values... lots of /cdn-cgi/l/email-protection and such...#2021-08-1517:55p-himikYou can expand such values to at least try to understand what's there. But getting beyond looking at Java objects would require for the JVM to be paused on a proper breakpoint, I'm afraid. What you can do is to pause your code, set a breakpoint at a place that should be hit either next or soon after, wait for it to get that checkmark that means that JVM now knows about that breakpoint, and hit Resume. Then you'll be able to see more.#2021-08-1517:55lspector... and /cdn-cgi/l/email-protection, etc... though I can indeed now drill down far enough to get, for example, to an actual symbol that is in a vector that's in a map that's in a sequence... but it seems like it would be a lot of work to actually see the data structure as one would in a REPL...#2021-08-1517:56lspectorIf I set breakpoints then will I be able to see data structures in a normalish way?#2021-08-1517:56p-himikIndeed - because debugging is fundamentally different on JVM than using an interactive REPL.#2021-08-1517:57p-himikWell, I would think so but I for some reason get this. @cfleming any clue why? It's just paused on a breakpoint, nothing special, and I haven't started any evaluation.#2021-08-1517:59p-himik@U06BV1HCH FWIW, in general it is my impression that Clojure people don't really like working with the debugger and prefer doing each and every experiment via using REPL with generous usages of tap> and some neat tool to view the results, like Reveal. But I understand that it might be unfeasible in some contexts.#2021-08-1518:04lspectorIn my work I often hit situations where something seems to be going wrong and I want to stop it and look around, see if something has gotten weirdly big, or weird in some other way (maybe gigantic numbers). These situations are hard to predict and hard to recreate, because there's lots of randomness. In Common Lisp I'd just break execution and look at the locals up and down the stack, which would look like they do in the REPL. To use tap for this, I might have to add taps of everything everywhere, right? It seems like we're close to getting what I'm aiming for via Cursive's debugger, except for not actually being able to see data structures without digging and reconstructing them bit by bit.#2021-08-1518:06p-himikPerhaps there are some tricks that help with inspecting a running program with a REPL... If you're interested in that, it would be worthwhile asking in the #clojure channel. Along with a question on such run-time debugging in general - there very well might be other tools there that allow that, I'm not familiar with JVM enough to just discard that hope.#2021-08-1518:20lspectorThanks -- I learned a bunch here and may take that question to #clojure#2021-08-1322:25lspectorI miss this capability of Common Lisp so much, and could really use it now... and it occurs to me that maybe Cursive already has it?#2021-08-1518:44p-himikJust got this message:
Invalid Cursive Build
This build is more recent than your update period allows. Your update period ends on May 21, 2021, and 1.10.3 was released on Jul 28, 2021.
The most recent available stable build is 1.10.2 (Install)
Renew your licence on our website.
If you have renewed your licence, activate it.
When I click "Install", IDEA does its thing and asks me to restart it. I do that, only to be greeted with the same message again - and I confirm that the installed version is still 1.10.3. I was able to manually downgrade it to 1.10.2 by installing it from a file, but IDEA immediately starts saying that it's outdated and I don't see any option to pin the older version. Is it something that can be done without disabling plugin updates completely? Is that "Install" button not working or do I have wrong expectations about it or maybe I'm doing something wrong?
#2021-08-1614:50AJ Jaro@U2FRKM4TW Are you asking to use an older version of Cursive because you’re not concerned about new updates/features?#2021-08-1614:51p-himikIndeed. And after all, Cursive itself suggests installing the version that I have access to, but it doesn't seem to work.#2021-08-1910:08cflemingI’ll check that, thanks for the report.#2021-08-1611:17souenzzoHello. I was using cursive with "Use tools.deps directly". After upgrade to 0.12.x, everything seems fine, but when I fire my REPL, I can't find any of my git deps. I downgraded to 0.11.905 and it's working again. This is a know issue?#2021-08-1611:20imreMight be relatwd to https://clojurians.slack.com/archives/C0744GXCJ/p1628700544077600#2021-08-1611:34souenzzo I use REPL with intellij classpath#2021-08-1614:37markaddlemanI found that downgrading to 0.10.889 works.#2021-08-1717:25tony.kayI'm having trouble with git deps (using the CLI tools 1.10.3.933) ever since I upgraded to the that version (using Cursive latest, with IntelliJ latest). I also just tried the latest EAP and doesn't seem to work.#2021-08-1717:31tony.kayDowngrading to CLI 855 (which is before various CHANGELOG events related to git deps in tools deps) fixes it.#2021-08-1717:35tony.kay@U0567Q30W I've opened an issue: https://github.com/cursive-ide/cursive/issues/2581#2021-08-1721:18cfleming@U0CKQ19AQ Thanks, I’m planning to look at that today#2021-08-1802:29cflemingFixed - this is because recent deps versions return :git/sha instead of :sha#2021-08-1803:23cflemingThis is out now in the new EAP.#2021-08-1614:24sbHello, When I use Cursive + CLJ/CLJS project + npm postwatch Tailwind CSS.. auto refresh freeze in the browser and I got this error
Exception in thread "async-dispatch-6" java.net.SocketException: Socket closed
	at java.base/java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:113)
	at java.base/java.net.SocketOutputStream.write(SocketOutputStream.java:150)
	at java.base/java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:81)
	at java.base/java.io.BufferedOutputStream.write(BufferedOutputStream.java:95)
	at nrepl.bencode$eval37479$fn__37480.invoke(bencode.clj:397)
	at clojure.lang.MultiFn.invoke(MultiFn.java:234)
	at nrepl.transport$bencode$fn__37627.invoke(transport.clj:117)
	at nrepl.transport.FnTransport.send(transport.clj:41)
	at shadow.cljs.devtools.server.nrepl04$send.invokeStatic(nrepl04.clj:33)
	at shadow.cljs.devtools.server.nrepl04$send.invoke(nrepl04.clj:20)
	at shadow.cljs.devtools.server.nrepl04$worker_exit.invokeStatic(nrepl04.clj:148)
	at shadow.cljs.devtools.server.nrepl04$worker_exit.invoke(nrepl04.clj:146)
	at shadow.cljs.devtools.server.nrepl04$cljs_select$fn__38805$fn__38807.invoke(nrepl04.clj:165)
	at shadow.cljs.devtools.api$nrepl_select$fn__21203$state_machine__7111__auto____21220$fn__21222.invoke(api.clj:383)
	at shadow.cljs.devtools.api$nrepl_select$fn__21203$state_machine__7111__auto____21220.invoke(api.clj:376)
	at clojure.core.async.impl.ioc_macros$run_state_machine.invokeStatic(ioc_macros.clj:973)
	at clojure.core.async.impl.ioc_macros$run_state_machine.invoke(ioc_macros.clj:972)
	at clojure.core.async.impl.ioc_macros$run_state_machine_wrapped.invokeStatic(ioc_macros.clj:977)
	at clojure.core.async.impl.ioc_macros$run_state_machine_wrapped.invoke(ioc_macros.clj:975)
	at clojure.core.async$ioc_alts_BANG_$fn__7340.invoke(async.clj:383)
	at clojure.core.async$do_alts$fn__7272$fn__7275.invoke(async.clj:252)
	at clojure.core.async.impl.channels.ManyToManyChannel$fn__2061.invoke(channels.clj:265)
	at clojure.lang.AFn.run(AFn.java:22)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
	at java.base/java.lang.Thread.run(Thread.java:834)
Evaluation interrupted. 
#2021-08-1709:19onetomthat sounds like a pretty complicated setup... the way im dealing with such issues is to avoid them, by using simpler tools and simpler approaches. for example, i just switched out the official sentry client to an unofficial one (https://github.com/source-c/sentry-tiny), which is just 169 lines and relies of well-tested, relatively-simple libraries (cheshire, clj-time, httpkit). then, i've even get rid of some of those dependencies and replaced them with more modern ones (clojure.data.json, java.time, hato). took me 2 hours, but after fighting with the official client for 4+ hours, i think it worth the tradeoff...#2021-08-2514:25sbThanks Tom! Sorry for this late response..#2021-08-1614:26sbany idea how to fix? when I stop the execution in the CLJ REPL (with x) and restart the mount flows, everything is normal… not really big issue, but maybe.. somebody saw similar.. (between 30 mins and 2 hours happens)#2021-08-1803:04cflemingDo you have any reason to suspect that this is Cursive-related? If not, it’s probably a better question for #shadow-cljs.#2021-08-2514:24sbCursive IDE freezing, from terminal np. That is what I got as error, maybe setup related true...#2021-08-1803:16cfleminghttps://twitter.com/CursiveIDE/status/1427831439660179465#2021-08-1816:17imreI'm getting frequent java.lang.IllegalArgumentException: Failed requirement. errors with 1.11.0-eap2-2021.2 and #IC-212.5080.17#2021-08-1816:17imreFor example when I prepend a form with #_#2021-08-1816:17imreOr try to paredit raise#2021-08-1816:18imreFull exception:#2021-08-1816:18imre
java.lang.IllegalArgumentException: Failed requirement.
	at com.intellij.grazie.utils.PsiUtilsKt.getNotSoDistantSimilarSiblings(PsiUtils.kt:95)
	at com.intellij.grazie.utils.PsiUtilsKt.getNotSoDistantSimilarSiblings(PsiUtils.kt:87)
	at cursive.grazie.ClojureTextExtractor.buildTextContent(Grazie.kt:26)
	at com.intellij.grazie.text.TextExtractor.doExtract(TextExtractor.java:148)
	at com.intellij.grazie.text.TextExtractor.findTextAt(TextExtractor.java:82)
	at com.intellij.grazie.text.TextExtractor.findUniqueTextAt(TextExtractor.java:136)
	at com.intellij.grazie.ide.inspection.detection.LanguageDetectionInspection$buildVisitor$1.visitElement(LanguageDetectionInspection.kt:49)
	at com.intellij.psi.impl.source.tree.LeafPsiElement.accept(LeafPsiElement.java:208)
	at com.intellij.codeInspection.InspectionEngine.acceptElements(InspectionEngine.java:64)
	at com.intellij.codeInspection.InspectionEngine.createVisitorAndAcceptElements(InspectionEngine.java:55)
	at com.intellij.codeInsight.daemon.impl.LocalInspectionsPass.runToolOnElements(LocalInspectionsPass.java:326)
	at com.intellij.codeInsight.daemon.impl.LocalInspectionsPass.lambda$visitPriorityElementsAndInit$4(LocalInspectionsPass.java:285)
	at com.intellij.util.AstLoadingFilter.forceAllowTreeLoading(AstLoadingFilter.java:159)
	at com.intellij.util.AstLoadingFilter.forceAllowTreeLoading(AstLoadingFilter.java:151)
	at com.intellij.codeInsight.daemon.impl.LocalInspectionsPass.lambda$visitPriorityElementsAndInit$5(LocalInspectionsPass.java:283)
	at com.intellij.util.AstLoadingFilter.disallowTreeLoading(AstLoadingFilter.java:130)
	at com.intellij.util.AstLoadingFilter.disallowTreeLoading(AstLoadingFilter.java:119)
	at com.intellij.codeInsight.daemon.impl.LocalInspectionsPass.lambda$visitPriorityElementsAndInit$6(LocalInspectionsPass.java:283)
	at com.intellij.concurrency.ApplierCompleter.execAndForkSubTasks(ApplierCompleter.java:136)
	at com.intellij.concurrency.ApplierCompleter.execAndForkSubTasks(ApplierCompleter.java:149)
	at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1078)
	at com.intellij.concurrency.ApplierCompleter.lambda$wrapInReadActionAndIndicator$1(ApplierCompleter.java:92)
	at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:705)
	at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:647)
	at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:63)
	at com.intellij.concurrency.ApplierCompleter.wrapInReadActionAndIndicator(ApplierCompleter.java:104)
	at com.intellij.concurrency.ApplierCompleter.lambda$compute$0(ApplierCompleter.java:83)
	at com.intellij.openapi.application.impl.ReadMostlyRWLock.executeByImpatientReader(ReadMostlyRWLock.java:174)
	at com.intellij.openapi.application.impl.ApplicationImpl.executeByImpatientReader(ApplicationImpl.java:183)
	at com.intellij.concurrency.ApplierCompleter.compute(ApplierCompleter.java:83)
	at java.base/java.util.concurrent.CountedCompleter.exec(CountedCompleter.java:746)
	at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:290)
	at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1020)
	at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1656)
	at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1594)
	at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:183)
#2021-08-1822:27cflemingThanks, I’ll look at that.#2021-08-1823:35cfleminghttps://github.com/cursive-ide/cursive/issues/2582#2021-08-1816:20potetmSame^#2021-08-1816:21potetm#IU-212.4746.92#2021-08-1816:22potetm@cfleming#2021-08-1816:25potetmdowngrading appears to fix it#2021-08-1816:32imrewatch out for the git deps bug fixed in eap2 tho#2021-08-1816:38potetmwut boog?#2021-08-1816:39potetmah: https://github.com/cursive-ide/cursive/issues/2581#2021-08-1822:28cflemingSorry, I’ll try to get a fix for that out today. It’s related to the spelling integration, for some reason it didn’t happen in the unit tests.#2021-08-1909:40cflemingThe fix is out in the new EAP BTW.#2021-08-1909:41cflemingIt was a problem caused by #_ comments, which was why the tests didn’t catch it.#2021-08-1914:32potetmlul#2021-08-1816:26potetmper: https://cursive-ide.com/userguide/#downgrading-cursive#2021-08-1905:08cfleminghttps://twitter.com/CursiveIDE/status/1428221089369317376#2021-08-1905:09cfleming(this is the IllegalArgumentException one)#2021-08-1909:49imrecheers Colin, this appears to be working fine now#2021-08-1914:32potetmThanks Colin!#2021-08-1909:18folconSo I'm curious, what's the difference between send form to repl and load file in repl? I've been using cursive with arcadia, which granted is a bit outside the norm and send form to repl seems to work perfectly, but load file in repl seems to not do anything? Is that calling some internal nrepl function? Knowing this would be useful as it might lead to fixing cursive functionality in terms of REPL workflow 😃...#2021-08-1909:24imresend form sends a single form: either the one you have selected or the one before the caret#2021-08-1909:24imreload file loads the entire file#2021-08-1909:24imrei.e. all the forms in the file#2021-08-1909:39cflemingRight, and if your REPL is using nREPL, that will use the load-file op: https://nrepl.org/nrepl/0.8/ops.html#load-file#2021-08-1909:40cflemingPerhaps the Arcadia nREPL impl doesn’t implement that? Would seem weird though.#2021-08-1910:20folconI'll take a peek into the source, give me a sec#2021-08-1910:21folconSure, I just was initially under the impression that load file was just sending multiple repl forms#2021-08-1910:24folconHmm, it just seems to proxy the messages across, so I have no idea why it's failing... https://github.com/eponai/tools.cursive-arcadia-repl/blob/master/src/eponai/tools/cursive_arcadia_repl.clj
#2021-08-1910:24folconIt might be a nrepl version thing...#2021-08-1910:24folconGoing to try and update the nrepl version and see if that helps 😃#2021-08-1910:32folconHmm, it does say Error initialising locals clearing#2021-08-1911:00folconOk, this is just weird, calling (ns-publics 'game) gives the functions in question, but using send form to repl within the namespace does not work at all... It's like send form to repl is still invoking the function in the user namespace even though I'm in the game namespace... Even fully qualifying the name doesn't work#2021-08-1911:04folconOk, I've created a mock function that just prints out the name in the user ns and it now returns that instead. Looking at the nrepl messages, the :ns key is not being set when I call send form to repl. Hmm, let's see if that's not being set at all or if the nrepl bridge is making a mistake 😃#2021-08-1911:15folconOk, passing the :ns key in the transport layer seems to make fully qualified names work, but not just calling the function and sending it's form across#2021-08-1911:25folconSorry if this is out of scope, but so far it sends the: :id :op :ns :code as well as the :file :file-name :file-path when those are available Not sure if some other data is required? No idea why the non-fully qualified name is causing this issue where send form to repl for the function call calls the function inside the current namespace instead of within the ns of the file it's in... This doesn't even work if I change namespaces away from user...#2021-08-1911:25folconbrb grabbing lunch#2021-08-1915:59folconOk, still not figured much about how to fix the non-fully qualified names from just calling user namespace instead of their own namespace...#2021-08-1916:37folconJust so that it's clear: This is the "game" code:
;; game.core.clj
(ns game.core
  (:require [arcadia.core :as arc])
  (:import (UnityEngine GameObject)))

(defn log-name [obj role-key]
  (arc/log (.name obj)))

(def mainObject (atom nil))

(defn create-main []
  (swap! mainObject (fn [n] (new UnityEngine.GameObject "Main"))))

(defn hook-main []
    (arc/hook+
      @mainObject
      :start
      :log-name
      ;; in log-name `obj` will be the `the-object`, `role-key` will be `:log-name`
      #'log-name))

;; user.clj
(defn hook-main []
  (println "THIS IS THE WRONG ONE!"))
This is what happens =)...:
(create-main)
=> System.InvalidOperationException unable to resolve symbol: create-main in this context
  clojure.lang.Compiler.ResolveIn (clojure.lang.Namespace, clojure.lang.Symbol, System.Boolean)
  clojure.lang.Compiler.Resolve (clojure.lang.Symbol)
  clojure.lang.Compiler.AnalyzeSymbol (clojure.lang.Symbol)
  clojure.lang.Compiler.Analyze (clojure.lang.CljCompiler.Ast.ParserContext, object, System.string)
(game.core/create-main)
=> #<Main (UnityEngine.GameObject)>
(hook-main)
THIS IS THE WRONG ONE!
=> nil
(game.core/hook-main)
=> #'game.core/log-name
(in-ns 'game.core)
=> #object[Namespace 0xa0757000 "game.core"]
(hook-main)
THIS IS THE WRONG ONE!
=> nil
Calling the unqualified function just calls the hook-main within the user namespace, even though the nrepl call is going to the correct namespace... Even switching namespaces doesn't appear to help I've made one minor edit to tools.cursive-arcadia-repl, which I've forked here:
#2021-08-1918:00folconNot sure if this is a cursive problem or an nrepl one?#2021-08-2000:29folconIt's an nrepl server implementation problem it turns out, got a PR here: https://github.com/arcadia-unity/Arcadia/pull/386 I'm trying to figure out what else needs to be done to get cursive compatibility in a good place 😃... Advice appreciated!#2021-08-2000:29cflemingThat’s good timing, I was just at this very minute reading through your thread 🙂#2021-08-2000:29folconOk good#2021-08-2000:30cflemingThings like the locals clearing might not work though, I don’t know if ClojureCLR (or MAGIC? not sure what Arcadia is using these days) supports that.#2021-08-2000:30folconIt's pretty late where I am, but I'd really like this to work better, I get the impression that a fair few people who want to use arcadia also are wanting to use cursive, it seems to work fairly well barring a few issues 😃...#2021-08-2000:31folconThey're working on MAGIC from what I understand, with clojureCLR being what's used#2021-08-2000:33folconWhat would be helpful is having a clear idea exactly what the behaviour should be, I'm not sure how the nrepl implementation they've got working was written (did they just rewrite an old version of nrepl?), but it's only somewhat adherent to nrepl's protocol, so working with cursive exposes some holes. I've put in the PR that I linked things I'm a little unsure of with regards to how it should work as I don't know the exact order stuff should evaluate in 😃...#2021-08-2000:35folconI suspect there's subtle gotchas in this space, if there's any obvious issues I'd be grateful if you can point them out so the PR can be worked on / improved 😃...#2021-08-1912:54ikitommiis it safe to update to IDEA 2021.1.3?#2021-08-1913:00imreI used that for a while before upgrading to 2021.2 and had no issues with it. However, when trying to upgrade to .2, I ran into some conflicts and had to reinstall idea. Details are at https://youtrack.jetbrains.com/issue/IDEA-274515 The tl;dr; is something like 2021.1.3 having been rebuilt and republished to fix an issue I would consider 2021.1.3 safe now#2021-08-1913:11ikitommithanks#2021-08-1912:55ikitommiany idea what this mean (shadow-cljs project):#2021-08-1914:56Jeff Evanslooks very similar to: https://clojurians.slack.com/archives/C0744GXCJ/p1628499337053900#2021-08-1921:07cflemingDo you know where those files are coming from? Are they in your project or in libraries?#2021-08-1921:08cflemingYou could try this (from that thread) to get more info: https://clojurians.slack.com/archives/C0744GXCJ/p1628849897090400?thread_ts=1628499337.053900&amp;cid=C0744GXCJ#2021-08-1918:00folconNot sure if this is a cursive problem or an nrepl one?#2021-08-1919:28RyanHey all, is it sort of normal at present for a great many symbols to not resolve in cljs land?#2021-08-1920:08thhellernpm-related things yes, otherwise not so much. depends on the kinds of macros you use I guess.#2021-08-1920:21Ryanhm I might have a bigger problem then because it cant resolve defn or let#2021-08-1920:21RyanI mean, the code is running, my code is just littered with yellow squiggly underlines 🙂#2021-08-1920:36thhellerhow did you load the project? usually this happens when the project wasn't created properly#2021-08-1920:37RyanSo I used the re-frame template project for leiningen, and I guess that process does not actually create a leiningen project file nor a deps.edn file for the project, or maybe I deleted it in haste?#2021-08-1920:38Ryaneither way, I've created a deps.edn file, deleted and re-added the module (it was a web module so.. all sorts of things were wrong!)#2021-08-1920:42thhellerI think that just creates a shadow-cljs.edn? then you can follow https://shadow-cljs.github.io/docs/UsersGuide.html#_cursive#2021-08-1920:44RyanYeah, it was very odd to me that a leiningen generator did not create a project manifest for itself, but I'm still trying to understand all the tooling.#2021-08-1920:44thhellercreating a deps.edn is fine too, just don't have to if you don't intend to use it#2021-08-1920:44Ryanthe pom way seems better 🙂#2021-08-1920:50RyanDoes that periodically need to be re-ran? like if I were to.. say.. change the nrepl port? not that I'd ever need to#2021-08-1920:50thhelleronly if you change :dependencies or :source-paths#2021-08-1920:51thhellerdon't hardcode a nrepl port. not needed, cursive has an option to use the created nrepl port file#2021-08-1920:53Ryansure, I just grabbed the first keyword out of the map 🙂 I guess that leiningen template did that, I haven't touched this file yet!#2021-08-1920:56RyanThanks for all the help, this is such a nicer setup than the last project I worked on (angular 6–11, webpack etc etc)#2021-08-2008:11heliosI see this as nor being resolved in cursive (java interop). What do you recommend to do?#2021-08-2010:38cflemingUgh, sorry, I’ve never added support for the .. form. I’ll try to add that, but if you convert it to (-> (InetAddress/getLocalHost) (.getHostName)) that should work.#2021-08-2014:29jthibaudeauHi, I am using cursive in a cljs project with reagent and had a question. I am using the with-let macro from reagent, and cursive (possibly just intellij) is complaining about the symbols in the binding cannot be resolved. Is there a way I can get cursive to recognize them within the context of with-let?#2021-08-2014:47jthibaudeauThe answer of course is in the docs... I chose resolve as let since it has similar semantics as let. Docs are here for anyone else who comes across this question. https://cursive-ide.com/userguide/macros.html#2021-08-2217:57popeyeTeam, I have cloned clojure project which has deps file also it has muultiple modules, But whenever I open the file , no keyword of clojure is identified in intellj, I saw many post and found this https://github.com/cursive-ide/cursive/issues/2222 is this issue still exist in cursive ?#2021-08-2221:50cflemingHi there, take a look at this and let me know if it helps: https://cursive-ide.com/userguide/troubleshooting.html#help-lots-of-symbols-don-t-resolve#2021-08-2612:22heliosJust one thing that helped me yesterday with a colleague: make sure that you are using all the proper aliases in the "Clojure Deps" pane/toolbox (sorry i don't know the proper term)#2021-08-2612:22heliosyesterday a colleague had this and after checking all the aliases and refreshing deps it worked fine 🙂#2021-08-2217:58popeyei have cleared cache and restarted, also I am using latest version of intellj , But did not helped#2021-08-2217:58popeyecan anyone help me please#2021-08-2308:57danmHow am I supposed to use Tools -> REPL -> Send (function under caret) to REPL? If I try it when in the user ns, I get the error :namespace-not-found, even when the function is itself only using functions that are from clojure.core. If I first use Tools -> REPL -> Switch REPL NS to current file then the error is instead Unable to resolve symbol: defn in this context, which seems to be because by switching the REPL NS it's lost all of the references to clojure.core functions/macros. I'm sure this is something I'm doing wrong, rather than something broken with Cursive, but I don't know what that is#2021-08-2308:58cfleminghttps://cursive-ide.com/userguide/troubleshooting.html#unresolved-symbols-from-clojure-core-when-sending-forms-to-repl#2021-08-2308:58cflemingtl;dr: you need to make sure the namespace is loaded into the REPL.#2021-08-2308:58danmfacepalm Thanks! 😄#2021-08-2309:00cflemingNo worries - the usual confusion is that forms sent from the editor are (by default) executed in the namespace of the file they’re sent from, not the current REPL ns.#2021-08-2312:16Jakub Holý (HolyJak)How to troubleshoot when Parinfer seems not to work? I press tab an expect the sexp to get idented (works) and the close paren of the sexp on the previous line to be moved after it (i.e. slurp) but this does not work. I only get a red underlining with "incorrect indentation for parinfer" 🙏 (FYI Slurping via paredit works but takes a few seconds, on this 40 line let ) Update: When I start writing eg. a defn then parinfer warns about incorrect indentation. So I guess my question actually is: How do I find where the indent. is wrong, and how best to fix it?#2021-08-2314:54Jeff EvansI struggle with this too. Best advice I can offer is to look for the first red squiggly and start fixing from there downward#2021-08-2321:20cflemingWhen there’s incorrect indentation, you’ll see the indentation marked in red in the margin, like this:#2021-08-2321:21cflemingYou can jump to those with Navigate | Next Highlighted Error#2021-08-2321:22cflemingGenerally reformatting the code with the indentation problems will fix the issue.#2021-08-2321:36Jakub Holý (HolyJak)Thanks a lot for the advice! Will try.#2021-08-2318:49indyBabashka support is quite nice:v:#2021-08-2321:23cflemingThanks for letting me know! That’s the first feedback I’ve received, glad to know it’s working. Let me know if there are any issues.#2021-08-2319:40Colin P. Hilloh there’s babashka support? well that’ll accelerate my plans to learn babashka. 👀#2021-08-2321:24cflemingThat’s in the latest EAP: https://groups.google.com/g/cursive/c/LTrXa9_34C0/m/MxCVRuErBgAJ#2021-08-2411:58imreGot an exception when trying to report an error through the popup. Details in thread#2021-08-2411:58imre
Error submitting report: 422 Unprocessable Entity : ErrorResponse(message=Validation Failed, errors=[ErrorItem(resource=Issue, field=labels, code=custom)])

cursive.exception.GithubException: 422 Unprocessable Entity : ErrorResponse(message=Validation Failed, errors=[ErrorItem(resource=Issue, field=labels, code=custom)])
	at cursive.exception.ClojureErrorReportSubmitterKt.update(ClojureErrorReportSubmitter.kt:190)
	at cursive.exception.ClojureErrorReportSubmitterKt.access$update(ClojureErrorReportSubmitter.kt:1)
	at cursive.exception.ClojureErrorReportSubmitter$submit$1.run(ClojureErrorReportSubmitter.kt:339)
	at com.intellij.openapi.progress.impl.CoreProgressManager.startTask(CoreProgressManager.java:450)
	at com.intellij.openapi.progress.impl.ProgressManagerImpl.startTask(ProgressManagerImpl.java:117)
	at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcessWithProgressAsync$5(CoreProgressManager.java:510)
	at com.intellij.openapi.progress.impl.ProgressRunner.lambda$submit$3(ProgressRunner.java:243)
	at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$2(CoreProgressManager.java:183)
	at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:705)
	at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:647)
	at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:63)
	at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:170)
	at com.intellij.openapi.progress.impl.ProgressRunner.lambda$submit$4(ProgressRunner.java:243)
	at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1700)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
	at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:668)
	at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:665)
	at java.base/java.security.AccessController.doPrivileged(Native Method)
	at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1.run(Executors.java:665)
	at java.base/java.lang.Thread.run(Thread.java:829)
#2021-08-2411:59imreOriginal error I was trying to report happened at stub generation#2021-08-2421:01cflemingThat’s strange, have you been able to report other errors?#2021-08-2505:50imreHaven't had anything to report since then, but I had been able to report stuff last week.#2021-08-2420:17hlshipQ: As described [here](https://dev.to/hlship/improving-defrecord-with-a-macro-3f9n-temp-slug-278833?preview=ef36b7f6eeda854053ccd5fbe885710a107ccc8571a3da1f01b6ba41f8b208de8bad6176828f008ff8300057124a78f48b26165e52b5a8788e03d357), I have a macro, defkvrecord that is like defrecord but also introduces an additional macro, kv->Record. Is there a way to "teach" Cursive about the relationship between defkvrecord and kv->Record (like the relationship between defrecord and ->Record and map->Record)? Closest I've gotten is to "resolve as ... defrecord" but that leaves kv->Record flagged as unknown.#2021-08-2506:52jsyrjalaHow to limit output to Cursive repl? E.g I evaluate some thing that gets printed as several millions rows, taking a long time. Instead I'd like cursive to truncate the output to some reasonable amount.#2021-08-2511:02AJ JaroCan you assign the output to a def and then use first or whatever key access you need from there?#2021-08-2511:57flowthingDepending on the type of thing you're printing, you can also try (set! *print-length* 1024).#2021-08-2604:38jsyrjala(set! *print-length* 1024) seems to work#2021-08-2605:12flowthing(Of course, you can tweak the precise value to your liking.)#2021-08-2511:08AJ JaroI've started using clj-kondo for linting in IntelliJ with cursive. One drawback, however, is that clj-kondo is probably never going to allow code navigation which is a huge tool that cursive has in it's kit. Would there ever be a day that cursive offers custom linting options for macros? I understand currently you can use resolve as but that's just not addressing all my macro concerns. A custom linting option would help bridge the gap for me in this use case. Or an alternative here is to define which macros you'd like to expand for processing#2021-08-2511:08borkdude@ajarosinski FWIW, clojure-lsp builds on clj-kondo for navigation and uses the LSP protocol to implement navigation for clients that support it (emacs, vscode, etc). Not that this helps you with Cursive, unless you use some LSP plugin.#2021-08-2511:09borkdudeIf Colin is open to integrate clj-kondo into Cursive for those who want to use it, to allow custom linting for macros and possibly offer more linting that it provides, I'd be happy to help with that.#2021-08-2514:26mike_ananevIs there any hotkey in Cursive+Idea to transform text in the editor like this: DOCKER_IMAGE_RELEASE_REPOSITORY -> docker-image-release-repository ? When I write scripts in babashka I need to deal with many env vars#2021-08-2514:28imreafaik the 'string manipulation' plugin has stuff like these#2021-08-2514:29mike_ananev@U08BJGV6E what is the name of plugin?#2021-08-2514:29imrestring manipulation#2021-08-2514:29mike_ananevoh, I see. thank you!#2021-08-2514:29imrehttps://plugins.jetbrains.com/plugin/2162-string-manipulation#2021-08-2515:34popeyeI have a list like below `
(def j `({:a "a" :b "b"})  )
How can I add the another key value in this so my output would be ({:a "a" :b "b" :c "c"})
#2021-08-2515:38popeye
(cons {:c "c"} j)
is returning ({:c c} {:b b, :a a})
#2021-08-2515:38dpsuttonwas this meant for the #cursive channel?#2021-08-2515:39popeyesorry , wrong group#2021-08-2612:27imre@cfleming bb support is really nice indeed! I just launched my first bb repl from cursive.#2021-08-3009:49heliosyeah it's working great for us as well, at the very least for symbol resolution for my file marked as BB#2021-08-2614:07dmarjenburghCursive often throws the following error. Any idea what to do about it?
java.lang.Throwable: Non-idempotent computation: it returns different results when invoked multiple times or on different threads:
  REPL method getBytes (class cursive.psi.repl.ReplMethod) != REPL method getBytes (class cursive.psi.repl.ReplMethod)
  which is element of 
#2021-08-2621:02salami'm new to shadow-cljs, is this a known issue with Cursive?#2021-08-2621:03cflemingYes, sadly, I’m planning to fix this soon. JS interop in general is tricky and not currently implemented well.#2021-08-2621:06salamah, i see. (sorry, i had to delete the screenshot because i forgot to redact something in it.)#2021-08-2621:06cflemingNo worries. I have plans to initially just make the JS interop not complain as much as it does currently, and then to try to actually fix it, probably using TypeScript type definitions.#2021-08-2621:07salami like that plan!#2021-08-2621:18salam@cfleming while you're here, i noticed the following two issues with the REPL tool window: • hiding the toolbar hides the individual tools (the buttons) but doesn't hide the toolbar (the space) itself • the shortcuts for resizing tool windows (https://www.jetbrains.com/help/idea/manipulating-the-tool-windows.html#resize) don't have any effect on it#2021-08-2621:19cflemingInteresting, I’ll check that, thanks. That code is extremely old now, it’s possible it could use a little love.#2021-08-2621:20salamthis is what it looks like when "Show Toolbar" menu item is unchecked:#2021-08-2621:22cflemingHmm, strange. I’ll take a look.#2021-08-2702:45indyI have the resizing toolbar window issue too. Thought it was something up with my setup (though I’ve checked and there’s nothing strange in my keymaps and settings) and didn’t want to bother Colin about it. Colin let me know if you’ll find it handy if I create a GitHub ticket for the resizing of the toolbar window issue. #2021-08-2708:28imreCan confirm, the Stretch active tool window to commands are greyed out for the repl#2021-08-2707:50ikitommiis there a way to set cond-> indentation (to align with clj-format defaults)?#2021-08-2918:21ikitommiit was checked, no effect.#2021-08-2918:21ikitommiupdated to 2021.2.1, there is now no clojure in the intentions at all :thinking_face:#2021-08-2918:22ikitommiworks for normal forms, not for macros like cond->#2021-08-2918:30ikitommimy bad, there is still clojure, an it’s ok:#2021-08-2918:30ikitommi#2021-08-2918:36ikitommithe new IDEA version shows the intentions setting under create scratch file, weird#2021-08-2921:35cflemingThat is weird. Someone just posted to the ML saying that some inspections are not working under 2021.2.1, I’ll investigate all that today.#2021-08-3007:02ikitommi🙇#2021-09-0608:52cflemingI finally got around to looking at this, and it’s working fine for me. I’m not sure why that wouldn’t work for you.#2021-09-0608:52cflemingDoes this work for other macros, e.g. defn?#2021-09-0608:52cflemingIf so, does it work for threading macros like ->?#2021-09-0612:37ikitommithat works in other projects, just configured those via another project and it applies to this one too (where it is not available). There are no errors, just isn't there :man-shrugging:#2021-09-0612:38ikitommiI can try to pinpoint what's different in that project, but case resolved now for me. Weird.#2021-09-0612:39ikitommiIf I hadn't taken a screenshot, I would suspect my own eyes. Just checked, still not there in the one (deps cljc) project.#2021-09-0622:03cflemingIn that one project, does it work for the other macros (`defn`, ->)?#2021-08-2718:16Colin P. HillAre :git/url sources in deps.edn supported? Cursive seems to be skipping over those when it resolves my dependencies#2021-08-2917:19kennytiltonFigwheel doc says "Support for deps.edn and the CLI is currently only available in the Early Access versions of Cursive and it is not yet able to run figwheel-main directly, so for now we will focus on Leiningen." Is this still pending? I am using figwheel:main on a React Native effort. My plugin info shows:
Built on: 2021-08-19 16:56
Built from: 1.11.0-eap3
I tried various configurations without luck. I'll try using Leiningen for now.
#2021-08-2921:38cflemingThat doc is definitely way out of date. However this is a bit outside my realm of experience sorry, my limited experience with CLJS has pretty much always used Shadow. BTW if you do want a REPL with Shadow it’s easy to achieve since it uses nREPL, so you can usually start Shadow on the command line and connect to it with a remote REPL config.#2021-08-2921:39cflemingHow would you normally start the simulator on the command line?#2021-08-2921:41cflemingJust to clarify my comment above - Cursive supports deps.edn and the Clojure CLI, and has for ages now.#2021-08-2923:11raspasovI use RN + figwheel-main + deps.edn + Cursive. No issues, in general.#2021-08-2923:13raspasovSample REPL config#2021-08-3007:00kennytilton@U0567Q30W Shadow rocks, but using it with Helix proved difficult once I got to React Native. So I fired up figwheel:main and am exploring that. So far so good, but I have just scratched the surface. yarn ios or npm run ios bring up iPhones, emulator -avd Pixel_5_ARM64-v8a brings up an android on my M1.#2021-08-3007:39kennytilton@U050KSS8M, ah, those parameters look like what I need. Thx for the screenshot! 🙏#2021-08-3013:07kennytiltonOh, wow, It Just Works(tm). Seems quite fast compared to my shadow experience. [n.m! -- Just to confirm, you start the local repl, then npm run ios or npx react-native ios. I tried the reverse order and it ended up "waiting for fig" or sth. ] Thx a ton! @U050KSS8M#2021-08-3013:10kennytiltonOh, OK, that ^^^ is the documented sequence without using Cursive. n.m!#2021-08-2919:17kennytiltonSo I followed the directions here and managed to bring up a local repo on my figwheel:main+Expo+RN project by following the instructions here https://figwheel.org/docs/cursive.html, but do not see how I would launch a simulator. Interestingly, if I launch the sim with the cursive local config running, when I kill it the sim notes the closing of a socket, messing with the source in IntelliJ is not "seen" by the sim. I usually do not use a REPL with CLJS projects -- I just let Shadow or Figwheel do their things after I change the source -- no no great loss, but did I miss some way to combine IntelliJ with Figwheel:main+RN?#2021-08-3102:00Oliver GeorgeIs it just me or have we lost the ability to reformat code across a project? Code cleanup runs but it doesn't do any indentation/whitespaces changes. Reports "Code inspection did not find anything to report. 593 files processed..."#2021-08-3102:28Oliver GeorgeAh, I think the LSP plugin was at fault. Worked after I disabled it.#2021-08-3107:19heliosSometimes IntelliJ fails to recognize a function as never used. Is there a way that i can see all unused functions and force it to recalculate it?#2021-08-3110:06cflemingFor some reason the global unused symbol inspection doesn’t work with Clojure code. I need to investigate why that is, but haven’t yet.#2021-08-3107:40heliosI have another question for the Cursive hive mind: at work we're often aliasing namespace (without requiring) to use the aliases for namespaces keywords. We have this macro
(defmacro ns-alias
  "Set up a custom alias for use with namespace keywords.
  (ns-alias com.example.application.system sys)"
  [ns as]
  `(do
     (create-ns '~ns)
     (alias '~as '~ns)))
So that enables us in destructuring to do things like {::sys/keys [config]}, etc. But intelliJ isn't happy about the usage of ns-alias as the new alias sys can't be resolved. Any hint?
#2021-08-3109:09cflemingIf you reverse the arguments in your macro, then you could just resolve it as alias, and that should work.#2021-08-3108:00SchpaaCan I have a babashka repl in cursive “natively”, or do I still need to use the tubular workaround?#2021-08-3108:15cflemingThis is as far as the doc has got so far: https://groups.google.com/g/cursive/c/LTrXa9_34C0#2021-08-3108:01borkdude@schpaencoder There is an EAP which has built-in babashka features now#2021-08-3108:01SchpaaCool!#2021-08-3108:03SchpaaI’m gonna try this as soon as the intellij-beachball settles#2021-08-3108:19SchpaaRegarding this facet-thing, is there a writeup about what I need to do to add a Babashka facet for my module?#2021-08-3108:23SchpaaAh, found something at https://groups.google.com/g/cursive/c/LTrXa9_34C0/m/MxCVRuErBgAJ#2021-08-3108:24SchpaaThis is sweet!!!#2021-08-3110:05cflemingGreat, glad it’s working well!#2021-08-3119:15salamin Conjure (a Clojure plug-in for Neovim), you can mark a frequently-used form and evaluate it later using a keyboard shortcut:
<localleader>em[mark]    Evaluate the form under the cursor at the given
                         |mark|. Set a regular Neovim mark on a form using
                         `mF` for example in any file, then jump to another
                         file. You can evaluate that form at any time with
                         `<localleader>emF`.
how would one go about achieving a similar goal with Cursive? are bookmarks in IntelliJ IDEA line-level (i.e., they don't store column numbers)?
#2021-08-3119:20salamah, i guess i just found the answer to my question: https://youtrack.jetbrains.com/issue/IDEA-98780#2021-08-3121:05cflemingThere’s nothing quite like that. There are REPL commands: https://cursive-ide.com/userguide/repl.html#repl-commands#2021-08-3122:20kennytiltonI have been known to create clojure.test entries to achieve this, along with setting up some keychord to dispatch "run last test". Then I just have to "run test under ????" to make it the last test and I am able to rerun form anywhere.#2021-08-3123:28cflemingWould an easier way of creating REPL commands (something like “Create REPL command from form under caret”) make that easier?#2021-08-3123:52cfleming@U0PUGPSFR If you’re going to those lengths, why not just create a REPL command? Is it because the test is easier to update or something?#2021-08-3123:56kennytiltonWhat?! A REPL command?! makes not to explore such a beast But yeah, with my set up I point the autorun last test at a different test at will with a second key chord dedicated to "run test under cursor". Or edit a test if I want to do that. Mind you, this is quite rare. Normally I am content to have a comment block with all sorts of code snippets a "send to repl" away. But when the OP asked about navigating about and still being able to fire off the code, I thought of my test hack.#2021-09-0100:04salamit would but i was thinking of a more flexible and “lighter-weight” approach that works with the existing (almost powerful) bookmarks feature of IntelliJ IDEA (https://www.jetbrains.com/help/idea/navigating-through-the-source-code.html#use_bookmarks). i should be able to evaluate a bookmarked form by invoking an action (via a keyboard shortcut, of course) such as "Send form at bookmark <a bookmark mnemonic (i.e., a digit or letter)>". (see the image below) but, again, without the column numbers available in bookmarks, this would be impossible to implement (i think).#2021-09-0100:06cflemingRight, I could implement something like that by just essentially copying the bookmarks and adding support for columns. I’d probably need convincing that it was much of an improvement over REPL commands, though.#2021-09-0100:18salami could use REPL commands to achieve the same goal but it just doesn't feel as "lighter-weight" as the feature i proposed: i need to create REPL commands (most of them have a very short TTL) using the editor first and then i need to find keyboard shortcuts to them (for quick access.) this is a challenging task as you're already aware how difficult it is to find an ergonomic, easy-to-remember keyboard shortcut in IntelliJ IDEA these days... with the "Evaluate Form at Bookmark..." approach, i just have to remember one keyboard shortcut that works with the existing bookmarks actions.#2021-09-0100:45cflemingFair enough, that all sounds reasonable. I’ll investigate what would be involved.#2021-09-0100:47salamlet me know if you need me to create a GitHub issue for it.#2021-09-0100:48cflemingThat’s probably a good idea, in case I get distracted in the meantime.#2021-09-0105:59imreThere's the also the current command which re-rends the last form (or repl command) to the repl#2021-09-0106:00imrePerhaps a similar one could be added which sends the last marked form. Of course one would need a mark form command with it#2021-09-0117:41Sam AdamsHey all! I want to interact with IntelliJ APIs from my Cursive REPL, e.g. call (com.intellij.openapi.vfs.VirtualFileManager/getInstance) — [link to method](https://upsource.jetbrains.com/idea-ce/file/idea-ce-178c8565735689ec2663b7ed21a7e817a1e368cf/platform/core-api/src/com/intellij/openapi/vfs/VirtualFileManager.java). (Underlying goal is to programmatically manipulate source file contents at the cursive REPL, and then force a https://upsource.jetbrains.com/idea-ce/file/idea-ce-178c8565735689ec2663b7ed21a7e817a1e368cf/platform/core-api/src/com/intellij/openapi/vfs/VirtualFile.java?nav=26143:26150:focused&amp;line=785&amp;preview=false via the REPL; or, possibly, directly manipulate IntelliJ’s VirtualFile buffer rather than go straight to disk.) The problem, I think, is that my REPL is a different JVM instance than that running IntelliJ itself — so of course the IntelliJ SDK classes aren’t on the classpath, and instances of them are not accessible in this separate process. I think a solution would be to embed a clojure REPL inside the IntelliJ JVM process itself, e.g. using a tool like https://github.com/djpowell/liverepl, but I haven’t attempted to do so yet — does this sound generally possible? Or, does anyone have any tips / know of another way I can interact with the IntelliJ machine at the REPL?#2021-09-0121:17cflemingYou can actually do this with Cursive, although it’s hidden. Go to Help-&gt;Edit custom properties…, and add idea.is.internal=true in the editor that opens. Then restart your IDE and you’ll have a new item in your Tools menu, Start IDE REPL. That’s a REPL on your open IDE instance.#2021-09-0121:44Sam AdamsJust what I was after — thanks Colin! I’m curious, is this on track to be an official, documented Cursive feature? And, is the IDE REPL an nREPL/socket-exposed REPL which I could somehow configure as a standard deps-aware Cursive remote REPL?#2021-09-0123:17cflemingI’m not sure about making this a documented feature or not. At the moment it’s hidden, but not very hidden. The IDE REPL isn’t a network REPL, no, it just evaluates its forms directly. However there under Help-&gt;Edit Custom VM Options you can add -Dide.repl.server.port=40000 and you’ll get a socket REPL listening on that port.#2021-09-0201:29Sam AdamsNeat, thanks! An enlightening encounter with the streaming-/RPC-REPL divide, for me. Might it be possible/desirable to implement the IDE REPL as an nREPL or pREPL, to enable easier programmatic interaction with IntelliJ via Clojure? If so, would a GitHub issue for the same be welcome?#2021-09-0202:43cflemingNo, thanks - it used to use nREPL, but then I switched it to a socket REPL. If you connect to it from the Cursive Remote REPL, that will construct a prepl-like protocol over that connection so it will work in an RPC fashion. If you’re connecting from something else you’ll have to do that bit yourself. It should be fairly easy to set up a prepl over that connection from the client, I think.#2021-09-0202:46cflemingThe justification for that is that it’s easier to start a socket REPL from a bare socket, so I can use IntelliJ’s machinery to listen for a socket connection without having to load Clojure itself. Otherwise loading nREPL will necessarily load Clojure at IDE startup (which currently happens anyway, but I’m working to fix that over time).#2021-09-0219:32Sam AdamsGotcha, I see. Thanks for all the info, I really appreciate it.#2021-09-0221:11Sam AdamsDoes the Cursive remote REPL use Unrepl to establish that pREPL protocol? Or a similar solution you’ve implemented?#2021-09-0221:30cflemingIt’s a home-grown thing based on prepl. It’s structured in both directions like nREPL, which allows a few things, principally executing a form in a namespace other than *ns*. This is used when you send a form from a file to the REPL.#2021-09-0204:14jajuHi all I have a gradle project (mainly java code), in which I have some Clojure libraries as dependencies. There is no clojure build-tooling - I only have an nrepl instance through which I live-code. The problem is that cursive doesn’t seem to locate the clojure-libraries source-code, so I am unable to use normal IDE functions (like source-code navigation, refactoring etc.) The clojure library dependencies appear fine in the gradle dependencies window, and even clojure code evaluation in the nrepl works. Is there a way to hint to the Cursive editor how to integrate with the libraries already on the classpath?#2021-09-0208:28cflemingThat should just happen if the libraries are attached to your project correctly. Just to be clear, things are working for your own source in the project, correct?#2021-09-0209:03jajuThanks for the response and the nudge @U0567Q30W - since you say it should work, I tried a change to my dependencies to see if it affects - instead of developmentOnly I changed the clojure libraries dependencies to implementation and the problem went away. I wouldn’t have imagined that by myself as being a reason, but now that it does seem to affect, I am exploring more on how to go further. (For background: this is a springboot app and I am experimenting with introducing clojure here but keep it dev-only initially)#2021-09-0209:20cflemingHmm, my gradle-fu isn’t strong enough to know what might be happening there, sorry.#2021-09-0209:48jajuNot a problem! Your input helped - I don’t mind using implementation in the mean while!#2021-09-0208:12simongrayI was curious why my deps.edn GIT repos suddenly didn’t work and experimented with reloading the project. I wanted to preserve my REPL configurations so I saved them as a file in .run. Then when I found out that I needed to upgrade to the EAP to get that functionality back, I looked for an option to re-import those REPL configurations, couldn’t find one, and then I went with some general “import settings” option in intellij. Now my whole editor has been reset. Despite syncing my intellij settings to a git repo automatically, overwriting local settings from the repo state seems to do nothing. Fucking sucks. Guess I’ll be setting up intellij and cursive from scratch this morning.#2021-09-0208:13cflemingSorry about that - how did you export the .run file?#2021-09-0208:13simongrayThere is a checkbox in the run configurations (upper right corner) for each run configuration. Clicking that saves an XML file to /.run#2021-09-0208:14cflemingDo you mean the “Store as project file” one?#2021-09-0208:15cflemingThat will normally store them under <project>/.idea/runConfigurations#2021-09-0208:15cflemingUnless you have that customised? I didn’t know that was a thing, I think that must be relatively recent.#2021-09-0208:15simongray#2021-09-0208:16simongrayFrom a (now fresh) install of Intellij#2021-09-0208:16cflemingYep, I see. And you still have those run config files?#2021-09-0208:16simongrayyeah, do you want me to send them to you?#2021-09-0208:16cflemingOr are the run configs now not the problem, and it’s more that all your config is lost?#2021-09-0208:17cflemingNo, I’m just trying to figure out how to get those back.#2021-09-0208:17simongrayThat all of my configuration, all of the plugins installed, everything apparently reset#2021-09-0208:17cflemingThat is very strange.#2021-09-0208:18simongrayYup… it was very unexpected#2021-09-0208:18cflemingImport Settings would normally accept a jar file created at some point from an export. It should (in theory) only overwrite the config that’s actually present in the jar.#2021-09-0208:18simongrayApparently there is some undefined behaviour :S#2021-09-0208:18cflemingUgh#2021-09-0208:19cflemingThat said, there’s plenty about IntelliJ I still don’t understand, but that definitely does not sound like expected behaviour.#2021-09-0208:20simongrayAnyway, thanks for getting back to me. I’m using Cursive free of charge at the moment, so I shouldn’t be complaining.#2021-09-0208:21cflemingSo normally, when you tick that option, the files are stored within .idea, and the IDE should pick them up. However, I don’t know how that works when that location has been customised. In the new copy of your project, if you customise that location then close the project and reopen it, does it find them?#2021-09-0208:21cflemingFree users deserve support too 🙂#2021-09-0208:21simongrayI did convert a bunch of people at my old workplace from poor emacs setups to Cursive which resulted in additional licence purchases :P#2021-09-0208:22cflemingWe need some sort of preacher or messiah emoji.#2021-09-0208:22cfleming:messiah:#2021-09-0208:22cflemingNope.#2021-09-0208:22simongrayAdd one!#2021-09-0208:24simongray> So normally, when you tick that option, the files are stored within `.idea`, and the IDE should pick them up. However, I don’t know how that works when that location has been customised. In the new copy of your project, if you customise that location then close the project and reopen it, does it find them? Right now the issue is that all of my intellj settings were nuked, keybindings, plugins, everything, so I really can’t check this stuff at the moment#2021-09-0208:24simongraynot just the project specific settings. I makes little sense to me why this would happen.#2021-09-0208:25simongrayNo recent projects either… everything is gone#2021-09-0208:25cflemingThat is really weird, I’ve never heard of anything like that. Unfortunately, I think you’re right that reinstalling is your only option. Once your IDE is moderately sane and you have your project back, with a bit of luck IntelliJ will pick the run configs back up.#2021-09-0208:25simongrayyeah#2021-09-0208:39simongrayOk, reinstalled Cursive EAP, managed to restore my keybindings (I think), so the damage was controllable#2021-09-0208:39simongraybut I’ll manually restore the REPL run configurations this time, not risking anything#2021-09-0208:55cflemingNice, I’m glad to hear it!#2021-09-0217:49thumbnailI encountered this while refactoring some code; the second cursor is typing in reverse 🤯#2021-09-0217:49thumbnailCurrently on 1.10.2-2021.1 btw#2021-09-0219:57Jeff EvansJust noticed that my license expired, and it got me thinking back to when I first purchased the Cursive license a year ago. I was going through a rough time, professionally and personally. Probably strange to say, but using Cursive felt like the one thing that was just “working” at the time, even though I ran into occasional (literal) bugs and glitches. I was already extremely comfortable with IntelliJ, so it allowed me to learn Clojure with a minimal amount of extra cognitive overhead. Now, I have a terrific full time job writing Clojure (in Cursive, obviously). It’s a fantastic tool, and the fact that the developer is here in Slack answering questions is an almost ridiculous bonus. Keep up the great work (and take my money for the renewal).#2021-09-0221:58cflemingThanks for the kind words, Jeff! I enjoy developing tooling because I like helping make people’s work more pleasant, it’s always great to hear that that’s the case.#2021-09-0222:27JAtkinsI’m having trouble with project resolution at the moment. Something about 401 unauthorized error. I can’t replicate this in the cli, so I was wondering if and where log files would be stored for that?#2021-09-0222:35JAtkinsAh, found the problem. Would be useful to have logging to help trace stuff like this down still though. #2021-09-0222:42cflemingWhat was the problem, out of curiosity?#2021-09-0222:44JAtkinsI’m setting up a new laptop and downloaded dev-local deps. Turns out I downloaded a newer version, so the version my repo wanted wasn’t in my mvn folder. Not exactly sure how that causes a 401, but :man-shrugging: .#2021-09-0222:45cflemingWhat’s weird is that it worked on the CLI - is that correct?#2021-09-0222:47JAtkinsIt’s slightly more complicated. I made an :override-deps alias in my global deps, and was using it on the cli without selecting it in the cursive aliases. Should’ve caught it. #2021-09-0222:47cflemingAh, ok, that makes sense. What sort of logging would have helped, do you think?#2021-09-0222:49JAtkinsIf I run the cli with the wrong dev-local dep intentionally, it says the error is “failed to read artifact descriptor for com.diatomic:dev-local ....”. Along with the mvn stack trace. Would be nice to be able to see that in the logs. #2021-09-0222:50JAtkinsThe IJ / Cursive log for the error only prints the reason phrase “Unauthorized (401)”#2021-09-0222:50cflemingOk, I’ll repro that and see what I can do, thanks.#2021-09-0222:50JAtkins*event log#2021-09-0222:50JAtkinsThanks#2021-09-0222:51cflemingIf there’s anything in the log, it’ll be in the file at Help -&gt; Show log in Finder/Explorer, but it would be nice to surface that in the IDE too.#2021-09-0311:15heliosIs there a way to collapse just a single form? Right now if you use Collapse it will collapse the whole function#2021-09-0311:22cflemingNo, there isn’t, sorry. Finer-grained folding of various types has been discussed from time to time, but I don’t have any immediate plans around it.#2021-09-0311:24imreIdea supports a
;; region some comment

some-form

;; endregion
way of folding
#2021-09-0311:24imrenot sure if that helps in your case#2021-09-0312:36heliosthank you 🙂 it doesn't specifically but good to know#2021-09-0716:33DG#2021-09-0808:53cflemingUnfortunately I’m not very familiar with WSL (I don’t use Windows) and I don’t really know how IntelliJ’s recent support works either, sorry. Hopefully someone who’s actually using it can chime in and be more useful than me.#2021-09-0813:32folconI've not had that particular error @U01JPGC1PQQ, my issues with wsl2 have been related to ports. In my experience it's better to boot the repl in wsl2 via terminal for example and then connect to cursive via a remote repl...#2021-09-0813:32folconJust make sure you open your ports internally and it works fine#2021-09-0815:13DG@U0JUM502E the ports are open, this isn't the issue. The issue is when running the application or the tests, which in that case Cursive has to run a new JVM (and not just connect to the REPL)#2021-09-0815:13DGAre you able to run your application or your tests by using the Run or Debug in Intellij?#2021-09-0815:16folconHmm, to be honest I don't run my tests within intellij, I just run them at the command line on wsl2. My application does function fine when I've run it, but it effectively runs in windows if I trigger it with run configuration not wsl2.#2021-09-0815:17folconSo these don't end up being blockers for me, whereas REPL experience is the main thing I care about 😃... Sorry if that's unhelpful!#2021-09-0815:18DGOh no worries, it's always helpful. Thanks 🙂#2021-09-1010:20steffan@U01JPGC1PQQ I've been running Cursive in WSL2 for some time, by running an X server (VcXsrv) and the Linux version of IntelliJ. There's a little bit of setup to enable X11 forwarding, then you're good to go: https://stackoverflow.com/questions/61110603/how-to-set-up-working-x11-forwarding-on-wsl2#2021-09-1010:23steffanWhen WSLg is released, running graphical apps such as IntelliJ on WSL should be easier.#2021-11-2615:20folconWhich reminds me I should try this out next chance I get 😃...#2021-09-0810:48tskardalI just tried to change the keymap as suggested here https://cursive-ide.com/userguide/ui.html#some-suggested-settings, but when I press tab it actually tabs out to the next UI widget instead of registering the keypress as a shortcut. Help 😅#2021-09-0914:55gregIt looks like the docs are not up to date, or maybe it is matter of OS. Not sure, but I get the same behaviour. The solution is using the + button on the right. So instead of pressing a tab key, click this + and then choose tab symbol.#2021-09-1009:33tskardalThanks! Kind of embarrassed not to have seen that 😅#2021-09-0915:47gregHi, I noticed some strange "incorrect arity" warning. I attach screenshots. So there are two files. First contains the protocol definition. The second, a record implementing the protocol. There are three methods. The one with just this argument gets highlighted for no reason, I think. Am I doing something wrong (despite all works fine), or this is an IDE issue?#2021-09-0916:12Alex Miller (Clojure team)I think you don't need the qualifier on the method names in the defrecord? I'm guessing it's treating that as a function invocation and fx-rate-date takes 1 arg but it thinks you are passing it two [_] nil#2021-09-0916:13Alex Miller (Clojure team)you do need the qualifier on the protocol name#2021-09-0916:38gregok, makes sense, both the solution and the explanation why it highlights it. Thanks#2021-09-1117:23thhellerdid intellij or cursive change mouse selection somehow or did I somehow mess with that unknowingly? somehow I always end up not copying the last character I thought I selected with the mouse?#2021-09-1117:23thhellerI did a bunch of upgrades recently so that might have been the cause?#2021-09-1117:27thhellereg. (foo) dragging/selecting from right to left from end of line gives me (foo whereas left to right gives me (foo)#2021-09-1117:27thhellerdidn't use to be like that#2021-09-1117:27thhelleralso using ideavim#2021-09-1117:34thhellerok, appears to be ideavim. works fine when I disable that#2021-09-1410:05Vincent CantinHello, it seems that Cursive cannot resolve x in this type of destructuring while it seems valid in Clojurescript.
(let [[x
       {:keys [y]
        :or {y x}}
       {:keys [z]
        :or {z x}}] [:a nil {:z :c}]]
  [x y z])
=> [:a :a :c]
#2021-09-1410:07imresame in clojure#2021-09-1418:55thumbnailAfaik this is undefined behaviour in Clojure: https://clojurians-log.clojureverse.org/clojure/2020-03-02/1583165149.094200#2021-09-1503:07Vincent Cantin@UHJH8MG6S That's very instructive, thank you.#2021-09-1415:57markaddlemanI would love for search to support fully qualified symbols and keywords. I found this issue https://github.com/cursive-ide/cursive/issues/821 which, I think amounts to the same thing. If it doesn't, I'll open a new issue#2021-09-1416:23gregI've noticed a "x cannot be resolved" warning when using async `alt!`. I believe syntax is correct, it works, still Cursive highlights it. What do you think?#2021-09-1612:27gregIs there any way of disabling selected "cannot be resolved" highlights like these?#2021-09-1612:27gregIs there any way of disabling selected "cannot be resolved" highlights like these?#2021-09-1513:12souenzzocursive do not resolve destructure in as->, which is supported in cljs, clj and sci.#2021-09-1513:28imreJaysus, I didn't even know that was a thing!#2021-09-1513:28imreNice#2021-09-1513:54souenzzoI hope to never find this in a codebase 😅#2021-09-1513:56imream I right thinking this will do the destructuring at every step of the as->?#2021-09-1513:59souenzzothis is the stylish way to do a "get-in" that I ever see#2021-09-1514:01souenzzoI think that we need to borkdude impl a ERROR in clj-kondo linter to avoid this.#2021-09-1514:01imreYeah I think Cursive is probably right to flag this after all 😅#2021-09-1514:05souenzzocheckIfDestructureInAs_Arrow() ? Popup("You are drunk. go sleep").then(System.exit(1))#2021-09-1606:48JoniHi, is there some way for Cursive to support cljfmt formatting configs?#2021-09-1608:02Jordan Robinsonas far as I'm aware the main limitation of cljfmt in this kind of thing is that it doesn't have a binary so you can't set up a file watcher for it, or if you do it might be quite slow. There are a couple of posts I found when researching trying to do the same thing (though we eventually just swapped to cljstyle instead). They aren't for cljfmt specifically but they should get you on the right track. https://bogoyavlensky.com/blog/clojure-formatting-cljstyle/ https://github.com/clj-kondo/clj-kondo/blob/master/doc/editor-integration.md#intellij-idea hope that helps!#2021-09-1701:59salamthis is one of the top voted issues: https://github.com/cursive-ide/cursive/issues/1403#2021-09-1712:26JoniYea I read that and read the last comment, but couldn't figure out how the "works out of the box" thing actually works.#2021-09-1609:34caleb.macdonaldblackAny idea why cursive is not working for me? I’m getting this error:
com.intellij.execution.ExecutionException: Cannot execute - downloaded deps classpath not found:
/Users/calebmacdonaldblack/.m2/repository/org/clojure/tools.deps.alpha/0.12.1003/tools.deps.alpha-0.12.1003.jar
/Users/calebmacdonaldblack/.m2/repository/org/apache/maven/resolver/maven-resolver-api/1.7.0/maven-resolver-api-1.7.0.jar
/Users/calebmacdonaldblack/.m2/repository/org/apache/maven/resolver/maven-resolver-spi/1.7.0/maven-resolver-spi-1.7.0.jar
/Users/calebmacdonaldblack/.m2/repository/org/apache/maven/resolver/maven-resolver-impl/1.7.0/maven-resolver-impl-1.7.0.jar
/Users/calebmacdonaldblack/.m2/repository/org/apache/maven/resolver/maven-resolver-named-locks/1.7.0/maven-resolver-named-locks-1.7.0.jar
/Users/calebmacdonaldblack/.m2/repository/org/apache/maven/resolver/maven-resolver-util/1.7.0/maven-resolver-util-1.7.0.jar
/Users/calebmacdonaldblack/.m2/repository/org/apache/maven/resolver/maven-resolver-connector-basic/1.7.0/maven-resolver-connector-basic-1.7.0.jar
/Users/calebmacdonaldblack/.m2/repository/org/apache/maven/resolver/maven-resolver-transport-file/1.7.0/maven-resolver-transport-file-1.7.0.jar
/Users/calebmacdonaldblack/.m2/repository/org/apache/maven/resolver/maven-resolver-transport-http/1.7.0/maven-resolver-transport-http-1.7.0.jar
/Users/calebmacdonaldblack/.m2/repository/org/apache/maven/maven-resolver-provider/3.8.1/maven-resolver-provider-3.8.1.jar
/Users/calebmacdonaldblack/.m2/repository/org/apache/maven/maven-model/3.8.1/maven-model-3.8.1.jar
/Users/calebmacdonaldblack/.m2/repository/org/apache/maven/maven-model-builder/3.8.1/maven-model-builder-3.8.1.jar
/Users/calebmacdonaldblack/.m2/repository/org/apache/maven/maven-repository-metadata/3.8.1/maven-repository-metadata-3.8.1.jar
/Users/calebmacdonaldblack/.m2/repository/org/apache/maven/maven-core/3.8.1/maven-core-3.8.1.jar
/Users/calebmacdonaldblack/.m2/repository/org/apache/maven/maven-settings/3.8.1/maven-settings-3.8.1.jar
/Users/calebmacdonaldblack/.m2/repository/org/apache/maven/maven-settings-builder/3.8.1/maven-settings-builder-3.8.1.jar
/Users/calebmacdonaldblack/.m2/repository/org/apache/maven/maven-builder-support/3.8.1/maven-builder-support-3.8.1.jar
/Users/calebmacdonaldblack/.m2/repository/org/apache/maven/maven-artifact/3.8.1/maven-artifact-3.8.1.jar
/Users/calebmacdonaldblack/.m2/repository/org/apache/maven/maven-plugin-api/3.8.1/maven-plugin-api-3.8.1.jar
/Users/calebmacdonaldblack/.m2/repository/org/apache/maven/shared/maven-shared-utils/3.2.1/maven-shared-utils-3.2.1.jar
/Users/calebmacdonaldblack/.m2/repository/com/google/inject/guice/4.2.1/guice-4.2.1-no_aop.jar
/Users/calebmacdonaldblack/.m2/repository/com/cognitect/aws/api/0.8.505/api-0.8.505.jar
/Users/calebmacdonaldblack/.m2/repository/com/cognitect/aws/endpoints/1.1.11.969/endpoints-1.1.11.969.jar
/Users/calebmacdonaldblack/.m2/repository/com/cognitect/aws/s3/811.2.858.0/s3-811.2.858.0.jar
	at cursive.deps.DepsProjectsManager$Companion.classpath(DepsSupport.kt:173)
	at cursive.deps.DepsProjectsManager$Companion.resourceConfigFile(DepsSupport.kt:128)
	at cursive.deps.DepsProjectsManager$Companion.configFiles(DepsSupport.kt:84)
	at cursive.deps.DepsProjectDetails.doGetDetails(Project.kt:164)
	at cursive.deps.DepsProjectDetails.doGetDetails(Project.kt:85)
	at cursive.build.BuildSystemProjectDetails.getProjectDetails(BuildSystem.kt:42)
	at cursive.build.BuildSystemProjectsManager$reimportAllProjects$$inlined$synchronized$lambda$1.run(BuildSystemManager.kt:150)
	at cursive.build.BuildSystemUtil$runTask$1$1.run(BuildSystemUtil.kt:93)
	at com.intellij.openapi.progress.impl.CoreProgressManager$TaskRunnable.run(CoreProgressManager.java:998)
	at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcessWithProgressAsync$5(CoreProgressManager.java:497)
	at com.intellij.openapi.progress.impl.ProgressRunner.lambda$submit$3(ProgressRunner.java:228)
	at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$2(CoreProgressManager.java:178)
	at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:688)
	at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:634)
	at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:64)
	at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:165)
	at com.intellij.openapi.progress.impl.ProgressRunner.lambda$submit$4(ProgressRunner.java:228)
	at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1700)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
	at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:668)
	at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:665)
	at java.base/java.security.AccessController.doPrivileged(Native Method)
	at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1.run(Executors.java:665)
	at java.base/java.lang.Thread.run(Thread.java:829)
#2021-09-1609:36caleb.macdonaldblackI get this as soon as I open intellij. Even with a blank project deps.edn:
{:paths ["src"]
 :deps  {org.clojure/clojure {:mvn/version "1.10.3"}}}
#2021-09-1609:37caleb.macdonaldblackinvalidate cache and restart does nothing#2021-09-1609:40caleb.macdonaldblackOkay so I just updated my tools.deps version and it started working. Not sure why it broke in the first place#2021-09-1611:04Otto Nascarellais there any way to make cursive understand js/Promises? it really makes the code unintelligible …#2021-09-1612:11Jeff EvansWhat do you mean precisely by "understand"?#2021-09-2016:42Otto Nascarella(-> (.resolve js/Promise 1) (.then #(+ 1 %) println) resolve, then and js/Promise symbols are not recognised.#2021-09-2016:43Jeff Evansdid you try the steps from here? https://cursive-ide.com/userguide/troubleshooting.html#2021-09-2016:45Otto Nascarellasure did.#2021-09-1611:46Jakub Holý (HolyJak)Why do I get "submit cannot be resolved" on the proxy-super call? This https://clojuredocs.org/clojure.core/proxy-super#example-5f746700e4b0b1e3652d73c5 explains that even (set! *warn-on-reflection* true) would complain about it but that it can be fixed by adding type hint to the this , which I do. I guess Cursive does not handle it in the same way?
(proxy [ThreadPoolExecutor] [^int 1 ^int 1 0 TimeUnit/MILLISECONDS 10 thread-factory]
                      (submit [^Runnable task]
                        (let [^ThreadPoolExecutor this this]
                          (proxy-super submit ^Runnable task))))
#2021-09-1612:27Jakub Holý (HolyJak)Is it possible to tell Cursive "Indent all unknown macros by 2 spaces"m instead of aligning with the first argument?#2021-09-1710:01stijnHello, is there some documentation of the new babashka integration available? i'm struggling to 1. setup the REPL (you can choose a module, but I don't know how to add it to Cursive - I currently only have a bb.edn, not deps.edn) 2. have Cursive recognize the source files that are declared in bb.edn :paths#2021-09-1710:22cflemingI actually have the doc ready to go for a planned release tomorrow. Hang on and I’ll get it into the staging env so you can check it out.#2021-09-1710:31cflemingHere you go, let me know if anything is confusing: https://staging.cursive-ide.com/userguide/eap/babashka.html#2021-09-2013:48stijnOK, the docs are clear, but it's not working out for me. I don't see the babashka module in this screen#2021-09-2020:35cflemingHmm, which version of Cursive are you running?#2021-09-2021:37cflemingAlso, just to check - you have selected the module you want to add support to, right?#2021-09-2107:41stijnCursive version is
#2021-09-2107:41stijnYes, I selected the module. Just to be sure, does Cursive expect to have any specific files in the module before it sees it as a 'babashka' module?#2021-09-2107:42stijnI'm using bb.edn, I understand it doesn't support the deps (not using that), but I am using the :paths entry for putting code in "src"#2021-09-2108:38cflemingOne question - how did you create the module you’re trying to add this to? It has to be a Java module type, which most Clojure modules are. Did you create this via deps or lein, or in some other way?#2021-09-2110:07stijnah, no I just added the directory, because I don't have a deps.edn or lein file#2021-09-2110:07stijnbut I can add an empty one maybe?#2021-09-2110:08cflemingYeah, if you just add a deps.edn containing {}, right click it and “Add as Clojure Deps file” that should do it.#2021-09-2110:10stijnok yes that worked, thanks!#2021-09-2110:14cflemingGreat! I’ll add that to the doc, I’d assumed that everyone would be adding bb stuff to an existing module rather than creating a new one.#2021-09-2110:38stijnReally nice work!#2021-09-1710:03borkdude@stijn Cursive should be executing bb print-deps which prints a deps.edn which is then used to resolved local sources + dependencies#2021-09-1710:03borkdudeso it's using bb itself under the hood to detect the project deps#2021-09-1710:04stijnok, but I'm clearly missing something; when does it do this? when you run the REPL?#2021-09-1710:04borkdudeNot sure#2021-09-1710:05stijnThe thing I'm stuck at is that I need to specify a module, but I don't know how to add the bb project as a module.#2021-09-1915:55devurandomI have an odd issue where Cursive's nREPL client seems to show things that REPL-y does not: https://clojurians.slack.com/archives/C17JYSA3H/p1632066344001900 Can someone help or maybe has some idea what could have caused this?#2021-09-1921:27cflemingThat looks to me like the REPL server doesn’t support some basic Clojure functionality that Cursive requires. Any idea what the server is or how it works?#2021-09-1921:27cflemingActually, it’s possible that what’s happening is that the results of Cursive’s initialisation are being printed there, where they wouldn’t normally be. Does the REPL seem to work ok apart from that?#2021-09-1921:28cflemingIt’s possible that the server’s responses are not quite what the standard nREPL’s ones would be, and that’s causing Cursive to print the results of some internal ops.#2021-09-1922:15devurandomThe server should be a standard nREPL 0.8.3: https://github.com/lambdaisland/witchcraft-plugin/blob/main/src/lambdaisland/witchcraft/plugin.clj#L66-L75 https://github.com/lambdaisland/witchcraft-plugin/blob/main/deps.edn#L21-L24 https://github.com/lambdaisland/witchcraft-plugin/blob/main/resources/witchcraft_plugin/default_config.edn.tmpl#L3-L10 But it uses a middleware that is supposed to execute each command in a different thread: https://github.com/lambdaisland/witchcraft/blob/main/src/lambdaisland/witchcraft/nrepl/task_eval.clj https://github.com/lambdaisland/witchcraft/blob/main/src/lambdaisland/witchcraft.clj#L523-L526 If I disable this middleware, the mysterious output is gone. Any idea what might be wrong with that code to modify the responses? Otherwise I'll continue poking it and read more about how nREPL works internally...#2021-09-1922:18devurandomSomething I am thinking about now, but which I will have to do more research on: Are nREPL commands supposed to be synchronous or can they be asynchronous? And does Cursive treat the nREPL connection as something stateful, e.g. switching "echo" off and on? That will be the next thing I will dig into...#2021-09-1922:22cflemingnREPL commands are asynchronous. You send a message, and get one or more replies back. Unfortunately I know next to nothing about Minecraft, so I’m not sure why it would do that - looks like there’s a standard thread commands need to be executed on, like the Swing EDT or something?#2021-09-1922:24devurandomApart from the comment in that config EDN file, I do not know anything about this, either: > Run evaluated expressions inside the game loop, so you don't have to schedule them explicitly But yes, I assume game code needs to be executed from the game thread, maybe because the thing is not entirely thread safe... 🤷#2021-09-1922:26cflemingI’m not really sure what that is doing. What I suspect is that either the message or session IDs are not coming back correctly. The way this works is that an ID is set on the request, and that should be provided on the response. Cursive maintains a map of response handlers for outstanding requests indexed by ID, and if it can’t find the correct handler for a response it will just use a default one. I suspect that’s what’s happening. Give me one sec…#2021-09-1922:27cflemingDrat, I thought I had debug logging to see the message contents, but I don’t…#2021-09-1922:29cflemingYou could create a middleware to do that, perhaps…#2021-09-1922:31cflemingLooks like this has been discussed here: https://github.com/nrepl/nrepl/issues/85#2021-09-1922:56devurandomThanks, that intro to nREPL helped a lot.#2021-09-1922:59cflemingNo worries, let me know if you have more questions.#2021-09-2205:36plexusThanks for the help @U0567Q30W, upon inspection it seems we were sending a :done to the eval op before sending the :value response. Would that explain this behavior? I've put out a fix.#2021-09-2205:36plexusBefore:
C ---> 11 eval {:nrepl.middleware.print/buffer-size 4096, :ns "user", :file "*cider-repl clj-projects/cauldron:localhost:25554(clj)*", :nrepl.middleware.print/quota 1048576, :nrepl.middleware.print/print "cider.nrepl.pprint/pprint", :column 7, :line 13, :code "(+ 1 1)", :nrepl.middleware.print/stream? "1", :nrepl.middleware.print/options {:right-margin 80}}
C <=== 11 #{:done} {}
C <--- 11 #{} {:value "2"}
C <--- 11 #{} {:ns "user"}
After
C ---> 11 eval {:nrepl.middleware.print/buffer-size 4096, :ns "user", :file "*cider-repl clj-projects/cauldron:localhost:25554(clj)*", :nrepl.middleware.print/quota 1048576, :nrepl.middleware.print/print "cider.nrepl.pprint/pprint", :column 7, :line 13, :code "(+ 1 1)", :nrepl.middleware.print/stream? "1", :nrepl.middleware.print/options {:right-margin 80}}
C <--- 11 #{} {:value "2"}
C <--- 11 #{} {:ns "user"}
C <=== 11 #{:done} {}
#2021-09-2211:04cflemingYes, that would explain it in Cursive’s case. Cursive keeps a map of handlers for outstanding requests around, indexed by message ID. When it receives a :done message, the handler is removed from the map of outstanding requests, and any further responses for that ID will go to a generic handler. That will print out the values as devurandom was seeing.#2021-09-2211:04cflemingI’ve never come up with a good heuristic for how long to keep handlers around after a :done message, so at the moment I tidy them up immediately. I guess I could use an LRU cache and keep up to 100 of them around while they’re still receiving messages or something, but that’s getting complicated and I haven’t needed to do it yet.#2021-09-2213:50plexusI did notice working on the sideloader recently that that is an extreme case where the sideloader will respond with :done as soon as it is installed, but will then send messages to the client with the same id whenever it wants to request a resource. possibly in perpetuity#2021-09-2213:50plexusmight make more sense for it to never send :done, or only when you stop the sideloader again#2021-09-2213:51plexusbut that's not the only weird thing about the sideloader so maybe not something that concerns you much 😄#2021-09-2302:09cflemingYeah, in that case I’d definitely expect the :done message not to be received until you’re done with the sideloader.#2021-09-2319:17devurandomThanks, @U07FP7QJ0! https://github.com/lambdaisland/witchcraft/commit/5bdb56a17a17d630fbca66167fff50cda275f59b fixed the issue with Cursive. 🙂#2021-09-2009:36GGfpcIs it possible to configure Cursive to cmd+click to hugsql queries? They are linked via a :name key in a comment in the sql file#2021-09-2309:53cflemingNot at the moment, sadly, no - sorry.#2021-09-2013:49helios@cfleming the new :as-alias from clojure 1.11 isn't supported yet in cursive, right?#2021-09-2020:34cflemingNo, it’s not supported at the moment, I’ll try to get that in the next EAP build.#2021-09-2013:49helios(b isn't marked as resolved)#2021-09-2013:59Alex Miller (Clojure team)given that it was just released as an alpha, I don't know why you would expect it to be supported yet? as an alpha feature, it may still undergo changes before release#2021-09-2014:08heliosSince i'm on the EAP builds of Cursive that also can change arbitrarily, it doesn't hurt to ask 😄#2021-09-2014:09helioswhat better way of testing alpha stuff than using it? 😏#2021-09-2021:44cflemingCertainly can’t hurt to ask!#2021-09-2019:29genekimHello, all! Quick proposal for license renewal message — I got this message, shown in the screenshot. I spent ten minutes trying to figure out how to renew my personal license, to finally learn that you can only renew commercial licenses. (I kept submitting my order number and email address, to which it returned “Not found”.) I’d like to propose clearer language in the notice: “Renew your commercial license or purchase a new personal license”). PS: I was super delighted to purchase another license to support your amazing work! 🙂#2021-09-2020:32cflemingHi Gene, you should be able to renew a personal licence. Non-commercial ones are not renewed (you just get a new one), but personal ones definitely are. Could you drop me a mail at <mailto:/cdn-cgi/l/email-protection|/cdn-cgi/l/email-protection> and I’ll sort that out for you?#2021-09-2021:15genekimRoger that! Thx!!#2021-09-2102:42kharusI can confirm I renewed personal license 2 times. But from the website.#2021-09-2201:56genekimSuper low priority question: I am so proud of myself that for years, I have resisted mucking with IntelliJ advanced VM settings, and trying out Shenandoah GC, despite seeing spinning ball of death many many times on macOS, which I assume are GC pauses. Has anyone actually tried this out and had success with it? (I feel like this is what only maniacs due, because they think they can tune IntelliJ better than the vendor...) https://news.ycombinator.com/item?id=25581487#2021-09-2203:01cflemingSo, I’m mostly in the same group as you (don’t fiddle, because it’s likely that papa knows best), so I’m not sure on this. One thing to bear in mind is that they use their own JDK which is currently 11, and I wouldn’t recommend using a different one since it contains a lot of bug fixes relevant to JetBrains products. I think Shenandoah is only stable on JDK 17, right? I’m pretty out of touch, though.#2021-09-2204:53genekimThanks for convincing me not to open the hood. Danger and distraction lurk. 🙂 (Ah, you’re right. You have to switch the JVM IntelliJ uses… Which means even more danger, I’m assuming. I have plenty of danger in my life without this. 🙂 (Reminds me of people who buy fuel additives to increase fuel efficiency — an argument I found persuasive: if it actually worked (and in a way that didn’t cause long term issues), the auto manufacturers would use it, as they have every economic motivation to do so.)#2021-09-2216:49Jakub Holý (HolyJak)I have never experienced such pauses from GC (lucky?). What is however a huge problem for me is IntelliJ's beloved indexing. Every I.I. release I hope it will get better and every release I am disappointed. (Admittedly, it got better since I upgraded my Mac - but still prefer VS Code for any things I only work on shortly.)#2021-09-2722:43kendall.buchanan@U6VPZS1EK I don’t know if this is relevant to what you’re asking, but on the M1 I get a huge performance increase from using https://plugins.jetbrains.com/plugin/10044-atom-material-icons. Sounds crazy, but the rationale is here: https://youtrack.jetbrains.com/issue/JBR-3237#2021-09-2800:25cflemingThanks @U0HJA5ZQT, interestingly that link also mentions that JB are updating the JBR to Java 17 as we speak, so hopefully Shenandoah will become a thing at some point soon-ish.#2021-09-2803:03tony.kayI almost always increase my heap settings. Having a larger pool reduces certain GC times. Theoretically the larger the memory pool, the better GC works (infinite memory means no GC:slightly_smiling_face:). Of course if you make it too large you'll starve the rest of your computer for ram and slow other things down or cause swapping. I don't however, bother messing with the actual GC options. Most general purpose users on a single user app are going to be hard pressed to do anything noticable.#2021-09-2210:02indyWould be nice if Cursive also showed the differences for clojure.test/are :)#2021-09-2309:47cflemingI looked at this back in the day. I seem to recall that for some reason it’s impossible to get the required information back from clojure.test, but it’s probably worth looking at it again in case I missed something.#2021-09-2310:56indyYeah skimmed the source and looks like it. are is just a do of is '.
(clojure.test/are [x y] (= x y)
                        1 1
                        2 2
                        2 3
                        4 1)

FAIL in () (te.clj:754)
expected: (= 2 3)
  actual: (not (= 2 3))

FAIL in () (te.clj:754)
expected: (= 4 1)
  actual: (not (= 4 1))
Figuring out the indices of the args that failed might be difficult I think. Sad, because I don't use are in cases I should be using it since I can't see the diffs in Cursive. Would be nice if clojure.test itself added some metadata to find out the indices of the args that failed, it would really help when there a lot of args to are.
#2021-09-2216:46Jakub Holý (HolyJak)Hi @cfleming! I love Cursive, thanks for the great work! I wonder, is there any solution for letting Cursive understand when vars are copied from one ns it another one, as is done here https://github.com/expez/superstring/blob/a24e30367b0bca2144ffd25fe78abe3cd0f42bb1/src/superstring/core.clj#L35 ? I guess it is the same case as https://github.com/cursive-ide/cursive/issues/711, i.e. not going to be supported? I would not mind having to provide some info manually - for a lib I used often it is still much better than missing autocompletion and the pesky XXXX cannot be resoled. I can imagine having some .edn in my home dir / project dir with a map mapping symbol from the lib to the original (in the case of superstring, e.g. {superstring.core/trim clojure.string/trim, ...} .#2021-09-2308:47Jakub Holý (HolyJak)I guess https://cursive-ide.com/userguide/macros.html#stub-generation would solve my problem. Would it be possible to enable it for custom namespaces???#2021-09-2309:40cflemingHi Jakub! Sorry about the slow response. There are actually a couple of forms like this which are supported, I’ll check to see if any of them look like that and could be configured with Resolve As… If not, I’d have to add some code for that. And yes, enabling stub support for custom namespaces is something I’ve considered. It would only work for namespaces from libraries, which should work for this case.#2021-09-2313:31Jakub Holý (HolyJak)thank you!#2021-09-2219:17Colin P. HillWhat does “Stub generation required” mean? I’ve got a project that keeps prompting me to generate stubs, and every time it finishes it just prompts me again#2021-09-2220:12tanzoniteblackhttps://cursive-ide.com/userguide/macros.html#stub-generation#2021-09-2220:12tanzoniteblackas to why it continually is asking, if you check the events log, is it actually succeeding? I’ve seen that behavior happen when there’s multiple log4j reporters on the classpath and it causes some oddities#2021-09-2302:11cflemingRight, if it’s not working for some reason, please find your log file (Help | Show log in Finder/Explorer) and email it to me at <mailto:/cdn-cgi/l/email-protection|/cdn-cgi/l/email-protection>#2021-09-2318:47kennyThe power at my house dropped in the middle of a rebase and left my .git in a completely broken state. I just recloned my monorepo and opened it up and now the project looks totally different. Previously, my Project view in IntelliJ would show the monorepo root folder, all files within it, and and our projects folder which contains many Clojure Deps projects. Now, after reopening the project, all of the projects in the projects directory are displayed at the top level and the root directory is displayed at the very bottom, highlighted in brown. For the life of me, I cannot figure out how to get IntellliJ to recognize the top level monorepo directory as where the project starts. Does anyone here have any ideas?#2021-09-2318:57Jeff Evansusing deps.edn?#2021-09-2318:58kennyYes#2021-09-2318:58Jeff Evansmy guess is you need to right click the topmost one, and Add as Deps Project#2021-09-2318:58Jeff EvansI have this happen often when switching between branches where we converted from lein->deps#2021-09-2319:10imreyou might be able to "import project from existing sources", target the root of your monorepo, go through the import wizard#2021-09-2319:10imresaved my arse and sanity a few times#2021-09-2400:04kennyJust following up here. What worked for me was cloning the project and renaming the .idea directory temporarily. We commit .idea/clojure-deps.xml and .idea/ClojureProjectResolveSettings.xml to VCS. I then open the root directory via File > Open and finally move the two files into the newly created .idea directory. Quite the hassle. @U0567Q30W any idea why this works in this manner?#2021-09-2322:03EddieI’m considering adding a couple vars in my project that will be dynamically created at load-time via a macro. My understanding is that “stubs” are the only way for Cursive to recognize these vars. I understand from the docs that automatic stub generation is limited to a hard-coded set of namespaces, but is there a way to just manually write/specify some static stubs?#2021-09-2400:35dpsuttonYou can declare all of them if you know which ones will be created and let your load time macro handle the actual value#2021-09-2401:38EddieIn my case, there will be a different set of defn made depending on the version of one of my deps so I can’t just declare the symbols. My plan was to (hopefully) write a handful of stub files for each version of the dep that I will be using and point Cursive at those.#2021-09-2516:30thumbnailI noticed kwd is marked as unused, but it's actually used 👀#2021-09-2519:03potetmThat’s not legal clojure and cursive knows it.#2021-09-2519:03potetmwell. ish.#2021-09-2519:03potetm
(require (symbol (str (namespace :foo/bar) "." (name :foo/bar))))
#2021-09-2519:03potetmis legal clojure and doesn’t highlight#2021-09-2611:38thumbnailWhat's illegal about it 👀?#2021-09-2614:29potetmRun just the require form#2021-09-2614:29potetmMy guess is that cursive has special parsing for require#2021-09-2614:30potetmAnd dynamic args are jacking with it.#2021-09-2613:29jeremysHi, is there a way to get a list of Cursive's action ids ? I am trying to use ideavim and want to map some shortcuts...#2021-09-2710:02indyThere is a Cursive section in keymaps that should list all of Cursive’s actions, I’m guessing#2021-09-2802:54tony.kayI think :actionlist shows them#2021-10-0120:15jeremysThanks, I ended up using the track action id stuff to find the ids I needed. Cheers.#2021-09-2712:21roman01la👋 Probably was asked already: Does Unused declaration inspection work in general? Doesn’t seem to be working for me no for Clojure neither for ClojureScript. Does it require a running instance of REPL?#2021-09-2721:05cflemingNo, for some reason it doesn’t for Clojure, I haven’t got around to figuring that one out. I’ll try to look at that soon, a couple of people have asked about it.#2021-09-2809:08roman01laThanks a lot 🙏#2021-09-2813:33emccueI know its old news, but is there any progress on letting us teach cursive about new macros? We have a particular thing we do in our code base that is a lot of boilerplate, but we haven't been able to make a macro because we can't find a way to fit it into any of the built in forms. (and losing symbol resolution/click to definition would negate a lot of the benefit of what we do)#2021-09-2914:00Jeff Evansquite possibly related? https://github.com/cursive-ide/cursive/issues/147#2021-09-2914:10emccueAs far as I can see the solutions that would work would be • A way to do this and say "this macro will give these symbols with docstrings based on this logic" similar to how clj-kondo handles it with hooks (if cursive can just take info from clj-kondo that would do just dandy) • Stub generation for all the places we use the macro. This is only done for a whitelist of public libraries, not a knob that has been offered to users. • Running repl supplements static analysis. Cursive has been pretty clear about not wanting to support this#2021-09-3009:38cflemingThere’s still not much to support this, sorry. However fixing it properly has been held up by some daft architectural choices I made a long time ago, but I’ve recently made some steps towards fixing those.#2021-10-0219:08imre@U0567Q30W that's great to hear. Do you see a possibility of any visible improvements in this topic in the next year or so?#2021-10-0301:03emccueI know you have a ton on your plate, but if there is anything that can be done to help with this I would be happy to#2021-09-2819:21Jim StrieterIs there any way to use Intelli-J/Cursive to generate clojure bindings for a local java project?#2021-09-2914:36the-alchemistdefine "Clojure bindings"?#2021-09-3009:39cflemingYes, I’d like to know what you’d like to happen here, as well.#2021-09-3008:26mokrHi, is there anything I can do myself to help Cursive understand e.g. re-posh/reg-sub like it understands re-frame/reg-sub, so that they show up in the “Structure” tool window , works with “find usages” and can be navigated with CMD+click? Update: Languagees & Frameworks > Clojure > Symbol Resolution looks promising, but I just have to figure out how to add new Global/IDE entries as there is no +/add button… Update2: I get the impression that what I want is the “Resolve _ as” functionality from context menu, but that only works for macros, not functions it seems.#2021-09-3009:37cflemingResolve as… is definitely what you want, and it should work for functions as well. Let me know if that’s not the case.#2021-09-3013:10mokr@U0567Q30W That is good news, but for some reason I get No context actions available at this location when I try to bring them up for re-posh/reg-sub in a namespace where I have required [re-posh.core :as re-posh] (latest IntelliJ and Cursive). Then I noticed that inside the re-posh.core ns itself I get that context menu, but what should I actually resolve it as to have it work like re-frame.core/reg-sub? Trying def and defn didn’t seem to work. Update: Got it working from inside re-posh.core ns. Had to drop the re-frame.core/ ns part when resolving as reg-sub#2021-10-0220:52cflemingThat’s really strange, I can’t see why you would need to do that. But I’m glad it’s working!#2021-09-3009:33imre@mokr I grepped my settings and it appears ~/Library/Application Support/JetBrains/IdeaIC2021.2/options/ClojureResolveSettings.xml contains these#2021-09-3012:42roklenarcicI have a leiningen project. When I run it with lein run it works normally. When I run it with IntelliJ run profile with Run with Leiningen enabled, I get:
Could not decrypt credentials from /Users/roklenarcic/.lein/credentials.clj.gpg
Cannot run program "gpg": error=2, No such file or directory
See `lein help gpg` for how to install gpg.
In console, typing gpg works as expected
#2021-09-3012:44roklenarcicIs there some sort of weird path issue with IntelliJ?#2021-09-3014:18Jeff Evanswhat is your $PATH in the terminal when it works? for Lein, I think you can set custom environment variables in the tool window#2021-10-0112:15roklenarcicI’ll try that#2021-09-3013:01wilkerluciosince yesterday I start seeing cursive marking some things as unresolved, that doesn't make sense, this macro is already setup to use as let, if I refresh the project it goes back to normal, but at random times Cursive seems to be marking as unresolved in the way you can see in the screenshot#2021-09-3013:14wilkerlucionevermind, it was related to clj-kondo things, no cursive deal 👍#2021-10-0100:38Oliver GeorgeNot sure if this is off topic. Tell me if I should delete it... IntelliJ users of the world unite! We need a "git grep" style search feature. Vote here: https://youtrack.jetbrains.com/issue/IDEA-177598.#2021-10-0116:42Jeff EvansI +1ed it. Would be useful.#2021-10-0106:34JoniHi, I am not sure if this is a Cursive issue or an Idea issue, but I cannot find any good answers anywhere so here goes. I am working on a project that has multiple different repos in it, and 2 of them are common helpers which are used in the other repos through symlinks and all of this works fine, but when I start Idea it automatically adds the symlinked folders as source roots in the module settings to the common modules. This breaks the source roots and go to definitions everywhere, so every time I start Idea I need to go to the module settings and click to remove the excess content roots. Has anyone else ran into an issue like this and if so, did you manage to fix it?#2021-10-0720:56cflemingSorry for the delay with this, no, I’ve never heard of anything like that sorry. Do your other repos have the symlinks marked as source roots? i.e. in my head it looks like this: module 1 has src marked as a source root, but that’s actually a symlink pointing to module 2 src dir. The problem is that the directory in module 2 is actually the one that gets marked. Is that right?#2021-10-0720:56cflemingAre you using deps, lein or something else?#2021-10-1210:10JoniAa hey, sorry for taking some time to get back to you, we are using lein, and the structure is like modules: • common • ui • desktop (actual project that's running a repl) • management (another separate project running a repl) So the common and ui modules/projects are symlinked under the desktop and management projects under a folder called "checkouts" which is then excluded in the main module settings of each, so we don't have to run lein installs to get the changes made in these shared projects. And the symlinks are not marked as source roots, but the folders where the symlink is pointing to is used as a source root in the common and ui modules. I realise now that this is pretty hard to explain, as I don't have total understanding of why this is setup the way it is, and I don't have a lot of experience wrestling with Idea modules.#2021-10-1210:22JoniAa and i've just figured out that the checkouts structure is a leiningen feature where leiningen knows to fetch the used dependency from there instead and that should help if you're developing the said dependency at the same time.#2021-10-0307:02JAtkinsLow importance question: has anyone else noticed an eternal “calculating classpath” task occasionally when starting local deps repls? I have a project I’ve imported from scratch a couple times on different computers, but only one has this problem. Basically, I start a local repl, and the “Calculating Classpath” spinner starts. It seems to be an infinite hang, and it’s not cancelable. The only solution I’ve found is to reboot the IDE, but that’s inconsistent. That route requires possibly multiple restarts. I don’t see anything in the IJ logs or in the event viewer that are obviously related to this. Current workaround is starting the repl outside of IJ.#2021-10-0422:37cflemingThat’s very strange, I can’t think of anything that would cause that on just a single machine. Could you take a thread dump of the IDE when it’s hung? https://intellij-support.jetbrains.com/hc/en-us/articles/206544899-Getting-a-thread-dump-when-IDE-hangs-and-doesn-t-respond#2021-10-0503:31JAtkinsHere’s one#2021-10-0409:37heliosMaybe I'm making a stupid mistake. I have a case function which should differentiate between different symbols. IntelliJ is warning me that those symbols can't be resolved, but the documentation of case explains that
The test-constants are not evaluated. They must be compile-time
literals, and need not be quoted.  
I've now switched the (case sym ...) into a (condp = sym ...) but it feels a workaround. Shouldn't case be exempt from trying to resolve things? cc @cfleming
#2021-10-0409:38heliosthis is in clojurescript btw, and also the compiler throws some warnings
--------------------------------------------------------------------------------
  32 |
  33 | (defn explain [sym]
  34 |   foo "foo"
  35 |   bar "bar")
---------^----------------------------------------------------------------------
 Use of undeclared Var my.ns/bar
#2021-10-0409:54imreAre you having troubles with case or defn?#2021-10-0409:55imreThe defn example sure isn't valid unless you have foo and bar defined globally#2021-10-0411:40emccue
(defn explain [sym]
  (case sym
    foo "foo"
    bar "bar"))
#2021-10-0414:01imreah I see now#2021-10-0414:32helios@U3JH98J4R yes sorry i typed it wrong, but you're right 😄#2021-10-0421:50cflemingYes, Cursive should definitely not complain about that.#2021-10-0413:21roklenarcicIs there a way to disable maven in clojure projects? My build keeps generating pom.xml files and then Intellij complains that Maven and Leiningen cannot both manage the module#2021-10-0421:52cflemingThat should only happen if Maven thinks it’s managing the module, it won’t import the pom by default. If you open your Maven toolwindow and remove the project from there it should stop pestering you.#2021-10-0413:21roklenarcicEffectively it disables leiningen on the module, giving precedence to maven#2021-10-0413:26roklenarcicI still have problem where all the leiningen preparation tasks run with a weird PATH. And then I always get Cannot run program "gpg": error=2, No such file or directory. It works fine from command line.#2021-10-0422:31cflemingDoes this work if you set the gpg path at Preferences | Build, Execution, Deployment | Build Tools | Leiningen?#2021-10-0512:26roklenarcicyes entering full path here helps#2021-10-0512:26roklenarcicthanks#2021-10-0511:29imre@cfleming FYI https://github.com/cursive-ide/cursive/issues/2593#2021-10-0521:07cflemingThanks, I’ll fix that for the next EAP.#2021-10-0605:10imreThank you very much!#2021-10-0514:29seriogaHello @cfleming In the code
(ns user.cursive-ns-alias
  (:require [clojure.string :as string]))

(let [{:keys [string/x]} {:string/x 0}]
  x)
Cursive thinks that string in :keys [string/x] is an alias of clojure.string. This affects such functionality as “ns alias usages” and “rename keyword”. Should I create a ticket for this?
#2021-10-0520:56cflemingYes, please - good catch.#2021-10-0612:06seriogaOK, the issue has been filed https://github.com/cursive-ide/cursive/issues/2596#2021-10-0621:19cflemingThanks!#2021-10-0515:30JHi! I have a strange behaviour. When a use the function Run Test Under Caret in Repl the first time, the test ran but if I use the same function twice no test found (`0 test, 0 assertion`) I must kill and reopen a new repl. Do you have an idea what’s going on?#2021-10-0720:51cflemingHmm, no, I’ve never seen anything like that. Does it happen for all tests? What about in different projects?#2021-10-0813:32JNo just on one project. Maybe I miss a configuration.#2021-10-1419:43JHi! @cfleming This is a screen video of the weird behaviour.#2021-10-0517:10Colin P. HillAnyone have any keymap recommendations for IntelliJ and Cursive on Mac? Using default bindings for both the IDE and the plugin, I’m running into a bunch of collisions – both between the IDE and the plugin, and between both and the OS. I’ve been remapping things as I run into them, but if anyone’s found that some other keymap works better out of the box, I may just cut my losses and make the switch.#2021-10-0611:15indyI tend to use emacs like keybindings where there are first strokes and second strokes, the keybindings palette expands significantly this way. Example, I use ^ + C as the first stroke and ^ + M as the second stroke to invoke the Manage Projects actions.#2021-10-0612:45heliosI second Emacs-like keybindings#2021-10-0612:58Colin P. HillI’ll give that a try, thanks!#2021-10-0614:18imrehttp://mishadoff.com/blog/idea-for-clojure/ is a good starting point for mnemonics-like ones, https://github.com/imrekoszo/dotfiles/tree/master/settings/IdeaIC-current/keymaps are based on that#2021-10-0612:06seriogaOK, the issue has been filed https://github.com/cursive-ide/cursive/issues/2596#2021-10-0604:24royalaidhey @cfleming I am trying to use cursive inside a larger team repo. Because I am the only one using cursive we would like to keep the idea files out of the main repo. The problem I have is that everytime I update my deps.edn and sync it breaks the idea configuration#2021-10-0604:31R.A. PorterAre you sharing disk space or using version control software? I would hope and assume the latter; in that case, just add your IJ project files to either your global ignore file (e.g. .gitignore if using git) or to local ignite files. If the former case, I strongly advise that you explain to your team the value of DVCS.#2021-10-0612:45heliosI know this is not what you asked, but we are also mostly .gitignoring the .idea folder BUT having a few files actually checked in for consistency: indentation settings and whatnot. But everybody has their own .idea folder#2021-10-0615:43royalaidWe are using DVCS, hence why I referred to a repo. Again my main problem is that syncing the deps.edn with intellij breaks the modules that have been added to the project.#2021-10-0615:50R.A. PorterPerhaps I don't understand why you said, "we would like to keep the idea files out of the main repo", then.#2021-10-0615:53royalaidBecause I am the only one using intellij, it just adds noise the PRs and diffs#2021-10-0615:54R.A. PorterRight. Which is why @U0AD3JSHL and I both suggested using .gitignore Then your IJ files would still be where they belong but not be in your PRs and shared repository.#2021-10-0615:57royalaidAgain, its not about where the project files live. That isn’t an issue. The issue is specifically if I right click my deps.edn and sync new dependencies the project loses modules#2021-10-0615:57royalaidDo you have a solution to specifically, that?#2021-10-0615:58R.A. PorterI do not. Good luck.#2021-10-0616:41royalaidFound what I think is the problem, or part of it. The issue seems to be cursives assumption that the deps.edn files will live next to the intellij iml. We have frontend setup with two sub projects that use a parent directory to house their deps.edn#2021-10-0621:19cfleming@U0S3YK6HK Can you share the directory structure of your project along with where the deps.edn files live? I’m not sure I understand how you have this set up. If you’d prefer to email to <mailto:/cdn-cgi/l/email-protection|/cdn-cgi/l/email-protection> and discuss offline that’s fine too.#2021-10-0604:25royalaidadd to this that the project uses a monorepo with multiple modules that nested under other modules and it seems to run into a lot of cases that cursive assumes work but do not#2021-10-0604:25royalaidI am sure a major part of this is me not understanding how to use intellij’s project config but I can’t imagine my modules should get nuked on refreshing deps#2021-10-0616:41royalaidFound what I think is the problem, or part of it. The issue seems to be cursives assumption that the deps.edn files will live next to the intellij iml. We have frontend setup with two sub projects that use a parent directory to house their deps.edn#2021-10-0710:46Rachel WestmacottMinor issue: defs with names containing $ e.g. (defn fmt-$ [my-amount] ...) seem to not be visible to cursive. Perhaps a regex issue on the name?#2021-10-0713:16onetomi think i've encountered that $ issue too, but im not 100% sure.#2021-10-0720:45cflemingInteresting, I’ll check that out and see if I can reproduce it.#2021-10-0710:51Rachel WestmacottMinor issue 2: Extend Selection (Ctrl+W by default I believe) is inconsistent in this case (thing "string"|) (where | is the caret). Compare this to the case where "string" is anything other than a string to see the inconsistency, e.g. a number, symbol or collection literal.#2021-10-0710:51Rachel WestmacottMajor issue: Cursive is great and more people should be using it.#2021-10-0713:15onetomthere is no space printed after reader tags in the cursive REPL pane. on a terminal REPL there is a space after reader tags. is it like that for others too? is that intentional? is there a configuration option somewhere which affects this?
#inst "2020"
=> #inst"2020-01-01T00:00:00.000-00:00"

@(def my-rmap (rmap my-data-map))
=> {:foo #rmap/rval??, :bar #rmap/rval??}
#2021-10-0720:47cflemingI don’t think it’s intentional, and I don’t think there’s a config flag for it. Does it affect anything or is it just an aesthetic issue?#2021-10-0806:49onetomit's just a readability issue; hasn't interfered with anything else so far. i was just updating rmap docs, so i was copy-pasting from the REPL to a README and that's why it became a temporary annoyance.#2021-10-0713:36helios@cfleming I'm seeing quite frequently some issues with IntelliJ/Cursive and rendering. I can't exactly tell you when the problem starts, but at some point i get some strange highlighting in forms. As i scroll through the document with my cursor, it looks like the font-weight changes. Only restarting the IDE seems to fix it. I can try to make a video to highlight the problem, but it's very unpredictable. Have you ever seen anything like it? I think this happens after the laptop has been sleeping / resuming activities a few time (FWIW, MBP 2019 16", using always the dedicated graphics card)#2021-10-0713:52heliossent you a mail with the video#2021-10-0714:20onetomI'm using Cursive on MacBook Pro (15-inch, 2017) for a few years and never experienced issues with font weight changing unexpectedly. I'm on macOS Big Sur 11.6 (20G165) at the moment, but used both release and EAP versions of intellij with earlier macOS versions too. I also used IntelliJ on external non-HiDPI and HiDPI screens; no issues. Font weight specifically (and even font style) can change depending some settings in your theme for highlighted parenthesis pairs, so that's something which can be unexpected while u r scrolling by changing your cursor position. I hope these statements might trigger some ideas, like looking for suspicious IntelliJ extensions or having some graphics related kernel extension (like SwitchResX) or screen sharing software or some unusual font, which triggers some edge cases in the font rendering engine.#2021-10-0714:21onetomare you using the official JetBrains JDK or some generic, off the shelf one? because i've seen crazy behaviour on non-jetbrains patched JDKs.#2021-10-0720:43cfleming@U0AD3JSHL I’ll reply over here so that others can see the conversation. Unfortunately I’ve never seen anything like that. Are you on the IntelliJ EAP? I’ve sometimes found the font rendering to be worse in the EAPs but it’s generally fixed in time for the release. I’d suggest filing a YouTrack issue at http://youtrack.jetbrains.com, JetBrains are usually pretty responsive over there.#2021-10-0720:44cflemingAnd yes, definitely use the JetBrains JDK in case you’re not for some reason.#2021-10-0810:18helios@U086D6TBN yeah i understand, there's something going on because restarting IntelliJ fixes this behavior. @cfleming yeah running on EAP, but this is not something new. It's occurring more often now#2021-10-0810:19cfleming@U0AD3JSHL Definitely time for a YouTrack issue then, I think.#2021-10-1005:30onetomonce i've restored a macos installation from a time machine backup (iirc moved the setup from a macbook to an imac) and i've experienced very strange behaviours. certain shortcuts just didn't work. the font rendering was different too and i couldn't get into the bottom of it, so i've ended up reinstalling the system (which i hardly ever do...) just saying, to add to the list of oddities, which might lead to unique/rare experiences.#2021-10-0720:29Colin P. HillDoes Cursive have any features to support transforming a :refer :all require into one that uses an alias? And if not, what’s the best way to submit a feature request? Would be a nice complement to the existing “Rename…” support for namespace aliases.#2021-10-0720:50cflemingThere’s an old issue here requesting the opposite, with a comment that both directions would be nice. I’m planning to do some work on general namespace manipulation soon. https://github.com/cursive-ide/cursive/issues/863#2021-10-1009:41Oded HassidiHi, I have recent version of cursive with intellij. and when trying to run test with “Run with Leiningen” I get this “Deferred configurations cannot be run with standard runners” any idea?#2021-10-1020:13cflemingCan you send a screenshot of your test run configuration please?#2021-10-1112:36Oded HassidiThanks#2021-10-1311:21Oded Hassidi@U0567Q30W can u please help?#2021-10-1321:06cfleming@U01HHEGLQAX Does this happen with all your test configs? When I’m back at my computer I’ll try to see if I can reproduce this.#2021-10-1321:06cflemingDoes it happen in other projects, or just this one?#2021-10-1405:54Oded Hassidiall of them, this is running tests. but running repl runs ok#2021-10-1020:18cfleming@onetom (and others) - I’m hoping to get the next EAP out this week, and that has better support for Code With Me. The REPL is shared and the structural editing/navigation commands now work. There are still things that don’t work, but it’s getting more usable.#2021-10-1201:56steveb8n@cfleming fwiw I’m excited about the prospect of using Code with Me. thanks for focusing on this#2021-10-1211:03Jakub Holý (HolyJak)I have a really long (deftype ...) defined on a single line. I select it and run the Reformat Code command and expect it to format it - but nothing happens. Why?#2021-10-1212:13imreCursive's reformat doesn't add linebreaks as far as I know#2021-10-1212:18GGfpcIs there a way to use the repl while the execution is paused on a breakpoint?#2021-10-1220:54Jeff Evansthe evaluate window works then#2021-10-1220:55Jeff Evansalthough the trick is you will have needed to require the namespaces you want to use beforehand#2021-10-1311:57miikkaI seem to have a new REPL issue. On this old Boot-based project, if I start a nREPL, connect to it with Cursive, and try to load some code, I'm getting somewhat arbitrary exceptions about namespace not found. However, if I first connect with boot real -c and load code, it works fine when connected with Cursive. Everything worked just fine last week when I last worked on this project but this morning I upgraded IDEA to 2021.2.2 and Cursive to 1.11.0-2021.2, so I suspect the upgrade broke something.#2021-10-1401:12cflemingHi Miikka, can you provide some more detail on what you’re doing to load the code? Send file to REPL, or sending forms? Also, what does the exception look like?#2021-10-1510:43miikkaHi Colin! It seems that I don't even need to load any code. Simply connecting the REPL (with remote Clojure REPL run configuration using nREPL in Cursive) seems to trigger the problem actually. In the terminal where I'm running Boot, a huge backtrace pops up. It's not always the same; I tried it now twice and got these ones: https://gist.github.com/miikka/5aee7dffbddb60e72bad5c1f66a92750#2021-10-1510:45miikkaIf the answer is "don't use Boot", I understand that. We should absolutely migrate this to Leiningen or deps.edn.#2021-10-1510:49cflemingHmm, I suspect that probably is the answer, sorry. Those are some extremely strange errors, and I really have no idea what might cause them.#2021-10-1510:49cflemingSorry I don’t have a better answer.#2021-10-1403:01nodenameI’m trying to add a run configuration for Reveal as described in https://vlaaad.github.io/reveal/#cursive but “Run with Deps” is greyed out. Why is it greyed out?#2021-10-1403:32cflemingHow did you create the project? That option is only available for projects imported from a deps.edn.#2021-10-1416:23nodenameOK no it was not created that way#2021-10-1415:19octahedrionsometimes when I start a REPL I can't send forms inside comment blocks to the REPL, instead it sends the entire parent comment. I don't know what I'm doing differently when this happens because usually it does what I expect and sends the outermost non-comment form to the REPL#2021-10-1419:46cflemingI’ve been meaning to test this, but I think that this happens if you send the form when it’s indexing.#2021-10-1812:59octahedrionit's not that - it's not indexing#2021-10-1813:28octahedrionthough it could be related to indexing - I did "refresh clojure deps..." and got an exception regarding indexing which I've reported to Cursive. I'm now doing invalidate caches and restart...#2021-10-1813:29octahedrionI also noticed that I had no code-completion for that project#2021-10-1813:31octahedrionok invalidate caches & restart fixed it#2021-10-1813:32octahedrionand fixed the code-completion too#2021-10-1813:33octahedrionit's annoying having to restart IntelliJ but all's well that ends well#2021-10-1419:43dvingoit depends on where your caret is placed#2021-10-2008:00octahedrionno it doesn't. There are 2 ways to send forms to the REPL, send current form and send form before caret. I'm talking about the former which can break if indexing is broken#2021-10-1505:04Oliver GeorgeQuick sanity check. Is there a way I can avoid being completely "off the map" with my js interop. Example below from a namespace (we use shadow-cljs). Bit shouty for my taste.#2021-10-1505:42cflemingUgh, sorry, I’ve been meaning to make an interim fix to this for the longest time (as well as a more definitive fix, of course). I’ll try to get that into the next EAP.#2021-10-1505:04Oliver George#2021-10-1823:14nodenameI’ve managed to break Cursive’s ability to open a REPL. I believe I clicked “Restart REPL” and it didn’t restart, and now when I try to open a REPL I get a grey pane with “Nothing to Show” in it. Is there a way I can restore REPLing to Cursive?#2021-10-1919:50wilkerlucio@cfleming hello, I'm experiencing a case where my project is refreshing forever, it just says Reading Project, but seems stuck there for a long time, this project worked before, the issue started after I add two new deps to deps.edn, I have those same deps in other projects without issues, is there a way I can see some debugging info to understand whats going on?#2021-10-1919:56Alex Miller (Clojure team)does it work at the terminal?#2021-10-1919:56Alex Miller (Clojure team)(probably want a -Sforce if you check)#2021-10-1923:35cflemingYes, I’d check that first, I can’t think of anything in Cursive that would cause that, it just calls out to deps.#2021-10-2019:54wilkerluciodidn't got to try on terminal, but it was a git dep, when instead I made a released and used the maven version, it worked fine, I'll do a check on the terminal for it#2021-10-2020:57wilkerlucio@U064X3EF3 I just tried running from terminal, and it works as expected there (also tried loading the lib from the REPL)#2021-10-2020:57wilkerlucioits a git dep, in a project that has 3 different deps.edn modules#2021-10-2019:55wilkerlucioI'm noticing in a project that the auto-complete for keywords is using different contexts for CLJ and CLJS (a keyword that's on CLJ file doesn't show in completions on CLJS), is this intended? I believe would be better to have keywords shared across CLJ/CLJS#2021-10-2020:25wilkerlucioactually, not about CLJ vs CLJS, but about different modules in the same project#2021-10-2100:51wilkerlucioI'm seeing a strange hightlight behavior, as I move my cursor over the keywords it gets some parts green that make no match with the current keyword#2021-10-2100:53wilkerluciofull file contents: https://gist.github.com/wilkerlucio/f598716ae10345895cb56076dba98eaf#2021-10-2109:15imreI also noticed this, not specific to keywords#2021-10-2109:16imre
IntelliJ IDEA 2021.2.3 (Community Edition)
Build #IC-212.5457.46, built on October 12, 2021
Runtime version: 11.0.12+7-b1504.40 x86_64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
macOS 11.6
GC: ParNew, ConcurrentMarkSweep
Memory: 4029M
Cores: 8
Registry: scala.erase.compiler.process.jdk.once=false
Non-Bundled Plugins: net.seesharpsoft.intellij.plugins.csv (2.17.1), com.intellij.plugins.watcher (212.5080.8), Key Promoter X (2021.2), StringToolsPlugin (4.0), de.thomasrosenau.diffplugin (2.1.7-SNAPSHOT), com.jetbrains.plugins.ini4idea (212.5457.59), org.intellij.plugins.hcl (0.7.14), dev.monogon.cuelang (0.8.2), com.namespace.sort.namespace-sort-plugin (1.6-imrekoszo), name.kropp.intellij.makefile (212.5457.59), mobi.hsz.idea.gitignore (4.3.0), String Manipulation (8.19.203.000.0), org.intellij.scala (2021.2.23), org.jetbrains.kotlin (212-1.5.31-release-546-IJ4638.7), com.cursiveclojure.cursive (1.11.0-2021.2)
Kotlin: 212-1.5.31-release-546-IJ4638.7
#2021-10-2119:26markaddlemanI recently started using https://github.com/hyperfiddle/rcf . It's pretty nice. I'd love to configure Cursive to treat its tests macro the same as clojure core's comment macro for the purposes of sending the top form to the REPL. Under Cursive's current behavior, only (inc 1) form is considered the top form:
(comment
  (inc 1) ; <- cursor in this form
  (inc 2))
Whereas, the entire (tests ...) form is considered the top form:
(tests
   (inc 1)
   (inc 2))
As a default behavior, this makes sense. However, I don't think there's currently a way to tell Cursive to treat tests the same as comment
#2021-10-2121:42cflemingI’ll check this - I’m not sure if it’s possible to resolve-as a form as comment. I’m also not sure you’d want that, since it disables some functionality inside comment blocks. Could you file an issue for that?#2021-10-2315:43markaddlemanhttps://github.com/cursive-ide/cursive/issues/2600#2021-10-2315:44markaddlemanThanks for Cursive!#2021-10-2320:28cflemingGreat, thanks!#2021-10-2400:15emccueIf I make a custom data reader for css, could we make intelliJ do syntax highlight in the string?#2021-10-2404:15cflemingDefine “we” 🙂#2021-10-2404:18cflemingThe short answer is: it’s possible, but tricky.#2021-10-2412:40AJ Jaro@U3JH98J4R is that for a certain file type? You can create a custom editor for that file type and that editor can have your syntax highlighting, yes#2021-10-2415:45emccue@UGMAVSMUM I was thinking of looking into css directly in cljs files#2021-10-2415:47emccueso instead of page.css and page.cljs having
#css "
.some-class {
   color: red;
}
"

(defn component []
  [p.some-class "hi"])
#2021-10-2415:52emccueon the scope of “features i wish we had” - ability to declare macros that introduce new symbols is still more directly useful - but there might be some compile checking of css classes that we could get from something like this#2021-10-2416:37emccueAnd "we" in this context is the engineers I work with#2021-10-2508:24wotbrewOh I would love this for SQL/GraphQL#2021-10-2620:28cflemingTo answer the original question - I don’t know very much about language injection, but I believe there’s a mechanism by which users can configure where languages should be injected. I’ll try to figure this out, and I might be able to make it flexible enough for that case.#2021-10-2400:16emccueI.E.
#css "
p {
  color: blue
}
"
#2021-10-2416:23GGfpcHow do I run all tests in a package with cursive?#2021-10-2504:28cfleminghttps://twitter.com/CursiveIDE/status/1452492161253986305#2021-10-2508:47imreNice improvements!#2021-10-2513:00wilkerlucioawesome! I'm just trying the new :as-alias support, I see when I use Cursive now correctly completes the keyword with it 🙌#2021-10-2513:01wilkerluciobut seems like the IDE still marks that as an error (yellow background)#2021-10-2520:22cflemingHmm, thanks, I didn’t see that, I’ll check it.#2021-10-2613:31imreI'm unable to get https://github.com/cursive-ide/cursive/issues/2026 work btw#2021-10-2620:48cfleming@U08BJGV6E do you have an example?#2021-10-2620:48cflemingBasically, as long as the key and value are not on the same line, that should work.#2021-10-2709:35imre@U0567Q30W basic case:#2021-10-2709:36imrecomplex case:#2021-10-2709:37imreIt could be that I don't properly understand how this one should work, perhaps you have a counter-example?#2021-10-2709:38imre
IntelliJ IDEA 2021.2.3 (Community Edition)
Build #IC-212.5457.46, built on October 12, 2021
Runtime version: 11.0.12+7-b1504.40 x86_64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
macOS 11.6
GC: ParNew, ConcurrentMarkSweep
Memory: 4029M
Cores: 8
Registry: scala.erase.compiler.process.jdk.once=false
Non-Bundled Plugins: Key Promoter X (2021.2), StringToolsPlugin (4.0), dev.monogon.cuelang (0.8.2), com.jetbrains.plugins.ini4idea (212.5457.62), com.intellij.plugins.watcher (212.5080.8), mobi.hsz.idea.gitignore (4.3.0), org.intellij.plugins.hcl (0.7.14), de.thomasrosenau.diffplugin (2.1.7-SNAPSHOT), name.kropp.intellij.makefile (212.5457.62), com.namespace.sort.namespace-sort-plugin (1.6-imrekoszo), org.jetbrains.kotlin (212-1.5.31-release-546-IJ4638.7), com.cursiveclojure.cursive (1.12.0-eap1-2021.2), org.intellij.scala (2021.2.23), String Manipulation (8.20.203.000.1)
Kotlin: 212-1.5.31-release-546-IJ4638.7
#2021-10-2510:04octahedrionI have "default to only indent" and "force only indent for all forms" selected but still structural editing moves like raise and splice reformat code, which I don't want. For example, splicing a pair of forms out of a vector into a parent map within a map will reformat the entire root map, and it's someone else's code so I don't want to change their formatting.#2021-10-2520:25cflemingHmm, I think that’s hard-coded at the moment and can’t be controlled. I’m going to re-work the structural actions soon and I can fix it then - could you file an issue so I don’t forget?#2021-10-2608:40octahedrionok thank you!#2021-10-2513:50Ivar RefsdalHm. When I do "Search REPL history" IntelliJ/Cursive crashes and logs me out (!). Not sure when this started happening.#2021-10-2520:39cflemingHmm, that’s very strange, do you mean that the whole application crashed? If so that sounds like a bug in IntelliJ or the JBR. I’m not sure there’s much I can do about that in Cursive itself, unfortunately.#2021-10-2705:05onetomif i press cmd-opt-e, while my cursor is in the REPL tool window's expression input area, the Search history popup appears as expected. however, if i do cmd-shift-a "repl his" enter, the popup appears briefly, then disappears and the latest history entry is pasted into the input area, as if I had pressed enter twice. and indeed, if i click on the Search REPL history menu item in the action menu, the search popup appears and stays active.#2021-10-2705:06onetomThe Previous/Next REPL History Item actions also doesn't work, regardless of how I try to execute them (via shortcut or from the action menu)#2021-10-2705:57cflemingHmm, interesting, I’ll check those.#2021-10-2707:27Ivar RefsdalFor my case it (search REPL history) works in one project, but (yes) crashes and logs me out in another project. Maybe this is related to that the search popup is bigger than the monitor it ends up on? I've been mixing dual and single monitor setup.#2021-10-2720:57cflemingYes that could be. I’ve been meaning to make fixes to that so the window doesn’t get out of control. I’d say that's the most likely candidate, it’s probably hitting a bug in the window rendering or something similar.#2021-10-2805:56Ivar RefsdalAny easy way to clear the REPL search history?#2021-10-2513:54Ivar RefsdalI'm using 1.12.0-eap1-2021.2#2021-10-2605:24shinichyIs there a way to evaluate an expression after local nREPL is started? I’d like to achieve the same behavior as -e option of clj command.#2021-10-2605:24shinichyI just found a feature request https://github.com/cursive-ide/cursive/issues/2038#2021-10-2611:24Mateusz MazurczakHi, when I run load file in repl for cljs files. I get wrong path sent to a repl (it is just sending absolute path /home/user/.../ instead of src/..) Can I change sent to repl path manually to send shorter path?#2021-10-2620:54cflemingHmm, I think this should work - what type of REPL are you running? (clojure.main, nREPL, etc)#2021-10-2713:39Mateusz MazurczaknREPL#2021-10-2720:58cflemingDoes this happen for all files?#2021-10-2613:45helioshow can i force cursive to regenerate stub? after upgrading intellij+cursive all datomic stuff looks unresolved#2021-10-2620:53cflemingYes, I need an explicit action to allow this. Currently the best way to force it is to refresh your project using either the lein or deps toolwindow.#2021-10-2705:13onetomi usually do Cmd-Shift-A "ref dep" Enter to run the Refresh Clojure Deps Project action. i need it so rarely, i didn't feel like i would need to come up with some shortcut key for it.#2021-10-2705:57cflemingWhat I meant was that that there should be an action to check the stubs without having to refresh the project.#2021-10-2613:49heliosI think there is an error with two projects open. Let's say A or B. I have the window of B open and i get the prompt for generating stubs. I see that is generating stubs for project A (or at least that's what i see in the bar at the bottom of the screen with the activity)#2021-10-2613:49heliosand then no stubs are still present#2021-10-2613:49helioshaving only one project open fixed it for me, maybe a bug, @cfleming?#2021-10-2620:54cflemingHmm, that could be. Are the stubs for the same dependency (e.g. datomic)? Could you file a bug with some repro info, please?#2021-10-2615:37Shantanu KumarHi, is there a way to set CLJ_CONFIG env var for a deps.edn project in Cursive?#2021-10-2620:29cflemingAs Alex mentioned, you can do this for run configs, but you can’t do it for project resolution. You definitely should be able to, and I’ll fix this.#2021-10-2620:30cflemingThere’s a request for this at https://github.com/cursive-ide/cursive/issues/2212, I’ve just set it for the current EAP cycle and I’ll fix it there.#2021-10-2615:39Alex Miller (Clojure team)you can set env vars on run configurations
#2021-10-2705:09onetomhas the error formatting in the REPL window changed in the latest cursive? it has pretty colors and nicely indented now.#2021-10-2705:09onetom#2021-10-2705:10onetomor is this the consequence of something else customizing the exception reporting format?#2021-10-2705:54cflemingThat looks like Aviso pretty to me. Cursive will use it if you have it installed and loaded.#2021-10-2811:19imreHow exactly can this be used? I tried putting pretty on the classpath, then doing
(throw (ex-info "foo" {:bar 1} (Exception.)))
(pst)
but not getting this nicer display
#2021-10-2816:34onetomi ran ((requiring-resolve 'io.aviso.repl/install-pretty-exceptions)) - as mentioned here: https://ioavisopretty.readthedocs.io/en/latest/exceptions.html#io-aviso-repl - and then both (clojure.repl/pst) and the Print Last Exception Cursive action is printing nicely.#2021-10-2816:35imreooh so it isn't as simple as putting it on the classpath#2021-10-2816:35imrethanks!#2021-10-2816:35onetomfor me it was pulled in by midje, through nubank/matcher-combinators, because i forgot to exclude midje:
{nubank/matcher-combinators {:mvn/version "3.3.1"
                                :exclusions  [midje/midje]}
...
like this
#2021-10-2816:36onetomwell, mr fleming did say: if u have it installed and loaded#2021-10-2816:38imreyeah, I wasn't familiar with this lib at all#2021-10-2817:02onetomi saw it ages ago, probably in https://github.com/bhauman/rebel-readline , but since it was pulling in a lot of deps, i ignored it, because cursive was already enhancing exception printing since then machines got more ram and more powerful cpus, so maybe it's not such a bad idea anymore to use this by default :)#2021-10-2823:20cflemingYeah, the namespace has to be loaded, since there’s no simple way to check if something is available on the classpath or not.#2021-10-2823:24cflemingCursive will also use clj-stacktrace if it’s loaded.#2021-10-2901:47onetomi think these would be great selling points for Cursive. i would worth mentioning them on the website and include screenshots too. it could definitely help me to win some ppl over to Cursive.#2021-10-2901:50cflemingSounds good, I will do.#2021-10-2906:21imreJust out of curiosity, wouldn't requiring-resolve be a simple enough way to chexk?#2021-10-2908:25cflemingThe problem is that if it's not on the classpath, then it'll search it every time an exception is printed. Perhaps that's not a big deal, but I assumed anyone wanting to use it would have loaded it somewhere.#2021-10-2910:49onetomthere must be some caching going on in requiring-resolve, because subsequent calls take almost no time:
(time (requiring-resolve 'io.aviso.repl/install-pretty-exceptions))
"Elapsed time: 157.880319 msecs"
=> #'io.aviso.repl/install-pretty-exceptions
(time (requiring-resolve 'io.aviso.repl/install-pretty-exceptions))
"Elapsed time: 0.037877 msecs"
=> #'io.aviso.repl/install-pretty-exceptions
(time (requiring-resolve 'io.aviso.repl/install-pretty-exceptions))
"Elapsed time: 0.032688 msecs"
=> #'io.aviso.repl/install-pretty-exceptions
#2021-10-2923:18cflemingRight, but that's if it's present on the classpath. I’m not sure how long that would take if it had to search for it but couldn't find it each time.#2021-10-2705:18onetom@cfleming You typically get negative feedback, so here is a positive one 🙂 I'm using 1.12.0-eap1-2021.3 on macOS Big Sur for 2 days now and I have no issues so far. I don't use tools.build yet though. Everything feels smoother and snappier on this latest IntelliJ EAP release compared to the latest non-EAP one. I really love the new map formatting logic too! We are one step closer to a uniform Emacs and Cursive code formatting experience!#2021-10-2705:55cflemingGreat, thanks - I also love positive feedback 🙂 Great to hear it’s going well. I’m going to look more in-depth at formatting soon, that’s some of the oldest code in Cursive and it could do with a dust-off. As part of that I’m going to make cljfmt compatibility a priority.#2021-10-2709:06octahedrionpeople usually only give feedback when something's wrong I guess, well let me also say I'm delighted with Cursive & been using it since the start, good job @cfleming#2021-11-0210:54Ivar RefsdalI also totally dig Cursive! Great job @cfleming !#2021-11-0220:33cflemingThanks everyone!#2021-10-2711:40dazldhey people - I'm trying to setup clj-kondo via the LSP method, but I don't seem to be able to see the reported issues from kondo in the IDE - what am I missing? hovering shows either the previously setup static issue, or documentation.#2021-10-2711:41dazldie, I don't see the linting feedback. maybe this is better for #clj-kondo too 🙂#2021-10-2711:47dazldanswering my own question - the IDE was configured to not show errors, I had to go and change the options in the top right:#2021-10-2712:14ericdalloBTW have you tried the LSP plugin with clojure-lsp? :)#2021-10-2809:02dazldnot yet!#2021-10-2809:02dazldbut clojure-lsp is excellent, and i've used that with emacs very succesfully (ty for that btw, eric!)#2021-10-2812:36ericdalloCool, you are welcome!#2021-10-2818:44Otto Nascarellahey @UKFSJSM38… I have tried it yesterday, but the intellij lsp plugin dies quite quickly. if I try and use clj-kondo command line, it also dies. it needs to be the special server build provided by @U04V15CAJ#2021-10-2818:45borkdudehmm, the difference is binary vs JVM there?#2021-10-2818:49Otto Nascarellait seems so, @U04V15CAJ#2021-10-2818:50borkdudewhat do you mean by "it dies", can you give some example output?#2021-10-2818:50Otto Nascarellait times out. even if I give it 60s to start#2021-10-2818:51borkdudebut you say on the command line it also dies?#2021-10-2818:52ericdallo@U5B8QSSC9 did you try increasing the plugin timeout? https://clojure-lsp.io/clients/#intellij#2021-10-2818:52Otto Nascarellano, no! sorry for the misunderstanding. it does not work in integration with the LSP plugin. even the normal standalone jar does not talk nicely to it. it needs to be the clj-kondo-lsp-server one#2021-10-2818:52ericdallothe first time clojure-lsp starts, it can take one minute or 2 depending on the project#2021-10-2818:52ericdallothe next times it caches#2021-10-2818:53Otto NascarellaI’ll give it a huge bump and see…#2021-10-2818:56Otto Nascarella> even the normal standalone jar does not talk nicely to it I mean… the lsp plug in does not talk nicely to lsp 🙂#2021-10-2818:58Otto Nascarella#2021-10-2819:00Otto Nascarellaalthough that message showed up, now it’s green @UKFSJSM38 and the highlighting I was getting from clj-kondo are also working ✌️#2021-10-2819:01ericdallothat message means lein classpath or clojure -Spath failed, it depends of your project type#2021-10-2819:01ericdallocheck clojure-lsp log for more details https://clojure-lsp.io/troubleshooting/#server-log#2021-10-2819:02ericdallohttps://clojure-lsp.io/troubleshooting/#classpath-scan-error#2021-10-2815:03RyanHas anyone had any luck getting language injection to work in strings? Specifically, I'd love to get GraphQL highlighting, even if I have to specify language with comment.#2021-10-2815:43wotbrewI believe this was discussed here in the context of data readers: https://clojurians.slack.com/archives/C0744GXCJ/p1635034544008200#2021-10-2819:57Ian FernandezHi, I'm having problems on configuring a leiningen project that has projects inside it#2021-10-2819:59Ian Fernandez
Error reading ...../project.clj
			Cannot run program "clojure" (in directory "...,"): error=2, No such file or directory
			error=2, No such file or directory
#2021-10-2820:00Ian Fernandezgetting this error#2021-10-2820:00Ian Fernandezwhen I'm configuring the modules on project structure top level module is not being detected as a leiningen project, even having project.clj when I click on the module with right button and add this#2021-10-2820:00Ian Fernandez#2021-10-2820:00Ian Fernandezit gives me that error#2021-10-2820:05tanzoniteblack@d.ian.b, I’ve seen this error a number of times when using the lein-tools-deps plugin for lein. It’s a path issue with how intellij is executing the lein command, in some environment where the clojure program isn’t findable. You can fix it by setting an executable path option in the lein settings: https://github.com/RickMoynihan/lein-tools-deps#clojure-executables#2021-10-2820:05Ian Fernandezthanks 🙂#2021-10-2820:05Ian Fernandezi'll try to do that#2021-10-2820:09Ian Fernandezit worked @tanzoniteblack! 😄 thanks#2021-10-2820:09tanzoniteblack👍#2021-10-2821:28djblueCross posting this here for those who might be interested: https://clojurians.slack.com/archives/C0185BFLLSE/p1635455070000900#2021-10-2821:30markaddlemanVery#2021-10-2903:13onetomi've commented on the original thread. we would love to see this. we used reveal from time to time, but it was a little bit heavy and it's definitely annoying that it opens a separate window.#2021-10-2910:47tlonistIs there any way to show REPL with presentation mode from intellij?#2021-10-2916:42salam@cfleming i started getting these exceptions from a socket repl:
Error handling response - class java.lang.IllegalArgumentException: No implementation of method: :err of protocol: #'cursive.repl/Handler found for class: nil
Error handling response - class java.lang.IllegalArgumentException: No implementation of method: :out of protocol: #'cursive.repl/Handler found for class: nil
Error handling response - class java.lang.IllegalArgumentException: No implementation of method: :out of protocol: #'cursive.repl/Handler found for class: nil
IntelliJ IDEA 2021.2.3 (Ultimate Edition) Cursive: 1.12.0-eap1-2021.2
#2021-10-3004:57cflemingDid anything change about your project that might have caused that?#2021-10-3005:06salamhm… good question. i cannot think of anything special in the project that would cause this. it’s a regular remote socket REPL server that i started using -Dclojure.server.repl="{:port 5555 :accept clojure.core.server/repl}".#2021-10-3005:07salamusing the latest version of Clojure#2021-10-3005:11salamyou may find the full stack traces and other data from the reports that i submitted within IntelliJ IDEA when this exception was thrown. #2021-10-2922:10buttergunsHi @cfleming. I have a Leiningen project imported using Cursive. The project.clj contains the following dependencies:
[com.mycompany/my-maven-project "5.3-SNAPSHOT"]      ; Maven
[com.mycompany/my-leiningen-project "5.3-SNAPSHOT"]  ; Leiningen
For both of these: the Sources exist within my IDEA project. When I import the project.clj the my-leiningen-project is declared as a Module Dependency. However the my-maven-project is declared as a JAR Dependency. I would like them both to be Module Dependencies. 1. Is that possible? 2. Am I doing something wrong? Thanks!
#2021-10-3004:56cflemingUnfortunately this isn't supported at the moment. Could you file an issue and I'll take a look at fixing that? No promises, it may be difficult.#2021-10-3019:15buttergunshttps://github.com/cursive-ide/cursive/issues/2608#2021-11-0111:19cflemingThanks!#2021-10-3013:09onetomI was giving a quick try to the Code With Me feature, to see, if it would be possible to utilize my powerful office machine from home, through my less powerful laptop. Here are the issues, I’ve encountered immediately: 1. Load File in REPL action is assigned to Opt-Shift-L JetBrains Client-EAP, instead of Cmd-Shift-L, like on the sharing session host machine 2. Jump to REPL Editor action doesn’t do anything, even when I invoke it with its Cmd-\ shortcut. What does work at least, is Cmd-E "repl" Enter 3. Cursive REPL commands are not available, so I can’t run my Kaocha tests conveniently 4. Edit REPL Commands action says: This action is not yet implemented in the JetBrains Client 5. Search REPL History action (`Opt-Cmd-E`) pops up the search window on the host machine, not the client machine. 6. If I Send ... to REPL something, it switches *ns* to the namespace of the file I was sending the expression from. I don’t have clear feedback about this because the REPL editor area is just a simple, 1-line high input field, which I can’t resize. 7. Can’t navigate by namespace (there is no Namespace tab the search everything popup) 8. There is no Refresh Clojure Deps Projects action So these would be the features, which would allow me to work remotely seamlessly. But if I understand correctly, for this purpose, the JetBrains Gateway is going to be a more suitable solution, so I might not care so much about the Code With Me support. What I was hoping, is that I can avoid spending money on the latest MacBooks and just utilize some remote machine, which either a pay-as-you-go type of cost OR I already have a really powerful i9 iMac in the office, with 80GB RAM, which I'm more than happy with already.#2021-10-3013:24onetomthe usages popup also has some graphical artifacts#2021-10-3013:32onetomvery impressive solution otherwise; very snappy too! and the JetBrains Client "only" consumes about 1 GB of RAM, as opposed to the 3 GB IntelliJ on the host machine. most ppl would think that's hardly a difference, which would worth the trouble, but unfortunately, on Mac's, with 8 GB or even 16 GB RAM, that is likely the difference between starting to rely on swap or not...#2021-11-0111:20cflemingThanks for the report, I’ll update https://github.com/cursive-ide/cursive/issues/2602, try all those out and ask JetBrains about the ones that aren’t already in that list.#2021-11-0114:05SKi! when using cursive for debugging, how to use the parameter of an anonymous function in intelliJ's "Evalute" window? I've tried using "%" but for that it says "unable to resolve %". In the "Variables" windows this parameter is listed as "p1--52131#" however it is not working with this name in the Evaluate window. Any ideas?#2021-11-0121:24cflemingHmm, good catch - I don’t think this is possible right now. I think you’d have to refactor your anonymous function to fn to do this.#2021-11-0119:29indyI seem to have to explicitly switch to the ns for the REPL command to resolve the selection, maybe the Execute in original namespace setting is what I need but that is disabled for all commands except for when Re-execute last command is on. Can the Execute in original namespace also be allowed to be toggled on for other REPL commands?#2021-11-0306:09onetomI, personally, don't really understand your question. Maybe that's why others hasn't reacted yet either. But it looks interesting what you are trying to do, so I would like to understand what are you up to. so this command would evaluate whatever text is selected. copies the prettified form of it into the clipboard. then returns the evaluation result. this much is clear. in other words, this command would behave, like the built-in Send Top Form to REPL or Send Form Before Caret to REPL, but also puts the prettified evaluation result into the clipboard.#2021-11-0306:53indyOkay maybe a screen recording might help elaborate this convenience issue.#2021-11-0306:55indyThe convenience issue is that, I have to Switch REPL to current NS for my custom REPL command to work as expected otherwise it won’t resolve the var. This is in contrast to the usual Send Form to REPL commands. It’s only a convenience issue and not anything major, just wanted to highlight it.#2021-11-0308:02onetomI was just thinking about a similar action this other day and had the idea of decomplecting the evaluation from the clipboard operation. I think regardless of which namespace you are evaluating something, clojure.repl/*{1,2,3} will be updated, so you could just have an operation, which puts the pretty-printed *1 into the clipboard.#2021-11-0308:08onetomalso, maybe u can utilize something like (in-ns ~file-namespace) yourself. i wonder if there is already something off the shelf, which can eval an expression within a namespace, without affecting *ns*... would (binding [*ns* ~file-namespace] ~selected-form) work?...#2021-11-0308:09onetomfor other readers benefit, these special ~something variables are documented here: https://cursive-ide.com/userguide/repl.html#repl-commands#2021-11-0308:11onetomi just remembered that i've done something like this before#2021-11-0308:13onetomend that Copy *1 to clipboard command was defined as ((requiring-resolve 'gini.clipboard/write) *1), where that clipboard/write fn was using java's built-in AWT, just to be cross-platform. but then i just discovered a few days ago, that such code is also available here: https://github.com/AvisoNovate/pretty/blob/master/src/io/aviso/clipboard.clj#2021-11-0308:15onetomhere is the code of the Open *1 in browser action, in case anyone wants to try:
(if (and (string? *1) (re-find #"^http|file" *1))
  ((requiring-resolve 'clojure.java.browse/browse-url) *1)
  (throw (ex-info "*1 was not a `file://` or `https?://` URL" {:*1 *1})))
#2021-11-0313:20indyThanks @U086D6TBN, I’m going to try the binding suggestion or explore in that direction, which if it works will solve my exact problem. And TIL clojure.java.browse. Usually for dev things like browsing a URL or opening a certain type of file with the correct app on a mac, I’ll simply do (clojure.java.shell/sh "open" file-path) .#2021-11-0313:22onetomI also work on macOS mostly, but trying to be cross-platform, so we can run the same code on Linux CI servers too.#2021-11-0313:25onetomI even have a direnv wrapper around clojure.java.shell/sh to make sure I have the same exact software on the path, regardless of the OS. I have an .envrc for every project, which has use nix , which ensures the environment I've declared in the shell.nix file in the same project directory.#2021-11-0217:54Shantanu KumarCan anyone share pointers on how to switch from stable to EAP version of Cursive?#2021-11-0217:55Shantanu KumarI downloaded the EAP ZIP - how to install it now?#2021-11-0218:01imrehttps://cursive-ide.com/userguide/#choosing-to-receive-eap-beta-builds#2021-11-0218:11Shantanu KumarThank you, @U08BJGV6E#2021-11-0219:29Shantanu KumarIn deps.edn projects {:mvn/version "_"} doesn't seem to be auto-resolving to the latest current version - is there a way to enable that?#2021-11-0220:02imreIs the issue isolated to cursive? Does it work if you run clojure -Srepro -Stree from the command line?#2021-11-0220:35cflemingGood question, I wasn’t aware that was a thing. I’d also be interested to know if that works from the command line.#2021-11-0220:37imre
; clojure -Srepro -Stree -Sdeps '{:deps {org.clojure/clojure {:mvn/version "_"}}}'
Error building classpath. Could not find artifact org.clojure:clojure:jar:_ in central ()
#2021-11-0220:39imreLooks like it isn't a thing, which is consistent with how I know Alex & co.#2021-11-0221:02Shantanu KumarThanks, @U08BJGV6E maybe it's a project specific config that I mistakenly considered a clj tool feature.#2021-11-0221:33Alex Miller (Clojure team)That’s not a thing. You can use “RELEASE” (that’s a Maven thing), but be aware that breaks the deps cache#2021-11-0306:01onetomwhat does "breaks the deps cache" mean? im aware, that using RELEASE as a coordinate results in checking for the latest version often (or always) at process startup, which can be very slow, depending on the quality of the network connection.#2021-11-0312:52Alex Miller (Clojure team)It's actually the opposite - the classpath cache looks good and will not be recomputed so you'll never see new versions#2021-11-0315:22onetomah, I probably mixed it up with how the SNAPSHOT versions behave.#2021-11-0315:33Alex Miller (Clojure team)more accurate than "breaks the cache" is "breaks the assumptions of the cache"#2021-11-0315:34Alex Miller (Clojure team)which is that a version is immutable and fixed#2021-11-0309:38henryw374I've now got clojure-lsp configured with intellij and I'd like code->reformat within a file to use clojure-lsp format instead of Cursive's formatting... and failing to see if that's possible. Or if there is some way to import clojure-lsp's formatting style into cursive that'd also work for me. Thanks#2021-11-0309:58henryw374there is an lsp option to 'always send requests' which apparently should mean the ide sends the command to the lsp even if the ide/plugin supports it already. but that doesnt seem to work for formatting afaict#2021-11-0310:08henryw374clojure-lsp format is using https://github.com/weavejester/cljfmt btw.#2021-11-0312:26ericdalloIt'd be nice to have that option on cursive :)#2021-11-0315:27onetomcljfmt could be just bundled with Cursive directly, since it's written in Clojure too, BUT 1. how well does it deal with invalid Clojure syntax? 2. how would the cursor position survive the reformatting? 3. how would the formatting of selections work? (alignment-wise, relative to the context of the selection)#2021-11-0610:41henryw374Any thoughts @U0567Q30W?#2021-11-0820:59cflemingMy plan here is to have an easy way to configure the Cursive formatter to be cljfmt-compliant. It’s actually hard to use an external formatter in IntelliJ since the formatting is deeply integrated in areas you wouldn’t expect (for example, when you press enter, where the caret should move to is calculated using the formatter). I’m interested to hear about cases where the current Cursive formatting can’t be made cljfmt-compliant, or other differences that are annoying.#2021-11-0821:00cflemingImporting a cljfmt spec and configuring Cursive appropriately is an obvious requirement that isn’t there currently.#2021-11-0822:15henryw374Sounds awesome 👍#2021-11-0314:17roklenarcicI’ve got a project that has project.clj and pom.xml . The pom.xml is the sideeffect of making a jar, but the IntelliJ complains that Maven and Leiningen cannot both manage the project and it keeps preferring Maven. Is there a way to fix this?#2021-11-0320:24cflemingI think what you need to do is unregister the project with Maven. In your Maven toolwindow, remove the registered project there, and then make sure that it still appears in your Leiningen toolwindow. If it doesn’t, you might need to re-import the project.clj again (right click -> add as lein project)#2021-11-0418:55GGfpcIn cursive, when I left click a test and click run-test-in-repl what exactly is happening under the hood?#2021-11-0508:46cflemingDo you mean that you put the caret inside a test and then use REPL-&gt;Run ‘some-test’ in REPL? If so, Cursive works out the var for the test you’re in, and then sends some code which is roughly equivalent to https://github.com/clojure/clojure/blob/b8132f92f3c3862aa6cdd8a72e4e74802a63f673/src/clj/clojure/test.clj#L797-L830 (but predates it so doesn’t use it)#2021-11-1017:42GGfpcIs there a way I can call that from the repl instead of having to right click?#2021-11-1017:42GGfpcLike calling (run-test my-test-name)#2021-11-1100:16cflemingNo, this would require communication from the REPL server to the IDE, which is something I have planned but isn’t there yet.#2021-11-0511:51mike_ananevI'm experiencing a constant problem: Idea+Cursive hangs too often. Idea 2021.2.3, Cursive 1.12.0-eap1-2021.2 (stable version behaves the same), Clojure CLI version 1.10.3.998 Steps I made: 1. Open one project 2. Open another project (never mind what project is) 3. See message about Synchronizing project 4. Idea is not responding...#2021-11-0512:31onetomu havent mentioned which OS are you on and I can't really tell from the screenshot. although the structure of the filename suggests, it's probabyl macOS, but which version of macOS? i don't have hanging issues on this macOS Monterey setup with the EAP version of IntelliJ and Cursive: IntelliJ IDEA 2021.3 Beta (Ultimate Edition) Build #IU-213.5605.12, built on November 3, 2021 IntelliJ IDEA EAP User Expiration date: December 3, 2021 Runtime version: 11.0.13+7-b1751.16 x86_64 VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o. macOS 12.0.1 GC: G1 Young Generation, G1 Old Generation Memory: 2048M Cores: 8 Registry: ide.allow.merge.buttons=false editor.show.notification.after.reformat=false Non-Bundled Plugins: AceJump (3.8.3) com.4lex4.intellij.solarized (2.4.0) indent-rainbow.indent-rainbow (1.6.2) org.jetbrains.plugins.localization (213.5605.12) mobi.hsz.idea.gitignore (4.3.0) name.kropp.intellij.makefile (213.5605.12) AWSCloudFormation (213.5605.12) org.toml.lang (213.5605.12) ru.adelf.idea.dotenv (2021.3.0.213) PlantUML integration (5.7.2) com.dmarcotte.handlebars (213.5605.12) com.cursiveclojure.cursive (1.12.0-eap1-2021.3) com.intellij.plugins.html.instantEditing (213.5605.12) Kotlin: 213-1.5.10-release-949-IJ5605.12#2021-11-0515:15mike_ananevMacOS Big Sur 11.6#2021-11-0520:45cflemingSo when this happens, the whole IDE locks up? If that’s the case, check for the automatically generated thread dumps: https://intellij-support.jetbrains.com/hc/en-us/articles/206544899-Getting-a-thread-dump-when-IDE-hangs-and-doesn-t-respond. If you have some there from recent hangs, please bundle them up and email them to me at <mailto:/cdn-cgi/l/email-protection|/cdn-cgi/l/email-protection>#2021-11-0511:56mike_ananevIf I kill an Idea app and reopen any project everything works fine, until next hang.#2021-11-0513:48Colin P. HillI'm trying to get Cursive to recognize the functions defined in honeysql.helpers. They use a macro, defhelper, which looks like defn except that it creates an additional arity with an extra parameter beyond the explicitly declared ones. Adding a custom resolution so that it resolves as defn works until I get to an invocation which uses that extra parameter, at which point Cursive complains about the arity. How can I get Cursive to resolve these correctly?#2021-11-0521:01cflemingYou can’t unfortunately. If you could file an issue for it, I’ll look at adding support in Cursive until you can do that yourself.#2021-11-0815:02Colin P. HillAh, I see the problem...we're on an old version of honeysql! Still want an issue, or are old versions out of scope for Cursive support?#2021-11-0820:57cflemingIf it’s not an issue in the latest version then no, I’d just wait for that to cease being a problem.#2021-11-0520:16folconHow does cursive decide which files to send when you call Sync Files in REPL \ Load File in REPL with nrepl? Does it wait for nrepl to respond in some way before sending the next file along? I'm evaling at the top namespace in a project, and it appears to only be sending my utils namespace, which is one the namespaces that requires no other files in my project, so it makes sense that would be the first ns sent, but I'm wondering why nothing else seems to be being sent...#2021-11-0521:14cflemingSync files will look at all modified files, and then send those files and all their modified dependencies in dependency order (i.e. dependencies before the files that depend on them). Load File does pretty much the same, but does it just for the file you invoke it on whether that file is modified or not.#2021-11-0600:58folconHmm, not sure why, but when I'm launching a new remote repl I only seem to be sending my utils.clj, it's not a big issue, as I've got a work around of calling load-file for my core ns, which seems to cause all my other files to load, but I'm surprised as it normally just works. I'm listening to the nrepl messages to determine that none of the other namespaces are sent. This is on clojure-clr, but I'm not using any specific behaviour, so a bit puzzled why it's happening. The behaviour worked perfectly, but appeared to break yesterday... Thanks for the heads up @U0567Q30W 😃#2021-11-0606:28cflemingThat does sound odd. I’m not in front of my computer but IIRC there’s some debug logging you can turn on to get a better idea of what’s happening and why. When I can I’ll send some info (assuming my memory is correct)#2021-11-1110:58onetomi would also be interested in some debug logging related to file loading/syncing. i keep experiencing inexplicable situations, which i can't reliable reproduce or comprehend. i did identify one pattern, which contributes to this mysterious behaviour. if i (def some-data ...) in NS1 and def some other value, derived from some-data in NS2, then changes of same-data in NS1, will not trigger the re-computation of the derived value in NS2. it sounds obvious that one shouldn't do this and use functions instead, but it's easy to fall into this trap... one example, which i was just fixing yesterday, would be to have a malli schema, which we use for generating a datomic schema. it doesn't change during the regular operation of the program, but during development, obviously it does. until we had only one file containing both the malli and the derived datomic schema as defs, everything was fine. no so much, after moving the computed datomic schema into other namespaces...#2021-11-1121:06cflemingI’ve checked the code and there isn’t any debug logging around this, but there should be. I’ll add that for the next build.#2021-11-1121:08cfleminghttps://github.com/cursive-ide/cursive/issues/2612#2021-11-0720:56jfntnHi there, is it possible to configure intellij/cursive to automatically refresh deps and reload the repl when it detects a deps file change?#2021-11-1110:49onetomim not sure it's possible to define precisely what is a deps file change. if u switch to a branch with a different deps file, then it's obvious, but when you are editing the deps file manually, it's unclear when are you in a state, when you would wish to reload a REPL. you might also have auto-save and save-on-focus-lost enabled, which means even when you are mid-edit of a deps.edn, but you switch to an another application, your REPL would be reloaded? i don't think that's very intuitive, nor desirable. then, it's also not clear which REPLs would you restart. if you enabled running multiple instances of the same REPL config, then you might not want to restart all of them. if you are starting your REPLs from a terminal and only connecting to them from Cursive, then what behaviour would you expect? it sounds to me, that this would be a rather niche feature and doesn't worth the effort of introducing some flags and documenting them, with all the above mentioned limitations... i know, it's not the same, but maybe the add-lib clojure tool might cover some of your use-cases. i don't know much about it, but i would start here: https://github.com/seancorfield/dot-clojure/blob/develop/deps.edn#L93#2021-11-0823:56Oliver George@cfleming seems to me refactoring to change a require alias should be blindingly fast - it only needs to look in one file. What I see is slow and seems to involve some kind of full project scan.#2021-11-0905:48cflemingDo you mean a rename of the alias? That’s possible, yeah, I’ll see if I can fix that.#2021-11-1100:19cflemingI looked into this, and unfortunately it’s not trivial to fix. When the rename dialog pops up you can select “Current File” there, and it should work as expected, but there is no way to change what that scope defaults to so you’ll have to do it manually every time. Fortunately I guess this is an uncommon operation, but it’s not ideal.#2021-11-1105:34Oliver Georgethanks for looking into it.#2021-11-1105:35Oliver GeorgeWish it was uncommon for me. Perhaps my particular brand of developer OCD is uncommon :-).#2021-11-1110:35onetomthat full-project scan also made me uneasy too. it gives the impression, that something else might have changed in some other files too. but it's comforting to know, that it's just some framework limitation 🙂#2021-11-0823:56Oliver George(just feedback in passing)#2021-11-1013:45Kari MarttilaOccasionally I have some annoying issue using Cursive which I just haven't been figured out what I am doing wrong. I have a Clojure REPL running in a terminal. I connect to this backend RELP using Cursive Run configuration: nREPL. Everything is working just fine. Occasionally I want to experiment with some function X in namespace Y. I change REPL to this namespace (using Switch REPL NS to Current File) and *ns* shows that I'm in namespace Y). Now I load everything in the editor (in namespace Y) into REPL (`Load File in REPL`). I have a comment block. In comment block I have some test data. Now I evaluate the test data. Then I call some function X in that namespace with that test data. Everything works fine. I experiment more. Suddenly the same function X call with the same data gives me error, e.g.:
Execution error (IllegalArgumentException) at y/x .
Don't know how to create ISeq from: clojure.lang.Var$Unbound
If I evaluate the function X, and the test data separately, I can see that there is a binding. At this point I don't restart the terminal REPL, but I click the Restart REPL button in the Cursive REPL window. I once again switch REPL to this namespace Y and load everything in the editor into REPL. Everything works once again just fine. This is a bit annoying. I'm 99% sure this is not a Cursive bug but I have something wrong in my work flow. I'd appreciate any help how to investigate what is happening in my workflow and how to fix this issue.
#2021-11-1013:48Kari MarttilaThe rubber duck effect works. I just now realized after writing this that I might have unconsciously hit my Integrant-reset hot key in my laptop. This probably causes this. I need to investigate this a bit. But if you have some hints I'm happy to hear about them! 🙂#2021-11-1013:57Kari MarttilaI just managed to get this error after hitting my Integrant reset button. But the weird thing is that
(keys (ns-publics *ns*))
Shows the same bindings before and after the Integrant reset, but after the reset I get this clojure.lang.Var$Unbound error. I have done a few years Clojure development but I'm not a Clojure guru. I asked about this in the Metosin slack and someone said that he remembers to experience something similar which was a bit weird.
#2021-11-1014:11henryw374if you do switch to ns again, does that fix it?#2021-11-1014:28Kari MarttilaNo. And the weirdist thing is that this does not happen immediately after hitting Integrant reset - possibly it has nothing to do with it.#2021-11-1014:29Kari MarttilaUnpleasent to debug this since it behaves as if there is some non-deterministic behaviour, even though my brain says that it cannot be non-deterministic.#2021-11-1014:30henryw374what came to mind is if doing a clojure.tools.namespace.repl/refresh, the ns gets removed and recreated. wondered if somehow you had a stale reference to deleted var#2021-11-1014:31Kari MarttilaPossibly something like that.#2021-11-1015:42onetomi also tried to mix the usage of ctnr/refresh with the cursive load file / sync files in repl and ended up with inexplicable situations. but when i work with defprotocols or deftypes, it would be really nice to be able to unload the NSes with those definitions and reload every other NS, which used the previous definitions of those protocols and types. alternatively, it would be good to have some guides about how to structure a program, which relies on these abstractions, in way, that makes it easy to develop them. im still not sure i comprehend everything in https://functionalbytes.nl/clojure/lifted/protocols/2020/06/11/lifted.html for example, but i have the feeling, it might help with my issues... :/#2021-11-1015:57Colin P. HillOne of spec's value propositions is that fdef adds information to the docs generated for a function, but Cursive's documentation popups don't seem to incorporate this information. Are there plans to add this?#2021-11-1100:01cflemingYes, Cursive should definitely do this.#2021-11-1100:47kennyI've noticed that the Cursive test diff viewer does not let me use paredit to navigate, edit, select, etc. I thought it used to do that, but I could easily be misremembering. Regardless, it'd be great to get paredit support in the test diff viewer.#2021-11-1103:47cflemingHmm, interesting, thanks - I’ll check that.#2021-11-1104:48cfleminghttps://github.com/cursive-ide/cursive/issues/2611#2021-11-1104:48cflemingI’ve fixed that for the next build.#2021-11-1115:43kennyAwesome!#2021-11-1108:56octahedriondoes IntelliJ index directories like .idea and .cpcache by default and is it best to mark them as excluded in project settings > modules ?#2021-11-1121:08cflemingYes, they should be excluded. I assume that IntelliJ marks .idea as excluded by default, Cursive should do the same for .cpcache.#2021-11-1208:29octahedrionbut when I start a new project or import one, .idea and .cpcache are grey not red, which I assume means they're going to be indexed. It doesn't make sense for IntelliJ to index its own metadata but then IntellIj is very keen on indexing everything it can so it wouldn't surprize me in the least if it did#2021-11-1111:46R.A. PorterI'm trying to load-file with an eval in my ~/.clojure/deps.edn so I can have a repo of common fns I use. I have this alias that is including in the aliases run with my project...
:my/dev {:extra-deps {djblue/portal {:mvn/version "RELEASE"}}
         :main-opts ["-e" "(load-file,(str,(System/getProperty,\"user.home\"),\"/.clojure/dev.clj\"))"]}
and when I take a look at the REPL process, I can see the eval at the end:
clojure.main -i /private/var/folders/t6/1fg1jgsj64qfwwq081d8f6498r5sw6/T/form-init15371867233491097436.clj -e (load-file,(str,(System/getProperty,"user.home"),"/.clojure/dev.clj"))
but the namespace isn't loading into my REPL. I've tried other evals - basic assignment, prns, etc. - to see if those work and none of them seem to be either.
#2021-11-1117:16djblueI think another option is to have a project directory which would make a namespace available on the classpath, then require could find the file for you:
:my/dev
  {:main-opts ["-e" "(require 'dev)" "-r"]
   :extra-deps
   {my/dev {:local/root "/Users/<user>/repos/dev"}}}
#2021-11-1117:17djblueWhat I did notice is without the "-r" the repl process dies so I wonder if that is the underlying issue you are running into?#2021-11-1117:19djblueI wonder if you could/should add the ~/.clojure directory as a local/root thinking-face#2021-11-1117:23R.A. PorterIt's picking up my ~/.clojure/deps.edn okay. And I was able to add an extra-path to a subdir of ~/.clojure and put a user ns in there (as long as I didn't have one in my project to override). It seems to be something specific to eval. I'll try your suggestion above, but if eval doesn't work at all, I don't think that'll be any better.#2021-11-1117:27djblueIs the main mechanism for starting your repl clojure.main?#2021-11-1117:33R.A. PorterYeah. Through whatever hoops Cursive jumps.#2021-11-1117:48R.A. PorterIt's the eval. I've tried your suggestion with a project root and also just as an extra-path and once I get to the repl, I can require in the ns. I just can't get it to run with the eval flag to clojure.main. ¯\(ツ)/¯#2021-11-1117:49R.A. PorterI can at least get myself 80% of the way there for now. That's something.#2021-11-1121:10cflemingDoes this work with a bare Clojure REPL on the command line? i.e. is this a problem with Cursive’s REPL or a more general one?#2021-11-1123:37R.A. PorterRun at the command line with clj -M:dev:my/dev Where the :dev alias is in my local deps and the :my/dev alias is defined in ~/.clojure/deps.edn as
:my/dev {:extra-deps {djblue/portal {:mvn/version "RELEASE"}}
           :main-opts ["-e" "(load-file,(str,(System/getProperty,\"user.home\"),\"/.clojure/dev/dev.clj\"))" "-r"]}
And where that dev.clj being loaded lives where it's specified, it loads correctly and the fns in the namespace are available.
#2021-11-1123:42R.A. PorterAnd one last test...run with the command clj -M:dev -e "(load-file,(str,(System/getProperty,\"user.home\"),\"/.clojure/dev/dev.clj\"))" -r The file also correctly loads and the fns in the namespace are available.#2021-11-1408:48cflemingThanks, I’ll try to repro this.#2021-11-1114:41Colin P. HillThe Clojure code style settings include a "Docstring fill width" field, but when I format a file, it doesn't seem to reformat my docstrings to wrap at that width. Is this a bug, or am I misunderstanding something?#2021-11-1408:48cflemingDocstrings aren’t filled as part of the reformatting, there’s an explicit “Fill Paragraph” action that uses it.#2021-11-1513:18Colin P. HillAh I see – for some reason I thought it would be a context action (I think Goland had it as one by default, maybe that's what set my expectation), but I see it in the action list. Thanks!#2021-11-1521:00cflemingIt’s probably a good idea to add a context action for that, actually - could you file an issue for that, please?#2021-11-1521:37Colin P. HillSure, done! https://github.com/cursive-ide/cursive/issues/2614#2021-11-1521:37cflemingThanks!#2021-11-1117:57simongrayI recently dropped some coffee onto my old Macbook and now I have a new Apple silicon replacement. Just installed Intellij+Cursive but I am getting a whole bunch of "Cannot execute: Clojure command not configured" errors. For the record, Clojure is installed and works fine in Terminal.#2021-11-1118:33tanzoniteblackhttps://cursive-ide.com/userguide/deps.html#macos-and-linux did you already see this FAQ helper?#2021-11-1121:12cflemingRight, I think you’ll have to reconfigure deps as described in that section for Cursive to pick it up.#2021-11-1121:13cflemingPeriodically dropping coffee on your laptop sounds like a good plan!#2021-11-1121:38simongrayThanks!#2021-11-1121:41simongray@U0567Q30W Yeah, insurance covered it all, so other than having to wait for Apple to deliver it's been a pretty nice experience.#2021-11-1117:59simongrayIt's a deps.edn project I've opened in Cursive (from existing sources).#2021-11-1117:59simongraythe Clojure CLI was installed via homebrew.#2021-11-1213:51roman01laIs it possible to resolve a custom EDN tag?#2021-11-1218:22cjsauerQuick question: I can’t seem to get the little intention lightbulb to pop up anymore when hovering over a macro as https://cursive-ide.com/userguide/formatting.html#code-style-settings. I’ve tried disabling most plugins in case of a conflict to no avail :thinking_face: did anything change in this regard?#2021-11-1219:22tony.kayDon't know how to fix that, but one possible workaround is you can use the Action (Help -> Find Action, CMD-SHIFT-A on a Mac I think) search to find the "Resolve as..." action when you're on the name (if that's what you're trying to do).#2021-11-1220:42cjsauerThanks, I think I found the issue. CLJC doesn’t want to show that intention dialog, and even “Resolve as…” doesn’t show up there…#2021-11-1220:42cjsauerCreating a CLJ file and getting access to it from there did the trick.#2021-11-1219:03potetmDoes option+enter work for you?#2021-11-1220:41cjsauerAh, I found the issue. It doesn’t seem to work in CLJC files…`cmd+shift+a` -> “Resolve as…” doesn’t return any hits, and option+enter doesn’t have any effect in cljc files…#2021-11-1220:41cjsauerI had to create a stub CLJ file to get to it.#2021-11-1304:15Oliver GeorgeIs there a place for the "add function spec" equivalent of "command-shift-t"?#2021-11-1405:03cfleminghttps://twitter.com/CursiveIDE/status/1459748271702765570#2021-11-1614:46Shantanu KumarIs it documented anywhere how to specify the Clojure CLI config directory? The fix for https://github.com/cursive-ide/cursive/issues/2212 - I am on 1.12.0-eap2-2021.2#2021-11-1614:56Shantanu KumarFor an already created dps.edn project the "Project Settings > Path to config directory" setting is greyed out. Perhaps it can be defined only for a new deps.edn project?#2021-11-1620:19cflemingDo you have “Use CLI tools” or “Use tools.deps directly” selected?#2021-11-1705:58Shantanu Kumar@cfleming I have "Use tools.deps directly" selected as that's how I am handling the monorepo by setting the common root-level deps.edn (authoritative for all dependencies) path in "Path to user deps.edn".#2021-11-1723:22cflemingHmm, yes, it would make sense to combine those two options, I missed that. I’ll fix that.#2021-11-1723:32cflemingIn the meantime, you should now be able to use the CLI option with the new config field.#2021-11-1413:36mike_ananev@cfleming I can confirm that after an update I see no more Cursive+Idea hangs.#2021-11-1419:34cflemingGreat, thank you! That’s great news. (Not great news that it was frequent enough that you can tell in a day, though…)#2021-11-1422:48kennyIs there some sort of Cursive api function I could call at the REPL that would pop open Cursive's diff viewer? e.g., (cursive/view-diff x1 x2)#2021-11-1501:30cflemingThere isn’t, but I’m planning one.#2021-11-1501:43kennyThat'd be great! What inputs would it take? Just two objects?#2021-11-1504:02cflemingI think so, yes. Anything else that it might need?#2021-11-1519:24kennyThe only other thing I could think would be some sort of identifier to allow updates to an existing diff window. Doesn't seem critical though. #2021-11-1614:46Shantanu KumarIs it documented anywhere how to specify the Clojure CLI config directory? The fix for https://github.com/cursive-ide/cursive/issues/2212 - I am on 1.12.0-eap2-2021.2#2021-11-1515:03helios@cfleming you added support for :as-alias in 1.12.0-eap1, but i still see the alias as "Cannot be resolved" (using latest EAP from yesterday). Is that normal? Do i need to do more?#2021-11-1521:29cflemingOh, sorry - I meant to fix that for the latest EAP but forgot, it’ll be in the next one. The alias should work correctly, but will just be reported as unresolved in the require.#2021-11-1601:16cfleminghttps://github.com/cursive-ide/cursive/issues/2615#2021-11-1519:02Colin P. HillAnyone else have issues where scrolling in the REPL has absolutely massive input lag? I swipe on my touchpad a few times and I have to wait about fifteen seconds for it to stop. Can't quite tell whether this is a Cursive issue, an IntelliJ issue, or something else.#2021-11-1519:07R.A. PorterI've seen it with long-lived REPL sessions with a lot of output. If that's your case, and you don't need the older output in the REPL any longer, you can try clearing it (with the trash button) and it should improve performance.#2021-11-1519:41Colin P. HillHappens even with a fresh REPL#2021-11-2813:00tony.kayLine wrapping. Which you can turn off on the REPLs toolbar. Makes a big performance difference for me.#2021-11-2916:09Colin P. HillAh, I do keep line wrapping on. I'll try disabling it. Shame that it would make such a difference – it's hardly ideal to choose between being able to see everything and being able to scroll through it.#2021-11-1519:53Colin P. HillWhat's the right way to activate the try live template? I select a form and perform the "Surround with live template..." action, and it says no live templates are applicable#2021-11-1603:48stuartrexkingIs there anyway to have css autocomplete working in cljs files? I’m working with fulcro and I’d like css classes to be suggested with working with a :className value in the react components. Can IntelliJ or Cursive do this?#2021-11-1604:01stuartrexkingI see there is an open issue for it https://github.com/cursive-ide/cursive/issues/1553#2021-11-1621:30Wilson VelezHi is someone seeing this error?
Syntax error compiling at (cursive/deps/project.clj:162:62)
I’m clicking over the deps.edn file and trying to “add as a Clojure deps project”
#2021-11-1703:27cflemingWhere are you seeing this error? Can you post a screenshot?#2021-11-1712:38Wilson VelezHi @U0567Q30W here is the screenshot#2021-11-1712:39Wilson Velezit happens when clicking this option#2021-11-1723:02cflemingCan you send me your log file, please? Help -&gt; Show Log in Finder/Explorer. Email to <mailto:/cdn-cgi/l/email-protection|/cdn-cgi/l/email-protection> is probably best.#2021-11-1622:06emccueOn the transition to deps.edn. Getting this error running a namespace class java.lang.Character cannot be cast to class java.lang.String (java.lang.Character and java.lang.String are in module java.base of loader 'bootstrap') No other context. Running via the command line works fine#2021-11-1703:28cflemingAs Alex said: > can you be more explicit about what “running a namespace” and “running via the command line” mean?#2021-11-1703:28cflemingAlso, do you have anything suspicious in your log file? Feel free to email it over if you’d rather I checked it.#2021-11-1703:43emccue#2021-11-1703:44emccueand running on the command line i do clj -A:dev -M -m company.dev-main#2021-11-1703:45emccueIn the log it just says Error running 'company.dev-main': Error creating run parameters.#2021-11-1703:46emccueunless there is like a log file i should check#2021-11-1622:21Alex Miller (Clojure team)can you be more explicit about what "running a namespace" and "running via the command line" mean?#2021-11-1622:22Alex Miller (Clojure team)oh, sorry I thought this was a CLI question, didn't realize I was in cursive. (but still probably a good question :)#2021-11-1702:52cflemingDefinitely a good question.#2021-11-1709:09simongrayHmmm… I do not seem to be allowed to change the indentation for defonce or other Clojure core forms inline any longer…?#2021-11-1821:15cflemingIs the problem only with those forms, or with all forms? If it’s all forms, what can happen is that the intention gets disabled. Check Editor | Intentions | Clojure.#2021-11-1909:43simongrayI haven’t been consistently able to edit them inline for maybe half a year. Sometimes it’s possible, sometime it isn’t, and I have no idea why it changes. That issue seems to be present with all Clojure core forms, but not other forms. The defonce problem is the fact that it is does not seem to be included in the list of indentation rules in preferences, only cljs.core.defonce is.#2021-11-1909:44simongray(the screenshot is BTW the intentions - none seem to be disabled)#2021-11-1909:49simongrayIt’s now working on my work machine (an Intel Macbook pro), but not working on my ARM Macbook Air. It’s entirely possible that it’s just something weird in my setup.#2021-11-1909:50simongrayI sync settings between different machines a settings repository, so maybe that can screw things up? It does seem a bit wonky sometimes.#2021-11-1709:10simongrayit used to be the case the case that you could right click and configure indentation for Clojure core forms, but that is not possible any longer. Instead, there is a panel in settings where all of the built-in forms are listed (and I guess this is where you’re supposed to change it now), but defonce is not a part of it, only cljs.core.defonce. I guess it was omitted by mistake? It would make sense to just default it to the same indentation behaviour as def (which is what I usually change it to anyway).#2021-11-1716:56cjsauer@simongray that sounds similar to what I was seeing above. Are you by chance editing a cljc file?#2021-11-1716:57cjsauerI had to create a stub clj file, write the form I wanted to manually indent, and then access the inline menu that way.#2021-11-1809:16simongray@cjsauer Nope, regular clj files. It’s been like this for a while. The problem persists on a completely fresh install of macOS.#2021-11-1815:20Ian FernandezHow can I use a boot project with cursive?#2021-11-1815:44salami don't think you can (at least directly) as Cursive doesn't support Boot. #2021-11-1821:15cflemingThat’s correct, I never got around to adding boot support and it’s not used much these days.#2021-11-1912:53Ivar RefsdalWe're doing:
(require 'boot.lein)
(boot.lein/generate)
to generate a project.clj from inside build.boot and then open the project as leiningen project.
#2021-11-1916:25markaddlemanI've been searching for a way to replace the REPL console window with the Portal plugin. I've been playing with repl commands for a few days and have recently come up with :
(ns ~file-namespace)
(try (tap> (eval '~top-level-form))
     (catch Throwable t
       (tap> t)))
I like it because taps forms that cannot be evaluated. Anybody else have Cursive repl commands that might be worth sharing?
#2021-11-1919:04shinichyHi @cfleming, is there any plan to support paredit-convolute-sexp? I sometimes miss this functionality. https://github.com/cursive-ide/cursive/issues/809#2021-12-0300:04cflemingSorry, I missed this when you posted it. I could do, but I never found a decent explanation online of how it should work.#2021-12-0504:47shinichyI think emacs’s document explains the behavior. > “Convolute S-expressions. > Save the S-expressions preceding point and delete them. > Splice the S-expressions following point. > Wrap the enclosing list in a new list prefixed by the saved text. > With a prefix argument N, move up N lists before wrapping.” https://github.com/emacsmirror/paredit/blob/8330a41e8188fe18d3fa805bb9aa529f015318e8/paredit.el#L2181 Calva’s implementation https://github.com/BetterThanTomorrow/calva/blob/986b4fd1afd84a916c6c460acb7a9a69f08e4692/src/cursor-doc/paredit.ts#L879#2021-12-0504:50shinichyAn example used in Calva https://calva.io/paredit/
(let [s [1 2 3 4 5]]
  (->> s
       (map (apply + [1 2 3]))
       |(repeat 4)
       (zipmap (range 4))))
;Save the S-expressions preceding point and delete them.
;Saved S-expressions are
;->> s
;    (map (apply + [1 2 3]))

(let [s [1 2 3 4 5]]
  (|(repeat 4)
   (zipmap (range 4))))
;Splice the S-expressions following point.
(let [s [1 2 3 4 5]]
  |(repeat 4)
  (zipmap (range 4)))
;Wrap the enclosing list in a new list prefixed by the saved text.
(->> s
     (map (apply + [1 2 3]))
     (let [s [1 2 3 4 5]]
       |(repeat 4)
       (zipmap (range 4))))
#2021-12-0823:25shinichy@cfleming Just want to ping you in case you missed my reply.#2021-12-0823:56cfleming@U40AQPFAM Thanks, I’ve updated the Github issue with those examples. It’s probably likely to be a low priority with everything else I have to do, though.#2021-12-0900:01shinichy@cfleming ok. Hope you find some time to work on it in the future. Thanks!#2021-11-2017:31eyalchIf anybody was able to make Cursive know about native JavaScript symbols, e.g. .getElementById, I'd love to know how#2021-11-2214:19dvingoThis quite old issue just bit our team, https://github.com/cursive-ide/cursive/issues/1335 Just wanted to "bump" it#2021-11-2217:11AJ JaroI’m getting this error message on a deps.edn project when running -main from the Clojure namespace, specifically with an alias configured. class java.lang.Character cannot be cast to class java.lang.String (java.lang.Character and java.lang.String are in module java.base of loader 'bootstrap') However, if I Run with IntelliJ project classpath no error occurs.#2021-11-2221:05AJ Jaro@U0567Q30W I https://github.com/cursive-ide/cursive/issues/2617for this#2021-11-2308:07cflemingThanks for the issue. Does that error appear in your log? Help | Show log in Finder/Explorer.#2021-11-2314:45AJ JaroGreat question @U0567Q30W! It does and I added it to the issue#2021-11-2408:17cfleming@UGMAVSMUM Which version of Cursive are you using?#2021-11-2412:14AJ Jaro@U0567Q30W Built on: 2021-11-14 17:47 Built from: 1.12.0-eap2-21-gb63530cd#2021-11-2218:56Alex Miller (Clojure team)seems unlikely to have anything to do with deps. can you (pst *e) when it happens and figure out where it's coming from?#2021-11-2220:34AJ Jaro@U064X3EF3 This isn’t run from the REPL. This is run as an IntelliJ Run configuration and the server doesn’t even begin to start before failing with this message in the Event Log. This most likely has something to do with Cursive and deps.edn#2021-11-2220:46Alex Miller (Clojure team)that's not a message from tools.deps or the CLI so I'd guess cursive#2021-11-2403:20Ian FernandezWhy Run with IntelliJ project classpath and adding a alias that have :jvm-opts ["-Denvironment=test"] does not print this variable when I run (get (System/getProperties) "environment") but when I run with clj -A:my-profile it works well?#2021-11-2407:54cflemingWhen you run with the IntelliJ project classpath, you can’t select an alias. It will use whichever aliases you had selected in the deps toolwindow when you last synced.#2021-11-2407:54cflemingBut those aliases won’t be used to supply things like :jvm-opts#2021-11-2411:03imreIs there any reason jvm-opts are ignored?#2021-11-2414:47Ian FernandezI've selected the aliases on deps toolwindow, Is there any reason jvm-opts are ignored?#2021-11-2419:51cflemingBecause those aliases are only used to sync the project, so they’re only involved in run configurations tangentially. Basically, those aliases determine the deps and source paths that will be synced to the IntelliJ project, and those deps and paths determine the classpath IntelliJ uses. If you do want proper alias support, then the thing to do is to use “Run with deps” and select the aliases there.#2022-10-1910:29imre@U0567Q30W apologies for resurrecting an old thread, but is this decision something you could be open to reconsidering? The deps tool window is a lot more user-friendly for selecting aliases. Moreover, 'running with deps' is still affected by the Deferred parameters have not been cached! problem reported at https://github.com/cursive-ide/cursive/issues/2308#2022-10-1910:29imreWhenever I hit restart repl on a running with deps repl I get this and it won'r restart#2021-11-2411:46ingesolI have a tools.deps project. I use aliases to override maven style dependencies with :local/root ones to get hot reloading for dependency source code in shadow-cljs. Is there a way in cursive to make code navigation point to dependency source rather than the dependency JAR? So I can cmd-click a function name and go to its definition in the :local/root source?#2021-11-2420:05cflemingDo you have those aliases selected in your deps toolwindow?#2021-11-2420:49ingesolI did not, do now 🙂#2021-11-2420:53ingesolThanks, wasn’t aware of that feature.#2021-11-2417:36favilaUsing 2021.2.3 with 1.12.0-eap2-2021.2, I am unable to send stacktrace reports. (I don’t know whose fault this is :)) The error is Error submitting report: 422 Unprocessable Entity : ErrorResponse(message=Validation Failed, errors=[ErrorItem(resource=Issue, field=labels, code=custom)]) Top of stack:
cursive.exception.GithubException: 422 Unprocessable Entity : ErrorResponse(message=Validation Failed, errors=[ErrorItem(resource=Issue, field=labels, code=custom)])
	at cursive.exception.ClojureErrorReportSubmitterKt.update(ClojureErrorReportSubmitter.kt:190)
	at cursive.exception.ClojureErrorReportSubmitterKt.access$update(ClojureErrorReportSubmitter.kt:1)
	at cursive.exception.ClojureErrorReportSubmitter$submit$1.run(ClojureErrorReportSubmitter.kt:339)
	at com.intellij.openapi.progress.impl.CoreProgressManager.startTask(CoreProgressManager.java:450)
	at com.intellij.openapi.progress.impl.ProgressManagerImpl.startTask(ProgressManagerImpl.java:117)
#2021-11-2418:48kennyFor me, it doesn't happen for all exceptions. #2021-11-2604:07cflemingDoes this happen for all exceptions for you, @U09R86PA4? It’s a weird error, I’m not sure what the code=custom means and the error is a bit meaningless without that.#2021-11-2604:37favilaIt’s a recent error. I’ll have to wait for another cursive exception to try again#2021-11-2604:38favilaThe original exception I was submitting was related to cursive using a not-yet-ready index, which I’ve seen before and submitted without problems#2021-11-2710:02cfleminghttps://twitter.com/CursiveIDE/status/1464534521315926016#2021-11-2907:14shinichyI created an IntelliJ plugin that enables navigation to Clojure https://github.com/weavejester/integrant component code. It supports navigation to init-key code from its key in a map. It also supports navigation from #ig/ref to its target. It’s useful when navigating a large code base using Integrant/duct. Please let me know if anyone finds an any issue. https://plugins.jetbrains.com/plugin/18019-integrant https://www.youtube.com/watch?v=kuv2f8Afv0o#2021-11-3002:16cflemingThis is really cool! I had a quick look at the code, a few comments:
#2021-11-3002:17cflemingI think your FilesSearchScope can just use GlobalSearchScope#filesScope().#2021-11-3002:19cflemingActually, I thought I had another comment, but I think what you have is OK. Nice work! That must have taken some figuring out 🙂#2021-11-3006:44shinichyThanks! It’s my first plugin, so I appreciate your feedback! Yes, it took a lot of time to figure out Psi element tree 😅 It would be great if my plugin depends on only cursive.psi.api.* packages, but I couldn’t find a good way to achieve what I want without cursive.psi.impl.* packages.#2021-11-3006:48shinichyMay I ask a question about testing my plugin? I’m trying to add a test, but ClojureGoToSymbolContributor doesn’t seem to work in the test. Do you know how to enable it in the test? https://github.com/shinichy/integrant-intellij-plugin/blob/add-test/src/test/kotlin/com/github/shinichy/integrant/IntegrantNavigationProviderTest.kt#L52#2021-11-3009:49cflemingHmm, I don’t, sorry. What I would normally do is get the IntelliJ community source code, and look for other implementations of the base class (ChooseByNameContributor), and see where they’re used in tests. But I just checked a few implementations there and they don’t seem to be used in tests at all, at least not directly. It’s possible there are tests for higher-level things like Go To Symbol which use them under the hood, but I’m not sure, sorry.#2021-11-3021:57shinichyNo worries. Thanks for checking it!#2021-11-2908:32cfleminghttps://twitter.com/CursiveIDE/status/1465236958922227714#2021-11-2909:21heliosUh, JetBrains just announced Fleet, a new lightweight editor. https://www.jetbrains.com/fleet/ Since it's using intelliJ for the code-processing engine I'm curious to see what will come out of it, and if it could be a lightweight alternative for us clojurians (with cursive! 😉). I guess this is news also to you @cfleming?#2021-11-2919:38cflemingIt is news to me! I knew they have been working on various projects along these lines, but I didn’t know they were ready.#2021-11-2922:08cflemingLooks like it will be a while before I can do anything to support this.#2021-11-2915:46Jakub Holý (HolyJak)Is there a way to run all tests from IntelliJ? (Using Lein) I assume that will make the results more navigable than just running lein test in the terminal. I have tried to add a run config. for clojure.test with "run all tests in module" but there was some IntelliJ error about the cursive config class that could not be cast to some II Base class and the run config does not run...#2021-11-2919:39cflemingCould you send the exact error? Or even better, check to see if it appears in your log?#2021-11-3010:52Jakub Holý (HolyJak)I don't know where to find it. It appeared in a pop up window which I killed.#2021-11-3010:58Jakub Holý (HolyJak)Ok, I found II logs but not sure what to look for. I will try to re-create the error.#2021-11-3011:27Jakub Holý (HolyJak)https://github.com/cursive-ide/cursive/issues/2619#2021-11-2917:03Ian FernandezI've tried to get a Repl running clojure from clojure cli with this :jvm-opts :
"--add-modules" "java.base/jdk.internal.misc=ALL-UNNAMED"
#2021-11-2917:04Ian Fernandezit gives me an error:
Unrecognized option: --add-exports
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
#2021-11-3002:21cflemingDoes this happen in Cursive or on the command line?#2021-11-3002:21cflemingOr both?#2021-11-3015:04Ian Fernandezin cursive only#2021-11-3020:12cflemingCan you send a screenshot of the error?#2021-12-0117:11Ian Fernandez#2021-12-0117:12Ian Fernandez#2021-12-0117:12Ian Fernandez@cfleming this should help?#2021-12-0120:59cflemingThat looks to me like your project is using the JDK bundled with IntelliJ, and it doesn’t support that option. There’s more information here about the syntax of that option in different JDK versions: https://stackoverflow.com/questions/40313090/java-9-options-add-exports-vs-xaddexports-not-recognized/40369977#2021-12-0121:01cflemingActually, I misread part of the stacktrace, it’s not using the IntelliJ JVM. But regardless, it’s a problem with the JVM, so I guess your Cursive project is using a different JVM to the one that’s picked up on the command line.#2021-11-2917:04Ian Fernandezwhy this happened?#2021-11-2921:43cap10morganJust updated to 1.12.0 (not sure what I had before but I am on EAP channel) on IDEA 2021.2.3 and lots of (but not all) clojure.core symbols have stopped resolving in a babashka project (e.g. defn, let, and ns don't resolve but def does). I tried invalidating caches and even deleted .idea and the .iml file and re-setup the project but no dice. Anyone else seeing that in babashka projects?#2021-11-2921:48cap10morganOh, this is with babashka 0.6.6#2021-11-2921:52borkdudeHmm, @cfleming - is there anything I can do to help here?#2021-11-2921:53borkdudeI think I found the issue#2021-11-2921:54borkdudethe print-deps result contains a local/root dependency which doesn't make sense for this use case#2021-11-2921:54borkdudeI'll make an issue and fix that#2021-11-2921:59cap10morganThanks @U04V15CAJ!#2021-11-2922:41borkdudeWhat a co-incidence, I had this issue open in my browser and you commented on it just now: https://github.com/oracle/graal/issues/2666#issuecomment-982087148#2021-11-2922:45borkdudeI pushed a fix for this to master, releasing now#2021-11-2922:46borkdudewill take 15 minutes or so (if CI cooperates)#2021-11-2923:00borkdudedone, 0.6.7 released#2021-11-3000:57cap10morganconfirming 0.6.7 fixed it here too. thanks again @U04V15CAJ!#2021-11-3003:14cfleminghttps://twitter.com/CursiveIDE/status/1465519556999331841#2021-11-3006:48ingesolWhen setting up a Clojure Deps project, we need to manually exclude certain folders like like node_modules , resources/js/compiled , target etc, to remove the noise when searching for namespaces and files. Are there other ways to achieve the exclusion than to manually select the folders in project settings?#2021-12-0111:20ingesolFor reference I found some good help in this issue https://youtrack.jetbrains.com/issue/IDEA-140714#focus=Comments-27-4851651.0-0#2021-11-3016:13Drew VerleeWhat are the steps for working with a shadow cljs project using deps.edn? I assume i 1. start the shadow process via something like npx/npm/yark shadow-cljs watch <some-build> 2. then connect to that repl via cursive run > clojure REPL > remote repl > connection type: nREPL + connection details: connect to server, host: localhost, port <port>. In step two i'm i supposed to select a "context module"? There isn't any options it just reads [none]#2021-11-3023:04stuartrexkingDo you have a deps.edn module configured?#2021-12-0100:55Drew Verlee@U3FKR3KDF it's setup the same way the cursive docs on deps recommend https://cursive-ide.com/userguide/deps.html#2021-11-3016:16Drew Verleeor maybe i'm supposed to follow the configuring deps docs and then do something more for shadow?#2021-12-0111:20ingesolFor reference I found some good help in this issue https://youtrack.jetbrains.com/issue/IDEA-140714#focus=Comments-27-4851651.0-0#2021-12-0100:56stuartrexkingI don’t do anything special for shadow. I start shadow from the terminal, then I connect to it’s nrepl from intellij run configuration. I choose the module in the connection settings. Once I’m connected, I (shadow/repl :main) or whatever your config is.#2021-12-0100:57stuartrexkingSounds to me like your intellij module isn’t being correctly configured for your deps.edn setup.#2021-12-0100:57stuartrexkingIs there a module in your project settings?#2021-12-0101:00Drew Verleecan you be more specific when you say "a module"?#2021-12-0101:01Drew Verleeor phrase it a different way, i'm not sure exactly what that means.#2021-12-0101:01Drew Verleeand yep, my plan was to start it from my terminal and then connect to it.#2021-12-0101:03Drew VerleeHere is what my run config looks like#2021-12-0101:04Drew Verleeand my settings...#2021-12-0101:04Drew Verlee#2021-12-0101:05Drew VerleeI assume the issue is in my "config" (first pic)#2021-12-0101:06Drew Verleeif i click run i get a "repl run configuration is incorrect - no module selected"#2021-12-0101:07stuartrexking#2021-12-0101:07Drew Verleeshadow-cljs - nREPL server started on port 43885#2021-12-0101:07stuartrexkingIntelliJ Modules#2021-12-0101:07stuartrexkingeach of those is a deps.edn on it’s own.#2021-12-0101:08stuartrexkingWhat do you have in your modules list under Project Structure#2021-12-0101:10Drew Verleelooking. I think i see the issue though, i didn't select the project root maybe.#2021-12-0101:16Drew Verleehere are my modules with the correct project root selected...#2021-12-0101:17Drew Verleeerr#2021-12-0101:17Drew Verlee#2021-12-0101:22stuartrexkingHard to tell your setup from that. Can you screenshot your project structure window?#2021-12-0101:24Drew VerleeWhat does you run/debug configurations look like ? i have "remote repl": • connection type: nrepl • connect to server (bc i started shadow locally) w/ host->locahost port->port started for nrepl server by shadow. context module->name of project root.#2021-12-0101:25stuartrexking#2021-12-0101:25Drew VerleeIf i run the "run" then it says its trying to connect to a remote server and just hangs#2021-12-0101:25stuartrexkingHave you started shadow?#2021-12-0101:26Drew Verleeyep#2021-12-0101:26Drew Verlee
shadow-cljs - HTTP server available at 
shadow-cljs - HTTP server available at 
shadow-cljs - server version: 2.15.10 running at 
shadow-cljs - nREPL server started on port 43885
shadow-cljs - watching build :dev
[:dev] Configuring build.
[:dev] Compiling ...
[:dev] Build completed. (1512 files, 1 compiled, 0 warnings, 9.10s)
#2021-12-0101:27Drew Verleemaybe its working right now. i think i ran into this before were i expected a repl to pop up after i hit the run button and its like hiding#2021-12-0101:28Drew Verleeyea#2021-12-0101:28Drew Verleelol#2021-12-0101:28Drew Verlee#2021-12-0101:28stuartrexkingGreat#2021-12-0101:28Drew Verleethanks!!!#2021-12-0101:34Drew Verleeit's telling me i can't send cljs forms to a clj repl. Which is fair, but shadow started the nrepl server at the port i selected for my remote repl. And when i started the repl i selected "cljs" though it immeditly changes to clj.#2021-12-0101:38Drew Verleeok i had to run (shadow/repl <my build>)#2021-12-0101:42stuartrexkingyes that’s right#2021-12-0101:44Drew Verleei should be get auto complete on a ns i require into another right e.g re-frame/* with * as my cursor should show everything in the re-frame ns. i don't and they are highlited telling me that that "re-frame" cannot be resolved.#2021-12-0101:44stuartrexkingYeah you should. That’s normally the Module not correctly imported or created.#2021-12-0101:45Drew VerleeIs this module setup by intelliji on load? like why wouldn't it be created correctly?#2021-12-0101:48stuartrexkingImpossible to tell from here.#2021-12-0101:51stuartrexkingOne thing you could do is delete all the .idea and *.iml files and recreate your project.#2021-12-0101:52Drew Verleeill try that.#2021-12-0101:56Drew Verleethat fixed it.#2021-12-0101:56stuartrexkingGreat.#2021-12-0102:01Drew VerleeInteresting. auto completion works, but it's inconstant. Like 1/4 times it won't give them on the same symbol.#2021-12-0102:02Drew Verleebut thats enough diving into this for today 🙂#2021-12-0102:11Drew Verleei swear to god, everytime i try out a different editor then emacs bc something isn't working (auto completion) it scares emacs into working#2021-12-0102:42stuartrexkingThere is no silver bullet unfortunately. Every few months I find myself flirting with a different editor because Cursive doesn’t have exactly what I want, but I always end up returning (happily I might add)#2021-12-0102:44Drew VerleeYep. The autocomplete thing is an utter mystery in this project. From file to file in the same folder it stops working#2021-12-0102:45Drew VerleeWhat i need to do is see if it fails the same way across a couple tools.#2021-12-0102:45Drew VerleeI'm going to find a compiler bug or something. My claim to fame.#2021-12-0102:45Drew Verleefiles with the letter "f" don't work on saturdays when there is a high tide.#2021-12-0103:37cflemingWe can’t send email more than 500 miles: https://www.ibiblio.org/harris/500milemail.html#2021-12-0107:44agigaoHey guys, I wonder why load file to REPL doesn’t eval the content? What is equivalent of cider-eval-buffer in Cursive?#2021-12-0107:48cflemingWhy do you think that load file doesn’t eval the content? It basically does a load-file (with some extra complication).#2021-12-0108:00agigao#2021-12-0108:02agigao:man-shrugging:#2021-12-0108:57cflemingWas your hello command typed into the REPL editor? If so, that’s because the REPL namespace is not the same as the namespace of the file. If you do (test/hello "Cursive") instead, that should work.#2021-12-0111:03agigaoNope, in the ns#2021-12-0120:44cflemingDo you have Preferences | Languages &amp; Frameworks | Clojure | REPL Options | Evaluate forms in REPL namespace selected?#2021-12-0120:45cflemingIf you eval *ns* from the file, what does it show?#2021-12-0207:30agigao1. Yes, it’s marked 2. Loading src/flx/awspricy.clj... loaded and then *ns* => #object[clojure.lang.Namespace 0x52bc6236 "user"]#2021-12-0223:32cflemingOk, that’s the problem. That checkbox is not checked by default. What that means is that if you send forms from an editor to the REPL, they will be evaluated in the current REPL ns rather than the ns of the file from which they came. So, when you load your file it’s loaded into the test ns as you would expect. Then when you evaluate (hello "Cursive") from your file, that happens in the user ns instead of your test ns, which is why hello can’t be found.#2021-12-0309:47agigaoThank you!#2021-12-0112:35scarytomhmm... I seem to be having some issues with deps.edn in cursive today. Has anyone seen a stack trace like this before?
java.lang.RuntimeException: Could not create shim
	at cursive.shim.ShimProvider.getShim(Shim.kt:148)
	at cursive.shim.ShimProvider.withShim(Shim.kt:115)
	at cursive.deps.DepsProjectDetails.doGetDetails(Project.kt:176)
	at cursive.deps.DepsProjectDetails.doGetDetails(Project.kt:87)
	at cursive.build.BuildSystemProjectDetails.getProjectDetails(BuildSystem.kt:45)
	at cursive.build.BuildSystemProjectsManager.reimportAllProjects$lambda-3$lambda-2(BuildSystemManager.kt:149)
	at cursive.build.BuildSystemUtil$runTask$1$1.run(BuildSystemUtil.kt:83)
	at com.intellij.openapi.progress.impl.CoreProgressManager.startTask(CoreProgressManager.java:436)
	...
	at java.base/java.lang.Thread.run(Thread.java:829)
Caused by: Syntax error compiling at (cursive/deps/command.clj:28:40).
	at clojure.lang.Compiler.analyze(Compiler.java:6808)
        ...
	at clojure.lang.Var.invoke(Var.java:384)
	at org.projectodd.shimdandy.impl.ClojureRuntimeShimImpl.require(ClojureRuntimeShimImpl.java:73)
	at cursive.shim.ShimBootstrap.apply(ShimBootstrap.java:29)
	at cursive.shim.Shim.createShimProvider$lambda-1(Shim.kt:80)
	at cursive.shim.ShimProvider$createShim$1.invoke(Shim.kt:155)
	at cursive.shim.ShimProvider$createShim$1.invoke(Shim.kt:153)
	at cursive.application.ApplicationKt.onPooledThread$lambda-2(Application.kt:16)
	at com.intellij.openapi.application.impl.ApplicationImpl$1.run(ApplicationImpl.java:263)
	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	... 7 more
Caused by: java.lang.RuntimeException: No such var: deps/make-classpath-map
	at clojure.lang.Util.runtimeException(Util.java:221)
	at clojure.lang.Compiler.resolveIn(Compiler.java:7388)
	at clojure.lang.Compiler.resolve(Compiler.java:7358)
	at clojure.lang.Compiler.analyzeSymbol(Compiler.java:7319)
	at clojure.lang.Compiler.analyze(Compiler.java:6768)
	... 110 more
#2021-12-0112:47Alex Miller (Clojure team)Fyi, if you hit the lightning icon and “create a text snippet”, it doesn't spam the channel quite as bad#2021-12-0114:14scarytomThanks @U064X3EF3, I wasn't expecting the stack trace to be so huge when I pasted it in! I'll move it into this thread to avoid the spam in the channel.#2021-12-0114:16scarytomfull stack trace#2021-12-0114:39scarytomI have submitted Exception report #21858 @U0567Q30W#2021-12-0114:41scarytomI've tried re-opening the project against a clean check-out of the code and it now fails as soon as I try to "add as a clojure deps project"#2021-12-0120:37cflemingThanks, I’ll check that.#2021-12-0120:39cfleming@UCQV87CN7 Does upgrading deps fix that? IIRC that was me trying to fix a deprecation warning in deps, and that var might not exist in older versions.#2021-12-0120:41Alex Miller (Clojure team)it is true that it does not exist in (much) older versions#2021-12-0121:18scarytomhmm, it is possible that my clojure cli is a little out of date...
clj --version
Clojure CLI version 1.10.3.855
#2021-12-0121:23scarytomupgraded to 1.10.3.1040 and that seems to have immediately fixed things -- thanks a lot \o/#2021-12-0121:24scarytomI wonder if it is worth getting Cursive to pop up a balloon in IntelliJ warning if the clojure cli version is out of date?#2021-12-0121:25cflemingIt actually does do that, but I made that change without considering that this might be a problem. I’ll figure out what the new minimum version is and update that.#2021-12-0121:26cflemingActually IIRC I feature test rather than having a hard-coded version, can’t remember the details right now but I’ll update after this fix regardless.#2021-12-0121:26scarytomfantastic, thanks.#2021-12-0121:26scarytomlet me know if you need me to harvest any more details for you.#2021-12-0121:26cflemingThanks.#2021-12-0201:26Drew VerleeIs curisve using clojure-lsp at all?#2021-12-0208:58practicalli-johnAs I understand it, cursive static analysis features are based on the years of work that JetBrains put into Intellij static analysis. clojure-lsp is written from scratch and is used as a core component in Clava for VS Code and can be use with any editors that support the fairly recently published Language Server protocol standard (Emacs, Neovim, etc) Intellij was built way before that standard came out. I wonder if JetBraint Fleet editor will support the LSP standard (I assume it will have to support LSP if it's trying to compete with VS Code). If fleet does support LSP, then in theory cursive could be modified to use that approt, but as fleet hasn't even been properly release yet, there seem a lot of unknowns.#2021-12-0212:32ericdalloThere is a intellij LSP plugin to to use clojure-lsp, but it's not actively maintained AFAIK#2021-12-0219:02tanzoniteblack
Fleet provides a polyglot experience, offering smart support for many languages and technologies out of the box, with support for even more planned via dedicated plugins. With the help of LSPs you will also be able to use other language services in Fleet.
#2021-12-0219:02tanzoniteblackso we’ll see what happens there, I guess#2021-12-0221:21cflemingCursive doesn’t use LSP at all, no. There are a couple of LSP plugins but I see a lot of complaints about them, and JetBrains have made it clear that they’re not going to support it natively in IntelliJ. Fleet should use it out of the box, though.#2021-12-0205:46thhellerno#2021-12-0221:21favilaI think I found a bug in symbol resolution through an if-let or if-some. In this screenshot, it thinks bug in the “else” branch references the one bound by if-let , but actually it’s from the outer let#2021-12-0221:22cflemingYes, the scope should be restricted to the true arm, but isn’t currently.#2021-12-0221:22favilaActually the identity function calls are not needed, I was just reducing from a more complex case.#2021-12-0221:23favilaah, ok, I haven’t noticed it until now!#2021-12-0221:23favilawild#2021-12-0314:16kennytilton"the scope should be restricted to the true arm" Really? bug will be falsey in the false arm, but it will still be bound (and in scope). No?#2021-12-0314:18favilaIt will be bound, but by the let in this particular case.#2021-12-0314:19favilaE.g. this is a syntax error:#2021-12-0314:20favila
(if-some [bug :foo]
  bug
  bug)
#2021-12-0314:20favila
Syntax error compiling at (...).
Unable to resolve symbol: bug in this context
#2021-12-0314:20favilabut cursive doesn’t see it#2021-12-0314:21favila#2021-12-0314:21favilaIt thinks the last “bug” is not an error#2021-12-0314:50kennytilton"If test is not nil, evaluates then with binding-form bound to the value of test..." That is evil. 🙂#2021-12-0317:54imreWith data visualization tooling like Portal and Reveal getting more and more mature, I seem to be adding more and more repl commands to Cursive. Repl commands are awesome and it would be extremely good to see some QOL updates to the Edit REPL Commands window. I added an issue about the ordering of entries there: https://github.com/cursive-ide/cursive/issues/2622#2021-12-0321:53cflemingThanks, I’ll look at this.#2021-12-0422:07imreThank you, Colin!#2021-12-0318:17salamCursive doesn't balance let bindings with destructuring in them, is this intentional?#2021-12-0319:31imreI actually find this behavior nice#2021-12-0320:18AJ JaroI prefer the balanced let bindings, but this is clearly a preference option that should be available to enforce or not#2021-12-0321:53cflemingYes, this is deliberate since the destructuring forms can be very large (like your example). If you’d like a switch for that I can add one - I tend to try to resist more config options until people complain loudly enough.#2021-12-0322:39salami think it's a valid strategy. 🙂 in this case, i would put the map on a new line anyway. but i'm curious what others think of it...#2021-12-0322:40salami just took a look at our codebase and it appears our team is ok with not balancing destructuring forms in let bindings. all good for now. :-)#2021-12-0807:53Uken7@cfleming Hi, I would really appreciate very much if there would be an option to balance this kind of let bindings. Also very often I want to align the pairs in some forms (like test and then statements in a cond or case) because of readability, is this something that others want? I really like Cursive, great job 👏 Colin.#2021-12-0318:55salam@cfleming better late than never. 🙂 https://github.com/cursive-ide/cursive/issues/2623#2021-12-0321:54cflemingDefinitely better! Thanks, I’ll look at this, I haven’t looked at the new bookmarks stuff in detail yet.#2021-12-0322:42salami'm looking forward to it. 🙂#2021-12-0322:43cflemingI just commented over on the issue with a few thoughts after looking at it briefly.#2021-12-0321:47Colin P. HillWhen using a context action to insert a require, is there any way to get Cursive to insert it in a sort order, rather than just at the bottom?#2021-12-0321:47cflemingI’m actually working on namespace ordering in general at the moment.#2021-12-0512:19AJ JaroIn the meantime, there's an ok plugin to sort requires. https://plugins.jetbrains.com/plugin/13222-clojure-namespace-sort#2021-12-0409:18p-himikA bit confused as to what's happening. I'm using an older version of Cursive, 1.10.2-2020.2, and I have the "Clojure Deps" settings section using the CLI tools, version 1.10.3.967. I just added this alias to my deps.edn:
:test       {:extra-paths ["test"]
                        :extra-deps  {io.github.cognitect-labs/test-runner
                                      {:git/tag "v0.5.0" :git/sha "48c3c67"}}
                        :main-opts   ["-m" "cognitect.test-runner"]
                        :exec-fn     cognitect.test-runner.api/test}
When I run clj -X:test, it works just fine. clj -A:test -Spath works just fine as well and has the correct dependency on the classpath. However, when I mark the :test alias in the "Clojure Deps" panel in IDEA, I get:
12:12	Errors during project resolution
			The following errors were found during project resolve:
			/home/p-himik/.../deps.edn:
			Library io.github.cognitect-labs/test-runner has missing :sha in coordinate.
If Cursive is using clj CLI tool, how can the above error be explained? How can I fix it?
#2021-12-0508:38cfleming@U2FRKM4TW I think you might be being hit by https://github.com/cursive-ide/cursive/issues/2105, which is fixed in 1.10.3. Could you check /usr/local/lib/clojure/libexec and see if you have multiple versions there? If so, please delete all but the one you want and try again.#2021-12-0508:50p-himikSeems like it's something else. The symptoms are different, and even after removing everything but clojure-tools-1.10.3.967.jar and exec.jar and restarting IDEA, the behavior is still the same.#2021-12-0508:51cflemingOk, I’ll see if I can reproduce that tomorrow.#2021-12-0508:53p-himikTrying to poke around with strace right now.#2021-12-0509:05p-himikLove me some bizarre behavior. After attaching strace, Cursive started erroring out with Could not create shim: Could not create shim. The stacktrace in the logs:
2021-12-05 11:59:35,974 [ 361182]  ERROR - #cursive.build.BuildSystemUtil - Could not create shim 
java.lang.RuntimeException: Could not create shim
	at cursive.shim.ShimProvider.getShim(Shim.kt:141)
	at cursive.shim.ShimProvider.withShim(Shim.kt:108)
	at cursive.deps.DepsProjectDetails.doGetDetails(Project.kt:167)
	at cursive.deps.DepsProjectDetails.doGetDetails(Project.kt:85)
	at cursive.build.BuildSystemProjectDetails.getProjectDetails(BuildSystem.kt:42)
	at cursive.build.BuildSystemProjectsManager$reimportAllProjects$$inlined$synchronized$lambda$1.run(BuildSystemManager.kt:150)
	at cursive.build.BuildSystemUtil$runTask$1$1.run(BuildSystemUtil.kt:93)
	at com.intellij.openapi.progress.impl.CoreProgressManager$TaskRunnable.run(CoreProgressManager.java:935)
	at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcessWithProgressAsync$5(CoreProgressManager.java:442)
	at com.intellij.openapi.progress.impl.ProgressRunner.lambda$submit$3(ProgressRunner.java:235)
	at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$2(CoreProgressManager.java:170)
	at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:629)
	at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:581)
	at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:60)
	at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:157)
	at com.intellij.openapi.progress.impl.ProgressRunner.lambda$submit$4(ProgressRunner.java:235)
	at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1700)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
	at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:668)
	at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:665)
	at java.base/java.security.AccessController.doPrivileged(Native Method)
	at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1.run(Executors.java:665)
	at java.base/java.lang.Thread.run(Thread.java:829)
Caused by: java.lang.NullPointerException
	at org.projectodd.shimdandy.impl.ClojureRuntimeShimImpl.postInvoke(ClojureRuntimeShimImpl.java:49)
	at org.projectodd.shimdandy.impl.ClojureRuntimeShimImpl.init(ClojureRuntimeShimImpl.java:31)
	at org.projectodd.shimdandy.ClojureRuntimeShim.newRuntime(ClojureRuntimeShim.java:26)
	at cursive.shim.ShimBootstrap.apply(ShimBootstrap.java:26)
	at cursive.shim.Shim$createShimProvider$1.apply(Shim.kt:73)
	at cursive.shim.ShimProvider$createShim$1.invoke(Shim.kt:148)
	at cursive.shim.ShimProvider$createShim$1.invoke(Shim.kt:90)
	at cursive.application.ApplicationKt$sam$java_lang_Runnable$0.run(Application.kt)
	at com.intellij.util.RunnableCallable.call(RunnableCallable.java:20)
	at com.intellij.util.RunnableCallable.call(RunnableCallable.java:11)
	at com.intellij.openapi.application.impl.ApplicationImpl$1.call(ApplicationImpl.java:268)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	... 7 more
At the same time, strace shows that one of the IDEA's processes is trying to find libjawt.so but in wrong places for some reason, and fails with SIGSEGV. Funny thing is, now dependency resolution doesn't work at all - in other projects, after killing strace and restarting IDEA along with purging all indexes. I have no clue how attaching strace could've seemingly prevented IDEA from looking for libjawt.so at the right place.
#2021-12-0509:20p-himikAh, I think I know what's going on. libjawt.so was just a random coincidence. I see this line in the strace output: stat("/usr/local/lib/clojure/libexec/clojure-tools-1.10.2.796.jar", 0x7f133adf3f40) = -1 ENOENT (No such file or directory) So for some reason, Cursive is still trying to access an older version of the jar, one that I removed.#2021-12-0514:23p-himik@U0567Q30W Just FYI, got it fixed by removing ~/.clojure/.cpcache.#2021-12-0519:55cflemingThat is super weird. I’m pretty sure that removing .cpcache wouldn’t be the thing that fixed it, since Cursive only calls the CLI script for -Sdescribe, which I don’t think uses it. I’m honestly not sure what might have actually fixed it though. I’m pretty sure that that bug is the underlying cause.#2021-12-0520:17p-himikWell, FWIW that's the only thing I did after which the behavior actually changed - tried multiple IDEA restarts with cache clearing (while using strace at different stages), and all the time strace was showing the old clojure-tools jar being used. Didn't do any other changes myself apart from removing the old jars in the first place.#2021-12-0520:19p-himikAnd BTW if you run clojure -Sdescribe within ~/home/.clojure, that .cpcache directory is definitely used. But only for the stat syscall, so maybe that's not important.#2021-12-0520:44cflemingOhh… actually, I think what you probably had to do was go to the Deps settings, change something, hit apply and then change it back and hit apply again. The path to the jar file that actually gets used is updated during that process.#2021-12-0520:44cfleming(or some similar combination which would provoke IntelliJ to update that value in the Settings dialog).#2021-12-0520:50p-himikOh, you're absolutely right! Not sure how it flew out of my head, sorry for the confusion.#2021-12-0520:51cflemingNo worries, it’s confusing that the process of configuring deps can later provoke this sort of error, for sure…#2021-12-0520:55p-himikFor the sake of my own education - where is this setting stored? I didn't find the old version with grep so I must've missed some place.#2021-12-0521:01cflemingSo in IntelliJ there are project-specific settings and global app-wide ones. This is app-wide, so it’s not stored in the project itself. You can find those directories here: https://www.jetbrains.com/help/idea/directories-used-by-the-ide-to-store-settings-caches-plugins-and-logs.html#config-directory. On my Mac, the relevant file is at: /Users/colin/Library/Application Support/JetBrains/IntelliJIdea2021.3/settingsRepository/repository/clojure-deps.settings.xml#2021-12-0521:03p-himikOh, I see it now, thanks!#2021-12-0617:02AJ JaroWhen generating stubs in IntelliJ version 2021.3 and Cursive 1.12.1-2021.3 I receive an error in this thread. How can I resolve this?#2021-12-0617:03AJ Jaro
java.lang.ExceptionInInitializerError
at java.base/java.lang.Class.forName0(Native Method)
at java.base/java.lang.Class.forName(Class.java:398)
at clojure.lang.RT.classForName(RT.java:2211)
at clojure.lang.RT.classForName(RT.java:2220)
at clojure.lang.RT.loadClassForName(RT.java:2239)
at clojure.lang.RT.load(RT.java:449)
at clojure.lang.RT.load(RT.java:424)
at clojure.core$load$fn__6839.invoke(core.clj:6126)
at clojure.core$load.invokeStatic(core.clj:6125)
at clojure.core$load.doInvoke(core.clj:6109)
at clojure.lang.RestFn.invoke(RestFn.java:408)
at clojure.core$load_one.invokeStatic(core.clj:5908)
at clojure.core$load_one.invoke(core.clj:5903)
at clojure.core$load_lib$fn__6780.invoke(core.clj:5948)
at clojure.core$load_lib.invokeStatic(core.clj:5947)
at clojure.core$load_lib.doInvoke(core.clj:5928)
at clojure.lang.RestFn.applyTo(RestFn.java:142)
at clojure.core$apply.invokeStatic(core.clj:667)
at clojure.core$load_libs.invokeStatic(core.clj:5985)
at clojure.core$load_libs.doInvoke(core.clj:5969)
at clojure.lang.RestFn.applyTo(RestFn.java:137)
at clojure.core$apply.invokeStatic(core.clj:667)
at clojure.core$require.invokeStatic(core.clj:6007)
at clojure.core$require.doInvoke(core.clj:6007)
at clojure.lang.RestFn.invoke(RestFn.java:408)
at cursive.stubs.metadata.clojure$read_ns.invokeStatic(clojure.clj:65)
at cursive.stubs.metadata.clojure$read_ns.invoke(clojure.clj:64)
at user$eval259.invokeStatic(create-stub16236083806959255914.clj:2)
at user$eval259.invoke(create-stub16236083806959255914.clj:2)
at clojure.lang.Compiler.eval(Compiler.java:7177)
at clojure.lang.Compiler.load(Compiler.java:7636)
at clojure.lang.Compiler.loadFile(Compiler.java:7574)
at clojure.lang.RT$3.invoke(RT.java:327)
at user$eval5.invokeStatic(form-init9916428172362789119.clj:1)
at user$eval5.invoke(form-init9916428172362789119.clj:1)
at clojure.lang.Compiler.eval(Compiler.java:7177)
at clojure.lang.Compiler.eval(Compiler.java:7167)
at clojure.lang.Compiler.load(Compiler.java:7636)
at clojure.lang.Compiler.loadFile(Compiler.java:7574)
at clojure.main$load_script.invokeStatic(main.clj:475)
at clojure.main$init_opt.invokeStatic(main.clj:477)
at clojure.main$init_opt.invoke(main.clj:477)
at clojure.main$initialize.invokeStatic(main.clj:508)
at clojure.main$null_opt.invokeStatic(main.clj:542)
at clojure.main$null_opt.invoke(main.clj:539)
at clojure.main$main.invokeStatic(main.clj:664)
at clojure.main$main.doInvoke(main.clj:616)
at clojure.lang.RestFn.applyTo(RestFn.java:137)
at clojure.lang.Var.applyTo(Var.java:705)
at clojure.main.main(main.java:40)
Caused by: java.lang.ClassNotFoundException: com.amazonaws.services.lambda.AWSLambdaClient
at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:471)
at clojure.lang.DynamicClassLoader.findClass(DynamicClassLoader.java:69)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:588)
at clojure.lang.DynamicClassLoader.loadClass(DynamicClassLoader.java:77)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
at java.base/java.lang.Class.forName0(Native Method)
at java.base/java.lang.Class.forName(Class.java:398)
at clojure.lang.RT.classForName(RT.java:2211)
at clojure.lang.RT.classForName(RT.java:2220)
at amazonica.aws.lambda__init.__init0(Unknown Source)
at amazonica.aws.lambda__init. (Unknown Source)
... 50 more
#2021-12-0620:39cfleming
Caused by: java.lang.ClassNotFoundException: com.amazonaws.services.lambda.AWSLambdaClient
#2021-12-0620:40cflemingThat’s the actual problem, any idea why that wouldn’t be on the classpath? I’m assuming that would be pulled in by Amazonica, right?#2021-12-0702:35AJ JaroNo, it’s a bit confusing. Yes, it is pulled in by Amazonica through our deps.edn. Here’s what we have there. Additionally, I have that class available in the External Libraries section of the project.
amazonica/amazonica             {:mvn/version "0.3.153"}
com.amazonaws/aws-java-sdk-s3   {:mvn/version "1.11.876" :exclusions  [joda-time/joda-time]}
#2021-12-0702:36AJ JaroWhen I opened that class I could click Download Source and that seemed to resolve the problem. Is that a deps.edn issue then?#2021-12-0702:55cflemingUm, honestly, I’m not sure. I can’t see how downloading the sources would affect that in any way. Are you able to reproduce the problem or is it now working ok?#2021-12-0722:02AJ JaroI’m not able to reproduce it anymore. It’s a bit odd 🤷#2021-12-0823:42cflemingWell, I think I’m going to file that under “sunspots”.#2021-12-0711:01Jakub Holý (HolyJak)Hi! Is it possible to make Cursive/II report an error when I have an unused alias? I do not see this particular inspection in Prefs - Editor - Inspections - Clojure (there is "unused require" but changing that to Error has on visible effect). I want to be loudly informed when I have an unused require/alias so that I can fix it before it fails on CI 🙏#2021-12-0715:29indyI guess IntellliJ needs to have a “loudly” inform feature for that. You can click on the problems tab to see the issues. If you’re using IntelliJ to commit your files you could turn on Analyze Code to not allow you to commit unless all the problems are resolved. Or alternatively you could add clj-kondo to your git pre-commit hooks.#2021-12-0808:11Jakub Holý (HolyJak)Thank you!#2021-12-0916:12roman01laHey hey. Anyone using clj-kondo with Cursive? I'm not seeing actual message in a popover when hovering over underlined code. Verified that it doesn't work with both clojure-lsp and kondo-lsp, seems to be an issue with Intellij's LSP plugin#2021-12-0916:24imreI use clj-kondo with the file watcher plugin, it works fine there#2021-12-0916:24roman01lahm, so file watcher, let me try...#2021-12-0916:49roman01la@U08BJGV6E hm, I can see linting report in Intellij's console, but the IDE is not displaying those in the editor for me#2021-12-0916:49roman01ladid you do anything besides setup guide in kondo's repo?#2021-12-0919:38imreno I didn't. here's my related config#2021-12-1423:26zxspectrrslightly off topic but is there a way to make the red error squiggles a bit more visible?#2021-12-1423:26zxspectrris that a styling setting in intellij somewhere?#2021-12-0921:43d5pwith latest cursive+intellij , when i cmd+up in repl to move between history i get an error and this stacktrace , is this known or anything i can do to sort it out?#2021-12-0921:45cflemingSorry, this is a known issue: https://github.com/cursive-ide/cursive/issues/2620#2021-12-0922:07d5pahh all good, thanks will wait for the next release#2021-12-0921:49Alex Miller (Clojure team)is there any way to use the intellij bytecode viewer with a Clojure class instance during debug?#2021-12-0921:51cflemingHmm, I’m not sure. If you’re AOT compiling you can find the class in the project view and open it, but I can’t think of a way to view a dynamically loaded one.#2021-12-0921:53Alex Miller (Clojure team)I cannot say how incredibly useful that would be to me :)#2021-12-0921:53cflemingI’ll see what I can do 🙂#2021-12-0921:58cfleminghttps://youtrack.jetbrains.com/issue/IDEA-83442 looks like your issue.#2021-12-1416:06GGfpcJust came across this post on HN: https://tonsky.me/blog/sublime-clojure/ The inline eval and exception formatting is really great. Would love it if they made it across to Cursive eventually#2021-12-1420:55cflemingYes, inline eval is something I’m working on. I’d be interested to see what it does with large data structures, I’ll have to install it and see.#2021-12-1421:03cflemingCursive does already also do the exception formatting, although it doesn’t yet work for #error{} objects for boring reasons.#2021-12-1507:20Erik ThorseliusAnyone seen errors like this? I'm a bit unsure where it originates from. Is it intellj/cursive, nrepl or something in my code?#2021-12-1507:22cflemingThis is a Cursive thing, which might be a problem in your code, or it might be a bug in Cursive. I have an outstanding issue to provide better debug logging around this: https://github.com/cursive-ide/cursive/issues/2612.#2021-12-1507:23cflemingIn the meantime, if you try the steps here: https://github.com/cursive-ide/cursive/issues/1432#issuecomment-538613756, do you see anything useful?#2021-12-1507:24Erik ThorseliusGreat! Thanks, I will read#2021-12-1507:28Erik ThorseliusNo output when I try to load file in repl 😞
2021-12-15 08:26:17,626 [2028144]   INFO - lij.diagnostic.DebugLogManager - Set DEBUG for the following categories: #cursive.repl.actions
2021-12-15 08:27:35,985 [2106503]   INFO - il.indexing.FileBasedIndexImpl - Health check heartbeat
#2021-12-1507:29cflemingWhen do you see that error?#2021-12-1507:29cflemingIs it as the result of some action?#2021-12-1507:30Erik ThorseliusYes, when I run Load files in REPL it shows up where I have my cursor#2021-12-1507:36cflemingSo, that should output something in the log. One sec…#2021-12-1507:37cflemingJust to check, this is “Load file in REPL” or “Sync files in REPL”?#2021-12-1507:37Erik Thorselius"Load file in REPL"#2021-12-1507:38Erik ThorseliusSync gives the same error#2021-12-1507:38cflemingActually, could you add #cursive.namespace to the debug log settings as well, and try again?#2021-12-1507:40Erik Thorselius
2021-12-15 08:39:27,655 [2818173]  DEBUG -             #cursive.namespace - Dependency cycle .../js/out/re_frame/trace.cljc -> ...static/js/compiled/out/re_frame/trace.cljc -> .../resources/public/js/out/re_frame/trace.cljc
#2021-12-1507:40Erik ThorseliusOkey, here is something to work on. Maybe more on my side then#2021-12-1507:41cflemingOk, it looks like you don’t have your CLJS output directories excluded. If you do that, does it help?#2021-12-1507:42Erik ThorseliusIs it configured in my deps.edn file?#2021-12-1507:42cflemingNo, you’ll probably have to do that manually, sorry. How are you compiling your CLJS?#2021-12-1507:43Erik ThorseliusGood question, this is not my strong side. Could figwheel help me with this?#2021-12-1507:47cflemingFigwheel is one way to compile your CLJS, yes, Shadow-CLJS is another, and you can also compile using just the straight CLJS compiler. I’m not sure how you’re doing it in your case, however. Can you find the directories mentioned in the error message? js/out, static/js/compiled/out and resources/public/js/out?#2021-12-1507:47cflemingIt actually looks to me like you’re getting some CLJC files in places where you should only have JS output, though, which is something you’ll have to fix in your build.#2021-12-1507:49cflemingIf you can find those directories, you probably want to exclude them, which means you right click them in the project view and select “Mark Directory As | Excluded”. However you’ll probably want to do that higher up in your directory hierarchy since you probably don’t want IntelliJ indexing any of your output.#2021-12-1507:51Erik ThorseliusExcluded the folder and everything works as expected. Thanks a lot!#2021-12-1514:15Colin P. HillTrying to run all tests in a project with Leiningen, I'm getting this error:
java.lang.ClassCastException: class cursive.runner.ClojureTestConfiguration$getRunProfileState$state$1 cannot be cast to class com.intellij.execution.configurations.RunConfigurationBase
IDEA Ultimate 2021.2.3, Cursive 1.12.1-2021.2. Is this a known issue?
#2021-12-1519:54cflemingThis is a bug sorry, it’s fixed for the next build: https://github.com/cursive-ide/cursive/issues/2621#2021-12-1521:09Colin P. HillSo, let's suppose I keep encountering a bug where my REPL editor gets stuck in read-only mode, but I can't figure out the conditions for reproducing it. Is there any diagnostic information I could give to make that bug report possibly actionable, or should I hold off until I can figure out exactly when it's happening?#2021-12-1600:10cflemingHmm, I’m not sure. So what is going on? You suddenly can’t type in the REPL editor?#2021-12-1612:45Colin P. HillWhen you're starting up a REPL, it doesn't let you type in the editor until it finished initializing, right? I'm running into a problem where it just never releases that hold. Typing in the editor just results in a little speech bubble that says (something like; I don't have it happening now to get the exact wording) "This view is read-only". Amusingly, I can type parens, but I can't delete them or type anything else, which, come to think of it, is probably a distinct but much less problematic bug.#2021-12-1623:58cflemingI see, so it’s not like it suddenly breaks, but that the REPL never accepts any input? That’s probably something as a result of the fix to stop the REPL focusing at startup, I’ll look at that. Does this happen sporadically for the same REPL run config, or are there particular configs that it always happens for and some that it doesn’t?#2021-12-1712:54Colin P. HillCorrect, the REPL simply never becomes usable. It happens sporadically for the same config. Yesterday I had to relaunch the same REPL something like five times before I could get a usable one. It feels like a state thing, but I haven't figured out exactly what ceremony will get it to work. A few slightly uncommon things about my environment that might be culprits: • The project uses multiple Leiningen profiles to build distinct artifacts with distinct source paths. These profiles clobber each other with ^:replace directives. In order to get it to work with Cursive, I have it configured to use a custom profile that lists all the source paths, but the REPL configurations use the project's native profiles. • As a consequence of the above, I keep two REPLs running much of the time, one for each of the two major profiles in the project.#2022-02-0814:27Colin P. Hill@U0567Q30W I think I figured this out! The REPL startup for my project is so slow that I was hitting the timeout configured in the plugin. I would get an error message saying something like "No connection details received" – but the startup would keep trucking along, and eventually a message would be printed that the REPL was started on port suchandsuch. I was ignoring the error message because it was mingled in with the unfortunately large number of spurious warnings I get on startup, and never suspected that the message might be coming from Cursive itself. So I think this is mostly working as intended, but the message could probably stand to be more prominent and clear, maybe pointing the user to the timeout setting.#2021-12-1600:09cflemingSomething I’ve been meaning to add for ages: the ability to diff data structures from the REPL.#2021-12-1600:24kennyThis will be a huge win!!#2021-12-1600:28cflemingI hope so! I’m not sure yet how it will perform for really big structures (the return value has to contain both sides of the diff, and the UI might be interesting too).#2021-12-1600:29kennyIt'd perform equivalently to how it performs in the clojure.test integration, I'd assume?#2021-12-1600:30cflemingRight, but I suspect people will use this with larger results.#2021-12-1600:31kennyAh. Probably right. Maybe generate some large data with test.check and see what happens 😅#2021-12-1600:32cflemingYep. I can probably create an option to elide identical values in maps and replace them with ... or something too.#2021-12-1600:34kennyOoo. That'd be awesome and useful even for the test integration!#2021-12-1600:36kennyOne thing that's always been really tough to parse out is when a set of maps differs from the left and right sides. The diff UI seems really tricky and perhaps some assumptions had to be made. I could find an example if interested. #2021-12-1600:36cflemingYes, I’d definitely be interested in an example.#2021-12-1600:37cflemingIt’s definitely hard to know how to present arbitrary diffs, since it’s impossible to know how arbitrary data structures should be formatted.#2021-12-1600:39kennyYeah. I have no idea how you'd even present the diff for a set of maps in the correct manner, now that I think about it. You don't know the semantics of the things I want compared since they're in a set.#2021-12-1600:40cflemingRight, and it’s often obvious to the user how you would want that data formatted, but that can’t be determined automatically. If you have suggestions about how it might work I’m all ears.#2021-12-1600:41cflemingI’ve thought about showing the diffs as a collapsible tree, but haven’t got around to a proof of concept for that.#2021-12-1600:49kennySent a follow up with a difficult map+set diff via DM. I don't have any ideas on that one since it seems very hard to do for arbitrary data.#2021-12-1600:51kennyHere's one I've gotten used to at this point: list vs vector show up in the diff even though they will be treated as =.#2021-12-1600:52cfleming
(= '(1 2 3) [1 2 3])
=> true
WAT
#2021-12-1600:52cflemingI’m truly shocked by that.#2021-12-1600:53cflemingThose things are not equal by anyone’s definition.#2021-12-1600:55kennyHaha. It has some weird consequences too. It does happen to be useful in tests a lot since the vector literal is nicer to type than (list ...). Fun thread on the topic: https://clojurians.slack.com/archives/C03S1KBA2/p1621184012406400#2021-12-1600:59kennyMaybe you've seen this already, but here's another interesting approach: https://fazzone.github.io/autochrome.html#2021-12-1601:44cflemingYep, there are a bunch of them - deep-diff2, editscript and a couple more.#2021-12-1601:54kennyOne other thing I was curious about. If a test reports :expected and :actual keys and is not an is form, could the diff still be shown? #2021-12-1602:11cflemingUmm… maybe? I’d have to go back and refresh my memory of how clojure.test works. What’s your use case?#2021-12-1602:19kennySupport for match? https://github.com/nubank/matcher-combinators/blob/551b6f5e915d523027cb4f26ecfe3c5423ac859f/src/clj/matcher_combinators/clj_test.clj#L38 Right now I have to manually run the test to view results. #2021-12-1602:20kennyFrom a naive perspective, it seems reasonable that any test report that contains an expected and actual could render the diff viewer. #2021-12-1602:22cflemingSeems reasonable, I’ll take a look.#2021-12-1602:25kennyAnyway, thanks for working on the diff api function. That will be really helpful.#2021-12-1614:51imreThis is a really promising feature, thanks Colin!#2021-12-1606:09agigaoHey there, I wonder how Cursive "decides" which profile to use and load? For example I have dev,test under profiles in repl configuration. Both configurations have corresponding config dirs: config/test/ and config/dev/ populated with config.edn . Repl starts by having both dirs in a classpath. And when I run test in the repl, which loads fixture from the same dir, where we load config file using https://github.com/yogthos/config, :java-class-path has config/test. By contrast, when dealing with Emacs, I have to manually specify the test profile. And I wonder how does Cursive choose a proper profile and/or config dir for :java-class-path? Not completely sure if it's the right place and the sound question, though 👻#2021-12-1608:28cflemingSo there are two places where you can configure profiles, and they do different things. There’s this: https://cursive-ide.com/userguide/leiningen.html#working-with-profiles, which is used when syncing the project to the IDE. And then you can also select the profiles to be used when constructing the classpath in your REPL run configuration, and that will be used to start the REPL (or other task). Does that make sense?#2021-12-1608:29cflemingIt sounds like you’re talking about running a REPL, so it’s probably the second of those. You can find the selected profiles in the run config.#2021-12-1610:42Daniel StephensHi all, wonder if anyone could help me sort this issue with test output when an exception is thrown or confirm if it's a cursive bug? Basically if somethig inside of (is) throws an exception, then I only get the top level Exception when running with cursive's 'run test' fns. If it's not in an (is) it works fine so my guess was that cursive overrides the report :error multimethod and drops the cause, but I'm not sure. Attached shows: • what I get running with other test runners, showing both the top level and causing parts of the exception. • what I get running with cursive REPL -> run test fns which only shows top level • and the test that I used for recreation purposes#2021-12-1713:32Fudge#cursive#2021-12-1713:49souenzzowhen we do #_ before a ^metadata, cursive highlights as if just the metadata is ignored. But the form will be ignored too.#2021-12-1722:14cflemingOops.#2021-12-1715:34sbIf I use remote repl connection (nrepl) configuration, that is much-much faster (init phase/ mount lib) than when I start as local “Run with Leiningen”. Is that normal? or do I need to add extra params?#2021-12-1805:36cflemingDo you mean the REPL startup? That’s because if you use a remote connection, it’s connecting to a server which is already started, so that doesn’t include any of the startup time before the REPL is ready.#2021-12-1716:14macrobartfastUsing cursive for a bit in Intellij… is there a way to get C-c C-c and C-c C-e to work like in Emacs (for sending form under point and before point to REPL, respectively)?#2021-12-1716:19R.A. PorterI can't answer that precise question, but IJ itself has a set of emacs keybindings that you could switch to. If you did, it'd probably make your overall editor experience feel a bit more familiar; likewise, it would also probably change many of the Cursive-specific bindings.#2021-12-1716:20macrobartfastThank you for replying! I did try the Emacs bindings… it didn’t seem to enable C-c C-c, for instance (which is my usual way of evaluating the form under the point).#2021-12-1716:20macrobartfastSo still thrashing a bit. 🙂#2021-12-1716:21Colin P. HillYou should be able to add whatever binding you want for whatever command you want. IntelliJ supports two-stroke sequences, so C-c C-c and C-c C-e should both be doable.#2021-12-1716:47Daniel Stephens@macrobartfast As Colin mentions, I think equivalent behaviours are implemented by cursive so you can setup shortcuts as you wish for them#2021-12-1716:22ikitommi@macrobartfast you should use something like integrant and call (reset) to reload everything. It’s in order of milliseconds#2021-12-1716:23macrobartfast@ikitommi gotcha! just about to set up integrant, so that’s perfect.#2021-12-1716:24macrobartfast(I accidentally deleted the message here that @ikitommi was responding to, which was how to reload an app as quickly as possible)#2021-12-1717:58souenzzomy cursive always loses its "ignore directory" configuration and stuck trying to index .shadow-cljs and cljs-generated files 😞 I need to wait until the index finish to edit this configuration and make it ignore the dirs#2021-12-1805:34cflemingWhen you say it always loses it, do you mean that it gets overwritten on a project sync? If you mark your directory then go to the lein or deps toolwindow and hit refresh, does it lose it then?#2021-12-2012:24souenzzoHello This morning I removed all my project files, did a clean git clone (we do not commit any of node_modules or .shadow-cljs files) Also, removed all my intellij plugins, removed .cache and .local/share/JetBrains directiries So I did a "fresh start" of the intellij with my project still, i couldn't open the project I was using this project with cursive/intellij for ~6 months now, without any problems There is others developers, with linux/mac in this project too, all them with intellij/cursive It stuck in Synchronizing Clojure Deps project with the messae Reading projects\n Reading appstream-model The project is a "monorepo", where there is a projects folder with ~20 clojure projects, all them with a deps.edn, many of them using git and local/root Here my logs https://gist.github.com/souenzzo/cc097812768a4e7e0504a9ea36c8d134#2021-12-2017:08souenzzostuck again in Synchronizing Clojure Deps project How can I debug why it stuck in Synchronizing Clojure Deps project ?#2021-12-2017:08souenzzothere is no CPU activity#2021-12-2017:11souenzzoif I click in x button, it stuck in Stopping - Synchronizin Clojure D...#2021-12-2017:11souenzzothis is really annoying
#2021-12-2105:40cflemingUgh, sorry, that does sound painful. Can you get a thread dump of the IDE when it’s stuck synchronising to see where it’s blocked?#2021-12-2105:41cfleminghttps://intellij-support.jetbrains.com/hc/en-us/articles/206544899-Getting-a-thread-dump-when-IDE-hangs-and-doesn-t-respond#2021-12-2115:27souenzzohttps://gist.github.com/souenzzo/cc097812768a4e7e0504a9ea36c8d134#file-threaddump-java#2021-12-2115:33souenzzoit is nice that I can get the intellij threaddump from intellij profile tab https://gist.github.com/souenzzo/cc097812768a4e7e0504a9ea36c8d134#file-switch-to-clojure-cli-java#2021-12-2115:35souenzzoi switched from tools.deps directly to tools.deps CLI, the WAITING stacktrace chagend, but seems to be the same issue. Which clojure cli command do cursive execute? I can run it directly?#2021-12-2115:40souenzzoI downgraded tools.deps directly 0.11.935 and now it is working again. Recap: • my cli version is 1.10.3.1020. it stuck. stacktrace in the git • using tools.deps 0.12.x directly stuck. stracktrace in the git • using tools.deps 0.11.x works If you want a complete thread dump, or if you want me to do some other debug thing to understand better my issue, I'm open to do it.#2021-12-2205:39cflemingOh, thanks, it might be an issue with new t.d.a versions, I’ll try to repro.#2021-12-1718:29FudgeI'm unable to download JDK 8 in my macbook, any suggestions on how I can download JDK 8?#2021-12-1718:38R.A. Porterhttps://adoptium.net/ and if you use brew you should be able to tap this cask: https://formulae.brew.sh/cask/temurin#2021-12-1718:38R.A. Porter(Adoptium used to be AdoptOpenJDK)#2021-12-1721:34Lennart Buitare you perhaps on an M1 mac?#2021-12-1805:26cflemingI find it easiest to use IntelliJ to do this. Open any project, then File-&gt;Project Structure. Select SDKs in the list on the left, and press +. Select “Download JDK” then you can choose your distribution, architecture and version easily.#2021-12-1817:12Romit GandhiI have generated re-frame project but in the intellige+cursive it is not detecting it and I'm not able to use any plugin features, do I need to do something extra?#2021-12-2208:24cflemingI’m going to need more information about what you’re doing, and what is not working. Did you follow either https://cursive-ide.com/userguide/leiningen.html or https://cursive-ide.com/userguide/deps.html to import your project?#2022-01-0417:15Romit GandhiActually @U0567Q30W, I generated re-frame project using lein new re-frame <app-name> and in that there is neither project.clj or deps.edn . Actually, inside that shadow-cljs.edn is there. And when I'm loading that project in Intellige using cursive it is not able to provide me any suggestion or any plugin related features. Can you please help me regarding that ?#2022-01-0420:13cflemingThe shadow docs discuss how to work with Cursive: https://shadow-cljs.github.io/docs/UsersGuide.html#_cursivehttps://shadow-cljs.github.io/docs/UsersGuide.html#_cursive#2021-12-1820:34FudgeHow do I add cursive plugin zip file in intellij?#2021-12-2000:22cflemingAre you just trying to install Cursive, or do you need to install from disk for some reason?#2021-12-2000:23cflemingIf you just need to install, then follow this: https://cursive-ide.com/userguide/#installing-cursive. If you need to install from disk for some reason, do something like this: https://cursive-ide.com/userguide/#downgrading-cursive#2021-12-1822:50Mikehey i'm having some trouble configuring cursive on windows. i'd like to use CLI Tools and installed clojure with the clj on Windows ps script, but it can't find the clojure command.#2021-12-1901:17cflemingThe best way to use deps with Cursive on Windows is to use tools.deps directly, see: https://cursive-ide.com/userguide/deps.html#windows.#2021-12-1901:18cflemingCursive can’t use WSL yet, unfortunately. I believe there’s support for graphical apps coming to WSL sometime, and then it should be possible to run IntelliJ entirely inside it, but AFAIK that’s not possible yet. I don’t use Windows myself though, so I’m not very up to date.#2021-12-1823:21Mikeis there a way to use wsl?#2021-12-2107:04agigaoI'd suggest - https://github.com/microsoft/wslg#2021-12-1823:21Mikewith cli tools#2021-12-2109:01SKhi! how to work around https://github.com/cursive-ide/cursive/issues/2620 ?#2021-12-2109:02SKwould it be possible to push version 1.11.0 (the last version without this bug) which is compatible with intellij 2021.3 so anyone can downgrade to that if needed? unfortunately I've upgraded intellij to 2021.3 and now I cannot downgrade the plugin because there is no such combination of versions here: https://plugins.jetbrains.com/plugin/8090-cursive/versions/stable. Reverting the whole intelliJ install, including all settings and plugins is a pain..#2021-12-2110:50Ilan Uzananyone else is using Intellij on Windows and has a problem with one of the leiningen projects (not on WSL), that whenever I run the REPL Intellij just gets stuck on "Calculating classpath" forever? If so, how did you solve it? I am working on Windows 10, Intellij Community edition 2021.3, Cursive 1.12.1#2021-12-2110:51Ilan UzanI see someone described a similar issue https://clojurians-log.clojureverse.org/cursive/2021-10-03, only in deps project - but it doesn't say if and how he solved it.#2021-12-2206:49shinichyHas anyone had this annoying Slow operations are prohibited on EDT issue? https://github.com/cursive-ide/cursive/issues/2628#2021-12-2208:14cflemingYes, a lot of these are showing up in Cursive, as well as in other plugins. I’m gradually working through the ones I’ve seen, and the ones that have come through in the tracker.#2021-12-2221:38shinichyGood to hear that. Thanks!#2021-12-2212:40scarytomI regularly get exceptions from Cursive, and I'm pretty religious about hitting the "Report to Cursive" button. Recently I've started getting an exception that fails to report! I'll include the stack trace for the exception and the message I get when I try to report it on the thread under this post. Just an FYI really @cfleming, as I don't know how else to report this. Not really blocking me.#2021-12-2212:40scarytom
update failed for AnAction(com.intellij.codeInsight.documentation.actions.ShowQuickDocInfoAction, id=QuickJavaDoc) with text=Quick Documentation

com.intellij.openapi.project.IndexNotReadyException: Please change caller according to com.intellij.openapi.project.IndexNotReadyException documentation
	at com.intellij.openapi.project.IndexNotReadyException.create(IndexNotReadyException.java:67)
	at com.intellij.util.indexing.FileBasedIndexImpl.handleDumbMode(FileBasedIndexImpl.java:852)
	at com.intellij.util.indexing.FileBasedIndexImpl.ensureUpToDate(FileBasedIndexImpl.java:804)
	at com.intellij.util.indexing.FileBasedIndexEx.processExceptions(FileBasedIndexEx.java:244)
	at com.intellij.util.indexing.FileBasedIndexEx.processValueIterator(FileBasedIndexEx.java:349)
	at com.intellij.util.indexing.FileBasedIndexEx.processValuesInOneFile(FileBasedIndexEx.java:281)
	at com.intellij.util.indexing.FileBasedIndexEx.processValues(FileBasedIndexEx.java:222)
	at com.intellij.util.indexing.FileBasedIndexEx.processValues(FileBasedIndexEx.java:211)
	at cursive.index$class_by_text_offset.invokeStatic(index.clj:574)
	at cursive.index$class_by_text_offset.invoke(index.clj:571)
	at cursive.intellij.class$class_by_text_offset.invokeStatic(class.clj:280)
	at cursive.intellij.class$class_by_text_offset.invoke(class.clj:279)
	at cursive.intellij.class$find_class$fn__9817.invoke(class.clj:292)
	at clojure.core$some.invokeStatic(core.clj:2705)
	at clojure.core$some.invoke(core.clj:2696)
	at cursive.intellij.class$find_class.invokeStatic(class.clj:292)
	at cursive.intellij.class$find_class.invoke(class.clj:284)
	at clojure.lang.Var.invoke(Var.java:384)
	at cursive.api.DelayedFn.invoke(DelayedFn.java:31)
	at cursive.findUsages.declarations.ClassDeclarationSearcher.findDeclarationsAt(ClassDeclarationSearcher.java:31)
	at com.intellij.model.psi.impl.DefaultPsiSymbolDeclarationProvider.getDeclarations(DefaultPsiSymbolDeclarationProvider.kt:18)
	at com.intellij.model.psi.impl.Declarations.declarationsInElement(declarations.kt:54)
	at com.intellij.model.psi.impl.Declarations.allDeclarationsAround(declarations.kt:23)
	at com.intellij.model.psi.impl.TargetsKt.declarationsOrReferences(targets.kt:120)
	at com.intellij.model.psi.impl.TargetsKt.declaredReferencedData(targets.kt:41)
	at com.intellij.model.psi.impl.TargetsKt.targetSymbols(targets.kt:23)
	at com.intellij.lang.documentation.symbol.impl.ImplKt.symbolDocumentationTargets(impl.kt:13)
	at com.intellij.lang.documentation.ide.impl.IdeDocumentationTargetProviderImpl.documentationTargets(IdeDocumentationTargetProviderImpl.kt:36)
	at com.intellij.lang.documentation.ide.actions.ActionsKt.targetsFromEditor(actions.kt:96)
	at com.intellij.lang.documentation.ide.actions.ActionsKt.documentationTargets(actions.kt:64)
	at com.intellij.codeInsight.documentation.actions.ShowQuickDocInfoAction.update(ShowQuickDocInfoAction.kt:32)
	at com.intellij.openapi.actionSystem.ex.ActionUtil.lambda$performDumbAwareUpdate$0(ActionUtil.java:131)
	at com.intellij.openapi.actionSystem.ex.ActionUtil.performDumbAwareUpdate(ActionUtil.java:145)
	at com.intellij.openapi.actionSystem.impl.ActionUpdater.doUpdate(ActionUpdater.java:602)
	at com.intellij.openapi.actionSystem.impl.ActionUpdater.lambda$updateActionReal$7(ActionUpdater.java:126)
	at com.intellij.openapi.actionSystem.impl.ActionUpdater.callAction(ActionUpdater.java:170)
	at com.intellij.openapi.actionSystem.impl.ActionUpdater.updateActionReal(ActionUpdater.java:127)
	at com.intellij.openapi.actionSystem.impl.ActionUpdater.lambda$new$0(ActionUpdater.java:109)
	at com.intellij.openapi.actionSystem.impl.ActionUpdater.update(ActionUpdater.java:588)
	at com.intellij.openapi.actionSystem.impl.ActionUpdater.expandGroupChild(ActionUpdater.java:434)
	at com.intellij.openapi.actionSystem.impl.ActionUpdater.lambda$doExpandActionGroup$21(ActionUpdater.java:413)
	at com.intellij.util.containers.ContainerUtil.concat(ContainerUtil.java:1454)
	at com.intellij.openapi.actionSystem.impl.ActionUpdater.doExpandActionGroup(ActionUpdater.java:413)
	at com.intellij.openapi.actionSystem.impl.ActionUpdater.expandGroupChild(ActionUpdater.java:489)
	at com.intellij.openapi.actionSystem.impl.ActionUpdater.lambda$doExpandActionGroup$21(ActionUpdater.java:413)
	at com.intellij.util.containers.ContainerUtil.concat(ContainerUtil.java:1454)
	at com.intellij.openapi.actionSystem.impl.ActionUpdater.doExpandActionGroup(ActionUpdater.java:413)
	at com.intellij.openapi.actionSystem.impl.ActionUpdater.expandActionGroup(ActionUpdater.java:233)
	at com.intellij.openapi.actionSystem.impl.ActionUpdater.lambda$expandActionGroupAsync$13(ActionUpdater.java:286)
	at com.intellij.openapi.actionSystem.impl.ActionUpdater.lambda$expandActionGroupAsync$15(ActionUpdater.java:309)
	at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1084)
	at com.intellij.openapi.actionSystem.impl.ActionUpdater.lambda$expandActionGroupAsync$16(ActionUpdater.java:309)
	at com.intellij.openapi.progress.util.ProgressIndicatorUtils.runActionAndCancelBeforeWrite(ProgressIndicatorUtils.java:158)
	at com.intellij.openapi.actionSystem.impl.ActionUpdater.lambda$expandActionGroupAsync$17(ActionUpdater.java:305)
	at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$2(CoreProgressManager.java:188)
	at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$executeProcessUnderProgress$12(CoreProgressManager.java:624)
	at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:698)
	at com.intellij.openapi.progress.impl.CoreProgressManager.computeUnderProgress(CoreProgressManager.java:646)
	at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:623)
	at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:66)
	at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:175)
	at com.intellij.openapi.progress.util.BackgroundTaskUtil.runUnderDisposeAwareIndicator(BackgroundTaskUtil.java:277)
	at com.intellij.openapi.actionSystem.impl.ActionUpdater.lambda$expandActionGroupAsync$18(ActionUpdater.java:304)
	at com.intellij.util.concurrency.BoundedTaskExecutor.doRun(BoundedTaskExecutor.java:246)
	at com.intellij.util.concurrency.BoundedTaskExecutor.access$200(BoundedTaskExecutor.java:32)
	at com.intellij.util.concurrency.BoundedTaskExecutor$1.execute(BoundedTaskExecutor.java:225)
	at com.intellij.util.ConcurrencyUtil.runUnderThreadName(ConcurrencyUtil.java:213)
	at com.intellij.util.concurrency.BoundedTaskExecutor$1.run(BoundedTaskExecutor.java:214)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
	at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:668)
	at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:665)
	at java.base/java.security.AccessController.doPrivileged(Native Method)
	at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1.run(Executors.java:665)
	at java.base/java.lang.Thread.run(Thread.java:829)
#2021-12-2212:41scarytomFailed to submit exception report: 422 Unprocessable Entity : ErrorResponse(message=Validation Failed, errors=[ErrorItem(resource=Issue, field=labels, code=custom)])#2021-12-2213:33SKYou could also search the github issue tracker and if the issue is not there, add a new bug ticket#2021-12-2214:44imreI also got the failed to submit error a number of times now#2021-12-2222:50cflemingThanks, a few people have reported this here but I’ve not seen one of these yet. Unfortunately the GH error message is not very useful, I have no idea what the code=custom bit means. I’ll dig around a bit and see if I can find anything.#2021-12-2310:25cfleminghttps://twitter.com/CursiveIDE/status/1473962706294116354#2021-12-2310:39steveb8nThat diff tool will be super useful. Xmas bonus#2021-12-2311:18Lennart Buit(Not so serious) Are bugs ever non-annoying?#2021-12-2319:44cfleming@UDF11HLKC Some are much more annoying than others.#2022-12-2715:00zxspectrrhi colin, sorry if I've missed this, but I don't understand how to use the diff. I read through the post in google groups and when I run this
(cursive/diff (meta #'defn) (meta #'let) :title "Metadata")
I just get `no such namespace: cursive'
#2022-12-2715:00zxspectrri'm guessing i need to require something, i'm jiust not sure what#2022-12-2720:41cfleming@U027433844C How did you start your repl?#2022-12-2721:28zxspectrrvia intellij#2022-12-2721:28zxspectrrjust created a local lein repl#2022-12-2721:29zxspectrras in i host from within cursive rather than connecting into an existing socket repl#2022-12-2721:30zxspectrr#2022-12-2722:38cflemingAnd it’s just a Clojure REPL, you’re not booting into a CLJS one or anything like that?#2022-12-2722:40cflemingIn the meantime, you can use the tagged-literal workaround described in the email. The diff function is literally just:
(defn diff [left right & {:keys [title]}]
  (tagged-literal 'cursive/diff (cond-> {:left left :right right}
                                  title (assoc :title title))))
#2022-12-2722:57zxspectrrjust a normal clj repl yea#2022-12-2722:57zxspectrroh i didn't get the email#2022-12-2800:51cflemingNo, I mean in the Google Groups post - if you’re on the mailing list you get that as an email.#2022-12-2801:58zxspectrroh i see#2021-12-2322:11salamColin, were you able to get to the bottom of why one would get this error from Cursive when working with a remote socket REPL?#2021-12-2322:12salam
2021-12-23 14:13:06,137 [20995681]  ERROR -      #cursive.repl.socket-repl - Exception 'java.lang.Throwable: Error handling REPL response
java.lang.IllegalArgumentException: No implementation of method: :out of protocol: #'cursive.repl/Handler found for class: nil
 at clojure.core$_cache_protocol_fn.invokeStatic (core_deftype.clj:584)
    clojure.core$_cache_protocol_fn.invoke (core_deftype.clj:576)
    cursive.repl$fn__1555$G__1527__1564.invoke (repl.clj:91)
    cursive.repl.socket_repl$handler.invokeStatic (socket_repl.clj:62)
    cursive.repl.socket_repl$handler.invoke (socket_repl.clj:46)
    cursive.repl.socket_repl$read_loop$fn__4218$fn__4219.invoke (socket_repl.clj:113)
    cursive.repl.socket_repl$read_loop$fn__4218.invoke (socket_repl.clj:110)
    cursive.repl.socket_repl$read_loop.invokeStatic (socket_repl.clj:103)
    cursive.repl.socket_repl$read_loop.invoke (socket_repl.clj:70)
    cursive.repl.socket_repl$start_session$reify__4245.run (socket_repl.clj:181)
    com.intellij.openapi.application.impl.ApplicationImpl$1.run (ApplicationImpl.java:263)
    java.util.concurrent.Executors$RunnableAdapter.call (Executors.java:515)
    java.util.concurrent.FutureTask.run (FutureTask.java:264)
    java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1128)
    java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:628)
    java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run (Executors.java:668)
    java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run (Executors.java:665)
    java.security.AccessController.doPrivileged (AccessController.java:-2)
    java.util.concurrent.Executors$PrivilegedThreadFactory$1.run (Executors.java:665)
    java.lang.Thread.run (Thread.java:829)
' was reported 6220 times 
2021-12-23 14:14:05,916 [21055460]  ERROR -                  #cursive.repl - Exception 'java.lang.Throwable: Error handling response
java.lang.IllegalArgumentException: No implementation of method: :out of protocol: #'cursive.repl/Handler found for class: nil
 at clojure.core$_cache_protocol_fn.invokeStatic (core_deftype.clj:584)
    clojure.core$_cache_protocol_fn.invoke (core_deftype.clj:576)
    cursive.repl$fn__1555$G__1527__1564.invoke (repl.clj:91)
    cursive.repl.socket_repl$handler.invokeStatic (socket_repl.clj:62)
    cursive.repl.socket_repl$handler.invoke (socket_repl.clj:46)
    cursive.repl.socket_repl$read_loop$fn__4218$fn__4219.invoke (socket_repl.clj:113)
    cursive.repl.socket_repl$read_loop$fn__4218.invoke (socket_repl.clj:110)
    cursive.repl.socket_repl$read_loop.invokeStatic (socket_repl.clj:103)
    cursive.repl.socket_repl$read_loop.invoke (socket_repl.clj:70)
    cursive.repl.socket_repl$start_session$reify__4245.run (socket_repl.clj:181)
    com.intellij.openapi.application.impl.ApplicationImpl$1.run (ApplicationImpl.java:263)
    java.util.concurrent.Executors$RunnableAdapter.call (Executors.java:515)
    java.util.concurrent.FutureTask.run (FutureTask.java:264)
    java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1128)
    java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:628)
    java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run (Executors.java:668)
    java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run (Executors.java:665)
    java.security.AccessController.doPrivileged (AccessController.java:-2)
    java.util.concurrent.Executors$PrivilegedThreadFactory$1.run (Executors.java:665)
    java.lang.Thread.run (Thread.java:829)
' was reported 6220 times
#2022-12-3104:06cflemingHi, sorry it took me a while to get to this. So I understand the mechanics of what’s going on, but I can’t understand how you’d get into that state. Briefly, when using the socket REPL, Cursive creates a handler for each evaluation which handles the response. This handler is usually discarded when the eval is done, but you seem to be receiving a response for an eval after that has happened. Are you doing anything like printing on background threads, or anything like that? Is there any particular situation which provokes this?#2022-12-3104:57salam> Are you doing anything like printing on background threads, or anything like that? the only suspect in the code that’s close to this is a core.async go-loop that calls a function that prints out logs. what’s odd, though, is that i don’t get the same error message when i run the same code in nREPL.#2022-01-0623:21cflemingYeah, I’d expect that. The nREPL protocol is different, and allows multiple parallel executions, so it assigns an ID to each eval and Cursive associates that with the corresponding handler. I could do the same with the socket protocol, it’s not a difficult change.#2021-12-2402:14Mr. SavyI'm getting "cannot be resolved" errors in my fulcro project after incorporating deps. I tried looking up some solutions to no avail. Is there a troubleshooting guide anywhere for this problem?#2022-12-2722:47cflemingWhich symbols are not resolving? Can you send a screenshot?#2022-12-2820:21Mr. Savyit's anything passed into defresolver or defstate from what i'm seeing. I haven't seen any other places where this happens yet. Here's an example file that I can recreate the issue with. I'm not sure if it matters, but for the dependencies i've tried it with deps, depstar, and dev (which I think is custom) loaded.#2022-12-2902:03cflemingI think the solution there would be to customise the symbol resolution (https://cursive-ide.com/userguide/macros.html#customising-symbol-resolution) for defresolver as defn.#2022-12-2902:45Mr. Savyi'll look into this, thank you!#2022-12-2707:32Fudgehow to read a json file in clojure#2022-12-2721:11AJ JaroThis is probably a better question for #clojure, but previously I’ve used https://github.com/dakrone/cheshire to parse json#2022-12-2722:47cflemingYes, definitely a better question for #clojure, this channel is for discussion related to Cursive.#2022-12-2714:57griersonHey, Can I setup many clojure projects (deps.edn) within one Intellij Idea/git project? Don't need to share dependencies across projects just want to maintain them all within one project. Like a .sln file within C#
myproject/
    shopping-cart
        deps.edn
        code.clj
    other
        deps.edn
        code.clj
#2022-12-2722:48cflemingYep, you can import a project like this using https://cursive-ide.com/userguide/deps.html#working-with-multi-module-projects, or you can just add new modules to an existing project any time.#2022-12-2715:11mishagreetings! is this known? usage/resolution highlights suggest first x is used in :or , when in fact the one from :keys [x y] is used.
(let [x 1
      {:keys [x y] :or {y x}} {}]
  [x y])
=> [nil nil]
#2022-12-2722:52cflemingI’m not sure, there are a few errors around :or, but it’s hard to search for in Github since it ignores the colon. I can’t see anything matching that case though, could you file an issue?#2022-12-2917:46mishahttps://github.com/cursive-ide/cursive/issues/2629#2022-12-2917:47mishathanks!#2022-12-2918:37gravApparently, relying on possibly destructured keys is undefined behaviour. In this case, the run-time seems to disagree with Cursive's static analysis, but neither is "correct", if I understand it correctly 🙂 https://clojurians.slack.com/archives/C03S1KBA2/p1639584960418600#2022-12-2918:41gravOr maybe, rather, anything is correct. Watch out that you're not launching any rockets, @U051HUZLD 😄#2022-12-2919:00mishaI replaced my spec-based implementation with a call to clojure.core/destructure, so I'll accept any destination where ever it takes me :D#2022-12-2915:29ikitommiwould it be possible to handle the Plumatic Schema type hints with different color, e.g. greyed out? testing how that would work with malli, something like this:#2022-12-2915:31ikitommior similar to java/kotlin, showing/hiding the argument names/types when not needed.#2022-12-3104:08cflemingIt would require some work, but it could be done, yes. But it would only work when the schema is in a known location relative to a macro form like your defn examples. I think in Malli the types are often in arbitrary datastructures, right?#2022-12-3107:43ikitommi95% of the time, those hints would be in same place as with schema, just different defn and fn macros.#2022-12-3108:33ikitommiactually, I think it's more 98%. Currently setting the (experimental) malli (plumatic-style) defn munually as resolve as schema.core/defn, but once it gets released, could the mappings be shipped with Cursive itself?#2022-12-3109:11cflemingYes, for sure. Let me know when they’re nailed down, and if there are any differences from Schema (or any differences you’d like to introduce)#2022-01-0916:34ikitommiIt’s malli.experimental/defn and works identically to schema.core/defn. Might move to another ns when 1.0.0 ships, but not likely to happen any time soon.#2022-01-0916:34ikitommihttps://twitter.com/ikitommi/status/1480215765143932931#2022-12-2915:29ikitommi#2022-12-2918:01gregI noticed in the Cognitect Datomic docs a pretty nice trick with dereferencing defs: when you use @(def ) (instead of just (def ...)) , and you evaluate it, it not only creates a var but also evaluates it, showing the value of the var in the repl. The thing is the Cursive complains about it and it doesn't look good. Is there a way to get away of this warning?#2022-12-3104:09cflemingI don’t think there is, no - if you could file an issue I’ll see if I can fix that.#2022-01-0312:53gregI created the issue here: https://github.com/cursive-ide/cursive/issues/2630#2022-12-2922:31borkdude#2022-01-0315:29gregworks really nice! thanks @U04V15CAJ @UQTHDKJ8J#2022-01-0315:30borkdudeThis plugin has now been released to the marketplace: https://plugins.jetbrains.com/plugin/18108-clojure-extras/#2022-01-0319:06zxspectrryep works great, ty ty#2022-01-0319:24borkdudeConsider giving @UQTHDKJ8J's awesome plugin a review here: https://plugins.jetbrains.com/plugin/18108-clojure-extras/#2022-01-0414:40Aurélien Bottaziniawesome. I added a review 😉#2022-01-0722:24JHi guys! Is there an extra config to enable clj-kondo inspection because not work for me (only evalution form)#2022-01-0722:25borkdude@UHZPYLPU1 if you go to "tools" then you will find "clojure-extras" and there is a checkbox#2022-01-0722:26JHere the config on my editor#2022-01-0722:27borkdudeShould be good then. I hope @UQTHDKJ8J can help you with the issue.#2022-01-0821:06JFor you record, if I use clj-kondo executable path, it works.#2022-01-0821:07borkdudeI see. And if you leave it empty it doesn't?#2022-01-0821:17JExactly#2022-01-0821:18borkdudeThen it's great that we have this binary option available :)#2022-01-0821:18borkdudeNot sure what's going on though. Perhaps @UQTHDKJ8J will help soon#2022-01-0821:22brcostaHi guys, sorry to hear that, i'll improve the error messages/logging to make it easier to understand what is going on in this case#2022-01-0821:33JNo worries @UQTHDKJ8J ! Thanks for this very cool plugin and thanks @U04V15CAJ for clj-kondo!#2022-01-0315:30borkdudeThis plugin has now been released to the marketplace: https://plugins.jetbrains.com/plugin/18108-clojure-extras/#2022-12-3016:24simongrayCLJC static analysis doesn’t seem to work correctly for me now...? I have a worse example, but this should be enough (cannot resolve s in the CLJS part):#2022-12-3104:10cflemingYeah, the static analysis sometimes struggles with CLJC, especially around interop. I’m planning to look at this soon since CLJC is about to get more complicated with ClojureDart.#2022-12-3106:43simongrayThanks a lot, Colin.#2022-12-3016:31Colin P. HillIs there any way in the code style options to reformat this
(filter even?
  (range 1 10))
into this?
(filter even?
        (range 1 10))
At my company, we use cljfmt to enforce this code style in CI, and I haven't been able to figure out how to replicate it in Cursive's settings.
#2022-12-3016:36Jordan Robinsonthis may or may not help, but cljstyle will do that for you automatically if you set it up as a file watcher#2022-12-3016:36Jordan Robinsonproblem being that cljfmt has very different rules apart from that one, so you may need to disable basically everything else#2022-12-3016:50shinichyI use cljfmt with File Watchers plugin to format a file on save. You can build cljfmt as a native binary using GraalVM. https://plugins.jetbrains.com/plugin/7177-file-watchers
git clone 
cd cljfmt/cljfmt
lein native-image

# Check the binary
target/cljfmt check
#2022-12-3017:00Colin P. HillAhh, never played with Graal and didn't think of it. I'll try that, thank you!#2022-12-3104:00cfleming@U029J729MUP You’ll want to set the indent for filter to “Function” - see: https://cursive-ide.com/userguide/formatting.html#code-style-settings#2022-12-3104:02cflemingYou’ll want to do that even if you use the File Watcher workaround, because the internal formatter is used for a lot of things (e.g. where the caret goes on the new line when you press enter)#2022-12-3112:50Colin P. Hill@U0567Q30W My issue was actually that I had this enabled (pretty sure it was the default). Took me a while to try unchecking it because it wasn't clear to me what "only indent" meant.#2022-01-0103:40cflemingOh, yes, that would do it. It’s not on by default, but even if you have it on you can override it for particular forms. But if you want to match cljfmt you want that off, for sure.#2022-12-3112:18mathias_dwHi, I finally switched to cursive completely because of emacs pinky 🙂. One piece of functionality I can't seem to find is the inspection of vars that i use a lot in cider. Is there a way in cursive to browse the data in vars in the repl, so without having to set a breakpoint somewhere.#2022-01-0103:40cflemingThere isn’t but it’s something I’m planning to add very soon, similar to the new REPL diff functionality.#2022-01-0113:57mathias_dwgreat, thanks!#2022-12-3116:01potetmYou mean, besides evaluating the var in the repl?#2022-12-3117:51mathias_dwI mean browsing the referenced data. I'm always working with very large data structures, so just printing it is not useful. cider gives you a "browser" to iteratively explore the data structure, navigating into the nested parts#2022-12-3117:52mathias_dwi think vlaaad.reveal is supposed to offer the same, but i just spent a few hours to try and make it work with my old leiningen project, without much success#2022-12-3117:53mathias_dwI was hoping to get the intellij debugger to explore data for the vars in the repl, really...#2022-12-3118:20R.A. PorterYou might want to look at Portal as well. It's pretty trivial to get hooked into a project and the beta of the IJ plugin works okay.#2022-12-3119:12mathias_dwCool, thanks, portal looks exactly like what I'm looking for!#2022-01-0318:59genekim+1 on this. Portal inside of Cursive/IntelliJ is freaking amazing.#2022-01-0312:46gregI tried to use "Clojure Application" configuration to run my custom namespaces that kicks off my repl. I noticed that if I choose "Run with Deps" I got:
class java.lang.Character cannot be cast to class java.lang.String (java.lang.Character and java.lang.String are in module java.base of loader 'bootstrap')
while when I choose "Run with IntelliJ proejct classpath" it starts ok (but complains later because the given namespace does not exist in the classpath because it is added only in specific deps alias - I guess this part is normal).
#2022-01-0322:00cflemingThere’s an issue for this, I’ll look at it for the next EAP: https://github.com/cursive-ide/cursive/issues/2617#2022-01-0319:10genekimJust curious: how often do y’all update IntelliJ? I think I had one bad experience 2 or 3 years ago, and so now I update maybe once per year. (I just learned you can upgrade Cursive independent of IntelliJ upgrades! Duh.)#2022-01-0615:33AJ JaroI regularly update IntelliJ and Cursive; no issues here…for now. 😉#2022-01-0319:30Alex Miller (Clojure team)ditto :)#2022-01-0319:33imreYou learn something new every day#2022-01-0319:35R.A. PorterI had a bad experience once, but the most I've done is stopped using EAPs. I "survived" the OSX update that nuked Java (by "survived", I mean I moved to a PC for several years), so my threshold is a bit higher. 😄#2022-01-0319:46imreI am on the EAP channel of both IJ and Cursive. For IJ I usually upgrade to builds that my must-have plugins support unless I see problems posted in this channel. For Cursive I usually upgrade at the first opportunity after a new build comes out#2022-01-0321:09Jeff Evansis it possible to disable (ideally temporarily) the Aviso exception printer when running a test? in essence, I’m running into this: #2022-01-0321:58cflemingI don’t think there is, unfortunately. The way this works in Cursive is that when you print an exception, it checks to see if the namespace is loaded, and uses it if so. Perhaps you could just unload the Aviso namespace in tests?#2022-01-0420:45GuessBurgerI spotted something strange with Cursive's REPL. I was having issues with some string formatting code I was writing and while debugging I found the cause was that when I eval " a \n b " it appears to trim the whitespace after the newline on the returned string to " a \nb ". This is the case whether a function returns that value or just the string is eval-ed but println-ing works fine (see screenshot). A colleague also reported seeing the same thing. Is there a flag we have checked that's causing this? I've looked through my settings and tried searching for it on the Cursive site but can't find anything.#2022-01-0420:56cflemingI should add a section to the Troubleshooting page about this, sorry, that’s Preferences | Languages &amp; Frameworks | Clojure | REPL Options | Split and align multi-line strings#2022-01-0421:11GuessBurgerNo problem, I obviously didn't look close enough 😅 Thank you for getting back to me so quickly!#2022-01-0421:27cflemingNo worries! That’s so that when you print out data structures containing formatted strings, they look nice. That’s useful, but for the case where you’re actually developing code that depends on formatted strings, it can be weird.#2022-01-0421:31cflemingI’ve updated the doc for this, it’ll go out on the next push.#2022-01-0613:51Mateusz MazurczakHi, I'm using intellij on ubuntu. I can't see any dependencies because I get an error. In clojure deps -> projectname -> /my/project/path/deps.edn: status code: 401, reason phrase: Unauthorized (401) I changed permisions for both intellij and my project to give full access (ls -l), but it shows the same error Any ideas how to solve it?#2022-01-0617:44Mateusz MazurczakI was missing .m2/settings.xml for datomic#2022-01-0613:59Alex Miller (Clojure team)Does it work outside cursive?#2022-01-0614:00Alex Miller (Clojure team)That's an http code, so I'd guess it's access to a repository #2022-01-0614:08Mateusz MazurczakYeah I can start the project and everything. It was also working previously and not showing this error. I just fresh installed due to my laptop issues.#2022-01-0615:23folconI've started seeing this error in the Run panel when running my REPL run configuration, which is really unhelpful for debugging what's wrong with it. Any ideas what's happening / how I could debug this?
Suppressed exit
#2022-01-0620:07cflemingThat error is coming from Leiningen. What that usually means is some code in lein is trying to exit the process, and Cursive is preventing it so that it doesn’t dump the whole Cursive process. The usual culprit is a lein plugin. If you look in your log (Help | Show log in Finder/Explorer), you should see a line somewhere: “Exit called in Leiningen” which will give you a stacktrace to where it happened.#2022-01-0620:08cflemingThat will hopefully help to diagnose the problem.#2022-01-1221:59folconThanks for the quick response @U0567Q30W, sorry I took a while to get back to you, managed to find it, now I need to work out why it's throwing a null exception instead of the expected compilation error...
#cursive.shim.IndicatorBridge - Exit called in Leiningen:
java.lang.RuntimeException: null
 at cursive.leiningen.project$add_standard_hooks_BANG_$fn__2318$fn__2319.invoke (project.clj:515)
    cursive.leiningen.project$add_standard_hooks_BANG_$fn__2318.doInvoke (project.clj:515)
    clojure.lang.RestFn.applyTo (RestFn.java:139)
    clojure.core$apply.invokeStatic (core.clj:667)
    clojure.core$apply.invoke (core.clj:660)
    cursive.leiningen.hooke$compose_hooks$fn__1838.doInvoke (hooke.clj:43)
    clojure.lang.RestFn.applyTo (RestFn.java:137)
    clojure.core$apply.invokeStatic (core.clj:665)
    clojure.core$apply.invoke (core.clj:660)
    cursive.leiningen.hooke$run_hooks.invokeStatic (hooke.clj:49)
    cursive.leiningen.hooke$run_hooks.invoke (hooke.clj:48)
    cursive.leiningen.hooke$prepare_for_hooks$fn__1843$fn__1844.doInvoke (hooke.clj:57)
    clojure.lang.RestFn.applyTo (RestFn.java:137)
    clojure.lang.AFunction$1.doInvoke (AFunction.java:31)
    clojure.lang.RestFn.invoke (RestFn.java:408)
    leiningen.javac$run_javac_subprocess.invokeStatic (javac.clj:133)
    leiningen.javac$run_javac_subprocess.invoke (javac.clj:115)
    leiningen.javac$javac.invokeStatic (javac.clj:147)
    leiningen.javac$javac.doInvoke (javac.clj:136)
    clojure.lang.RestFn.invoke (RestFn.java:410)
    clojure.lang.AFn.applyToHelper (AFn.java:154)
    clojure.lang.RestFn.applyTo (RestFn.java:132)
    clojure.lang.Var.applyTo (Var.java:705)
    clojure.core$apply.invokeStatic (core.clj:667)
    clojure.core$apply.invoke (core.clj:660)
    leiningen.core.main$partial_task$fn__7356.doInvoke (main.clj:284)
    clojure.lang.RestFn.invoke (RestFn.java:410)
    clojure.lang.AFn.applyToHelper (AFn.java:154)
    clojure.lang.RestFn.applyTo (RestFn.java:132)
    clojure.lang.AFunction$1.doInvoke (AFunction.java:31)
    clojure.lang.RestFn.applyTo (RestFn.java:137)
    clojure.core$apply.invokeStatic (core.clj:667)
    clojure.core$apply.invoke (core.clj:660)
    leiningen.core.main$apply_task.invokeStatic (main.clj:334)
    leiningen.core.main$apply_task.invoke (main.clj:320)
    clojure.lang.AFn.applyToHelper (AFn.java:160)
    clojure.lang.AFn.applyTo (AFn.java:144)
    clojure.core$apply.invokeStatic (core.clj:665)
    clojure.core$apply.invoke (core.clj:660)
    cursive.leiningen.hooke$run_hooks.invokeStatic (hooke.clj:49)
    cursive.leiningen.hooke$run_hooks.invoke (hooke.clj:48)
    cursive.leiningen.hooke$prepare_for_hooks$fn__1843$fn__1844.doInvoke (hooke.clj:57)
    clojure.lang.RestFn.applyTo (RestFn.java:137)
    clojure.lang.AFunction$1.doInvoke (AFunction.java:31)
    clojure.lang.RestFn.invoke (RestFn.java:436)
    leiningen.core.eval$run_prep_tasks.invokeStatic (eval.clj:51)
    leiningen.core.eval$run_prep_tasks.invoke (eval.clj:43)
    leiningen.core.eval$prep.invokeStatic (eval.clj:86)
    leiningen.core.eval$prep.invoke (eval.clj:73)
    cursive.leiningen.task$prep_hook$fn__2418.invoke (task.clj:41)
    clojure.lang.AFn.applyToHelper (AFn.java:156)
    clojure.lang.AFn.applyTo (AFn.java:144)
    clojure.core$apply.invokeStatic (core.clj:667)
    clojure.core$apply.invoke (core.clj:660)
    cursive.leiningen.hooke$compose_hooks$fn__1838.doInvoke (hooke.clj:43)
    clojure.lang.RestFn.applyTo (RestFn.java:137)
    clojure.core$apply.invokeStatic (core.clj:665)
    clojure.core$apply.invoke (core.clj:660)
    cursive.leiningen.hooke$run_hooks.invokeStatic (hooke.clj:49)
    cursive.leiningen.hooke$run_hooks.invoke (hooke.clj:48)
    cursive.leiningen.hooke$prepare_for_hooks$fn__1843$fn__1844.doInvoke (hooke.clj:57)
    clojure.lang.RestFn.applyTo (RestFn.java:137)
    clojure.lang.AFunction$1.doInvoke (AFunction.java:31)
    clojure.lang.RestFn.invoke (RestFn.java:408)
    leiningen.core.eval$eval_in_project.invokeStatic (eval.clj:364)
    leiningen.core.eval$eval_in_project.invoke (eval.clj:358)
    clojure.lang.AFn.applyToHelper (AFn.java:160)
    clojure.lang.AFn.applyTo (AFn.java:144)
    clojure.core$apply.invokeStatic (core.clj:667)
    clojure.core$apply.invoke (core.clj:660)
    cursive.leiningen.task$eval_hook$fn__2415.doInvoke (task.clj:30)
    clojure.lang.RestFn.applyTo (RestFn.java:142)
    clojure.core$apply.invokeStatic (core.clj:667)
    clojure.core$apply.invoke (core.clj:660)
    cursive.leiningen.hooke$compose_hooks$fn__1838.doInvoke (hooke.clj:43)
    clojure.lang.RestFn.applyTo (RestFn.java:137)
    clojure.core$apply.invokeStatic (core.clj:665)
    clojure.core$apply.invoke (core.clj:660)
    cursive.leiningen.hooke$run_hooks.invokeStatic (hooke.clj:49)
    cursive.leiningen.hooke$run_hooks.invoke (hooke.clj:48)
    cursive.leiningen.hooke$prepare_for_hooks$fn__1843$fn__1844.doInvoke (hooke.clj:57)
    clojure.lang.RestFn.applyTo (RestFn.java:137)
    clojure.lang.AFunction$1.doInvoke (AFunction.java:31)
    clojure.lang.RestFn.applyTo (RestFn.java:137)
    clojure.core$apply.invokeStatic (core.clj:667)
    clojure.core$apply.invoke (core.clj:660)
    leiningen.repl$repl.invokeStatic (repl.clj:393)
    leiningen.repl$repl.doInvoke (repl.clj:319)
    clojure.lang.RestFn.invoke (RestFn.java:425)
    clojure.lang.AFn.applyToHelper (AFn.java:156)
    clojure.lang.RestFn.applyTo (RestFn.java:132)
    clojure.lang.Var.applyTo (Var.java:705)
    clojure.core$apply.invokeStatic (core.clj:667)
    clojure.core$apply.invoke (core.clj:660)
    leiningen.core.main$partial_task$fn__7356.doInvoke (main.clj:284)
    clojure.lang.RestFn.applyTo (RestFn.java:139)
    clojure.lang.AFunction$1.doInvoke (AFunction.java:31)
    clojure.lang.RestFn.applyTo (RestFn.java:137)
    clojure.core$apply.invokeStatic (core.clj:667)
    clojure.core$apply.invoke (core.clj:660)
    leiningen.core.main$apply_task.invokeStatic (main.clj:334)
    leiningen.core.main$apply_task.invoke (main.clj:320)
    clojure.lang.AFn.applyToHelper (AFn.java:160)
    clojure.lang.AFn.applyTo (AFn.java:144)
    clojure.core$apply.invokeStatic (core.clj:665)
    clojure.core$apply.invoke (core.clj:660)
    cursive.leiningen.hooke$run_hooks.invokeStatic (hooke.clj:49)
    cursive.leiningen.hooke$run_hooks.invoke (hooke.clj:48)
    cursive.leiningen.hooke$prepare_for_hooks$fn__1843$fn__1844.doInvoke (hooke.clj:57)
    clojure.lang.RestFn.applyTo (RestFn.java:137)
    clojure.lang.AFunction$1.doInvoke (AFunction.java:31)
    clojure.lang.RestFn.invoke (RestFn.java:436)
    leiningen.core.main$resolve_and_apply.invokeStatic (main.clj:343)
    leiningen.core.main$resolve_and_apply.invoke (main.clj:336)
    cursive.leiningen.task$task_details$fn__2441.invoke (task.clj:79)
    cursive.leiningen.task$task_details.invokeStatic (task.clj:74)
    cursive.leiningen.task$task_details.invoke (task.clj:43)
    clojure.lang.Var.invoke (Var.java:388)
    org.projectodd.shimdandy.impl.ClojureRuntimeShimImpl.invoke (ClojureRuntimeShimImpl.java:119)
    org.projectodd.shimdandy.impl.ClojureRuntimeShimImpl.invoke (ClojureRuntimeShimImpl.java:112)
    cursive.shim.ShimBootstrap$Shim.apply (ShimBootstrap.java:53)
    cursive.repl.runner.LocalConfiguration$createLeinParameters$ret$1.invoke (ReplRunConfigurations.kt:463)
    cursive.repl.runner.LocalConfiguration$createLeinParameters$ret$1.invoke (ReplRunConfigurations.kt:462)
    cursive.shim.ShimProvider.withShim (Shim.kt:117)
    cursive.repl.runner.LocalConfiguration.createLeinParameters (ReplRunConfigurations.kt:462)
    cursive.repl.runner.LocalConfiguration.access$createLeinParameters (ReplRunConfigurations.kt:393)
    cursive.repl.runner.LocalConfiguration$getRunProfileState$1.createDeferredParameters (ReplRunConfigurations.kt:432)
    cursive.runner.DeferredCommandLineState.cacheDeferredParameters (Deferred.kt:72)
    cursive.runner.AbstractDeferredRunner$execute$1.run (Deferred.kt:104)
    com.intellij.openapi.progress.impl.CoreProgressManager.startTask (CoreProgressManager.java:450)
    com.intellij.openapi.progress.impl.ProgressManagerImpl.startTask (ProgressManagerImpl.java:117)
    com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcessWithProgressAsync$5 (CoreProgressManager.java:510)
    com.intellij.openapi.progress.impl.ProgressRunner.lambda$submit$3 (ProgressRunner.java:243)
    com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$2 (CoreProgressManager.java:183)
    com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun (CoreProgressManager.java:705)
    com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress (CoreProgressManager.java:647)
    com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress (ProgressManagerImpl.java:63)
    com.intellij.openapi.progress.impl.CoreProgressManager.runProcess (CoreProgressManager.java:170)
    com.intellij.openapi.progress.impl.ProgressRunner.lambda$submit$4 (ProgressRunner.java:243)
    java.util.concurrent.CompletableFuture$AsyncSupply.run (CompletableFuture.java:1700)
    java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1128)
    java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:628)
    java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run (Executors.java:668)
    java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run (Executors.java:665)
    java.security.AccessController.doPrivileged (AccessController.java:-2)
    java.util.concurrent.Executors$PrivilegedThreadFactory$1.run (Executors.java:665)
    java.lang.Thread.run (Thread.java:829)
#2022-01-1301:07cflemingThanks for that - the problem is in leiningen.javac/run-javac-subprocess, which looks like this: https://github.com/technomancy/leiningen/blob/b257a5ac02af51e1b89332c667e57c9e01f98d7e/src/leiningen/javac.clj#L115-L134. As you can see, it’s some exception executing javac which calls main/exit. Do you see any error output anywhere which might help? There’s a comment above that function discussing how the output is handled, but I must admit I don’t understand it. I think it’s saying that the output will just go to the standard process output, but since it looks like it runs javac in a separate process I don’t know where that will end up.#2022-01-1301:13cflemingLooks like there’s not much information apart from the exit code available anyway: https://github.com/technomancy/leiningen/blob/b257a5ac02af51e1b89332c667e57c9e01f98d7e/leiningen-core/src/leiningen/core/eval.clj#L261-L266#2022-01-1415:29folconOk, good to know.#2022-01-0618:29Josh HorwitzAnyone have any tips or guides on using Cursive with ideavim plug in? Or an ideavimrc they would like to share, having a tough time making the workflow as seamless as I think it can be#2022-01-0620:10cflemingThere’s a couple of pages here: https://github.com/cursive-ide/cursive/wiki/IdeaVim-issues#2022-01-0620:10cflemingIt’s also been discussed on the mailing list from time to time: https://groups.google.com/g/cursive/search?q=ideavim#2022-01-0623:27dvingoIf you are trying to solve a mystery of why some keybindings aren't working knowing about Preferences -> Editor -> Vim can help a ton. Certain bindings you might want the IDE to interpret vs the IdeaVim plugin.#2022-01-0700:05Josh Horwitz Thanks all!#2022-01-0716:31Grant HornerIs there any way for me to run clojure tests in cursive using a deps.edn alias, while also using "Run with Intellij project classpath"? I really like the IDE integration of using the Intellij project classpath, but I have a separate "test" alias set up for testing (duh) that I haven't been able to figure out how to activate.#2022-01-0716:46imrehave you found the clojure deps tool window?#2022-01-0716:47imreit has an aliases section you can expand, tick the aliases you want on the IJ classpath, refresh clojure project (spinny wheel icon at the top), and start a new repl#2022-01-0716:47imreor is there some project setting preventing you from doing that?#2022-01-0717:59Grant HornerThat was exactly the problem - I needed to check the aliases and tool aliases in there#2022-01-0818:21Mateusz MazurczakHi, js/window.location is highlighted as an warning (js/window.location.hash cannot be resolved). Other js functions are fine like for example: (js/encodeURIComponent url) How can I ignore it in Intellij or help it be resolved?#2022-01-0912:45zxspectrris it possible add a key binding for a custom repl command?#2022-01-0913:57markaddlemanYes. Every repl command is available in the Key Mapping dialog in settings#2022-01-0914:23zxspectrrah yea, got it. thanks!#2022-01-0912:46zxspectrri'm interested in executing
(integrant.repl/reset)
via a hotkey
#2022-01-1014:08Aurélien Bottazini👋 So some time ago, I finally took some time to figure out what was happening with an exception thrown by cursive. Context is: sometimes I work on JS projects where there is no clojure code. The node_modules still get parsed by cursive. And I get errors like that:#2022-01-1014:09Aurélien BottaziniIt took me some time to realise that cursive was not really at fault. It’s just that the JS library in question is malformed and has most certainly a bug#2022-01-1014:10Aurélien BottaziniThe way i “solve” (= make sure cursive does not throws an exception anymore) is by overriding the file type to plain text:#2022-01-1014:11Aurélien BottaziniWorks for me because i don’t care that this nested node_module dependency is not analyzed by Intellij.#2022-01-1014:11Aurélien BottaziniI think a note in the troubleshooting section of cursive’s user guide would be helpful to others 😉#2022-01-1110:43Al Z. HeymerI'm currently working on some logging. Because I now added the Thread-name (%thread) I now get a quite disruptive name in my REPL:
[2022-01-11 11:34:16,394][nRepl-session-ad588086-616b-4da7-89ac-9d5e094c1e86] INFO  d.c.c.caches          - KB caches created.
Is it possible to rename the nrepl-session to main ?
#2022-01-1113:14Al Z. HeymerTo clarify: I do not mean by (.setName thread' "main") but by settings in the REPL-profile, like Environment#2022-01-1120:40cflemingThat’s really an nREPL question, I’m not sure about that. If you can figure out the mechanism that nREPL uses, if one exists, then I can help you set that up in Cursive.#2022-01-1209:40dazldDo any of you know a good way to force nrepl output to go into the replpanel inside intelliJ?#2022-01-1209:51imreWhere else is it going?#2022-01-1209:53dazldInto the nrepl output in terminal, sadly#2022-01-1209:54imreI take it you run nrepl from the terminal then connect with Cursive?#2022-01-1210:02dazldcorrect#2022-01-1210:04dazldhow does clojure decide which stream should get a particular ouptut? I can see the values of *out* are different in the terminal and in cursive, for example.
terminal:
*out*
#object[java.io.PrintWriter 0x207e6102 "
#2022-01-1210:04imreI'm not sure this is a Cursive thing, more of an nrepl one#2022-01-1210:05imreafaik nrepl works on a request-response basis#2022-01-1210:05imrecursive sends a request, nrepl replies#2022-01-1210:06imreif you start nrepl outside of cursive, the latter won't have any control over the streams nrepl uses#2022-01-1210:07imrePerhaps there is a way to configure nrepl itself to send stdout to its clients, but I wouldn't bet on it#2022-01-1210:07imreDo you have to start nrepl outside or can you start it from inside cursive?#2022-01-1210:08imreI normally do the latter and nrepl output goes to the repl pane in that case#2022-01-1210:08dazldgenerally, I’ve been doing like you, and starting a repl inside cursive - however, the project I’m working on has stuff working in parallel to the nrepl, so it might not work.#2022-01-1210:09dazldhand on heart, I haven’t tried yet tho, was just wondering if there was a simple way to grab all the nrepl output into cursive ;)#2022-01-1220:42cflemingThis is a kind of murky area. nREPL does send output from evaluations to the client, and you should see those. For example, if you execute (println "Hello"). nREPL does this by binding *out* during evaluations, but that doesn’t work for everything, for example anything using System.out or anything kicked off from an eval which prints on a separate thread. If Cursive starts the REPL, then it controls the process and it will send the extra process output to the REPL pane too, but it can’t do that if you start it on the command line and then connect.#2022-01-1309:07Ivar RefsdalHi @U3ZUC5M0R There is https://github.com/nrepl/nrepl/issues/119 (by me) which links https://gist.github.com/daviesian/4517859. Personally I just make sure (when I'm running nrepl in the terminal) to evaluate that fix before doing any nrepl stuff --- i.e. I'm requiring a namespace that does the fix.#2022-01-1309:10dazld@UGJE0MM0W amazing, that worked! thank you!#2022-01-1313:15Ivar RefsdalGlad I could help!#2022-01-1316:10dazld@U0567Q30W perhaps an option could be added for remote repls? I guess it’d need to restore `*out*` bindings on close as well, and perhaps disable opening more than one repl if it’s selected.#2022-01-1212:19borkdudeclojure-extras: a plugin which builds on Cursive and adds extra features like clj-kondo linting, and inline eval:#2022-01-1214:17imreWhat exactly are the differences between using built-in clj-kondo vs specified from path?#2022-01-1214:18borkdudethe built-in one is running in a JVM and should be faster one it's started, the binary is used to shell out to every time you change something, which should also work fine#2022-01-1214:20imrebut if I use the binary then I might get updates quicker via brew, is that a good assumption?#2022-01-1214:24borkdudecorrect#2022-01-1214:24borkdudebut I hope and also think @UQTHDKJ8J will keep the plugin up to date#2022-01-1214:24borkdudeand else you can help by doing so via a PR#2022-01-1214:29imreThank you for the info#2022-01-1214:29imrethis is a much much nicer integration already than file watcher or lsp#2022-01-1214:29imreat least in my experience#2022-01-1221:36souenzzomaybe in the future we can add a version selector like this, then we will be able to choose the version directly from maven.#2022-01-1221:41borkdudeGood idea, but that would mean clj-kondo would have to run in its own process rather than in the plugin. Still possible though, for example using the pod interface that it already has.#2022-01-1221:55souenzzoNot sure how cursive does, if it spawns a new process, or if use some advanced classpath thing from intellij if it spawn a new process, the communication can be done via pod -like process 👀#2022-01-1221:57borkdudeyes#2022-02-1114:44DumchAbout the ‘open repl file buffer’. I would definitely like to be able to work with it like with plain text buffer, being able to modify it, copy and use it with vimium plugin. https://www.reddit.com/r/Clojure/comments/lzx0zb/did_you_know_that_ideacursive_repl_results_may_be/ to achieve it with ‘add new repl command’ (may be someone will find it useful).#2022-02-1114:44borkdude@UL05W6AEM There's a channel now: #clj-extras-plugin#2022-01-1215:52jacekschaeCursive supports converting HTML to Hiccup on paste. Would it be possible to have the same thing for Fulcro's HTML? There is even a functions that does the job at Developers Guide -- https://book.fulcrologic.com/#_converting_html_to_fulcro. Would people be interested in this feature? cc: @tony.kay#2022-01-1220:45cflemingThe problem is knowing which to convert to, I guess that would have to be a project-specific flag, possibly with a checkbox on the popup. But I can do that, sure. Could you file an issue for that?#2022-01-1305:00jacekschaeThanks Colin! Project specific sounds like a good idea to me. Here's the issue: https://github.com/cursive-ide/cursive/issues/2636#2022-01-1311:43JoniI am pretty sure I used to be able to change the indentation of the arrow macros from this context actions before, but now the option is gone? Also there doesn't seem to be an option for this in the code style preferences. Is this something intended or is something broken on my end?#2022-01-1312:42imreWorks for me using IntelliJ IDEA 2021.3.1 (Community Edition) Build #IC-213.6461.79, built on December 28, 2021 com.cursiveclojure.cursive (1.12.2-eap1-2021.3)#2022-01-1312:43JoniAa interesting, seems to work in another project.#2022-01-1621:03cflemingCheck Preferences | Editor | Intentions and make sure that the relevant Clojure ones are enabled. Does that help?#2022-01-1315:44octahedrionwhat does it mean when clicking on an exception link doesn't jump to the line in the source but instead brings up a popup list saying "choose target file" ? If I click on any of the files listed it jumps to that line in that file, but why would I want to jump to that line in any other file but that which contains the function in which the exception occurred ?#2022-01-1318:14jmvi'm having an issue trying to open a lein project. it indicates that none of the files are under a source or test root and when i try to click the refresh button on the lein panel, i get this error:
10:11 AM	Error reading /Users/jeremiah/src/the-project/project.clj
				fatal: not a git repository (or any of the parent directories): .git
which is also odd because i just checked out the repo from git
#2022-01-1318:36manutter51That's odd, have you tried typing git status at the command line to see if git thinks it's a valid project?#2022-01-1318:44jmvyep, git works just fine
> git status
On branch master
Your branch is up to date with 'origin/master'.
#2022-01-1318:44jmvalso git in intellij works just fine as well#2022-01-1318:45R.A. PorterI don't think that has anything to do with your repository. I think it's a dependency in your project.clj. Do you have one in there referencing a git repo?#2022-01-1318:47R.A. PorterProbably quicker...can you run the lein project from the command line?#2022-01-1318:52manutter51There's also lein deps :tree, though that might throw the same error.#2022-01-1318:53manutter51(Which might be a helpful diagnostic, actually.)#2022-01-1319:23jmvi can run all the lein commands normally. i normally use the project from emacs/cider and it works just fine.#2022-01-1319:23jmvbut let me double check it's not some lein plugin#2022-01-1319:24jmvah yep, it's a plugin we use that sources the project version from git instead of hard coding it#2022-01-1400:47jmvhello again! is there anything special that needs to be done for cursive to pickup lein middleware? i have this working with both emacs and vscode but with cursive i get an error trying to load the project. i'm trying to load my middleware version-from-git and hitting this error:
STDERR - Error: cannot resolve leiningen.git-release/version-from-git middleware 
#2022-01-1408:41borkdudeA new version of clojure-extras (add-on to Cursive) was released to the marketplace (0.4.5): https://plugins.jetbrains.com/plugin/18108-clojure-extras/ It has the newest clj-kondo and fixes a couple of issues. Thank you @brcosta!#2022-01-1415:31folconWhat in the project.clj governs what paths are added to Excluded Folders under the Project Structure? For some reason the path . keeps getting added in one of my projects, which then removes everything and I have to keep manually removing it everytime leiningen synchronises...#2022-01-1702:44cflemingThere have been issues like this before, see e.g. https://github.com/cursive-ide/cursive/issues/525. But there is a check there which should prevent that from happening now.#2022-01-1702:48cflemingThe current list of things which get excluded is: target dir, checkout dir, cljx output-path (probably not using that any more), cljsbuild compiler output-dir. Are you using any of those?#2022-01-1814:48folconThis is my :cljsbuild:
:cljsbuild {:builds
              {:dev {:source-paths ["src"]
                     :compiler {:main example.core
                                :optimizations :whitespace
                                :output-to "./Code.js"
                                :output-dir "target/dev"
                                :pretty-print true
                                :externs ["resources/gas.ext.js"]
                                :foreign-libs [{:file "src/entry_points.js"
                                                :provides ["example.entry-points"]}]}}
               :main {:source-paths ["src"]
                      :compiler {:main example.core
                                 :optimizations :advanced
                                 :output-to "./Code.js"
                                 :output-dir "target/main"
                                 :pretty-print true
                                 :externs ["resources/gas.ext.js"]
                                 :foreign-libs [{:file "src/entry_points.js"
                                                 :provides ["example.entry-points"]}]}}}}
If it's not that then I could paste in the whole thing... The :output-dir in :cljsbuild is targeting a subdir "target/{dev,main}" so not sure why this is happening... The only other keys I have defined in the defproject are:
:description :url :min-lein-version :dependencies :plugins (which only contains lein-cljsbuild) :source-paths and :clean-targets
#2022-01-2217:17folconI'd normally not prod the channel but this behaviour in cursive is pretty frustrating as it keeps ignoring my entire project every time lein refreshes... > The :output-dir in :cljsbuild is targeting a subdir "target/{dev,main}" so not sure why this is happening...#2022-01-2219:46cflemingAre you able to send me your whole project.clj? You could DM it or email it to <mailto:/cdn-cgi/l/email-protection|/cdn-cgi/l/email-protection> if you don’t want it to be public.#2022-01-2217:17folconI'd normally not prod the channel but this behaviour in cursive is pretty frustrating as it keeps ignoring my entire project every time lein refreshes... > The :output-dir in :cljsbuild is targeting a subdir "target/{dev,main}" so not sure why this is happening...#2022-01-1711:18mike_ananev@borkdude, hello! When I use clojure-extras, evaluate top form (inline) then all printlns are suppressed. How to redirect println to terminal where my active repl/jvm session is run ?#2022-01-1711:19borkdudeThis is a question for the maintainer @brcosta :) If you have clj-kondo questions, then please come to #clj-kondo :)#2022-01-1711:19mike_ananevOh! Sorry.#2022-01-1711:20borkdudeI also don't know if @cfleming would be ok if we used this channel to discuss clojure-extras issues, if so, we could dedicate a new channel for this. Please let us know, I don't want to get on anyone's nerves.#2022-01-1711:22borkdudeWe can at least use 🧵 for discussions. /cc @brcosta @U097654L8#2022-01-1711:22mike_ananev👍#2022-01-1711:23mike_ananev
(defn abc [a b]
  (let [x (* a a)
        y (* b b)
        result (+ x y)]
    (println "result" result)
    result))

(abc 2 4)
#2022-01-1711:23brcostaThanks!#2022-01-1711:24mike_ananevprintln is suppressed. I can't see result of println (neither in terminal, nor in repl/cursive window)#2022-01-1711:38brcostaok, I’ll take a look later today#2022-01-1711:43borkdudeyou can also make an issue here @U097654L8#2022-01-1711:43borkdudehttps://github.com/brcosta/clj-stuff-plugin#2022-01-1712:05mike_ananev@brcosta I've created an issue https://github.com/brcosta/clj-stuff-plugin/issues/7#2022-01-1721:10cflemingYeah, it’s probably better to create a separate channel, since I can’t really do anything about extras issues.#2022-01-1721:31borkdudeOK @brcosta: #extras-idea-plugin or so? I'll let it up to you to create it :)#2022-01-1912:10brcostaHi @U097654L8, created #clj-extras-plugin for this reports, also 0.5.0 is released with the fix for stdout redirection, please give it a try 🙂#2022-01-1921:41mike_ananev@brcosta 👍#2022-01-2409:08Schpaa@brcosta When the inline eval hangs forever with a Evaluating-popup, what could be wrong?#2022-01-2409:21borkdude@UBKAXK5QB There is now a #clj-extras-plugin channel, I think it'd be good to post there#2022-01-1711:23mike_ananev@brcosta see example in a thread.#2022-01-1716:04Kari MarttilaAnyone noticed some weird behavior with Cursive and Integrant? I have a Cursive remote REPL configuration (nrepl). Occasionally I change some function and re-evaluate that var (i.e. not with Integrant (reset) but sending the function to re-evaluation) - and still there seems to be the old functionality. I give command (in-ns 'my-ns) and then *ns* both in terminal clj session and in Cursive REPL window: they tell that the my-ns is different, example: • In terminal repl: #object[clojure.lang.Namespace 0x1111111 "my-ns"] • In cursive repl: #object[clojure.lang.Namespace 0x2222222 "my-ns"] I'm a bit puzzled with this.#2022-01-1721:13cflemingI’m not sure about this, sorry. The only thing I can think of is that it might be related to Cursive’s default behaviour of evaluating in the file ns, which is different to evaluating in the current ns of the REPL? See e.g. here for a problem (not the same as yours) which is also as a result of this behaviour, with a bit of explanation: https://cursive-ide.com/userguide/troubleshooting.html#unresolved-symbols-from-clojure-core-when-sending-forms-to-repl#2022-01-1810:08DumchIt’s possble to use `f` as ‘form’ for selecting in visual mode in spacemacs (by default) and vim (with https://github.com/guns/vim-sexp). For example, typing `daf` in visual mode will delete a form (“text”, (…), […}, {…}) under the cursor. Is it possible to achieve something like this in idea with cursive?#2022-01-2008:01Dumchmanaged to solve it with Idea LivePlugin
import com.intellij.openapi.actionSystem.CommonDataKeys
import liveplugin.registerAction
import liveplugin.show

show("Current project: ${project?.name}")

registerAction("SelectForm", "ctrl alt shift W", function = { event ->

    val project = event.project
    val editor = CommonDataKeys.EDITOR.getData(event.dataContext)
    if (project == null || editor == null) 
#2022-01-1810:09Dumchdoes anyone use some shortcut to insert a #_ comment on any form under a cursor with `idea/cursive`? originally asked https://clojurians.slack.com/archives/C053AK3F9/p1642494215468300#2022-01-1915:49Dumchmanaged to solve it with idea LivePlugin + ideavim ideavimrc part:
nnoremap <Leader>c :action insertClojureCommentAtTheFormStart<cr>
live plugin part
import com.intellij.openapi.actionSystem.CommonDataKeys
import com.intellij.openapi.editor.Document
import liveplugin.executeCommand
import liveplugin.registerAction
import liveplugin.show
import kotlin.math.max

show("Current project: ${project?.name}")

registerAction("insertClojureCommentAtTheFormStart", function = { event ->
    val project = event.project
    val editor = CommonDataKeys.EDITOR.getData(event.dataContext)
    if (project == null || editor == null) 
#2022-01-1817:44jmvhey all! would anyone be able to recommend the best way to debug a lein middleware issue? for context: i'm unable to sync a project in cursive with the error log saying it's unable to resolve the middleware function. the middleware works fine when calling lein from the CLI or if i create a lein run configuration.#2022-01-1919:59tjbhey everyone! starting to dig into cursive and when i attempt to run lein figwheel i get the following error
Figwheel: Cleaning because dependencies changed
Figwheel: Cutting some fruit, just a sec ...
java.lang.NullPointerException: null
 at leiningen.trampoline$write_trampoline.invokeStatic (trampoline.clj:38)
    leiningen.trampoline$write_trampoline.invoke (trampoline.clj:34)
    leiningen.trampoline$trampoline.invokeStatic (trampoline.clj:64)
    leiningen.trampoline$trampoline.doInvoke (trampoline.clj:41)
    clojure.lang.RestFn.invoke (RestFn.java:425)
    clojure.lang.AFn.applyToHelper (AFn.java:156)
    clojure.lang.RestFn.applyTo (RestFn.java:132)
    clojure.core$apply.invokeStatic (core.clj:669)
    clojure.core$apply.invoke (core.clj:660)
    leiningen.figwheel$figwheel.invokeStatic (figwheel.clj:559)
    leiningen.figwheel$figwheel.doInvoke (figwheel.clj:458)
    clojure.lang.RestFn.invoke (RestFn.java:410)
    clojure.lang.AFn.applyToHelper (AFn.java:154)
    clojure.lang.RestFn.applyTo (RestFn.java:132)
    clojure.lang.Var.applyTo (Var.java:705)
    clojure.core$apply.invokeStatic (core.clj:667)
    clojure.core$apply.invoke (core.clj:660)
    leiningen.core.main$partial_task$fn__7356.doInvoke (main.clj:284)
    clojure.lang.RestFn.invoke (RestFn.java:410)
    clojure.lang.AFn.applyToHelper (AFn.java:154)
    clojure.lang.RestFn.applyTo (RestFn.java:132)
    clojure.lang.AFunction$1.doInvoke (AFunction.java:31)
    clojure.lang.RestFn.applyTo (RestFn.java:137)
    clojure.core$apply.invokeStatic (core.clj:667)
    clojure.core$apply.invoke (core.clj:660)
    leiningen.core.main$apply_task.invokeStatic (main.clj:334)
    leiningen.core.main$apply_task.invoke (main.clj:320)
    lein_cprop.plugin$write_env_to_file.invokeStatic (plugin.clj:27)
    lein_cprop.plugin$write_env_to_file.invoke (plugin.clj:25)
    clojure.lang.AFn.applyToHelper (AFn.java:165)
    clojure.lang.AFn.applyTo (AFn.java:144)
    clojure.lang.Var.applyTo (Var.java:705)
    clojure.core$apply.invokeStatic (core.clj:667)
    clojure.core$apply.invoke (core.clj:660)
    robert.hooke$compose_hooks$fn__11222.doInvoke (hooke.clj:40)
    clojure.lang.RestFn.applyTo (RestFn.java:137)
    clojure.core$apply.invokeStatic (core.clj:665)
    clojure.core$apply.invoke (core.clj:660)
    robert.hooke$run_hooks.invokeStatic (hooke.clj:46)
    robert.hooke$run_hooks.invoke (hooke.clj:45)
    robert.hooke$prepare_for_hooks$fn__11227$fn__11228.doInvoke (hooke.clj:54)
    clojure.lang.RestFn.applyTo (RestFn.java:137)
    clojure.lang.AFunction$1.doInvoke (AFunction.java:31)
    clojure.lang.RestFn.invoke (RestFn.java:436)
    leiningen.core.main$resolve_and_apply.invokeStatic (main.clj:343)
    leiningen.core.main$resolve_and_apply.invoke (main.clj:336)
    leiningen.core.main$_main$fn__7445.invoke (main.clj:453)
    leiningen.core.main$_main.invokeStatic (main.clj:442)
    leiningen.core.main$_main.doInvoke (main.clj:439)
    clojure.lang.RestFn.applyTo (RestFn.java:137)
    clojure.lang.Var.applyTo (Var.java:705)
    clojure.core$apply.invokeStatic (core.clj:665)
    clojure.main$main_opt.invokeStatic (main.clj:491)
    clojure.main$main_opt.invoke (main.clj:487)
    clojure.main$main.invokeStatic (main.clj:598)
    clojure.main$main.doInvoke (main.clj:561)
    clojure.lang.RestFn.applyTo (RestFn.java:137)
    clojure.lang.Var.applyTo (Var.java:705)
    clojure.main.main (main.java:37)

Process finished with exit code 1
i am looking to boot up this application via cursive https://github.com/CSCfi/rems/blob/master/docs/development.md
#2022-01-1920:01tjbi am unsure the reason it is throwing this error (new to clojure) and attempted to use the commands in https://figwheel.org/docs/cursive.html but no dice#2022-01-2608:49Al Z. HeymerDid you successfully start figwheel over the cli?#2022-01-2010:12DumchIf anyone want to comment a form with #_ with a shortcut, select a form vith 'vaf' (https://plugins.jetbrains.com/plugin/164-ideavim), here is how I managed to achieve this with https://plugins.jetbrains.com/plugin/7282-liveplugin (https://github.com/Liverm0r/dotfiles/commit/83f7940c878038cabf5db7f98e9f0e4a1cb20e51 to dotfiles)#2022-01-2020:39JHi cursive lovers! I’m wondering if there is a way to ignore this (when require a js lib with shadow-cljs)#2022-01-2022:03Colin P. HillMy workaround has been to just demote unresolved symbols to a weak warning. Definitely not ideal, though.#2022-01-2107:13thhellerI do the same#2022-01-2107:13thheller@U0567Q30W would it be possible to add an option to treat all string requires :refer or :as uses as valid? without any actual checks?#2022-01-2108:21cflemingYes, I’m planning fixes for this to the current EAP series.#2022-01-2200:32bedersyeah, for js requires that would be terrific. Even more terrific if they are navigable 🙂#2022-01-2206:40cflemingBeing navigable will depend on how parseable the JS is. In my experience of looking at CommonJS modules, the answer is usually not much, sadly.#2022-01-2207:06thhellerthere are a lot of libraries in JS that handle that sort of thing. unfortunately they are in JS and expecting node, would be neat to have a java/clj lib for that but so far I haven't found one#2022-01-2208:35cflemingWhat would be some good examples of JS libraries handling this sort of thing?#2022-01-2208:45thhellerhttps://github.com/nodejs/cjs-module-lexer https://github.com/guybedford/es-module-lexer#2022-01-2208:45thhellerare the ones I can remember. there are others though.#2022-01-2208:47cflemingThanks!#2022-01-2416:13Grant HornerNot sure if this a regression, Mac issue, or ID10T error, but I recently switched from Windows to Mac and ran into an issue with symbol resolution. I set deftest to def , but this doesn’t seem to resolve correctly inside of with-redefs forms. No problem on Windows, but I may be on an older build there.#2022-01-2421:28cflemingI think the issue there is that the deftest is inside the with-redefs - could you check if taking it out helps that?#2022-01-2606:21robert-stuttafordis it possible to set up cursive to auto-format on save using cljfmt? in emacs, when one uses clojure-lsp, you get lsp-format-buffer, which uses cljfmt under the hood. perhaps cursive uses clojure-lsp and can therefore use cljfmt via lsp?#2022-01-2606:22cflemingNot yet, but it’s something I’m looking into as part of a change I’m just about to release.#2022-01-2606:22cflemingOr rather, I’m about to release the first version of it, it will need more refinement.#2022-01-2606:23robert-stuttafordoh wow you answered quick haha - i just amended my question!#2022-01-2606:25cflemingHaha, yes. I’m planning to support cljfmt in one of two ways, either modifying Cursive to allow its formatting to be configured from the cljfmt file, or by configuring an external formatter which (I think) will allow what you want.#2022-01-2606:26cflemingAre there forms where you can’t get the formatting from Cursive to match cljfmt, or is it just that it’s a pain to maintain the config in two places?#2022-01-2606:26robert-stuttafordok great!#2022-01-2606:26robert-stuttafordso, we have one cursive user and 5 emacs users, and whenever cursive-guy plus anyone else collaborate, the diffs are full of formatting changes#2022-01-2606:27cflemingHas the Cursive user tried to get the formatting to match cljfmt?#2022-01-2606:27robert-stuttafordyes! things like datalog's or-join and tufte/p being indented with two spaces rather than at the end of the function line, and that open issue with map values indenting at the end of the key even though its on a new line#2022-01-2606:28cflemingI’m interested in cases where Cursive can’t support something that cljfmt does. Otherwise it may just be a matter of configuring his Cursive setup.#2022-01-2606:28cflemingCan you give me some examples of the or-join and tufte/p thing? I’ll fix the map value thing in the next EAP (not this one I’m just about to release).
#2022-01-2606:31robert-stuttafordsure! we have this cljfmt config:
{:indents {tufte/p [[:inner 0]]
           or-join [[:inner 0]]}}
without the config:
(tufte/p :metric-name
         (measured-code-here))

(d/q '[:find ?x :where
       (or-join [?x]
                [?x :a]
                [?x :b])])
with the config:
(tufte/p :metric-name
  (measured-code-here))

(d/q '[:find ?x :where
       (or-join [?x]
         [?x :a]
         [?x :b])])
#2022-01-2606:32robert-stuttafordwe have more such indentation rules, all applying the same basic rule to lots of forms - compojure, stuartsierra/component, guardrails, etc#2022-01-2606:33robert-stuttafordideally we'd maintain one cljfmt config with all of this, and have it in the repo with the code. we've done the same with clj-kondo stuff and it's fantastic#2022-01-2606:34cflemingSo in Cursive, he should customise the indentation for that form like this: https://cursive-ide.com/userguide/formatting.html#code-style-settings. As described there, he should set the config to “1”, which is one special parameter and the rest just indented.#2022-01-2606:35robert-stuttafordok, that's promising! and having that in source control?#2022-01-2606:36cflemingUnder Preferences | Editor | Code Style | Clojure, set the scheme to “Project”. That will create file in the .idea folder which contains that config for that project.#2022-01-2606:37robert-stuttafordok perfect. thanks Colin!#2022-01-2606:37cflemingNo worries. There’s a section in that doc about matching emacs too, in case there are other cases missing. If you have any other queries, let me know.#2022-01-2606:38robert-stuttafordwill do!#2022-01-2607:50cfleminghttps://twitter.com/CursiveIDE/status/1486244500666470401#2022-01-2612:35Dumchcan I propose some features for the new releases here?#2022-01-2612:39DumchI already havehttps://github.com/Liverm0r/dotfiles/commit/e514831dfdc115d530444874bc2f37bebae8cbc9#diff-2097776acc409b1c4c6a8ab45fd000f47833f462dae606f010ee7bfaa37b9444 locally, so implementing it won’t be hard. Feature 1. Idea actions for deleting/selecting a form. Feature 2. Idea action to comment out a form. * form is one of "…", (…), {…}, […]#2022-01-2612:40DumchI need 1 to be able to have something like vim-sexp with idea-vim (an emacs users also can do this). I’ve written here about the problem https://clojurians.slack.com/archives/C0744GXCJ/p1642500532023400#2022-01-2616:21imreTrying to check my code styles today after upgrading and it seems to be hanging:#2022-01-2616:22imre
IntelliJ IDEA 2021.3.2 RC (Community Edition)
Build #IC-213.6777.38, built on January 25, 2022
Runtime version: 11.0.13+7-b1751.25 x86_64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
macOS 12.1
GC: G1 Young Generation, G1 Old Generation
Memory: 4096M
Cores: 8
Registry:
    scala.erase.compiler.process.jdk.once=false

Non-Bundled Plugins:
    org.intellij.plugins.hcl (0.7.14)
    net.seesharpsoft.intellij.plugins.csv (2.18.2)
    name.kropp.intellij.makefile (213.5744.224)
    de.thomasrosenau.diffplugin (2.1.8-imrekoszo)
    com.namespace.sort.namespace-sort-plugin (1.7-imrekoszo-2021-3-linebreak)
    com.jetbrains.plugins.ini4idea (213.5744.190)
    org.jetbrains.kotlin (213-1.6.10-release-944-IJ6461.79)
    org.jetbrains.idea.grammar (2021.1.2)
    gherkin (213.6461.19)
    dev.monogon.cuelang (0.8.3)
    StringToolsPlugin (4.0)
    String Manipulation (8.25.203.5981.1)
    Key Promoter X (2021.3)
    mobi.hsz.idea.gitignore (4.3.0)
    com.cursiveclojure.cursive (1.12.2-eap2-2021.3)
    com.github.shinichy.integrant (0.1.1)
    com.github.brcosta.cljstuffplugin (0.5.2)
    EDN-JSON Converter (0.0.5)
    org.intellij.scala (2021.3.18)

Kotlin: 213-1.6.10-release-944-IJ6461.79
#2022-01-2616:37imreoh, I'm just seeing this came up as an IDE error, reported as #23507#2022-01-2618:37seriogaHi @U0567Q30W, no plans for “Optimize imports” to remove unused imports?#2022-01-2621:17cfleming@U0HJNJWJH Yes, there’s a (potentially incomplete) to-do list in the release email, I’m hoping to get to it all over this EAP series.#2022-01-2616:44imreHmm interesting error I got at stub generation, perhaps it's to do with me using clojure 1.11.0-alpha4#2022-01-2616:46Alex Miller (Clojure team)definitely, clojure.core/abs is new in alpha4#2022-01-2616:47imreNot sure why it breaks stub gen though#2022-01-2616:48Alex Miller (Clojure team)the warning is correct and fine though (it's ok to overwrite the function)#2022-01-2616:48Alex Miller (Clojure team)yeah#2022-01-2616:48imreI'm getting used to seeing this warning all over the place now 🙂#2022-01-2616:50Alex Miller (Clojure team)issue out there for this already looks like https://github.com/dm3/clojure.java-time/issues/82#2022-01-2616:57imresent a pr there just in case#2022-01-2621:20cflemingThe stub generation currently assumes that anything output to stderr is an error. I could maybe relax that, but I’d have to ensure that I can be sure that the generation actually terminated correctly.#2022-02-1410:29cfleminghttps://github.com/cursive-ide/cursive/issues/2654#2022-01-2619:37wilkerluciohello, I was trying to find the setting to auto organize namespaces, but now when I go to the Clojure style part the screen never loads, it just stays in the state demonstrated by the screenshot#2022-01-2621:20imrehttps://clojurians.slack.com/archives/C0744GXCJ/p1643215029048700?thread_ts=1643183408.046300&amp;cid=C0744GXCJ#2022-01-2621:21cflemingI’ll look at this today.#2022-01-2621:28cfleming@U066U8JQJ Are you seeing the same error? It’s an NPE in FormParameterCodeStylePanel.getPanel.#2022-01-2621:29wilkerlucioI got this error:
java.lang.RuntimeException: Unexpected value null
	at cursive.formatter.codeStyle.FormParameterCodeStylePanel.<init>(CodeStyleConfig.kt:195)
	at cursive.formatter.codeStyle.ClojureCodeStyleMainPanel.initTabs(CodeStyleConfig.kt:93)
	at com.intellij.application.options.TabbedLanguageCodeStylePanel.ensureTabs(TabbedLanguageCodeStylePanel.java:163)
	at com.intellij.application.options.TabbedLanguageCodeStylePanel.getPreviewText(TabbedLanguageCodeStylePanel.java:266)
	at com.intellij.application.options.CodeStyleAbstractPanel.createEditor(CodeStyleAbstractPanel.java:144)
	at com.intellij.application.options.CodeStyleAbstractPanel.<init>(CodeStyleAbstractPanel.java:105)
	at com.intellij.application.options.TabbedLanguageCodeStylePanel.<init>(TabbedLanguageCodeStylePanel.java:68)
	at cursive.formatter.codeStyle.ClojureCodeStyleMainPanel.<init>(CodeStyleConfig.kt:84)
	at cursive.formatter.codeStyle.ClojureCodeStyleConfigurable.createPanel(CodeStyleConfig.kt:446)
	at cursive.formatter.codeStyle.ClojureCodeStyleConfigurable.createPanel(CodeStyleConfig.kt:442)
	at com.intellij.application.options.CodeStyleAbstractConfigurable.createComponent(CodeStyleAbstractConfigurable.java:36)
	at com.intellij.application.options.codeStyle.NewCodeStyleSettingsPanel.<init>(NewCodeStyleSettingsPanel.java:32)
	at com.intellij.ConfigurableFactory$createCodeStyleConfigurable$codeStyleConfigurableWrapper$1.createPanel(ConfigurableFactory.kt:32)
	at com.intellij.application.options.codeStyle.CodeStyleMainPanel.ensurePanel(CodeStyleMainPanel.java:252)
	at com.intellij.application.options.codeStyle.CodeStyleMainPanel.ensureCurrentPanel(CodeStyleMainPanel.java:237)
	at com.intellij.application.options.codeStyle.CodeStyleMainPanel.highlightOptions(CodeStyleMainPanel.java:312)
	at com.intellij.application.options.CodeStyleConfigurableWrapper.lambda$enableSearch$0(CodeStyleConfigurableWrapper.java:167)
	at com.intellij.openapi.options.newEditor.SpotlightPainter.update(SpotlightPainter.java:75)
	at com.intellij.openapi.options.newEditor.SettingsEditor$6.updateNow(SettingsEditor.java:272)
	at com.intellij.openapi.options.newEditor.SettingsEditor.lambda$updateStatus$3(SettingsEditor.java:470)
	at com.intellij.util.concurrency.QueueProcessor.runSafely(QueueProcessor.java:240)
	at com.intellij.util.Alarm$Request.runSafely(Alarm.java:385)
	at com.intellij.util.Alarm$Request.run(Alarm.java:374)
	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at com.intellij.util.concurrency.SchedulingWrapper$MyScheduledFutureTask.run(SchedulingWrapper.java:220)
	at com.intellij.openapi.application.TransactionGuardImpl.runWithWritingAllowed(TransactionGuardImpl.java:214)
	at com.intellij.openapi.application.TransactionGuardImpl.access$200(TransactionGuardImpl.java:21)
	at com.intellij.openapi.application.TransactionGuardImpl$2.run(TransactionGuardImpl.java:196)
	at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:805)
	at com.intellij.openapi.application.impl.ApplicationImpl.lambda$invokeLater$4(ApplicationImpl.java:348)
	at com.intellij.openapi.application.impl.FlushQueue.doRun(FlushQueue.java:82)
	at com.intellij.openapi.application.impl.FlushQueue.runNextEvent(FlushQueue.java:131)
	at com.intellij.openapi.application.impl.FlushQueue.flushNow(FlushQueue.java:47)
	at com.intellij.openapi.application.impl.FlushQueue$FlushNow.run(FlushQueue.java:187)
	at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:313)
	at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:776)
	at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:727)
	at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:721)
	at java.base/java.security.AccessController.doPrivileged(Native Method)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
	at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:746)
	at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:891)
	at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:760)
	at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$6(IdeEventQueue.java:447)
	at com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:818)
	at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$7(IdeEventQueue.java:446)
	at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:805)
	at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:492)
	at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:117)
	at java.desktop/java.awt.WaitDispatchSupport$2.run(WaitDispatchSupport.java:190)
	at java.desktop/java.awt.WaitDispatchSupport$4.run(WaitDispatchSupport.java:235)
	at java.desktop/java.awt.WaitDispatchSupport$4.run(WaitDispatchSupport.java:233)
	at java.base/java.security.AccessController.doPrivileged(Native Method)
	at java.desktop/java.awt.WaitDispatchSupport.enter(WaitDispatchSupport.java:233)
	at java.desktop/java.awt.Dialog.show(Dialog.java:1070)
	at com.intellij.openapi.ui.impl.DialogWrapperPeerImpl$MyDialog.show(DialogWrapperPeerImpl.java:701)
	at com.intellij.openapi.ui.impl.DialogWrapperPeerImpl.show(DialogWrapperPeerImpl.java:437)
	at com.intellij.openapi.ui.DialogWrapper.doShow(DialogWrapper.java:1671)
	at com.intellij.openapi.ui.DialogWrapper.show(DialogWrapper.java:1629)
	at com.intellij.ide.actions.ShowSettingsUtilImpl.showSettingsDialog(ShowSettingsUtilImpl.java:90)
	at com.intellij.ide.actions.ShowSettingsAction.perform(ShowSettingsAction.java:50)
	at com.intellij.ui.mac.MacOSApplicationProvider$Worker.lambda$initMacApplication$1(MacOSApplicationProvider.java:74)
	at com.intellij.ui.mac.MacOSApplicationProvider$Worker.lambda$submit$8(MacOSApplicationProvider.java:172)
	at com.intellij.openapi.application.TransactionGuardImpl.runWithWritingAllowed(TransactionGuardImpl.java:214)
	at com.intellij.openapi.application.TransactionGuardImpl.access$200(TransactionGuardImpl.java:21)
	at com.intellij.openapi.application.TransactionGuardImpl$2.run(TransactionGuardImpl.java:196)
	at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:805)
	at com.intellij.openapi.application.impl.ApplicationImpl.lambda$invokeLater$4(ApplicationImpl.java:348)
	at com.intellij.openapi.application.impl.FlushQueue.doRun(FlushQueue.java:82)
	at com.intellij.openapi.application.impl.FlushQueue.runNextEvent(FlushQueue.java:131)
	at com.intellij.openapi.application.impl.FlushQueue.flushNow(FlushQueue.java:47)
	at com.intellij.openapi.application.impl.FlushQueue$FlushNow.run(FlushQueue.java:187)
	at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:313)
	at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:776)
	at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:727)
	at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:721)
	at java.base/java.security.AccessController.doPrivileged(Native Method)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
	at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:746)
	at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:891)
	at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:760)
	at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$6(IdeEventQueue.java:447)
	at com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:818)
	at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$7(IdeEventQueue.java:446)
	at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:805)
	at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:492)
	at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
	at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)
#2022-01-2621:29cflemingHmm, that’s slightly different but seems related. Thanks, I’ll look at both.#2022-01-2622:55cflemingDoes restarting the IDE or just trying again work for either of you? This seems to be some weird constructor initialisation order problem, but I can’t figure it out.#2022-01-2623:29wilkerluciohere its consistently reproducible#2022-01-2623:31cflemingIt’s very strange, I can’t reproduce it at all. Can you email me your .idea/codeStyles/Project.xml file?#2022-01-2623:32cflemingIdeally after closing the project - not required to fully shut the IDE down though.#2022-01-2707:52cfleming@U08BJGV6E Could you do that too please? Also if you could include the system info from About IntelliJ IDEA that would be great too, so I can see which plugins you have in common. I’m starting to think this might be related to a plugin conflict.#2022-01-2708:05cflemingAlso, I’m interested to know if this happens for you in all projects, or just a specific one?#2022-01-2708:06imreAlso consistently reproable here. I don't even need to have a project open for it, same happens from the Idea launch page#2022-01-2708:06imreI posted my system info yesterday: https://clojurians.slack.com/archives/C0744GXCJ/p1643214178048500?thread_ts=1643183408.046300&amp;cid=C0744GXCJ#2022-01-2708:36cflemingAh yes, thanks. That is super weird then, if it doesn’t even need a project.#2022-01-2708:36cflemingI’ll keep investigating.#2022-01-2708:36imrethank you!#2022-01-2714:15wilkerlucio@U0567Q30W just the delay, just tried to get my .idea/codeStyles/Project.xml but I can't find this file (looked at the project and at HOME)#2022-01-2714:17imreI also noticed that I don't seem to be able to save changes to my repl run configs#2022-01-2720:26cfleming@U08BJGV6E do you get an error?#2022-01-2720:27imreno, just the Apply button stays grey and if I click on Run my changes don't get picked up#2022-01-2720:27wilkerlucioin case it helpers, this is my system info:
IntelliJ IDEA 2021.3.1 (Ultimate Edition)
Build #IU-213.6461.79, built on December 28, 2021
Licensed to Wilker Lucio
Subscription is active until May 7, 2022.
Runtime version: 11.0.13+7-b1751.21 x86_64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
macOS 12.1
GC: G1 Young Generation, G1 Old Generation
Memory: 16384M
Cores: 16
Non-Bundled Plugins:
    net.sf.opk.avro-schema-support (203.1.2)
    net.seesharpsoft.intellij.plugins.csv (2.18.2)
    me.ihxq.acejump.lite (1.2)
    djblue.portal (0.20.1)
    com.wakatime.intellij.plugin (13.1.8)
    com.jetbrains.plugins.ini4idea (213.5744.190)
    com.intellij.plugins.watcher (213.6461.19)
    org.intellij.plugins.hcl (0.7.14)
    org.jetbrains.plugins.hocon (2021.1.0)
    com.intellij.apacheConfig (213.5744.190)
    org.asciidoctor.intellij.asciidoc (0.36.13)
    String Manipulation (8.25.203.5981.1)
    PlantUML integration (5.10.0)
    mobi.hsz.idea.gitignore (4.3.0)
    com.cursiveclojure.cursive (1.12.2-eap2-2021.3)
    com.github.shinichy.integrant (0.1.1)
    mdx.js (1.0.213)
    intellij.prettierJS (213.6461.6)
    com.intellij.tailwindcss (213.6461.6)
    com.intellij.lang.jsgraphql (3.1.2)
    aws.toolkit (1.37-213)
    com.dmarcotte.handlebars (213.5744.190)

Kotlin: 213-1.5.10-release-949-IJ6461.79
#2022-01-2720:27cflemingHmm, that’s weird, I don’t think anything else has changed there. I’ll check.#2022-01-2720:31wilkerlucio@U0567Q30W is it weird that I can't find the xml config file? seems like its not getting generated here#2022-01-2720:35cfleming@U066U8JQJ Maybe, which files do you have in your .idea folder in your project? Also, does this happen in all projects for you? Does it also happen if you don’t have projects open like imre?#2022-01-2720:37wilkerluciojust tested: 1. closed IntelliJ 2. open intellij on the Welcome Screen 3. open settings from there 4. navigate to clojure code style#2022-01-2720:37wilkerluciothis still had the same issue#2022-01-2720:38cflemingOk, although the exception is slightly different, I think you’re both seeing the same thing somehow.#2022-01-2720:39wilkerluciomy .idea in a project#2022-01-2720:39cflemingThanks. So you have the Scheme under Code Style settings set to IDE, right?#2022-01-2720:40wilkerlucioyes, correct#2022-01-2720:46imreI also have it set to IDE and this is what I see under .idea in a project:#2022-01-2721:01cflemingInteresting, I wonder if that’s the problem, I’ll test that.#2022-01-2811:24cflemingHi guys, I have published a dev build, 1.12.2-dev1. Could you download it from here: https://plugins.jetbrains.com/plugin/8090-cursive/versions/dev and try it out? I’m pretty sure it will fix Wilker’s problem, and I hope it will fix Imre’s even though I don’t have a good explanation for it.#2022-01-2811:26imrecheers, gonna try now#2022-01-2811:27cflemingThere is still another problem I’m working on where the settings aren’t serialised properly, but I will have to try to finish that off tomorrow.#2022-01-2811:30imrenice, I can now load the clojure code style page on the welcome page#2022-01-2811:30imregot an error when I opened a project right after: #23569#2022-01-2811:31cflemingAh yeah, that’s just because it’s a dev build.#2022-01-2811:31cflemingI don’t think that should affect the other issue.#2022-01-2811:32imreI also checked editing the repl run config#2022-01-2811:32imreIt appears I can edit and the apply button works#2022-01-2811:32cflemingStill, that’s great news. I’m still not sure what the problem was, but it’s possibly related to Wilker’s problem (which was something else in the end.#2022-01-2811:32cflemingOh great!#2022-01-2811:33imreMy report yesterday probably wasn't complete: then I only tried to change the value of "allow parallel run" - and when that's the only change it still won't get applied#2022-01-2811:33cflemingWhat is not working at the moment is saving the config when you modify code style settings - I’m working with JetBrains on that. As soon as I get it fixed I’ll get this out.#2022-01-2811:33imrebut it does together with say changing display name#2022-01-2811:33cflemingHuh, interesting - I’ll check that out tomorrow too.#2022-01-2811:34imreThanks for the fix so far#2022-01-2811:34cflemingProbably just that field is missing from the list of things to check to see whether the editor has modified the config.#2022-01-2811:34cflemingNo worries, hopefully I can get the full thing out tomorrow.#2022-01-2811:35imre👍:skin-tone-3:#2022-01-2813:15wilkerlucioits back! 😄#2022-01-2821:23cflemingHooray!#2022-01-2821:50wilkerlucio@U0567Q30W one thing though, I just tried to see if my imports where getting auto-organized, but they are not, the option is checked, but they still getting always add to the end of the :require (simple require structure, no reader conditions or fancy things)#2022-01-2822:14cfleming@U066U8JQJ You’re talking about new ones being added by auto-require, right? Yes, that’s not there yet, it’s on the to-do list. What is new is that you can use the Optimise Imports action and it will sort out the ones that are there.#2022-01-2822:15wilkerlucioah, gotcha, thanks for the clarification#2022-01-2822:15cflemingSo you can run that right after an auto-require and it should put it in the right place.#2022-01-2703:40cflemingI’ve temporarily removed the eap2 update - some users have been experiencing problems with the code style migration, which I can’t figure out. Since that’s a non-reversible change, I’ve taken this down and will hopefully get a fixed version up shortly.#2022-01-2821:22cap10morganWhen I have cursive format some code, it always moves same-line comments far to the right (e.g. this: foo (:bar baz) ; barring the baz gives you foo becomes this: foo (:bar baz) ; barring the baz gives you foo). is that configurable? I want it to not do that 🙂#2022-01-2821:23cflemingYep, Preferences | Editor | Code Style | Clojure | General | Comment alignment column. Set it to 0 if you just want them left alone.#2022-01-2821:24dpsuttonI think there’s a (lisp) convention that ; aligns to the right and ;; aligns to the left correct?#2022-01-2821:26dpsuttonor i suppose ;;; aligns left, ;; aligns at the current indentation level, and ; aligns to the right?#2022-01-2821:28cflemingI’m not sure to be honest.#2022-01-2821:29cflemingI thought ;; was used for kind of like a ‘higher level’ comment about a block of code, which I guess would normally be at the left.#2022-01-2821:57nlessaHi @cfleming! Using Intellij-2021.3.1 Runtime version: 11.0.13+7-b1751.21 aarch64 VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o. and Cursive 1.12.1-2021-3 I am always getting this exception when trying to use the shortcut for REpl-history.
clojure.lang.ArityException: Wrong number of args (2) passed to: cursive.repl.toolwindow/history-move
	at clojure.lang.AFn.throwArity(AFn.java:429)
	at clojure.lang.AFn.invoke(AFn.java:36)
	at cursive.repl.actions$history_next.invokeStatic(actions.clj:542)
	at cursive.repl.actions$history_next.invoke(actions.clj:539)
	at clojure.lang.Var.invoke(Var.java:384)
	at cursive.api.DelayedFn.invoke(DelayedFn.java:31)
	at cursive.actions.ClojureActionBase.actionPerformed(ClojureActionBase.java:38)
	at com.intellij.openapi.keymap.impl.ActionProcessor.performAction(ActionProcessor.java:65)
	at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher$1.performAction(IdeKeyEventDispatcher.java:573)
	at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.lambda$doPerformActionInner$10(IdeKeyEventDispatcher.java:706)
	at com.intellij.openapi.actionSystem.ex.ActionUtil.performDumbAwareWithCallbacks(ActionUtil.java:265)
	at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.doPerformActionInner(IdeKeyEventDispatcher.java:702)
	at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.processAction(IdeKeyEventDispatcher.java:645)
	at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.processAction(IdeKeyEventDispatcher.java:584)
	at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.processActionOrWaitSecondStroke(IdeKeyEventDispatcher.java:467)
	at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.inInitState(IdeKeyEventDispatcher.java:456)
	at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.dispatchKeyEvent(IdeKeyEventDispatcher.java:224)
	at com.intellij.ide.IdeEventQueue.dispatchKeyEvent(IdeEventQueue.java:804)
	at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:754)
	at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$6(IdeEventQueue.java:447)
	at com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:818)
	at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$7(IdeEventQueue.java:446)
	at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:805)
	at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:498)
	at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
	at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)
Anyone found this error before?
#2022-01-2822:15cflemingYes, a few people have reported this. I haven’t managed to reproduce it, but there is a fix that I think will work in the next EAP.#2022-01-2823:29nlessaThanks, @cfleming!#2022-01-2822:30Drew Verleedoes cursive have step debugging features for cljs?#2022-01-2822:30cflemingNo, it doesn’t, sadly. It’s something I’d love to add and have spent a decent amount of time investigating, but it’s a lot of work.#2022-01-2822:32Drew Verleegotcha, yea. I'm no help there sadly. I'm just collecting information on if anything has support for it. I think the answer is no. I'm curious if somehow all the solutions can share a common set of features though in order get more mind share and hopefully support (financial, etc..).#2022-02-0100:41tony.kayThe source maps give you source-level debugging in the js console in Chrome.#2022-02-0100:41tony.kayin the sources tab#2022-02-0100:42tony.kayand exception breakpoints#2022-02-0100:42tony.kayit isn't perfect, but it isn't "nothing"#2022-01-2901:27cfleminghttps://twitter.com/CursiveIDE/status/1487235385415860225#2022-01-2902:55wilkerlucio@cfleming noticing something strange with indexing, in Pathom 3 I use guardrails to define functions with (>defn, it has a defn-like syntax and I tell Cursive to do that, but seems like its indexing some of the symbols, but not others, I did asked Cursive to define that as def instead, and then back again to defn, this fixed some of the cases, but after working a bit more I see not all were fixed#2022-01-2903:01wilkerlucioinvalidating caches didn't fixed it, but seems like using cljs.core/defn instead of clojure.core/defn made it work#2022-01-3022:17genekimSomewhere along the line, I picked up a habit of doing comment blocks like this:
(comment
  {:a 1}
  
  ,)  ; <--- note comma before closing paren
Someone noted that the comma would keep the closing paren from from being put right after the last form. I loved doing this because it made adding more forms inside the comment blocks super easy — no need to find that last closing paren, and insert a couple of newlines. Cursive used to protect that last ,) during code auto-format. But I’m noticing that this is no longer the case? Is there a way to revert to the old behavior when formatting code? Many thanks!!
#2022-01-3022:19cflemingHmm, I’m not sure about that, I’ll take a look. One similar thing I do for parinfer is #_nil), which is uglier but should still work, I think.#2022-01-3106:37danierouxI do ())#2022-01-3109:04imreI never had to use any of those tricks, if I put the closing paren on its own line, Cursive leaves it alone... FWIW I use paredit, not parinfer#2022-01-3116:45genekimThank you @U0567Q30W and @U9E8C7QRJ — I’ll try to start using that! 🙏#2022-01-3119:18cfleming@U6VPZS1EK Do you use parinfer? As imre states, I suspect (but haven’t tested) that with paredit this wouldn’t be a problem. Is it possible that this started to affect you when you switched to parinfer?#2022-01-3119:19genekimAh, yes. I’ve used parinfer from the very beginning — in fact, to my knowledge, I never used anything else. (I needed all that extra help when I first started Clojure! 🙂#2022-01-3119:20genekimSo, to answer your question: I’m pretty sure the behavior changed. Perhaps when I upgraded Cursive versions? (I upgrade seldomly, so I could have jumped 1.5 years or more.)#2022-01-3119:21genekimHoly cow. I’m running 1.12.1-2021.2 — I thought I was a bit more current than that! Will upgrade very soon.#2022-01-3119:21cflemingHmm, I don’t think I’ve touched that code in forever, but I may be forgetting something - the older I get, the more it happens.#2022-01-3119:22genekim(Hmm. I guess I’m current, given my IntelliJ version: 2021-2.)#2022-01-3119:36cflemingYeah, 1.12.1 is current for Cursive, unless you’re taking EAPs.#2022-01-3112:07mathias_dwhi, does anyone know how to make this type of pop-up disappear?#2022-01-3112:28Dumchtry cmd+shift+a — show paramter hints#2022-01-3112:30Dumchyou need this window#2022-01-3112:59mathias_dwthanks for replying. That one seems to control the "useful" pop-ups, though. And I don't really mind getting the type of pop-up i showed, since often it's useful, but i often hides stuff I need to read, and i can't figure out how to make it go away without pressing esc.#2022-01-3113:08mathias_dwok, your tip showed me those are called parameter info popups. still no luck binding a key to close them, though...#2022-01-3114:23DumchI found out how to hide them with hotkeys without exiting input mode (have to add hotkey myself)#2022-02-0115:17mathias_dwcool, thanks a lot!#2022-02-0115:33mathias_dwjust in the unlikely case anyone else got annoyed by those popups: i ended up adding this in my .ideavimrc to use qq while in insert mode to get rid of the popup:
:inoremap qq <esc> :action TogglePopupHints<CR> i 
#2022-01-3112:08mathias_dwnot using Escape, because I'm using ideavim, and that also gets me out of insert state#2022-01-3114:17dazldpossibly not a cursive question, but I think I have something turned on somewhere, and it’s letting me put the cursor anywhere in a file, instead of clamping to the existing whitespace. I prefer it when it jumps to the end of the whitespace - any ideas what it might be?#2022-01-3114:28Dumchmay it’s a virtual space you are talking about.#2022-01-3115:18Jordan RobinsonI've had this before, it was this: https://intellij-support.jetbrains.com/hc/en-us/community/posts/206916285-Click-anywhere-and-cursor-is-put-there#2022-01-3115:19Jordan Robinson(column selection mode, towards the bottom of that link)#2022-01-3116:24dazlda thousand 🍪 to you both, you saved my sanity#2022-01-3116:24dazldthank you!#2022-01-3123:28hlshipWe've been moving from lein to deps; at first, this was great ... when deps changed, Cursive was much faster to update the project (again, giant mono-repo, with 45+ submodules). Now we've moving from Maven coords to Git coords for our many internal libraries, and it's gotten very slow to update. I know the Git coords are more work (it's also much slower when using clj), but is Cursive able to cache or parallelize things to speed it up?#2022-02-0111:48Jakub Holý (HolyJak)Is it possible to extend the test diff support to other assertions than (is (= expected actual)) ? Namely to https://cljdoc.org/d/com.github.seancorfield/expectations/ 's (expect expected actual) ? In the terminal it is recommended to use expect with the humane-test-output lib but that does not work in Cursive REPL so I am curious what other options I have. expect is a macro that eventually resolves into (clojure.test/is (=? expected actual)) (where the =? is just a symbol that clj.test understands)#2022-02-0120:57cflemingI would like to do this (I think Nubank have a similar lib) but it’s not possible at the moment.#2022-02-0114:55Dumchdo you know if there is a quick way to refactor one type of brackets into another (for example, from (..) to [..] )?#2022-02-0114:56imreyep, Cycle Collection Type ~or something like that~ is the name of the action#2022-02-0117:44Jakub Holý (HolyJak)Awesome! I had not idea that was possible. Thx!#2022-02-0118:53imreYW 🙂#2022-02-0116:48folconIs there a function that does its let bindings on the second argument? I'm trying to find an appropriate target for symbol resolution... The below is getting a little annoying 😃...#2022-02-0116:51imredefn?#2022-02-0116:51imreor fn for that matter#2022-02-0116:51imrefn is probably better as it doesn't put anything into the global scope#2022-02-0119:21folconyep, not sure why that didn't occur to me 😳, thanks#2022-02-0119:22imredid it work? I haven't tried it#2022-02-0119:23imrealthough the binding form is different to that of a fn now that I look at it#2022-02-0119:53folconI went with defn in the end#2022-02-0119:53folconIt's "good enough" for now...#2022-02-0119:59folconThanks @U08BJGV6E 😃#2022-02-0120:25imrenm, glad I could help#2022-02-1906:47staypufdWhat UI lib are you using?#2022-02-2112:08folconhttps://github.com/HumbleUI/HumbleUI It's already pretty good :)...#2022-04-1220:39staypufdThanks#2022-02-0214:58thhellerSo here is a weird question. I have https://github.com/thheller/shadow-experiments I've been working on for a long time now that I use in many different projects. Since I haven't done a proper release of that lib yet I just include it via :source-paths ["src/main" "../shadow-experiments/src/main"] in the projects (via lein)#2022-02-0220:32cflemingThat is definitely weird. I’m not sure whether that’s officially supposed to work, but that behaviour is definitely buggy. I’ll take a look.#2022-02-0215:01thhellersomehow that seems to confuse Cursive and I keep piling up .iml files. Dunno exactly when they appear but it might have something to do with leinigen refresh button
-rwxrwxrwx 1 thheller thheller   251 Mar 13  2021 shadow-experiments-1.iml*
-rwxrwxrwx 1 thheller thheller   251 Feb 14  2021 shadow-experiments-2.iml*
-rwxrwxrwx 1 thheller thheller   253 Jan 13 08:07 shadow-experiments-3.iml*
-rwxrwxrwx 1 thheller thheller  6334 Jan 10 18:28 shadow-experiments-4.iml*
-rwxrwxrwx 1 thheller thheller   253 Feb  2 15:56 shadow-experiments.iml*
#2022-02-0215:01thhellershould I just give up on this pattern? I realize its a hack but it is a workarround for lein checkouts having other issues 😛#2022-02-0215:04thhellerI don't mind the extra .iml files but sometimes in the project itself it sort of forgets about itself and all source paths and stuff are gone#2022-02-0215:04thhellerwhen I press the leiningen refresh button I think thats when it recreates a new iml file and basically recreates the project from scratch#2022-02-0215:05thhellerif this isn't supposed to work that is fine#2022-02-0215:20Jordan Robinsonthis may/may not help but another approach could be using a git reference in your project.clj#2022-02-0215:24Jordan Robinsonwe're using reifyhealth/lein-git-down for that#2022-02-0215:36thhelleryeah I was trying to avoid deps.edn or git 😉#2022-02-0215:45thhelleralso gets to kinda weird error messages when the project has been lost#2022-02-0215:45thhellerdunno where that 3c... prefix is coming from :P#2022-02-0215:49thhellernow it seems to be completely destroyed. even the lein refresh button doesn't get it back into a working shape#2022-02-0316:19p-himikI have two aliases with conflicting deps with versions that can't be compared (one has :mvn/version and the other has :git/sha). Enabling both of those aliases in Clojure Deps results in the Unable to compare versions error. But I'd like to be able to work on code that needs the first alias and on code that needs the second one at the same time, without having to toggle them and refresh the deps every time I switch between files. Is there a workaround that's not as clunky as creating a special alias just for Cursive that copies one of those aliases but excludes the dep with a conflicting version?#2022-02-0316:22imrehow about creating a third alias that just fixes a version of the conflicting dependency?#2022-02-0316:34p-himikThat makes sense, thanks!#2022-02-0416:10potetmFor some reason, test failures aren’t highlighting red for me now.#2022-02-0416:10potetmtbh this could have happened months ago — I’ve not run tests from the REPL for quite some time.#2022-02-0416:11potetmIs there a new option you’re supposed to turn on or something? Or maybe I accidentally turned it off at some point (if so, how do you turn it back on)?#2022-02-0416:14Jordan RobinsonI've had this for a few reasons: • when the namespace has a _ when it should be a - • when the name of the test file conflicts with another test file elsewhere • when I can't attach to breakpoints in the file, which can be a few other things#2022-02-0416:21potetm@UC3B7UJF2 #2 it was (test ns was the same as the ns under test)#2022-02-0416:21potetmyou’re the man!#2022-02-0416:21Jordan Robinsonglad to help 🙂#2022-02-0420:30cflemingTIL - I didn’t know that!#2022-02-0709:52GGfpcNot sure if this already exists but I would love it if the watched variables in the debugger automatically doall-ed all the lazy seqs#2022-02-0722:41cflemingThe issue there is that they might be infinite. I agree it would be good if it could display them say 10 at a time, though.#2022-02-0800:26souenzzoit will create situations like • code don't works • open the debugger • now the code works. • close the debuger • not work again #2022-02-0712:29imreI often find myself wanting to copy the fully-qualified name of a symbol or keyword these days. Is anyone aware of a command in Cursive to do that?#2022-02-0712:30imreso, standing on (defn as|df [] I would like my.namespace/asdf to get onto the clipboard.#2022-02-0712:31imrestanding on ::foo/qw|er I'd like :that.other.ns.foo/qwer to be copied#2022-02-0712:46Dumch
set 
#2022-02-0712:47Dumchand everything like w, b, e, vaw, yaw, * in normal mode will consider some-thing liek some-word/with.whatever as one word#2022-02-0712:49Dumchso copy will become yaw#2022-02-0713:25imreThat needs ideavim though, correct?#2022-02-0713:27Dumchoh, sorry, for some reason I though you were using ideavim 🙂#2022-02-0713:29imreThanks anyway.#2022-02-0713:30imreThe point is not that some expanded selection is copied, but that a fully qualified value is copied#2022-02-0713:32imreasdf -> my.namespace/asdf ::bleh -> :my.namespace/bleh foo/bar -> that.other.ns.foo/bar ::foo/qwer -> :that.other.ns.foo/qwer#2022-02-0721:05cfleming@U08BJGV6E Right click | Copy/Paste Special… | Copy Reference#2022-02-0721:23apbleonardIn the past I have hit shift f6 (refactor > rename), which I use all the time anyway, to get the fully qualified name of a namespaced keyword at least.#2022-02-0721:27imrewonderful, thank you @U0567Q30W#2022-02-0814:03iecya@cfleming hi there, I have been suggested to ping you here about a problem I am having with cursive. Not sure how much detail you need, but I'll try to give you a bit of context: i'm working on a clojure project that also has some java files; when trying to start a local clojure repl it fails because it looks for a .class file in an absolute path saying it is not a relative path. More details, including the stack trace, should be included in the exception report #20491. Interestingly, it works if i clone my repo in a tmp directory, but it doesn't work in my working directory within the root directory#2022-02-0814:19Jordan Robinsonpotentially related: https://github.com/cursive-ide/cursive/issues/2633 (no solution in there though, sorry)#2022-02-0815:41iecyathanks for sharing it @UC3B7UJF2 I actually found this github issue that is exactly what I am experiencing at the moment (still no answer though): https://github.com/cursive-ide/cursive/issues/2624#2022-02-0819:24GGfpcCan cursive highlight when you're passing the wrong type to a function based on fspecs?#2022-02-0900:13folconAnyone using clojure-extras with cursive, any way of turning off the red underlining? Cursive does a good job of unobtrusively highlighting stuff that's not resolved, I don't need telling twice...#2022-02-0900:16cflemingProbably best to ask that over in #clj-extras-plugin#2022-02-0900:27folconThanks!#2022-02-1009:25DumchIs there a way to ignore anything inside comment form (like in emacs)? I don’t want to see errors there#2022-02-1112:30souenzzoHey @UL05W6AEM comment is a macro-level implementation of commentary blocks it means that it's body needs to be readable my the clojure reader Any syntax error inside a comment block will result in a exception while trying to load the namespace with that in mind, i think that make sense the IDE warns you about syntax errors in this block#2022-02-1013:40roklenarcicDid anyone have luck with setting up build.clj in such a way that you could experiment with it in REPL? https://clojurians.slack.com/archives/C02B5GHQWP4/p1644498430343479?thread_ts=1644497861.646089&amp;cid=C02B5GHQWP4#2022-02-1013:54R.A. PorterTry opening the Clojure Deps tool window, then expanding the Tool Alias folder. Check the build alias.#2022-02-1015:19roklenarcicYeah I did and I still get that message#2022-02-1115:33dvingothe build.clj file is just a suggestion, you can place it on your classpath - or under a separate directory like build and then add a deps alias that adds that dir to the classpath (as well as adding tools.build), this way you don't include the build code in your actual application code when it is built, but you can have the build available in cursive during development.#2022-02-1122:28cfleming@U66G3SGP5 Sorry, this is more awkward than it should be, I’ll try to fix it for the next build. I believe that you should be able to start a socket REPL in the terminal and connect to that using a remote REPL option in Cursive.#2022-02-1408:21roklenarcichm cool, but i’ve ran into a bigger problem. Even though I have build selected in Tool Aliases when I run the REPL, the dependencies from the build alias :deps key are absent from classpath.#2022-02-1410:22cflemingHmm, I’m not sure about that. I’ve filed this issue and will try to fix it soon: https://github.com/cursive-ide/cursive/issues/2653#2022-02-1017:08Grant HornerMinor gripe here (happy to make an issue or however you prefer to track these things). If I have a function that splits its arguments over multiple lines, I noticed that the signature when mousing over the function has some extra indentation. This isn’t something I usually do, but I’ve been experimenting with it since I’ve starting using inline specs with malli/schema-style defn , which get pretty long#2022-02-1122:28cflemingHmm, I see. Yeah, an issue would be good, thanks.#2022-02-1021:28James VickersAny idea how to debug what's happening with an error like this trying to run a lein profile? .idea.log just says:
2022-02-10 14:25:53,629 [85110763]   INFO - xecution.runners.ExecutionUtil - Error running 'sponsor-repl':<br>Error executing Leiningen configuration. 
com.intellij.execution.ExecutionException: Error executing Leiningen configuration.
	at cursive.repl.runner.LocalConfiguration.createLeinParameters(ReplRunConfigurations.kt:516)
	at cursive.repl.runner.LocalConfiguration.access$createLeinParameters(ReplRunConfigurations.kt:393)
...
#2022-02-1122:32cflemingIs there another exception following that one in the logs?#2022-02-1415:58James VickersI think this is the entire related part (based on time)
2022-02-11 17:05:15,298 [ 819856]   INFO - xecution.runners.ExecutionUtil - Error running 'sponsor-repl':<br>Error executing Leiningen configuration. 
com.intellij.execution.ExecutionException: Error executing Leiningen configuration.
	at cursive.repl.runner.LocalConfiguration.createLeinParameters(ReplRunConfigurations.kt:516)
	at cursive.repl.runner.LocalConfiguration.access$createLeinParameters(ReplRunConfigurations.kt:393)
	at cursive.repl.runner.LocalConfiguration$getRunProfileState$1.createDeferredParameters(ReplRunConfigurations.kt:432)
	at cursive.runner.DeferredCommandLineState.cacheDeferredParameters(Deferred.kt:72)
	at cursive.runner.AbstractDeferredRunner$execute$1.run(Deferred.kt:104)
	at com.intellij.openapi.progress.impl.CoreProgressManager.startTask(CoreProgressManager.java:436)
	at com.intellij.openapi.progress.impl.ProgressManagerImpl.startTask(ProgressManagerImpl.java:120)
	at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcessWithProgressAsync$5(CoreProgressManager.java:496)
	at com.intellij.openapi.progress.impl.ProgressRunner.lambda$submit$3(ProgressRunner.java:244)
	at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$2(CoreProgressManager.java:188)
	at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$executeProcessUnderProgress$12(CoreProgressManager.java:624)
	at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:698)
	at com.intellij.openapi.progress.impl.CoreProgressManager.computeUnderProgress(CoreProgressManager.java:646)
	at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:623)
	at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:66)
	at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:175)
	at com.intellij.openapi.progress.impl.ProgressRunner.lambda$submit$4(ProgressRunner.java:244)
	at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1700)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
	at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:668)
	at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:665)
	at java.base/java.security.AccessController.doPrivileged(Native Method)
	at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1.run(Executors.java:665)
	at java.base/java.lang.Thread.run(Thread.java:829)
2022-02-11 17:05:18,104 [ 822662]   WARN - vdmanager.AvdManagerConnection - No Android SDK Found 
#2022-02-1113:35Audriusparedit or parinfer? what to choose.#2022-02-1113:48Jordan RobinsonI like parinfer but it's definitely just a preference thing 🙂#2022-02-1113:57imreMy recommendation is paredit all the way.Clojure is my first lisp and my first functional programming language. Back in '14 when I started playing with Clojure and Cursive, it was an absolute heureka moment when I read the Cursive paredit docs. Paredit made it incredibly easy to work with an otherwise unknown language and I totally miss it from every language where it isn't available. slurp, barf, raise, splice, etc are absolutely essential to my toolbox ever since. It makes you understand the AST of your code while being completely decoupled from how you indent/lay out things.#2022-02-1122:29cflemingPersonally I use parinfer, since I can also use the paredit commands when they make sense.#2022-02-1116:00CaseyIs there a way to get the clj formatter to suck up the trailing closing parens on their own line? I don't see a paren-affecting setting in the code style settings panel#2022-02-1122:29cflemingIt should do this by default, do you have a case where that’s not working?#2022-02-1612:54CaseyHmm it's definitely not. On any clojure project/file.#2022-02-1612:54CaseyIt's possible this is user error as this is a long time cursive install, and I might have broke a setting in the past. Is there an option for this?#2022-02-1116:19GGfpcIs it possible to define custom resolvers for macros? I'd like to use orchestra's defn-spec without all my code being red and squiggly 😅#2022-02-1116:30Dumchdo you know that if you press alt+enter on a macro form, Idea will ask you to select what kind of syntax to use for it?#2022-02-1116:39Dumchhttps://cursive-ide.com/userguide/macros.html#2022-02-1116:41GGfpcYes, but this one can't be resolved as any of the existing ones#2022-02-1122:31cfleming@U016XBH746B Could you add an issue for that and I’ll look at adding support, since orchestra is pretty popular.#2022-02-1215:59steffanI'm having trouble getting going with Babashka support in Cursive 1.12.2-eap3-2021.3. Following the guide at https://cursive-ide.com/userguide/babashka.html I've added the Babashka facet to the only module in a barebones deps.edn based project, but I notice the External Library node its added is empty, which doesn't match the screenshots in the guide. When I mark any file as a Babashka script, all forms show as unresolved. Possibly related, Cursive didn't find my bb installation, so I had to type in the "path to bb cmd" when adding the facet: /home/linuxbrew/.linuxbrew/bin/bb#2022-02-1221:08cflemingI found that adding the deps to the external library was a bit flakey (it’s an IntelliJ problem, I think), but that closing and reopening the project usually fixed it. Does that help your case?#2022-02-1300:20steffanSadly no, closing and re-opening the project brings no improvement. I've tried adding the Babashka facet in various projects but all exhibit the same issue, where the "Babashka" External Library node is shown but appears empty. Cursive is totally happy with all my regular deps.edn Clojure projects, so I'm sure the deps part is configured and working OK in my Cursive setup. Is perhaps Cursive unhappy with my bb installation? I installed bb using the Linux version of brew.#2022-02-1300:23cflemingOn the command line, if you do bb print-deps --format deps what does that show?#2022-02-1300:24steffan
❯ bb print-deps --format deps
{:deps
 {selmer/selmer {:mvn/version "1.12.44"},
  org.clojure/clojure {:mvn/version "1.11.0-alpha4"},
  org.clojure/tools.logging {:mvn/version "1.1.0"},
  org.clojure/tools.cli {:mvn/version "1.0.206"},
  rewrite-clj/rewrite-clj {:mvn/version "1.0.699-alpha"},
  babashka/babashka.core
  {:git/url "",
   :git/sha "52a6037bd4b632bffffb04394fb4efd0cdab6b1e"},
  hiccup/hiccup {:mvn/version "2.0.0-alpha2"},
  org.clojure/data.xml {:mvn/version "0.2.0-alpha6"},
  org.clojure/data.csv {:mvn/version "1.0.0"},
  com.taoensso/timbre {:mvn/version "5.1.2"},
  com.cognitect/transit-clj {:mvn/version "1.0.324"},
  babashka/babashka.curl {:mvn/version "0.1.1"},
  clj-commons/clj-yaml {:mvn/version "0.7.107"},
  cheshire/cheshire {:mvn/version "5.10.2"},
  org.clojure/core.match {:mvn/version "1.0.0"},
  org.clojure/test.check {:mvn/version "1.1.1"},
  babashka/fs {:mvn/version "0.1.2"},
  nrepl/bencode {:mvn/version "1.1.0"},
  org.clojure/core.async {:mvn/version "1.5.648"},
  http-kit/http-kit {:mvn/version "2.5.3"}},
 :paths ["scripts"]}
#2022-02-1300:28steffanAlso, in case it helps:
❯ cat bb.edn
{:paths ["scripts"]}

❯ cat deps.edn
{:paths ["src"]
 :deps {org.clojure/clojure {:mvn/version "1.10.3"}}}
#2022-02-1301:15cflemingThanks, I’ll try to repro that.#2022-02-1307:12cfleminghttps://twitter.com/CursiveIDE/status/1492757978784878597#2022-02-1308:03imreThat's good stuff. Will there also be an option to add a linebreaks after :require and :import? Or is there one already?#2022-02-1321:40cflemingThere isn’t at the moment, no - currently Cursive never touches linebreaks. I’m planning to revamp all the formatting shortly which will make all that more configurable. What exactly do you want to happen there, just to be clear?#2022-02-1406:52imremy preference is exactly how it's in the summary at https://stuartsierra.com/2016/clojure-how-to-ns.html - one linebreak after :require and :import#2022-02-1406:55imreThat also seems to be the direction cider's refactor-nrepl adopted in 3.x: https://github.com/clojure-emacs/refactor-nrepl/blob/master/CHANGELOG.md#310-2021-11-09#2022-02-1406:56imreHaving this formatting/organization happen automatically on requiring/importing something would also be good to have#2022-02-1406:58imreHowever, for me it would be important to be able to turn auto-formatting and adding newlines off for specific projects. Normally when I submit a patch to a 3rd party project, I want to make the least amount of changes. However for our internal ones where I'm (partially) in control of formatting I'll want to clean stuff up as I go.#2022-02-1409:07cflemingSure, when adding new namespaces and imports, Cursive always adds a newline at the moment. If you have two in the same line though, it won’t insert a newline when formatting.#2022-02-1409:07cflemingRight now there isn’t a global “don’t do anything” switch, I’ll add one for that use case.#2022-02-1409:08cflemingAnd yes, once this is all done and working, it will allow me to finally add things like moving stuff between namespaces, proper namespace renames, etc.#2022-02-1409:42imre🎉#2022-02-1409:42imrekeep going Colin#2022-02-1506:35cflemingI was thinking about the global disable switch, and I don’t think it’s actually required. Right now, the ns will only be modified when you invoke the Optimise Imports action. The only place that would happen automatically is if you had configured it to happen on format, on commit, or maybe some other places that IntelliJ lets you invoke it automatically. So I’m assuming that for other people’s projects, you just wouldn’t configure that, and wouldn’t invoke the action.#2022-02-1506:37cflemingWhat I’m planning to do for the require insertion on completion is to scan through the requires, and insert the new clause before the first one that is lexicographically greater than the new one. So if your clauses are in order that should be maintained, and if they’re not you’re no worse off than you are now.#2022-02-1506:41cflemingFor some operations like moving things from one namespace to another, the Optimise operation will probably be invoked automatically by default on the namespace you’re moving things from, to tidy it up, and at that point it will probably make sense to have a “don’t do that” switch, even though I suspect that you will still want it in most cases anyway.#2022-02-1416:17Daniel ShrikiHi everyone. does anybody has a solution: project created from polylith - when I’m adding dependencies to deps.edn - intellij pops a message to import the new dependencies - however when I do so - he doesnt show the imported libs under ‘external libraries’ and it has not been added to ‘projectname.iml’ file. also, when I look at the project structure I see that he didn’t create dependencies in the module - so as a consequence I cant use the dependency in the code#2022-02-1418:07Daniel Shrikia solution has been found. tnx.#2022-02-1513:28imreIt appears #_ doesn't work fully correctly with type hints, not sure if this had already been reported? I can create an issue if not. In the attached screenshot, [chan] should also be highlighted as commented out#2022-02-1513:32emccueI think this is correct behavior. As edn it is read literally as
* the symbol ^ActionListener
* a vector containing
  * the symbol chan
The #_ signals to the edn reader to discard the next form, which is the symbol ^ActionListener. All this happens before clojure has a chance / wants to add special interpretation to the symbol/vector pair
#2022-02-1513:34emccueaaaand nope, nvm I am exactly wrong#2022-02-1513:34Alex Miller (Clojure team)The discard is discarding the thing after the type hint here#2022-02-1513:35Alex Miller (Clojure team)That is, it does not mean what you think it means#2022-02-1513:37imreDoes the discard also discard the type hint or only what comes after it? My expectation is that it discards both#2022-02-1513:38imreAnd that Cursive should highlight both as discarded#2022-02-1513:38emccueHuh, thats probably a bug in clojure.edn then
(require '[clojure.edn :as edn])
=> nil
(edn/read-string "#_ ^a [3]")
=> nil
#2022-02-1513:38emccuesince afaik metadata isn't part of the EDN spec, so this is clojure specific behavior#2022-02-1513:45Alex Miller (Clojure team)The Clojure edn reader supports some extensions beyond the spec #2022-02-1513:46Alex Miller (Clojure team)re the question above, it discards the next read value, which in this case is a vector with meta#2022-02-1513:47imre@U0567Q30W are you aware of a related open issue?#2022-02-1519:19cflemingNo, I’m not - an issue would be great, thanks.#2022-02-1519:21cflemingDoes that mean that #_ ^:foo bar baz would return baz without meta, or that the meta would apply to bar and would get dropped?#2022-02-1519:22Alex Miller (Clojure team)those sound like the same thing :)#2022-02-1519:22Alex Miller (Clojure team)the meta would be attached to bar, and bar would be discarded, and you would get baz with no meta#2022-02-1519:23cflemingIn my defence, it’s 8am here, and I should be doing other things rather than replying to Slack without thinking properly 🙂#2022-02-1519:23Alex Miller (Clojure team)I hear ya :)#2022-02-1519:24Alex Miller (Clojure team)the key is, it's a stack#2022-02-1519:25Alex Miller (Clojure team)
#_ says read the next thing and drop it
  ^:foo says here's some meta, read the next thing and give it that meta
    read bar symbol
  ... meta is applied to bar
... #_ drops bar w/meta
read baz symbol
#2022-02-1519:26Alex Miller (Clojure team)(the stack being actual stack frames in the LispReader, not an explicit stack)#2022-02-1519:34cflemingRight, that makes sense, thanks. So I guess ^:foo #_ bar baz would leave baz with meta applied.#2022-02-1519:48imreI think that's correct. Probably also important to repeat that the current behaviour is expected in edn. I'll record an issue#2022-02-1519:51imrehmm now I'm unsure about that edn part#2022-02-1519:52imre
(clojure.edn/read-string "[^asdf foo]")
=> [foo]
(clojure.edn/read-string "[#_^asdf foo]")
=> []
#2022-02-1520:06imreoh yeah, that's the https://github.com/clojure/clojure/blob/master/src/jvm/clojure/lang/EdnReader.java#L53 Alex mentioned#2022-02-1520:22imrehttps://github.com/cursive-ide/cursive/issues/2656#2022-02-1620:50souenzzohttps://clojurians.slack.com/archives/C0744GXCJ/p1639748950418800#2022-02-1906:35staypufdAlex Miller said above: “the meta would be attached to bar, and bar would be discarded, and you would get baz with no meta”#2022-02-1906:37staypufdSo I'm confused. Colin's says that baz would have the meta, Alex said it wouldn't. #2022-02-1906:37staypufdGonna try in REPL#2022-02-1921:01cflemingAlex is definitely correct here.#2022-02-1513:32Jakub Holý (HolyJak)Hm, "Edit REPL Commands" allows me to change/delete but not to add a command (nor it points to where I could add one)?!#2022-02-1513:40imrehttps://github.com/cursive-ide/cursive/issues/1415#2022-02-1513:58Jakub Holý (HolyJak)Ah, thanks! I should have thought of checking that first.#2022-02-1514:42AudriusIs there a way to get symbol information from REPL rather the setting everything manually as documentation says? I have Macro heavy code with a lot of unresolvable vars.#2022-02-1514:54imreNot at the moment as far as I know#2022-02-1523:30cflemingNo, Cursive doesn’t support this. It will in the future support customisation for macro forms, but doesn’t do that yet.#2022-02-1520:22imrehttps://github.com/cursive-ide/cursive/issues/2656#2022-02-1602:36steveb8nQ: I’m often editing edn or clojure files and need to insert a uuid. I jump to the repl and call (UUID/randomUUID) then copy and paste. Could Cursive automate this so I can have a keybinding that inserts a fresh uuid at the cursor location?#2022-02-1613:23Andrewhow about a REPL command similar to this, with a keybinding assigned?#2022-02-1623:26cflemingNice solution! I’m also planning to allow REPL commands to insert the results in the editor, which would make that even slicker.#2022-02-1721:56steveb8nThanks! I never would have figured that out. works great. will look forward to that new feature @U0567Q30W so that it’s 1 keystroke instead of 2#2022-10-2919:47cjsauerVery late to this thread but there is also this plugin: https://plugins.jetbrains.com/plugin/8320-uuid-generator#2022-11-1602:48onetomalso, there is a /usr/bin/uuidgen on macOS by default. then u can also pipe it into pbcopy, if u want it on the clipboard (or as macOS calls it, Paste Board, hence *pb*copy) so u can have some shell command runner plugin, which does this on a keystroke. i usually just run such stuff from the built-in terminal (which i've bound to Cmd-2) i do miss the ability to copy the last REPL evaluation result into the clipboard though... that would be a great, reusable action!#2022-02-1610:50GGfpcDoes cursive support inspecting data inside threaded macros or is adding a let the only way to see the intermediate state?#2022-02-1610:53imreI'm not aware of a built-in way, but it would be nice
#2022-02-1610:54imreI usually do a tap thing in this case btw, like (-> foo :bar (doto tap>) :baz)#2022-02-1623:26cflemingThere’s no built-in solution for this at the moment, sorry.#2022-11-1602:56onetomthere is https://github.com/philoskim/debux, which works on clojurescript too, but it's a bit too heavy-weight for my taste, so i've resorted to 1. have a live template definition, which types this for me: [our.company.common :refer :all] 2. then i add this to most of our NS forms 3. i defined a ? function, which pretty-prints any value (with puget.printer/cprint) and also returns it, so i can just drop it into threading forms i've originally called it probe, but ? doesn't seem to collide with anything so far and it's far easier to add and remove. it really feels akin to probing an electrical circuit with a multi-meter.#2022-11-1602:58onetomthis is the source code:
(defn probe
  ([x]
   ;; Print info about call-site
   (let [[_this-invokeStatic _this-invoke call-site]
         (-> (ex-info "" {}) .getStackTrace)]
     (println)
     (println "=== PROBE ===")
     (println " at" (.toString call-site)))
   (pp x)
   x)
  ([xform x]
   (probe (xform x))
   x))
i use that stack trace trickery to 1. ignore the stackelement of the probe function itself 2. print the top-most, relevant stack element in a format, which cursive can turn into a link in the REPL window that way i know where my probes are and quickly get to them, if i want to remove them.
#2022-11-1602:59onetompp is just a little automation around picking between clojure.pprint and puget.printer:
(defmacro >stderr [& body] `(binding [*out* *err*] 
#2022-02-1617:36kwladyka
ava.lang.Throwable: Error handling response
java.lang.IndexOutOfBoundsException: Wrong line: 523. Available lines count: 100
 at com.intellij.openapi.editor.impl.LineSet.checkLineIndex (LineSet.java:200)
    com.intellij.openapi.editor.impl.LineSet.getLineStart (LineSet.java:181)
    com.intellij.openapi.editor.impl.DocumentImpl.getLineStartOffset (DocumentImpl.java:1017)
    cursive.testing.actions$annotate_test$reify__17591.compute (actions.clj:102)
    com.intellij.openapi.application.impl.ApplicationImpl.runReadAction (ApplicationImpl.java:841)
    cursive.testing.actions$annotate_test.invokeStatic (actions.clj:99)
    cursive.testing.actions$annotate_test.invoke (actions.clj:97)
    cursive.testing.actions$fn__17692.invokeStatic (actions.clj:219)
    cursive.testing.actions/fn (actions.clj:215)
    clojure.lang.MultiFn.invoke (MultiFn.java:229)
    cursive.testing.actions$test_handler$process__17725.invoke (actions.clj:298)
    cursive.testing.actions$test_handler$reify__17728.out (actions.clj:310)
    cursive.repl.nrepl$handler.invokeStatic (nrepl.clj:78)
    cursive.repl.nrepl$handler.invoke (nrepl.clj:61)
    cursive.repl.nrepl$start$reify__14845$fn__14853.invoke (nrepl.clj:141)
    cursive.repl.nrepl$start$reify__14845.run (nrepl.clj:140)
    com.intellij.openapi.application.impl.ApplicationImpl$1.run (ApplicationImpl.java:265)
    java.util.concurrent.Executors$RunnableAdapter.call (Executors.java:515)
    java.util.concurrent.FutureTask.run (FutureTask.java:264)
    java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1128)
    java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:628)
    java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run (Executors.java:668)
    java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run (Executors.java:665)
    java.security.AccessController.doPrivileged (AccessController.java:-2)
    java.util.concurrent.Executors$PrivilegedThreadFactory$1.run (Executors.java:665)
    java.lang.Thread.run (Thread.java:829)

	at com.intellij.openapi.diagnostic.Logger.error(Logger.java:182)
	at cursive.logging$do_error.invokeStatic(logging.clj:60)
	at cursive.logging$do_error.invoke(logging.clj:59)
	at cursive.logging$do_log.invokeStatic(logging.clj:45)
	at cursive.logging$do_log.doInvoke(logging.clj:38)
	at clojure.lang.RestFn.invoke(RestFn.java:464)
	at cursive.repl$print_exception.invokeStatic(repl.clj:152)
	at cursive.repl$print_exception.invoke(repl.clj:150)
	at cursive.repl.nrepl$start$reify__14845$fn__14853.invoke(nrepl.clj:143)
	at cursive.repl.nrepl$start$reify__14845.run(nrepl.clj:140)
	at com.intellij.openapi.application.impl.ApplicationImpl$1.run(ApplicationImpl.java:265)
	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
	at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:668)
	at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:665)
	at java.base/java.security.AccessController.doPrivileged(Native Method)
	at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1.run(Executors.java:665)
	at java.base/java.lang.Thread.run(Thread.java:829)
Unfortunately I can’t paste tests.
#2022-02-1623:27cflemingDoes the name of your test file conflict with another test file in your project?#2022-02-1713:18kwladykano, at least I didn’t catch any#2022-02-1713:59kwladykabut wait, probably you were right. I removed some extra code for debugging purpose and not I don’t have this errror#2022-02-1713:59kwladykathis is huge code base old project#2022-02-1713:59kwladykathank you!#2022-02-1617:38kwladykatests work if run not in cursive#2022-02-1617:39kwladykaalthough it works on another developer computer which use cursive too. I have the newest intellij and cursive stable version#2022-02-1617:40kwladykait is happening in 1 ns, for the specific code, but it is very regular simple code without nothing special.#2022-02-1620:22souenzzoAnyone using cursive in a remote setup? Do REPL's run at local or at remote machine? https://www.jetbrains.com/help/idea/remote-development-starting-page.html#2022-02-1623:27cflemingI don’t do this myself, but I’m also interested to know if anyone has tried this, and how well it worked.#2022-02-1702:01souenzzointellij/idea remote still do not work. tried via local network (wired) and it is too slow.#2022-02-1702:01souenzzoI was not able to enable cursive plugin#2022-02-1702:01souenzzo(because it is too slow)#2022-02-1712:21souenzzoOk @U0567Q30W, now in a fresh morning I did new tests: • Remote intellij works in small projects • I created a new file: deps.edn, it offers to install cursive. Accept & restart • After restart, even simple operations like show files in the project now are too slow/do not work • If i keep trying to use intellij (open menus, reboot ide, etc), it somehow autodisable cursive #2022-02-1712:21souenzzoI would like to send you some logs but I didn't understand where is the logs. The one that I found is from the client, that feels useless.#2022-02-1712:22souenzzoTLDR; you will need to explicitly support remote intellij 😕#2022-02-1712:24souenzzohttps://gist.github.com/souenzzo/ea9ed96ee539ec6d004a840cb7bbe816#2022-02-1712:25souenzzo#2022-02-1712:26souenzzo2022-02-17 09:24:42,106 [ 419019] INFO - e.plugins.DisabledPluginsState - Plugins to disable: [com.cursiveclojure.cursive] #2022-02-1700:36lspectorI have a student whose new IntelliJ/Cursive setup allows him to create a new leiningen project, start a REPL, and evaluate expressions, but all of the symbols in his core.clj are highlighed and there's a message saying that they can't be resolved, or something like that. Also, the auto-indenting doesn't seem to know it's Clojure code, and there is an error message somewhere about a missing python dependency. I'm sorry for the fuzzy details here, but I'm not in front of his machine now.... but is this enough to ring a bell for anyone that might give a hint of what I should tell him to try?#2022-02-1701:17cflemingDoes anything here help? https://cursive-ide.com/userguide/troubleshooting.html#help-lots-of-symbols-don-t-resolve#2022-02-1701:44salamhey, Colin. i’ve been getting this NPE (“Got unexpected exception during formatting ClojureFile”) a lot when editing CLJS files which have namespaces requires as strings (e.g., ["react" :as react]) since i upgraded Cursive to 1.12.2-eap4. judging from the following line, it appears to have something to do with the new Optimize Requires/Imports code: at cursive.inspections.list.ClUnusedRequire.invoke(ListInspections.kt:31)#2022-02-1721:55cflemingThanks, I’ll get that fixed.#2022-02-1707:16jaimeHi, on the title bar, only the last part of the namespace is showing in full s.s.d.views , is there a way to show the full namespace by default?#2022-02-1712:32manutter51Look in Preferences under Languages & Frameworks -> Clojure. The last item under Appearance Options is Editor Tab Style, which will abbreviate namespaces if you select Truncated Namespace, so try one of the other two options.#2022-02-1720:34jaimeAwesome, that did the trick. Thanks a lot!#2022-02-1712:36manutter51By the way, I have my tabs on the right instead of at the top (Preferences -> Editor -> General -> Editor Tabs -> Tab Placement). Better use of space IMO, plus you get more control over the width of the tabs.#2022-02-1720:35jaimeOh nice tip. I don't show tab and nav toolbar though 😅#2022-02-1716:08emccueIDK the right place to ask this, but how can i make a REPL configuration "do what is in my zshrc"#2022-02-1716:09emccue
export PATH=~/.nix-profile/bin:$PATH
nix-shell ~/system/shell.nix
source ~/.lumanu
#2022-02-1716:10emccuewant to source all those environment variables and if possible run within the nix-shell#2022-02-1717:04AJ Jaro@U3JH98J4R Would configuring a Before Launch action that runs an External Tool work for this?#2022-02-1717:04emccueDoes not seem to since source is not an actual program#2022-02-1907:24staypufdCan you use “.” As it is an alias for source… ? #2022-02-1716:18bennyhello, I’m trying to open a gradle project and my source root (src/main/clojure) is not being recognized and I can’t add it via the IntelliJ notification. I continue to get an IDE error:
java.lang.NullPointerException
	at cursive.notifications.SourceRootNotificationProvider$AddSourceRoot.lambda$run$0(SourceRootNotificationProvider.java:119)
	at com.intellij.openapi.roots.ModuleRootModificationUtil.lambda$updateModel$9(ModuleRootModificationUtil.java:135)
	at com.intellij.openapi.roots.ModuleRootModificationUtil.modifyModel(ModuleRootModificationUtil.java:143)
	at com.intellij.openapi.roots.ModuleRootModificationUtil.updateModel(ModuleRootModificationUtil.java:134)
	at cursive.notifications.SourceRootNotificationProvider$AddSourceRoot.run(SourceRootNotificationProvider.java:116)
    ...
#2022-02-1901:13salami don’t think Cursive supports Gradle or even Maven.#2022-02-1716:26bennylooks like my problem might be that my version of gradle (7.x) is not supported#2022-02-1716:32bennyswitched to https://github.com/clojurephant/clojurephant/releases/tag/0.7.0-alpha.1 and it still fails 😕#2022-02-1717:37Ernesto GarciaHi all. I’m having an issue with a Leiningen project that includes Java source files through
:java-source-paths ["src-java"]
When I try to run a configuration that relies on Leiningen to run, I am getting the following IDE error: “Error running ‘REPL dev-site’: Error executing Leiningen configuration.”
#2022-02-1717:38Ernesto GarciaIt seems that Leiningen is not finding Java Runtime, from idea.log
2022-02-17 18:14:14,069 [188710431]  DEBUG - #cursive.deps.DepsShimProvider - Executing deps via CLI, uberjar at /usr/local/Cellar/clojure/1.10.3.822/libexec/clojure-tools-1.10.3.822.jar 
2022-02-17 18:14:16,063 [188712425]  DEBUG -             #cursive.shim.Shim - Creating shim:
Namespaces cursive.leiningen.init, cursive.leiningen.project
Version 2.9.3
Files /Users/ernesto-reify/.lein/self-installs/leiningen-2.9.3-standalone.jar 
2022-02-17 18:14:16,063 [188712425]  DEBUG -             #cursive.shim.Shim - Shim URLs: file:/Users/ernesto-reify/Library/Application%20Support/JetBrains/IdeaIC2021.3/plugins/clojure-plugin/lib/shimdandy-impl-1.2.1.jar, file:/Users/ernesto-reify/Library/Application%20Support/JetBrains/IdeaIC2021.3/plugins/clojure-plugin/lib/cursive-lein-shim.jar, file:/Users/ernesto-reify/.lein/self-installs/leiningen-2.9.3-standalone.jar 
2022-02-17 18:14:16,336 [188712698]  DEBUG - #cursive.deps.DepsShimProvider - Executing deps via CLI, uberjar at /usr/local/Cellar/clojure/1.10.3.822/libexec/clojure-tools-1.10.3.822.jar 
2022-02-17 18:14:20,389 [188716751]   INFO -                         STDERR - The operation couldn't be completed. Unable to locate a Java Runtime. 
2022-02-17 18:14:20,389 [188716751]   INFO -                         STDERR - Please visit  for information on installing Java. 
2022-02-17 18:14:20,389 [188716751]   INFO -                         STDERR -  
2022-02-17 18:14:20,394 [188716756]   WARN -  #cursive.shim.IndicatorBridge - Exit called in Leiningen:
java.lang.RuntimeException: null
 at cursive.leiningen.project$add_standard_hooks_BANG_$fn__2318$fn__2319.invoke (project.clj:515)
    cursive.leiningen.project$add_standard_hooks_BANG_$fn__2318.doInvoke (project.clj:515)
    clojure.lang.RestFn.applyTo (RestFn.java:139)
    clojure.core$apply.invokeStatic (core.clj:667)
    clojure.core$apply.invoke (core.clj:660)
#2022-02-2020:28Mario AngstHi all! I am new to Clojurescript, coming from an R/ Python background. As a long-time PyCharm user I was delighted to find Cursive 🙂 ! Currently working through http://learn-clojurescript.com. I quite like Clojure up until now 🙂! Clojurescript seems to be set up correctly, I can run basically everything up until now from the command line and editing files within IntelliJ. However, I cannot get Cursive to work in a deps.edn project setting. I constantly keep getting the error
Could not create shim: Could not create shim
(stacktrace attached below). I'm IntelliJ IDEA Ultimate 2021.3.2. Cursive is the latest non EA-version. I've tried • downgrading both IntelliJ and the plugin • re-installing IntelliJ while clearing the Cache • running from both Windows and WSL2 (how cool is that by the way) • different SDKs (SDK 11, Temurin, • after finding an earlier thread in here changing something in the Deps setting and hitting apply, does not do anything neither I'd be super grateful for a pointer! Tried other IDEs, but VS Code/ Calva confuses me (though seems to work). Really want to get Cursive to work.
#2022-02-2020:36Mario Angststacktrace:#2022-02-2100:26cflemingI was just looking at this yesterday. Does upgrading tools.deps on the command line help? To prompt Cursive to pick that up, you might need to go to Preferences | Build, Execution, Deployment | Build Tools | Clojure Deps, let it report the version and then hit apply.#2022-02-2108:30Mario Angst@U0567Q30W thanks for looking into this! I upgraded tools.deps.alpha to 0.12.1148 (still new to this but added it to my user.depn and hit clj on the command line and it upgraded) and as you said, when I went to the ... | Clojure Deps menu, the version appeared. Error sadly persists, stacktrace has also not changed 😞#2022-02-2108:51cfleming@U0349822389 Can you try this, please? 1. Open Help-&gt;Diagnostic Tools-&gt;Debug Log Settings. 2. In the box that’s opened, enter #cursive.deps.DepsShimProvider and press Ok. 3. Reproduce the problem. 4. Check your log file from Help-&gt;Show log in Finder/Explorer for lines mentioning DepsShimProvider, and let me know what they say.#2022-02-2108:52cflemingYou should either see a path to an uberjar, or a list of files making up a classpath, probably in your Maven repo.#2022-02-2108:56cfleming@U064X3EF3 Assuming the log entries show Mario using the correct version, any other ideas why this might be happening? This is problem we discussed the other day, but the assumption that the user’s version of deps CLI is out of date looks like it might not be the case.#2022-02-2109:56Mario Angst@U0567Q30W Ok, I've done this. As you said, the line shows a (long) list of files making up the classpath. Start of the latest entry:
2022-02-21 10:51:21,482 [  23976]  DEBUG - #cursive.deps.DepsShimProvider - Executing deps 0.12.1148 directly, classpath C:\Users\Mario\.m2\repository\org\clojure\tools.deps.alpha\0.12.1148\tools.deps.alpha-0.12.1148.jar:C:\Users\Mario\.m2\repository\org\apache\maven\resolver\maven-resolver-api\1.6.3\maven-resolver-api-1.6.3.jar:C:\Users\Mario\.m2\repository\org\ap (...)
As far as I can tell, it's using the correct version?
#2022-02-2113:43Alex Miller (Clojure team)The error is about missing stuff from Clojure 1.10 - can you see what version of Clojure is on that classpath?#2022-02-2115:17Mario AngstIt looks like the version on the classpath is clojure-1.9.0.jar - I am a bit confused because my user deps.edn and my project deps.edn include 1.10.3 (that's also what calling clj in the terminal yields)#2022-02-2115:23Alex Miller (Clojure team)really a question for @U0567Q30W - I don't know how all that shim stuff works. tools.deps.alpha 0.12.1148 depends on Clojure 1.10.3, so not sure how that classpath is being made#2022-02-2115:26Mario AngstThanks - it's a hint. As a hail mary, I've also tried manually deleting the 1.9.0 folder from the maven repository, but then setting the latest clojure deps version in ... | Clojure Deps downloads it again#2022-02-2115:56Mario Angstwhat is interesting is that if I delete 1.9.0 and then launch a fresh project with deps.edn set to the default
{:deps {org.clojure/clojurescript {:mvn/version "1.10.520"}}}
I get an error
Cannot execute - downloaded deps classpath not found:
			C:\Users\Mario\.m2\repository\org\clojure\clojure\1.9.0\clojure-1.9.0.jar
#2022-02-2116:20Mario Angst@U0567Q30W I found a solution! I tried creating a Leiningen project. Upon creating it, the IDE reminded me that there were two Maven repositories Build tools | Maven | Repositories that were not updated (the two remote ones: http://repo.clojars.org and https://repo1.maven.org/maven2). I updated those. Leiningen started working. Then I went back and created a brand new deps project and now everything works.#2022-02-2120:00cflemingI’ll try to figure out where the 1.9.0 could be coming from.#2022-02-2120:00cfleming@U0349822389 Could you DM me or email me the full classpath list from your log? Email is <mailto:/cdn-cgi/l/email-protection|/cdn-cgi/l/email-protection>.#2022-02-2123:35cflemingActually, never mind, I’ve reproduced the problem.#2022-02-2200:09cflemingThis is a problem in deps, https://clojure.atlassian.net/browse/TDEPS-222. I’ll get a workaround into the next build.#2022-02-2209:51cfleming@U0349822389 1.12.2-eap5 is out now, and has a fix for this problem as described here: https://groups.google.com/g/cursive/c/O_oettEjv40/m/agRLYvdBCAAJ. I’m not sure how your previous fix could have worked, but this should do it. You’ll need to switch to using EAPs, see https://cursive-ide.com/userguide/#choosing-to-receive-eap-beta-builds. If you’d rather not use EAPs, then I think just using Deps 0.11.x versions should work. If you want to do that, just go to Preferences | Build, Execution, Deployment | Build Tools | Clojure Deps and configure the version there.#2022-02-2215:25Mario Angst@U0567Q30W sorry for being late, glad you were able to reproduce the problem. looking forward to the EAP. Cursive is amazing!#2022-02-2215:27Mario Angstyeah and for my "fix", that was not really a solution as you suspected, while it led to Cursive being able to proceed a bit further (no shim error anymore and run REPL option appeared on deps.edn), IntelliJ then started to crash building the classpath.#2022-02-2216:03Mario Angst@U0567Q30W happy to report back that after a fresh re-install of IntelliJ + Cursive latest EAP + updating Clojure Deps, everything seems to work fine now.#2022-02-2219:52cflemingGreat!#2022-02-2112:49souenzzoHey @cfleming. Every time that I try to generate stubs I receive this error: I'm using t.d.a. 0.10.895 because: • t.d.a. 0.11.x has a deadlock issue • t.d.a. 0.12.x "fails to create a shim" • using /usr/bin/clojure (mine is 1.10.3.1075 ) fails to generate stubs too, but do not generate ANY error in idea.log https://gist.github.com/souenzzo/5808a677c539bbf353600c1cd38fdd9a#2022-02-2112:50imreStupid question: is cursive still indexing when you try to click generate stubs?#2022-02-2113:01souenzzonope. I already did a lot of things, like leave the IDE idle (any indexing/background process), wait a few minutes (to ensure that there is nothing running), wait, reboot, wait again, then click... always end up in the same error#2022-02-2113:04souenzzothis is just in one (huge) project, with ~50kloc of code, splited in ~20 projects/<sub-project>/deps.edn#2022-02-2113:04imreinvalidate caches dance?#2022-02-2113:04souenzzoin other small/simple projects stubs works#2022-02-2113:05souenzzo@U08BJGV6E I'm asking again because last week I bought a new machine, configured it from scratch (no backup/restore) and I still have the same error 😅#2022-02-2113:05imredamn#2022-02-2113:15imreis it an m2 by any chance?#2022-02-2113:19souenzzoI would like to have some better error reporting on it. I mean, "Error trying to generate stubs for this jar on this project "#2022-02-2113:19imreThat would be helpful, yeah#2022-02-2113:21souenzzoAs I said, this project has ~20 subprojects. I'm sure that is one of these that have a wired (probably, devtime) dependency that makes cursive unhappy In my case, it is more practical to remove this subproject (from cursive indexing/intellij config) and ignore for now Also, know which namespace/jar/project will definitively help to reproduce in another machine and fix the problem#2022-02-2119:06souenzzo@cfleming did you changed anything? I didn't anything updating#2022-02-2119:12souenzzoFixed the missing dep, now
com.intellij.openapi.project.IndexNotReadyException: Please change caller according to com.intellij.openapi.project.IndexNotReadyException documentation
	at com.intellij.openapi.project.IndexNotReadyException.create(IndexNotReadyException.java:67)
	at com.intellij.util.indexing.FileBasedIndexImpl.handleDumbMode(FileBasedIndexImpl.java:852)
	at com.intellij.util.indexing.FileBasedIndexImpl.ensureUpToDate(FileBasedIndexImpl.java:804)
	at com.intellij.util.indexing.FileBasedIndexEx.processExceptions(FileBasedIndexEx.java:244)
#2022-02-2206:23cfleming@U2J4FRT2T No, nothing has changed in that code in a long time. The IndexNotReadyException definitely means that IntelliJ is indexing. Perhaps something is always provoking the indexing as part of the stub creation process? I can’t imagine what it could be, though.#2022-02-2206:45cflemingI’m also about to make a new release of Cursive which patches the problem with t.d.a 0.12.x, so you could also try that. Seems unlikely, though.#2022-02-2206:52cflemingI’ll see about improving that error message to report the module as you suggest, too - thanks.#2022-02-2400:29cfleming@U2J4FRT2T Just to let you know that I haven’t forgotten about this. I’ve pinged JetBrains to get some help diagnosing why your indexing is kicking off, I’m still waiting to hear back.#2022-02-2420:58cflemingOk, you could try this: go to Help | Edit Custom VM options… and add -Dtrace.file.based.index.update=true. For good measure you could also go to Help | Diagnostic Tools | Debug log settings… and add #com.intellij.util.indexing.FileBasedIndexImpl there. Then restart your IDE, and reproduce the problem. Hopefully you’ll see lines in your log from FileBasedIndexImpl, let me know what they look like. If you’d rather send them privately, email me at <mailto:/cdn-cgi/l/email-protection|/cdn-cgi/l/email-protection>.#2022-02-2502:10souenzzo@cfleming I think that I will do it just on next will.#2022-02-2116:33AndreaI might have messed up my IJ/Cursive configuration and can no longer connect to nREPLs started by shadow cljs. When I connect my application logs a bunch of errors similar to the following
Unhandled REPL handler exception processing message {:code (try (clojure.core/cond (clojure.core/resolve (quote cljs.core/*clojurescript-version*)) :cljs (java.lang.System/getProperty "babashka.version") :babashka :else :clj) (catch java.lang.Throwable _ex__17614__auto__ nil)), :id 4b47f473-2c00-449a-9c7e-aeb0b94bc71a, :op eval, :session 0ed152b0-39af-480c-a0cb-638f00598290}
Syntax error macroexpanding at (cider/nrepl/inlined_deps/orchard/v0v9v1/orchard/java/parser.clj:1:1).
	at clojure.lang.Compiler.load(Compiler.java:7665)
	at clojure.lang.RT.loadResourceScript(RT.java:381)
	at clojure.lang.RT.loadResourceScript(RT.java:372)
	at clojure.lang.RT.load(RT.java:459)
	... 
	at java.base/java.lang.Thread.run(Unknown Source)
Caused by: java.lang.ClassNotFoundException: jdk.javadoc.doclet.Doclet
	at java.base/java.net.URLClassLoader.findClass(Unknown Source)
	at clojure.lang.DynamicClassLoader.findClass(DynamicClassLoader.java:69)
is the cider/nrepl path kind of expected in the stack? has this happened to any of you before?
#2022-02-2120:55cflemingNo, that shouldn’t be there. Do you have it in your user deps.edn or project.clj?#2022-02-2210:38AndreaThank you! I’ll dig deeper into how cider/nrepl lands there, it sure injects some middleware that’s causing troubles...#2022-02-2211:13AndreaIndeed, not requiring cider/cider-nrepl 0.26.0 from the alias which I use for starting shadow fixes it. That dependency has been around for a while in the project, but only recently started to make troubles. I’ve always been connecting over shadow nREPL in the past#2022-02-2121:07jasonjcknhttps://mustafaakin.dev/posts/2021-12-08-running-intellij-idea-with-jdk17-for-better-render-performance/#2022-02-2212:59imreset this up, fingers crossed#2022-02-2223:25jasonjcknhaving some stability issues hbu ?#2022-02-2308:21imreNo problems so far but I haven't pushed it too much since setting it up#2022-02-2308:21imre
IntelliJ IDEA 2021.3.2 (Community Edition)
Build #IC-213.6777.52, built on January 28, 2022
Runtime version: 17.0.2+8-b315.1 x86_64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
macOS 12.2.1
GC: G1 Young Generation, G1 Old Generation
Memory: 4096M
Cores: 8
Registry:
    scala.erase.compiler.process.jdk.once=false

Non-Bundled Plugins:
    org.intellij.plugins.hcl (0.7.15)
    net.seesharpsoft.intellij.plugins.csv (2.18.2)
    name.kropp.intellij.makefile (213.5744.224)
    de.thomasrosenau.diffplugin (2.1.8-imrekoszo)
    com.jetbrains.plugins.ini4idea (213.5744.190)
    org.jetbrains.kotlin (213-1.6.10-release-961-IJ6777.52)
    org.jetbrains.idea.grammar (2021.1.2)
    gherkin (213.6461.19)
    dev.monogon.cuelang (0.8.3)
    org.asciidoctor.intellij.asciidoc (0.36.18)
    StringToolsPlugin (4.0)
    String Manipulation (9.2.0)
    Key Promoter X (2021.3)
    mobi.hsz.idea.gitignore (4.3.0)
    com.cursiveclojure.cursive (1.12.2-eap5-2021.3)
    com.github.shinichy.integrant (0.1.1)
    com.github.brcosta.cljstuffplugin (0.6.0)
    EDN-JSON Converter (0.0.5)
    org.intellij.scala (2021.3.18)

Kotlin: 213-1.6.10-release-961-IJ6777.52
#2022-02-2510:32imreIt appears cmd+backtick switching between IJ windows doesn't work with this#2022-03-0618:59jasonjckndo you use vim plugin? i changed all the keymaps#2022-03-0619:41imreI'm not a modal person so not using ideavim. I did change most keybindings though. Cmd+backtick is a macos shortcut however and it works in other apps#2022-02-2201:13onetomis there any issue with naming vars starting with a $ sign? clojure itself doesn't seem to mind it, but cursive underlines them as "no usages found", while others are properly resolved and navigable. eg, in this snippet:
(def $cfg (-> :local api.env/cfg-rmap valuate! remove-nils (dissoc :ssm/params)))
(def $user-email (=> "
$cfg is ok, but both $user-email and $user-ref are marked as Unused global declaration, while $user-ref is clearly using $user-email right away on the next line.
#2022-02-2204:55cflemingI’d have to check, but I have a vague recollection that Cursive might treat those as logic variables, with different symbol resolution.#2022-02-2207:41cflemingNo, I misremembered - that’s only in the context of Clara macros. I’ll try your snippet.#2022-02-2220:41onetomi tried it on 1.12.2-eap5-2022.1 and the problem still persist. i've narrowed it further down; the symbol has to have a dash in it for the problem to manifest. eg, this all resolves nicely:
(def user-email 123)
(def qwe user-email)
[qwe]
then i do a rename refactoring on user-email -> $user-email and this is what i get:
#2022-02-2220:43onetomfunnily enough, i can navigate from the usage to the definition, but not the other way around. this smells like interference of special-case handling logic with something fundamental about symbol indexing.#2022-02-2221:52cflemingThat is super weird.#2022-02-2221:53cflemingI’ll try with all those cases, thanks.#2022-02-2212:52wegiIs there any way to resolve vanilla js functions? For example the .preventDefault function of events and others are not recognized at all.#2022-02-2216:58salamthis is tracked here: https://github.com/cursive-ide/cursive/issues/2076#2022-02-2309:25wegiThank you for the link#2022-02-2214:27AJ JaroWe have a custom CLJS macro called defevent and I’ve resolved that as defn. I’m pretty sure I should then be able to do code navigation when calling that macro however it doesn’t seem to work. It worked previously at some point. Current Plugin Version: 1.12.1-2021.3 Also verified on: 1.12.2-eap5-2021.3#2022-02-2214:33imreI saw similar behaviour today. What ended up working was getting Cursive resolve the macro as def, then when it finished indexing, telling it to resolve as defn again#2022-02-2214:34imre@U0567Q30W could this have anything to do with the recent config structure change?#2022-02-2217:27AJ Jarohuh, thanks for the suggestion @U08BJGV6E!! That worked for me!#2022-02-2220:45onetomi've also noticed something similar a few weeks back. i set a symbol resolution to defn and an hour later i had to set it again.#2022-02-2308:23imreWill see if the issue comes back after yesterday's def/n dance#2022-02-2812:45imrethe workaround I suggested here doesn't appear to stick unfortunately, I opened the project again where I had done this earlier and now I have to do it again#2022-02-2306:31steveb8nQ: I have multi-module project (modules come from deps). I have enabled aliases from the other modules and I can see the libs in the deps panel. when I start the repl, those deps are not available to the compiler and startup fails. is this supposed to work?#2022-02-2320:32cfleminghttps://twitter.com/CursiveIDE/status/1496583065816088577#2022-02-2320:44Alex Miller (Clojure team)Just a reminder that the State of Clojure 2022 survey https://www.surveymonkey.com/r/clojure2022 is open and to make sure you register your use of Cursive (Question #20)#2022-02-2321:20cflemingThanks Alex, I actually haven’t done that myself yet.#2022-02-2422:27Miķelis VindavsHello! I just upgraded Cursive and now namespace references have a different color from symbols. I can’t find which setting controls it under “Color Scheme”. Is this intentional? Is there any way to customize it? Here’s a screenshot of what I mean — before, cljs.core.async would be the same color as /go or /partition respectively.#2022-02-2422:30Miķelis VindavsSorry, it’s not Cursive after all — turns out it was the Clojure Extras plugin which I installed at the same time.#2022-02-2513:33Ivar RefsdalI'm getting com.intellij.execution.ExecutionException: Cannot execute: Command failed when executing /usr/local/bin/clojure whereas in the terminal it gives me:
$ /usr/local/bin/clojure
Clojure 1.10.3
user=> 
Anyone else experiencing this?
#2022-02-2519:25cflemingThere was an error similar to this a while ago, which I thought I had fixed: https://github.com/cursive-ide/cursive/issues/2561. Do you have a JDK configured in your project?#2022-02-2519:31cflemingAlso, could you send the whole stacktrace you’re seeing?#2022-02-2810:07Ivar RefsdalNo, I didn't have a JDK configured. After I added one, it worked#2022-02-2810:07Ivar RefsdalThanks for replying though 🙂#2022-02-2513:35Ivar Refsdal(I'm on a new/fresh install using jetbrains sync, don't know it that matters.)#2022-02-2515:43Ivar RefsdalRight, so I found out that the error message was:
Couldn't find 'java'. Please set JAVA_HOME.
#2022-02-2515:53Ivar RefsdalFor those curious: I installed java using sdkman#2022-02-2816:11isakIs this a bug? I didn't expect the requires aligned when I have this setting on (just indented):#2022-02-2821:03cflemingHmm, could be - ns has some special formatting, and it’s possible that it doesn’t take that setting into account.#2022-03-0104:10kingmobIs there something special I have to do, to get vars resolved in a top-level deps tool file? I have a top-level build.clj file, and build is checked as a “Tool Alias” in the Clojure Deps tool window. Is there more to do to get Cursive to resolve, or is something wrong with my setup?#2022-03-0120:03cflemingI found the way Cursive achieves this to be a little flakey at an IntelliJ level. If you close your project and re-open it, does that fix it?#2022-03-0122:19cfleming(it’s not required to completely shut down the IDE to test this, just close the project, although completely restarting is one way to achieve it).#2022-03-0123:01steffanI've experienced this too, closing and reopening the project (mostly) seems to fix it, and then project seems to stay OK.#2022-03-0123:52cflemingYes, that’s been my experience too. I suspect that it might still be flakey when adding new deps, for example, but I don’t do that often enough to be sure.#2022-03-0200:01cflemingHopefully if it is, reopening the project would help with that too - I expect so.#2022-03-0211:39kingmobClosing/reopening didn’t help. I could try deleting the IDEA files/dirs and reimporting. I’m not sure if it’s related, but it wasn’t even identified as a deps.edn project at first. I was tearing my hair out for a while trying to locate the tools.deps window, but cycling the power fixed that, at least.#2022-03-0211:46kingmobOK, I wiped the IntelliJ files, reimported, toggled checkmarks a bunch, opened and closed several times, and eventually it figured it out.#2022-03-0212:26reefersleepI’m getting “x cannot be resolved” warnings for pretty much all of the symbols in my cljs files. src is marked as sources root, I’ve right clicked on the project.clj and clicked “Add as leiningen project”, and I’ve tried invalidating and restarting.#2022-03-0221:01cflemingCould you look at this list? https://cursive-ide.com/userguide/troubleshooting.html. Sounds like you’ve tried most of it, but looking at the dependencies might give a clue.#2022-03-0808:28reefersleepI’ll do that, thank you 🙂#2022-04-2114:04reefersleepI couldn’t figure out what was wrong - the list of dependencies is really long, so I never really got going checking them. Instead, I tried installing the newest IntelliJ + Cursive, and now, my problem is gone. As always with this type of thing, I’m really bothered that I don’t understand what was wrong and why it appeared seemingly out of nowhere. But life is too short to dwell on that 🙂 Gotta get coding!#2022-03-0212:27reefersleepIt’s extremely distracting! 😞 And I feel like this is probably just some configuration/cache clearing issue, though I have no clue what. I haven’t changed anything recently, that I know of.#2022-03-0212:33imrehave you tried invalidate caches/restart?#2022-03-0212:45reefersleepI did 😞#2022-03-0212:46imre😢#2022-03-0212:48reefersleepIt’s one of my favourite debugging cannons, usually#2022-03-0212:49reefersleepThank you for your suggestion 🙂#2022-03-0212:35manutter51Do you have separate clj/ and cljs/ directories under src/? If so, you might need to mark your cljs/ dir as a sources root.#2022-03-0212:48reefersleepI don’t, but good to know!#2022-03-0212:49reefersleepThank you for the suggestion 🙂#2022-03-0214:38aratarehave you tried checking if you've setup Java Sdk correctly for the project? I've also encountered this several times and usually it could be solved by this.#2022-03-0220:05the-alchemistthis seems like a bug. it says “Run Configuration Error: Script does not exist”, but the run configuration actually runs fine#2022-03-0220:23the-alchemist#2022-03-0223:34staypufdHello group, I'm wondering if anyone has been able to make "Run with Deps" alias to work? I get this error:
class java.lang.Character cannot be cast to class java.lang.String (java.lang.Character and java.lang.String are in module java.base of loader 'bootstrap')
#2022-03-0223:34staypufdThis is the alias I pass in.#2022-03-0223:35staypufdMy Clojure Deps#2022-03-0223:38staypufdOh, I found a bug report for it: https://github.com/cursive-ide/cursive/issues/2617 So I guess it'll be in next update or two...#2022-04-2114:04reefersleepI couldn’t figure out what was wrong - the list of dependencies is really long, so I never really got going checking them. Instead, I tried installing the newest IntelliJ + Cursive, and now, my problem is gone. As always with this type of thing, I’m really bothered that I don’t understand what was wrong and why it appeared seemingly out of nowhere. But life is too short to dwell on that 🙂 Gotta get coding!#2022-03-0306:23EdmundHi all. I decided to give cursive a shot on Windows. Installed the plugin and followed the getting started guide but right out of the box it gives the below error. What could I be missing. I can't seem to find anything on this anywhere. java.lang.RuntimeException: Could not create shim at cursive.shim.ShimProvider.getShim(Shim.kt:148) at cursive.shim.ShimProvider.withShim(Shim.kt:115) at cursive.deps.DepsProjectDetails.doGetDetails(Project.kt:176) at cursive.deps.DepsProjectDetails.doGetDetails(Project.kt:87) at cursive.build.BuildSystemProjectDetails.getProjectDetails(BuildSystem.kt:45) at cursive.build.BuildSystemProjectsManager.reimportAllProjects$lambda-3$lambda-2(BuildSystemManager.kt:149) at cursive.build.BuildSystemUtil$runTask$1$1.run(BuildSystemUtil.kt:83) at com.intellij.openapi.progress.impl.CoreProgressManager.startTask(CoreProgressManager.java:436) at com.intellij.openapi.progress.impl.ProgressManagerImpl.startTask(ProgressManagerImpl.java:120) at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcessWithProgressAsync$5(CoreProgressManager.java:496) at com.intellij.openapi.progress.impl.ProgressRunner.lambda$submit$3(ProgressRunner.java:244) at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$2(CoreProgressManager.java:188) at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$executeProcessUnderProgress$12(CoreProgressManager.java:624) at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:698) at com.intellij.openapi.progress.impl.CoreProgressManager.computeUnderProgress(CoreProgressManager.java:646) at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:623) at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:66) at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:175) at com.intellij.openapi.progress.impl.ProgressRunner.lambda$submit$4(ProgressRunner.java:244) at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1700) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:668) at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:665) at java.base/java.security.AccessController.doPrivileged(Native Method) at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1.run(Executors.java:665) at java.base/java.lang.Thread.run(Thread.java:829) Caused by: java.lang.RuntimeException: Unable to resolve symbol: requiring-resolve in this context, compiling:(clojure/tools/deps/alpha/util/s3_transporter.clj:27:22) at clojure.lang.Compiler.analyze(Compiler.java:6792) at clojure.lang.Compiler.analyze(Compiler.java:6729) ...#2022-03-0306:25cflemingHi Edmund, this is a bug which is fixed in the current EAP (beta) series, the fix hasn’t made its way into a stable build yet. If you don’t mind switching to the EAP builds, you can follow the instructions here: https://cursive-ide.com/userguide/#choosing-to-receive-eap-beta-builds#2022-03-0306:26EdmundHi @U0567Q30W. Thanks a lot 🙏#2022-03-0312:06EdmundStill getting the same issue on the latest EAP versions. Also tried old versions and still got the same issue. Could there be some setting somewhere I'm missing?#2022-03-0317:59steffanIf your project uses deps.edn and you are using the option Settings > Build, Execution, Deployment > Build Tools > Clojure Deps > Use tools.deps directly (as you are seemingly forced to on Windows, as I can't for the life of me figure out the correct Path to clojure command setting for the Use CLI tools option) then I may have the answer for you as I ran into this myself. There was a very recent bugfix in tools.deps which you can pick up by clicking the Refresh button, then selecting the latest (`0.12.1153`), then clicking Download#2022-03-0319:04EdmundI already have that setting and its on the latest version of tools.deps.#2022-03-0320:09cfleming@UR7H0UC0M Sorry, there’s an extra step required, detailed in the release notes of the EAP fixing the bug: https://groups.google.com/g/cursive/c/O_oettEjv40/m/agRLYvdBCAAJ#2022-03-0320:11cflemingApologies for not mentioning it earlier.#2022-03-0419:22potetmOkay got a wild one#2022-03-0419:22potetmthat’s actually legit^#2022-03-0419:22potetmbut f shows as unresolved#2022-03-0419:23potetmproof#2022-03-0419:28Alex Miller (Clojure team)that code should be considered undefined. don't compute things in :or#2022-03-0419:29potetm:feelsbadman:#2022-03-0419:58potetmHonestly, it never occurred to me until today. @alexmiller Is it primarily a semantic breakage or is there a technical limitation as well?#2022-03-0420:07Alex Miller (Clojure team)semantic expectations is what I'm talking about - maps are unordered and you should not expect that :or is necessarily handled here before :as, even though they are lexically ordered#2022-03-0420:07Alex Miller (Clojure team)basically, we have not defined semantics around the ordering, so you shouldn't assume any#2022-03-0510:01tobiasIs there a trick to update the Babashka version seen by Cursive? I've update Babashka with homebrew but somehow Cursive is still seeing the old version of Babshka#2022-03-0510:02tobiasVersion in Cursive REPL:#2022-03-0510:02tobias#2022-03-0510:03tobias... is older than version in terminal#2022-03-0522:32DrLjótssonCan I type hint a js event so that Cursive recognizes for example .stopPropagation?#2022-03-0604:38cflemingUnfortunately no, at the moment. I’m working on some short-term fixes right now so that the complaint is less annoying, and I’m planning some long-term fixes that will hopefully help those symbols to actually work better.#2022-03-0607:17DrLjótssonThanks!#2022-03-0619:01jasonjcknanyone use the vim plugin with cursive, do you know if there’s a way to do key bindings based on the filetype=clojure in ~/.ideavimrc? vim’s autocmd isn’t supported.#2022-03-0721:25seriogaNot possible AFAIK#2022-03-0722:44tawongaYep. Works great in latest versions of the plugin#2022-03-0722:46tawonga
if has('ide')
    if &ide ~=? 'intellij idea'
        ...clojure specific config here
     endif
endif
#2022-03-0722:47tawongaOh, now I see. This works for me as I use Intellij idea for cursive only...may not apply to you#2022-03-0716:52scarytomWhat's the latest on ClojureScript support in Cursive with regards clicking through into 3rd party npm dependencies? I'm using shadow-cljs and currently my require blocks and later references are all yellow. Last I heard this was something that Colin was going to look into, but I'm guessing that's still on the TODO list? Anyone got any workarounds for this?#2022-03-0720:54cflemingRight now I’m working on making the screaming less for JS interop, as well as handling string requires properly. The second part there requires unpicking some very old code for handling ns forms, which was probably some of the first code I ever wrote in Cursive. But I’m hoping both of those fixes will be in the current EAP series.#2022-03-0720:55cflemingAnd I have plans also to try to index JS libs better for better IDE features, but that won’t be in this series.#2022-03-0723:04scarytomfantastic news, thanks#2022-03-0817:28cjsauerIs it possible to add a shadow-only module? I only have a shadow-cljs.edn file, without deps.edn or project.clj. Doesn't seem I can add it as a module though...every var in the project is showing up as undefined...#2022-03-0817:43thhellerhttps://shadow-cljs.github.io/docs/UsersGuide.html#_cursive#2022-03-0817:47cjsauerBrilliant. Thank you so much.#2022-03-1114:27Nom Nom MousseEvery single word is marked as cannot be resolved. What am I doing wrong?#2022-03-1114:30Nom Nom MousseI tried opening the project as project.#2022-03-1114:31Nom Nom Moussehttps://cursive-ide.com/userguide/eap/troubleshooting.html#help-lots-of-symbols-don-t-resolve#2022-03-1114:31souenzzoCheck your "project structure" window at project tab, it should have a JVM defined at sdk at modules, it should have at least one module Are you using project.clj or deps.edn?#2022-03-1114:35Nom Nom MousseIt seems to be fixed by setting a project SDK. Thanks..#2022-03-1114:48Nom Nom MousseIt seems like I can't write start of a parens without inserting a closing parens. Is there a way to turn this off?#2022-03-1114:51Nom Nom Moussehttps://stackoverflow.com/questions/35091783/cant-delete-parenthesis-in-intellij-cursive#2022-03-1116:08imredo have a look at https://cursive-ide.com/userguide/paredit.html - it's an excellent tool to work with a lisp#2022-03-1409:56henryw374I've got 2 repls going. is there a command to focus one, or tab through them or something? google+docs failing me so far. thanks#2022-03-1410:22Ivar RefsdalThere is "Jump to REPL editor" which you can assign to a shortcut. Once focused, you may use alt-left or alt-right to cycle through them#2022-03-1410:23Ivar RefsdalI think the default key for jump to REPL is Ctrl+\#2022-03-1410:42henryw374ooh. alt+left/right. that's what was eluding me. thanks!#2022-03-1505:23indyI might have replaced the alt+left/right. Mind telling which action is triggered to cycle through the REPLs?#2022-03-1510:17Ivar RefsdalIt seems that is Main Menu -> Window -> Editor tabs#2022-03-1510:17Ivar Refsdal(not Cursive per se)#2022-03-1510:18indyPerfect, thank you!#2022-03-1420:38cflemingIf you’re on the 2022.1 EAP and have noticed that Navigate to Keyword and Navigate to Namespace don’t work there, please vote for https://youtrack.jetbrains.com/issue/IDEA-290436.#2022-03-2201:25staypufddone - it's up to twelve votes#2022-03-2208:18cflemingThanks - it’s slated to be fixed in 2022.1, thankfully.#2022-03-1515:19ViktorDoes anyone know if there is a way to show these test result info popups using the keyboard only? (I can only get them to show by hovering over them with the mouse)#2022-03-1515:34Jordan Robinsonlast I checked there was no way but I'm also eager to find out if that's changed since#2022-03-1515:34Jordan Robinsonhopefully someone else has found a way#2022-03-1515:34Jordan Robinsonif I recall you can also click the circle next to the line number#2022-03-1516:26ViktorThanks @UC3B7UJF2. I’ll try to create a ticket#2022-03-1516:27Jordan Robinsonrelated: https://github.com/cursive-ide/cursive/issues/2229#2022-03-1516:33Viktoramazing! upvoted#2022-03-1612:34kennytiltonMacros pulled in from a require are not resolving such that I can jump to their definition. Functions work OK in this regard. Macros do compile fine.
[tiltontec.mxweb.gen-macro
             :refer-macros [audio img input figure p a span div button br]
             :as mxw]
Originally the :as option was not being specified, but I tried it to match the doc example with gloss. No help. The doc says "When the caret is the head symbol of a macro form which is not handling the symbol resolution correctly, you'll see the intention lightbulb near the left margin and you can use ⌥↩️ to customise how that form is interpreted:" but all I get is an option to create a function of the same name. I made it to "Preferences>Languages & Frameworks>Clojure>Symbol Resolution" but that just says "Nothing to show" and offers no "+" button. Is this in fact doable? Thx!
#2022-03-1700:25cflemingHow are those macros defined in tiltontec.mxweb.gen-macro? Is there a (defmacro audio [] ...) there somewhere, or are they autogenerated somehow?#2022-03-1712:22kennytiltonThe macros are auto-generated, by a macro-writing macro. 🙂#2022-03-1720:19cflemingSo that’s the problem - Cursive has no way of knowing what those macros are. For libraries, this is handled by stub generation (https://cursive-ide.com/userguide/macros.html#stub-generation). However this currently only works for specific hard-coded namespaces. I have plans to allow you to specify namespaces which get this treatment, but initially at least they will probably only be from libraries, since the cache invalidation is very complicated otherwise.#2022-03-1812:43gregIs there a way to make correct meander's syntax highlighting?#2022-03-1821:41cflemingThere’s an issue to add support for that, I’ll try to get to that soon: https://github.com/cursive-ide/cursive/issues/2302. In the meantime, you can use “Resolve as: None” as a workaround, see: https://cursive-ide.com/userguide/macros.html#customising-symbol-resolution#2022-03-1912:05SKHow to load a namespace on REPL startup? For example I'd like to silence a few loggers, set up humane-test-output for tests, etc.#2022-03-1923:59AJ JaroCan you include it in your user namespace?#2022-03-2020:36cflemingRight, user.clj is generally the best way to achieve this. Note that humane-test-output interferes with Cursive’s test integration, in case you want to use that.#2022-03-2203:01Mr. SavyI just wanted to stop in and say that I came back to clojure recently and played around a bit with cursive. I was able to get a debugger repl running and play around inside some toy functions and eventually I plan to be more comfortable using a repl driven development style. In the meantime, as a novice, having access the the intellji debugger is a much welcome feature that makes becoming more familiar with the dev enviroment a much smoother process. Thank you for your work @cfleming!#2022-03-2204:14cflemingThanks for the kind words! I’m glad Cursive is helping to make Clojure more accessible for you. That’s one of my major goals.#2022-03-2215:04AJ JaroI’m still periodically getting custom macros that are not resolved like I specified them to be. The work-around here is to resolve as def and then resolve as defn again. It’s like Cursive is losing the context of those custom macros resolutions
Built on: 2022-02-24 09:26
Built from: 1.12.2-eap6-13-g96b19682
#2022-03-2216:42markaddlemanfwiw, I see the same issue. Seemingly randomly cursive (or intellij?) seems to forget custom macros. I resolve the problem by doing the same thing#2022-03-2219:31cflemingAre these in CLJS or just plain CLJ?#2022-03-2219:31markaddlemanCLJ#2022-03-2219:31markaddlemanI have not tried in CLJS#2022-03-2219:37cflemingOk thanks, a few people reported that it was more prevalent in CLJS, but that may have just been chance.#2022-03-2219:38cflemingWhen this occurs, could you check in Preferences | Languages &amp; Frameworks | Clojure | Symbol Resolution and see if the macro in question is still present there in the configuration? It would be interesting to know if it’s failing despite the config being present, or if the config is falling off somehow.#2022-03-2219:46markaddlemanSure. I'll take a look at that next time#2022-03-2221:46cflemingI’d also like to know if this only happens for a single macro at a time, or if it suddenly appears to lose customisations for all macros.#2022-03-2223:53AJ JaroI have this happen in CLJS fairly often. I'll take a look in the preferences area next time around. Thanks!#2022-03-2416:55markaddlemanHere's a case. You'll see that mount's defstate is not resolving correctly#2022-03-2416:55markaddlemanBut it is in the symbol resolution table:#2022-03-2416:56markaddlemanThe meander macros are handled correctly in the same file#2022-03-2416:58AJ JaroYeah, hey! I just had this fail again this morning and am seeing the same thing as @U2845S9KL. It’s not resolving even though it is declared as such#2022-03-2421:12cflemingOk, thanks, that’s helpful. I’ll look to see what might be going on there.#2022-03-2220:50markbastianHey, just tried out the babashka repl in Cursive. Love it! One question, though. When I set environment variables in the run config they don’t seem to be getting set when I call (System/getenv). Is this a bug? E.g.#2022-03-2220:51markbastianThen in the repl:#2022-03-2221:32cflemingHmm, could be, yes. Could you file an issue and I’ll look at that?#2022-03-2221:39markbastianhttps://github.com/cursive-ide/cursive/issues/2670#2022-03-2221:42cflemingThanks, I’ll look at that for the current EAP series.#2022-03-2302:32aratareHi there. I have this piece of code
[{`(foo/bar {:a 1}) [:b/c]}]
where foo/bar is a function that takes in 2 arguments, hence Cursive is throwing an error under foo/bar saying I'm providing 1 instead of 2 arguments. However since the the form is quoted, I'd expect this error to not be there. Is there anyway to achieve this currently in Cursive? Specifically to turn off syntax checking if the form is quoted? Thanks in advance.
#2022-03-2507:22danierouxI am on a quest to get consistent formatting (on command, not automatically) across different editors, again. Most of the codebase is https://tonsky.me/blog/clojurefmt and I have set up Cursive to follow it. Except, that Cursive does not align to :require as it needs to:
(ns user
  (:require
    [dev-server]))
☝️:skin-tone-2:this is what Cursive does. "Non-symbol lists, vectors, maps and sets are aligned with the first element" so I want:
(ns user
  (:require
   [dev-server]))
(a filewatcher that runs cljfmt is not practical, until I can get it compiled under Graal, which is a rabbit hole I don't want to be in simple_smile) (https://calva.io/formatting/#indentation-rules is what we use for Calva)
#2022-03-2508:34cflemingI don’t think so, sorry, that is: https://github.com/cursive-ide/cursive/issues/2665, which I haven’t looked at yet.#2022-03-2523:40jasonjckn@U9E8C7QRJ i’m interested in your quest, if you have any intelliJ XML files and emacs configs that all work together, would be interested in seeing it published here.#2022-03-2608:01cfleming@U0J3J79FE There’s some information here: https://cursive-ide.com/userguide/formatting.html#matching-indentation-to-emacs#2022-03-2700:08cfleming@U9E8C7QRJ I’m sorry, I didn’t read your message carefully enough, and assumed it was the same case as that issue. It’s not, the option you want is “One space list indent”, discussed in the doc I linked.#2022-03-2507:22danierouxIs there any way to get what I want, that I am missing?#2022-03-2620:14SKhi! how can I profile Clojure code via Intellij? I've tried to start a REPL using the intellij profiler, but it pops up a red window saying cannot patch configuration, as described in this ticket: https://github.com/cursive-ide/cursive/issues/2514 . Any hints/tips how to do profiling? thanks!#2022-03-2701:53Oliver GeorgeI'd love cursive to help me write specs for my functions. Infer stuff and generate s/fdef statements... Lift s/asserts to be s/fdefs...#2022-03-3101:26cflemingThere are a bunch of issues at https://github.com/cursive-ide/cursive/search?q=spec&amp;state=open&amp;type=issues, but not one overarching one. I’m kind of torn with spec support at the moment to be honest, since it seems that spec 1 is unofficially deprecated, and who knows how much will carry over to spec 2.#2022-03-3101:33Oliver GeorgeI feel your pain. Perhaps there's some baseline functionality that spans some common functionality provided by things like malli / spec 1...#2022-03-3101:34Oliver GeorgeWhat would give you confidence it's worth the effort to explore? I help form (foment?) a mob...#2022-03-3103:59cflemingI mean, Rich or Alex saying “this is the plan” would help, but even then it’s hard to tell how spec 2 will come out, or when that might happen.#2022-03-3104:13Oliver GeorgeYeah, that's a bit of a sticking point isn't it. They're not fans of committing to roadmaps. Kind of a shame there isn't some kind of inner sanctum for key tool providers to help provide certainty (allowing you to invest effort with more confidence)#2022-03-3104:14Oliver GeorgeAs always, love your work... (but if cursive deletes my [goog.obj :as gobj] statement one more time I may cry)#2022-03-3104:17cflemingUgh, sorry, that’s https://github.com/cursive-ide/cursive/issues/638 which is fixed for the next build, but that is taking a while…#2022-03-2701:53Oliver GeorgeAny chance there's a github issue I can watch?#2022-03-2813:21Nom Nom MousseVim-mode: If I press * over a term I'm used to it searching for the whole term. I.e. pressing * over unconnected-nodes searches for the whole term, not just unconnected. What is this behavior called in IntelliJ? How do I switch 🙂 ?#2022-03-2818:52okworiCtrl+Shift+F on a selected text...#2022-03-2821:44cflemingUnfortunately I don’t use IdeaVim, so I’m not sure about this. The default word-select in Cursive selects the whole symbol, so if IdeaVim is just selecting a segment it’s IdeaVim doing that. I’m not sure if you can configure that, sorry. Perhaps this will help? https://github.com/cursive-ide/cursive/wiki/Mapping-IdeaVim-actions-to-Cursive-actionshttps://github.com/cursive-ide/cursive/wiki/Mapping-IdeaVim-actions-to-Cursive-actions#2022-03-2908:11Ivan FedorovCan I set up columns in let ?
(let [val      1
      name     "Baz"
      fav-meal "carrot"])
#2022-03-2908:33MatiasYes, Settings -> Editor -> Code Style -> Clojure -> General -> Align let-binding values#2022-03-2908:35Ivan Fedorov@U012GHQR89X AWWW! DANKS ❤️bmo#2022-03-3016:26wilkerlucio@cfleming I'm having this strange issue with Resolver ... as... funcionality, in Pathom 3 I use the Guardrails >defn function a lot, and I set cursive to resolve that as defn, but from time to time Cursive seems to forget about that, the setting is still there, but Cursive stops recognizing the symbols defined by >defn, the current fix is being to switch from clojure.core/defn to cljs.core/defn and them things get back (and the reverse once the issue happens again). but this has happened a couple of times already and everytime I close and re-open IntelliJ seems a risk to. Any idea what's may causing this?#2022-03-3016:27wilkerluciojust notice it seems the same as: https://clojurians.slack.com/archives/C0744GXCJ/p1647961488449569#2022-03-3016:57imreAnd https://clojurians.slack.com/archives/C0744GXCJ/p1645540040848229#2022-03-3100:25cflemingYes, I need to investigate that but haven’t got to it yet, sorry.#2022-04-0114:21AJ JaroThis happened again today#2022-04-0108:47Jakub Holý (HolyJak)@cfleming do you have any plans to eventually support the :style/indent metadata (https://github.com/cursive-ide/cursive/issues/1967)? thank you!#2022-04-0121:16cflemingSo I’ve been looking at this recently, with a view to making the Cursive formatting more compatible with cljfmt, particularly. But I don’t like the cljfmt specification much, so I think I’ll support the :style/indent form instead. So, yes is the short answer.#2022-04-0121:37Jakub Holý (HolyJak)Awesome! I hope that cljstyle and cljfmt will also adopt it eventually, with little push / help from the community ...#2022-04-0214:53jeffmkWas told I may have better luck here, so x-posting: > Anyone know of good no-frills guides for getting a minimalist ClojureScript project up and running from scratch, that integrates well with IntelliJ/Cursive? I've been out of the CLJS game for a while and frankly what's out there from my searches is pretty confusing to me. I'd prefer to take a deps.edn and/or shadow-cljs route if feasible. Ultimate goal is to get a Reagent site going, if that changes anything#2022-04-0222:51cflemingI’d recommend just using the Shadow documentation for the initial project setup, it’s what I use for my CLJS projects and it works well. I just use plain Shadow but it’s easy to combine with deps as well if you want to. Thomas is a Cursive user and is super responsive in the #shadow-cljs if you get stuck. Once you have the basic project set up then any Reagent tutorial should do, I think.#2022-04-0305:24jeffmkThanks! I like that approach (avoiding deps.edn), since my current goal is to minimize complexity. I think shadow-cljs pom did the trick for getting Cursive to see Reagent properly#2022-04-0217:52SKhi! how can I profile Clojure code via Intellij? I've tried to start a REPL using the intellij profiler, but it pops up a red window saying cannot patch configuration, as described in this ticket: https://github.com/cursive-ide/cursive/issues/2514 . Any hints/tips how to do profiling? thanks! (sorry for the repeated question, but got absolutely no reaction a week ago)#2022-04-0219:28Ivar RefsdalHi. My advice does not specifically address your question, but may be helpful nonetheless: I recommend clj-async-profiler: https://github.com/clojure-goes-fast/clj-async-profiler Works great, very little hassle. There is also tufte, though you need to manually tell what to profile: https://github.com/ptaoussanis/tufte. Neither is specific to Cursive.#2022-04-0219:34Ivar RefsdalOne small note: "Our" Clojure JVM containers running in the cloud (Azure Container Instances) are not able to use clj-async-profiler due to some kernel restrictions... So there profiling something "live" in production/stage we need to use tufte.#2022-04-0222:52cflemingCursive doesn’t have any explicit functionality for profiling, and I haven’t had a chance to look at that issue, sorry.#2022-04-0310:04SK@U0567Q30W the issue is about allowing the intellij built-in profiler to cooperate with Clojure. Maybe there is only some small issue preventing the start of a cursive REPL with profiling and if that would work, cursive would gain profiling "for free"#2022-04-0310:06SK@UGJE0MM0W thanks! Tufte I've tried but - as you say - manually adding all relevant functions is kind of a hassle. The clj-async-profiler looks good, I'll give it a try! thx#2022-04-0322:23cflemingSure, I understand, I’ll try to look at that to see if it’s an easy fix.#2022-04-0220:46BenjaminCurious if it is possible to use Cursive and Cider at the same time. In particular, is there a way to use the nrepl-refactor middleware with Cursive?#2022-04-0222:53cflemingNo, there isn’t, sorry. Cursive does allow you to define REPL commands which you might be able to hook up to refactor-nrepl, but I’m not aware of anyone having done it, and it’s likely tricky since it expects you to be using middleware.#2022-04-0301:35BenjaminAh okay. I think I've got most of what I was after by starting the nrepl first with Cursive, and then connecting to that repl with Cider. Doesn't have the refactor middeware of course, but by hooking up clojure-lsp I get most of that functionality at the cost of ~ 2GB more RAM. Thank you for Cursive by the way, it has been very helpful! I learned both Clojure and Emacs at the same time. Took a bit to get everything going. I am very impressed with how much Cursive does for you out of the box. Great UX.
#2022-04-0309:45cflemingThanks, I’m glad it’s helping!#2022-04-0314:40kwladykaHow to use Clojure to get hints for java interops? For example in java:#2022-04-0314:41kwladykabut in clj#2022-04-0314:41kwladykaCan I make it to show me the same what in pure Java? It will be so useful.#2022-04-0323:12cflemingYou’re comparing two different things there. One is the completion list for static methods, you can get that like this:#2022-04-0323:12cflemingThat looks pretty similar to me, one thing that is missing is types of fields, I can fix that.#2022-04-0323:13cflemingInstance method completion can be obtained as you show in your example:#2022-04-0323:16cflemingHere’s the equivalent in Java, which also looks pretty similar to me:#2022-04-0323:57cflemingI wrote a bit about what’s required for Cursive to be able to do this completion here: https://clojureverse.org/t/analyzing-java-sources-class-files-using-javaparser-or-javap/8131/22?u=colinfleming. It hasn’t made it into the doc yet, unfortunately.#2022-04-0407:19kwladykaThank you. I have to catch better moment. Just sometimes it shows invalid hints and not show valid. But I don’t know how it works.#2022-04-0407:33cflemingOk, if you see anything invalid I’d definitely like to see it.#2022-04-0422:57kwladykaIs a way to jump to the code .toEpochMilli (.toEpochMilli (first-timestamp-to-sync-db "HNT" "BUSD")) ? If I add type somewhere?#2022-04-0422:57kwladykaalso to show .toEpochMilli as a hint during typing?#2022-04-0509:23cfleming.toEpochMilli needs to know what the type of the receiver is, in this case that’s (first-timestamp-to-sync-db "HNT" "BUSD"). There are two things that need to happen, first-timestamp-to-sync-db needs its return type hinted so that Cursive (and Clojure) knows what type it will return, and then you need to use one of the forms I discuss in the ClojureVerse thread to ensure that the receiver is present when completing the method.#2022-04-0314:42kwladykathis is simple example, but sometimes classes are nested and editor doesn’t help at all#2022-04-0314:44kwladykasometime it works, sometimes not. I am not sure when, but I have constantly issues with this.#2022-04-0411:16AndreaHello Cursivists 👋, I’m trying to connect to an nREPL opened by https://github.com/babashka/nbb (a Node / Babashka interpreter for cljs). I’m launching an nREPL server via nbb (a Node process) and configuring Cursive nREPL connection accordingly, but, launching a repl I’m getting errors like:
Connecting to remote nREPL server...
Error updating completions:
Could not resolve symbol: cursive.repl.runtime/completions
Error getting documentation:
Could not resolve symbol: java.lang.System/getProperty 
in cursive repl console or like
Unable to resolve classname: java.io.PrintWriter
in nbb console. Is it correct to say Cursive always assumes a JVM on the other end of the connection? Can we disable such assumptions via e.g. some configuration in Settings→Languages &amp; Frameworks→Clojure to not eval Java specific code on e.g. connect? Thanks in advance for any advice 🙂
#2022-04-0411:17Andreacc #nbb#2022-04-0420:27cflemingSo Cursive doesn’t assume there’s a JVM, but it does try to detect the server type (e.g. CLJS, Babashka) and falls back to assuming a JVM if it can’t. could you file an issue, and I’ll take a look at what would be needed for nbb.#2022-04-0509:14AndreaThanks a lot 🙂 I opened https://github.com/cursive-ide/cursive/issues/2672.#2022-04-0509:28borkdude@U0567Q30W Thanks for being open to this!#2022-04-0509:29borkdude@U0567Q30W If you need anything, feel free to ping me here or in #nbb#2022-04-0417:55genekimPurely FYI and For Your Amusement: last week, @tony.kay told me about how he uses the IntelliJ vim emulation. I was 🤯🤯🤯 — I’ve often internally lamented in my head about how amazing it’d be to do vi-like things, like navigate, set and use bookmarks with ma, use sed commands like 'a,'bs/abc/xyz/. I’ve been using vim emulation for 48 hours with cursive, and it is 🔥🔥🔥. Not sure I’ll use it all the time and forever, as it does strange things with parinfer — but it’s been amazing to use decades of vi muscle-memory, and do things you can only do in vi. Highly recommended to look at if you ever missed vi.#2022-04-0418:05tony.kayYeah, if you’re going to use vi mode, I highly recommend turning structure OFF, and learning the proper structural editing kb shortcuts (slurp/barf/raise/surround/etc.).#2022-04-0422:48jtthi forget where i got this but this might help some (i haven’t used it extensively b/c i am without a clojure project right now)
""" Cursive-specific stuff
nnoremap J :action :cursive.actions.paredit/forward<CR>
nnoremap K :action :cursive.actions.paredit/backward<CR>

nnoremap H :action :cursive.actions.paredit/barf-forwards<CR>
nnoremap L :action :cursive.actions.paredit/slurp-forwards<CR>

nnoremap m :action :cursive.actions.paredit/move-form-down<CR>
nnoremap M :action :cursive.actions.paredit/move-form-up<CR>

nnoremap z :action :cursive.repl.actions/run-top-sexp<CR>
vnoremap z :action :cursive.repl.actions/run-top-sexp<CR>
#2022-04-0422:49jtthfor your ~/.ideavimrc#2022-04-0714:00Ian FernandezSince yesterday I'm having "Could not create shim: Could not create shim" error#2022-04-0714:24okwori@U9ABG0ERZ use tools.deps 0.13.1168 and the latest eap version of cursive #2022-04-0714:28Ian FernandezIt worked, thanks#2022-04-0714:00Ian Fernandezwith last community IntelliJ version and latest Cursive version#2022-04-0714:01Ian FernandezIs there any better way to debug this?#2022-04-0720:18Ian FernandezIs there any way to use Cursive in IntelliJ remote?#2022-04-0821:46cflemingI haven’t had a chance to look at this, sorry - I don’t know if there’s anything required on the Cursive side.#2022-04-0813:18Nom Nom MousseI have a project I usually start with lein run --my-flag myarg. Is there a way to do the same in Cursive, but also open a REPL connected to the running program?#2022-04-0813:36Nom Nom MousseThe easiest thing was to start the program the usual way and then connecting to it from Cursive.#2022-04-0821:46cflemingYes, this is the best option - start it e.g. in the terminal in IntelliJ or on the command line, and then connect to it using a Remote REPL.#2022-04-1011:42Nom Nom MousseCursive is great, thank you!#2022-04-0818:34AJ JaroWhen running an nREPL with deps.edn, I couldn’t get the :main-opts keyword to be used. Here is the vector for main-opts that I was using which works from the command line ["-e" "(user/reset"]. However, when running this in Cursive, it didn’t execute the function. Is it possible that we aren’t currently respecting that keyword?#2022-04-0819:14imrehttps://github.com/cursive-ide/cursive/issues/2322#2022-04-0819:14imrehttps://github.com/cursive-ide/cursive/issues/2379#2022-04-0819:15imrehttps://github.com/cursive-ide/cursive/issues/2409#2022-04-0820:28AJ JaroHmm, thanks. Apparently it's a known issue for a number of folks. @U0567Q30W I'd love to lend a hand on some of these if you're up for it#2022-04-0904:12cflemingUnfortunately I have jury duty next week, but I’ll look at this as soon as I’m back.#2022-04-1305:13cfleminghttps://github.com/cursive-ide/cursive/issues/2322#issuecomment-1097566491#2022-04-1523:49cflemingFix for this is out in 1.12.3-eap1.#2022-04-0903:40jeffmkAnyone know what could be causing this error when I connect to the nREPL and execute the Load file in REPL command? I have Reagent and React + React DOM installed properly (can Ctrl+Click to drill into each), and it was compiling properly previously. The code works in-browser FWIW:
Syntax error (FileNotFoundException) compiling at (src/foo.app.cljs:1:1).
Could not locate reagent/dom__init.class, reagent/dom.clj or reagent/dom.cljc on classpath.
Code:
(ns 
  (:require [reagent.core :as r]
            [reagent.dom :as rd]))
#2022-04-1407:42Ivar RefsdalSounds like you are missing piggieback / did not start figwheel/whatnot properly. That is Cursive/nrepl is in JVM-mode, and not ClojureScript/browser land...#2022-04-0922:25Oliver GeorgeRefactor thought. It would be nice to have an IntelliJ action for transforming the selection by passing it to a random clojure fn. (heh, probably the origin of emacs right there!). Needs to handle multicursor to be transformative for me. Examples I'd use it for today: • make a statement one line (replace \s+ with " ") • call "name" on a keyword to use the name for a def statement (avoids differences between :this/one and ::two) #2022-04-1004:11BenjaminPart of why I use emacs is precisely for this kind of thing. Well, that, and structural editing with Symex, Avy, custom jump-list functionality, magit, (Hmm, this list is getting long), etc. However, there are some times where neither lsp or cider can help you much. IE. Being able to set a break point in some lib's code, or pause on exception. That is where Cursive has been invaluable to me. Also, I'm still pretty new to Emacs, so sometimes if I can't figure something out in Emacs and can't justify the time I would need to figure it out, it's Cursive with it's intuitive UX to the rescue.#2022-04-0922:27Oliver GeorgeToday I use the string manipulation plugin heavily. With this I'd have a non restrictive alternative...#2022-04-0922:29Oliver GeorgePerhaps it could grow to allow a preconfigured list.#2022-04-1116:57genekimI had to install IntelliJ again, because, in a moment of supreme lack of judgement, tried modifying its startup JVM args to use G1GC — and managed to make the app no longer start on macOS. Not recommended. 🙂 But the amazing upside? I updated to latest version, and saw this magic happen in Cursive — ability to detect out of date deps, and right-click ability to update to latest!! Wow!!! So awesome!#2022-04-1117:06markaddlemanBe aware: There are times when IntelliJ produces different results than AntQ https://github.com/liquidz/antq#2022-04-1117:06markaddlemanI think this happens on non-semver version ids#2022-04-1117:13R.A. PorterIn future, you could also manually edit IntelliJ\ IDEA.app.vmoptions. It's deep in $HOME/Library... (path depends on your IJ version).#2022-04-1120:40salamactually, the recent versions of IntelliJ IDEA already use G1 GC: https://github.com/JetBrains/intellij-community/commit/edf1c0593e4a4655a0eeda2302f8089e155c8f8c#2022-04-1121:16genekimWOW! @UDCGPTV9R: Confirmed that it’s running on my laptop as well! I can’t wait to see to what extent it fixes the “spinning ball” issues that have mildly bothered me for years. @U01GXCWSRMW. (I did indeed try to modify the vmoptions file back, but I had somehow hopelessly screwed up my config. Reinstall was painless, though.)#2022-04-1201:08cfleming@U6VPZS1EK Also, check the Dependencies toolwindow, where you can just update everything in one go.#2022-04-1117:39pezI'd like to ask a Cursivist for a favor. This issue https://github.com/PEZ/rn-rf-shadow/issues/34. Would be great if some experienced Cursive user tried this and can figure out if the README instructions need to be corrected or if something else could be the cause. The price is golden stars in heaven, as we say in Swedish. (Meaning I will be super grateful for the help!)#2022-04-1200:52cflemingI’ll try this out this afternoon, since I’d like to try RN anyway.#2022-04-1214:13Ian FernandezCursive is not being found on plugins at (IntelliJ IDEA 2022.1 (Community Edition) Build #IC-221.5080.210, built on April 12, 2022) when I'm searching, is there any reason for it?#2022-04-1216:38Chris LoweI just walked into this one by updating the IDE as soon as the notification popped up. I’ve installed the most recent EAP version for now: https://plugins.jetbrains.com/plugin/8090-cursive/versions/eap#2022-04-1301:32cflemingCursive 1.12.2 is out now, sorry for the confusion.#2022-04-1305:48Chris Lowethank you#2022-04-1222:31markbastianIs there way to make (read-line) work in a babashka REPL in Cursive?#2022-04-1301:27cfleminghttps://twitter.com/CursiveIDE/status/1514052238246744064#2022-04-1306:55kingmobHi Colin, I have a couple Babashka integration issues I’m running into. 1. I use the EnvFile plugin to share a .env file between direnv and the IntelliJ Run/Debug configs. It works just fine with a normal clojure repl, but the EnvFile tab is missing from the BB REPL. Is there something different about the BB REPL that could be changed, e.g. like in https://github.com/cursive-ide/cursive/issues/2160? 2. Minor note: I have a scripts/ dir and place BB scripts in it, I get lots of complaints about “Namespace name does not correspond to filesystem hierarchy”. Nothing seems to make it go away, neither renaming, nor marking scripts as a sources root.#2022-04-1407:55cflemingCould you file issues for those, and I’ll look at them?#2022-04-1508:51kingmobOK, it’s https://github.com/cursive-ide/cursive/issues/2677 . I took a closer look at the second one, and I think it’s a clj-kondo error, not Cursive.#2022-04-1407:12Nom Nom MousseI am unable to mark a file as a babashka script unless it is in the class path it seems. I'd like to put bb scripts in ≤myproject>/bb/file.bb.#2022-04-1407:14Nom Nom MousseOr perhaps it is because the script file does not end with clj#2022-04-1407:15Nom Nom MousseYes, the script had to have the extension .clj#2022-04-1407:53cflemingYes, that action will only work on Clojure files, I think you can mark individual files with a file type in IntelliJ, but I haven’t tested that to see if it would work.#2022-04-1500:17tony.kayRunning Cursive 1.12.2-2021-3 and I’m seeing a new, somewhat annoying behavior: If a ns is required twice with different options (unfortunately happens frequently), then Cursive is now ignoring the first one completely. E.g.
(:require
  [a :refer [b]]
  [a :as A])
results in b being shown as undefined in the source, even though this works fine in Clojure and was fine in prior versions of Cursive. Is there a setting or something I accidentally changed?
#2022-04-1500:18cflemingHmm, I’ll check that, thanks. The ns parsing did change in the latest version, I have a couple of things to fix. I’ll get a new version out ASAP.#2022-04-1500:28tony.kay:thumbsup:#2022-04-1500:29tony.kayhopefully on the road to a “refactor -> Move function to new ns” that works with CLJC? 😄#2022-04-1500:29cflemingYes, that’s all hopefully coming soon after the new NS rewriting stuff is complete - that was the major missing piece.#2022-04-1500:30cflemingBTW is there a reason that you can’t combine the two of those into one require?#2022-04-1500:35tony.kaynone at all…it’s one of those things where other ppl on the team don’t check for it, and auto-fix a missing alias and accidentally dupe a require#2022-04-1500:36tony.kayso there are hundreds of files in this work project where that has happened, and now with this cursive release I suddenly have LOTs of error indicators and an inability to jump to the things without first patching all these ns decls. I’m personally one of those guys that sorts the nses so I can easily see dupes…but not everyone is so…meticulous 😄#2022-04-1501:17cflemingSo you’d be happy for optimise imports to fix that up?#2022-04-1508:53tony.kayAssuming it doesn't break things in cljc files, and doesn't remove unused automatically... Yes that would be swell. The other problem though is that sometimes there are two requires that alias to different names... So conflict resolution would have to pick one and refactor the uses of the other.#2022-04-1509:16cflemingSo you might have something like (:require [abc :as a] [abc :as b]) with uses of both a/something and b/something?#2022-04-1515:44tony.kayYep. Unfortunately#2022-04-1521:06cflemingAnd that used to work in Cursive? I’m genuinely surprised!#2022-04-1522:15cfleminghttps://github.com/cursive-ide/cursive/issues/2678#2022-04-1523:48cflemingFix for this is out in 1.12.3-eap1.#2022-04-1500:23Björn EbbinghausSo… Macros defining symbols don't work any more… They are flagged as "cannot be resolved". I have warnings all over my code, won't get autocompletion or navigation to symbols. And if I use only symbols defined by these macros, that namespace gets flagged as an "unused require" and deleted by "optimize imports". I had this problem in the past a few times, that the Quick Fix "Resolve as…" didn't do anything. (see https://github.com/cursive-ide/cursive/issues/2640 ) I just invalidated caches and restarted, and it didn't do anything. Any hints what's going on?#2022-04-1500:24Björn Ebbinghaus1.12.2-2022.1 with IntelliJ 2022.1#2022-04-1500:24cflemingSorry for the hassle, can you give me an example of something that’s failing? Are these macros which you have used “Resolve as…” with?#2022-04-1500:36Björn EbbinghausSymbols defined by`mount.core/defstate` in my own project. Symbols defined by com.fulcrologic.guardrails/>defn in a dependency, in my project or even defined in the same file. I don't seem to get autocompletion for macros, when in a CLJS file, in general. But once I type it out manually, I can navigate to the symbol.#2022-04-1500:46aratare@U4VT24ZM3 So I also had this problem. And I found that if I resolve it as something else, then resolve back to the original then my code is happy again. Perhaps you can try the same?#2022-04-1500:46Björn EbbinghausI have the following entry in my ClojureProjectResolveSettings.xml:
<item key="com.fulcrologic.guardrails.core/>defn" resolves-as="clojure.core/defn" />
I removed that line from the config, and used the Quick Fix Menu to add it again. Now the problem is gone for things defined by >defn I did the same for defstate. Just removing and readding the line to the file manually didn't seem to work. Using the Quick Fix did work, but the defstate line is not back in the file.
#2022-04-1500:47aratareSo for >defn I tried resolving it to def then back to defn and it's happy. Same for pretty much all other macros I use.#2022-04-1500:48Björn Ebbinghaus@U013F1Q1R7G Yes. Something like that seemed to help...#2022-04-1500:49Björn EbbinghausWeird… As I did reindex and invalidated caches and reloaded deps, a few times and nothing seems to fix it…#2022-04-1500:51aratareYeah this one is a bit persistent. I tried all of them, and even removing .idea and reimport the entire project, still nothing could fix it.#2022-04-1500:54Björn EbbinghausOh, no… it is broken again, for defstate. Maybe it was still indexing when I looked before…#2022-04-1500:55Björn EbbinghausI have to look into this tomorrow. It's way too late for this..#2022-04-1501:34cflemingSeveral people have mentioned that symbols that they have customised with Resolve as… sometimes lose their customisation. Usually changing the customisation and then changing it back will fix it, but I’ve never heard anyone saying it is that persistent. Unfortunately I’ve never managed to reproduce it since it seems to be a transient problem. I’ll pick over the code and see if I can figure it out.#2022-04-1501:36aratare@U0567Q30W sorry I don’t mean “persistent” in the sense that it happens all the time. I mean that it survives even between cache invalidation.#2022-04-1501:37cflemingYes, it doesn’t seem to be a problem with the caches. It’s a really weird problem, since the config seems to remain in place. I can’t think of anything that would make it sporadic.#2022-04-1501:41aratareIt is indeed very weird since it happens at random and I can’t figure out what triggers it, e.g. whether I’ve made a booboo somewhere. I just had the entire project filled with “cannot resolve” errors a few days ago and it happened out of nowhere, i.e. everything was perfectly fine the previous day.#2022-04-1501:42aratareRe-resolving all the macros is my current workaround, and luckily it only happens every blue moon so not that big of deal. Just the amount of macros I have to go through each time is a bit problematic 😅#2022-04-1501:43cflemingJust to be clear, does it suddenly happen to a lot of macros at once?#2022-04-1501:45aratareYep. I have things like mount’s defstate, fulcro’s defresolver or defmutation (just to name a few) and suddenly they all started throwing errors#2022-04-1501:46cflemingDoes restarting the IDE help? Just in case you tried that.#2022-04-1501:49aratareSo I tried restarting the IDEA, invalidating the cache, refreshing deps via the Clojure Deps tool, removing the project and reimporting it again, hard removing the project (remove .idea) and reimporting it#2022-04-1501:49aratareRe-resolve was my last resort (more like last hoorah 😂), and it worked#2022-04-1501:49cflemingThat’s…. a comprehensive list of attempts 🙂#2022-04-1501:49cflemingThat is really weird.#2022-04-1501:50aratareThat’s why I said “persistent” because it somehow survives all those 😅#2022-04-1501:50cflemingI think that qualifies for the “persistent” tag.#2022-04-1501:53aratare👍:skin-tone-3:#2022-04-1519:26Björn Ebbinghaus@U0567Q30W When I started IntelliJ again today, the marcos were not resolved again.#2022-04-1521:16cflemingUgh, sorry… I’m going to look at that today.#2022-04-1606:27aratare@U0567Q30W I'm seeing the same behaviour as @U4VT24ZM3 today, even after re-resolving yesterday. I'm not sure what I did aside from simply closing Cursive last night.#2022-04-1606:28aratareI'm throwing out a wild (and uneducated) guess here, but could be something to do with how Cursive is caching these resolutions?#2022-04-1606:29aratareI think this has been mentioned before, but this behaviour has only appeared after the latest Cursive update.#2022-04-1911:27wilkerlucioIME it usually happens when I restart the IDE here, closing all and open again, and the problem comes back#2022-04-1917:51xcenoSo, I want to add that I used to fix this issue by just re-resolving, but I can't even resolve as... anymore. The quick-tip doesn't show and the action also isn't available in the action-list. I tried this with the latest IntelliJ and the current cursive EAP, but I had this problem with Intellij 2021.3.3 and curisve 1.12.1 already. But it seems you guys are all still able to re-resolve stuff?#2022-04-1920:40cfleming@U012ADU90SW Someone else reported this yesterday on the mailing list, I’ll look at that today.#2022-04-1920:53wilkerluciohope you can find the cause soon @U0567Q30W, this one is being a big bummer, will be great to have it fixed, please let me know if there is any data/dumps that may help you figure it out#2022-04-1921:43cfleming@U066U8JQJ Yeah, this one is a pain, I’m sorry. I have an idea of how to fix it, I’ll try it this morning and get a dev build out so people can test it. I worked with aratare the other day who was kind enough to debug for me, and I can’t find anything wrong 😕#2022-04-2005:40cflemingHas everyone suffering from this bug only experienced it on IntelliJ 2022.1? Did anyone ever experience it on 2021.3?#2022-04-2005:43aratareI remember updating to some newer version of Cursive on 2021.3, can’t remember if it has started happening then. It’s only when I upgraded to 2022.1 that I start noticing this problem. But it could be just me not paying attention closely enough previously.#2022-04-2005:44cflemingYeah, with sporadic problems it can be really hard to tell. But this code hasn’t changed in a long time, so I suspect some platform change is causing it. But I’m really struggling to imagine what it might be.#2022-04-2005:45cflemingI have seen some indexing weirdness under 2022.1, so I suspect there might be an underlying bug there, but there’s obviously something on the Cursive side too since the resolve customisation bit is all Cursive.#2022-04-2005:46cflemingcc @U08BJGV6E @UGMAVSMUM I think you guys were getting this too. Any idea if it ever happened on 2021.3?#2022-04-2005:47aratare@U0567Q30W If it’s not too urgent, I can downgrade back to 2021.3 later today and give it a spin#2022-04-2005:48cfleming@U013F1Q1R7G Thanks, I’d appreciate that. No urgency, apart from the fact that the bug sucks, of course 🙂. I’m going to go through the Pathom tutorials this evening, since for whatever reason it seems to happen a lot with Pathom.#2022-04-2005:48cflemingHopefully I can reproduce it.#2022-04-2007:37imre@U0567Q30W I had it on 2021.3 yes. I think the issue started appearing around the time there was some sort of a config schema change for Cursive#2022-04-2007:39cfleming@U08BJGV6E This one, maybe? https://groups.google.com/g/cursive/c/wiquZ0Ex_6k/m/7C84MEo8AQAJ#2022-04-2007:39imreyeah, that's the one#2022-04-2007:40cflemingHmm. I’ll look at the changes there, but I don’t think they have anything to do with the customisation code.#2022-04-2007:40imreI also noticed that if I try to persist code style settings to the project, they wouldn't be used the next time I load the project#2022-04-2007:41imrebut I hadn't used that before said release so wouldn't know if it had been working earlier#2022-04-2007:41cflemingReally? I’ll look at that.#2022-04-2007:41imreso, say, I generally want to align map values but for some projects I don't#2022-04-2007:43cflemingRight, so you’d set formatting to the Project scheme, but that doesn’t get persisted?#2022-04-2007:44imreLet me do a repro on what exactly I see there#2022-04-2007:44cflemingThanks.#2022-04-2007:56cflemingSo I can’t see how that change could have had anything to do with this problem. That change and this problem don’t have any intersecting code at all.#2022-04-2007:58imreIt is still strange that these are all issues with project-wide settings, which started appearing after a change to how settings are stored#2022-04-2007:58imreI'll open a new issue for the code style one#2022-04-2007:58cflemingRight. But the settings are stored differently (the resolution customisation and the formatting config).#2022-04-2007:59cflemingThat’s why I asked about the IntelliJ version, I was wondering if something had changed in the platform that might have affected config storage somehow.#2022-04-2008:00imreI'm still on 2021.3.3 btw with latest cursive eap#2022-04-2008:00cflemingAnd you’re also seeing the resolution customisation problem?#2022-04-2008:00imreyes#2022-04-2008:00imresince about the release you linked#2022-04-2008:01imresee here for the earliest report of the issue that I know of: https://clojurians.slack.com/archives/C0744GXCJ/p1645540040848229#2022-04-2008:01cfleming@U013F1Q1R7G No need to downgrade, thanks 🙂#2022-04-2008:01cflemingAh, thanks I was looking for that one.#2022-04-2008:01cflemingSo that is prior to the config change.#2022-04-2008:02imrethe config change was sometime in January, no?#2022-04-2008:02cflemingYes, but AJ wasn’t on that build, the change was in 1.12.2-eap2.#2022-04-2008:03imreoh gotcha#2022-04-2008:03imresilly me assuming everyone else would be running latest eap all the time 😅#2022-04-2008:04xceno> Has everyone suffering from this bug only experienced it on IntelliJ 2022.1? Did anyone ever experience it on 2021.3? Yes. Cursive hasn't lost the resolution settings in a while, but I was unable to resolve as... for at least a few months. Yesterday I upgraded to the latest intellij and downgraded again to 2021.3. That's when all resolutions didn't work anymore. The settings are still there, they just have no effect. Afterwards I upgraded to the latest cursive eap, but to no avail. If there's any data dump or anything I can help with, let me know#2022-04-2008:04cflemingYes, the Resolve as… thing is also really strange. I’ll think about data to dump, thanks. I tried with aratare the other day and everything was hunky-dory.#2022-04-2008:07imre@U0567Q30W https://github.com/cursive-ide/cursive/issues/2681#2022-04-2009:17xcenoOkay, so here's a small update. The embarrassing part first: I somehow disabled the resolve action in Preferences->Editor->Intentions and because I use the Intellij Settings-Sync, of course it got disabled on all my machines and versions, that's why I thought it's a bug :man-facepalming: TBH, I didn't even realize that disabling Intentions was possible. Anyway: I re-enabled the resolve action and then re-resolved everything. I also re-started and disabled/enabled various other plugins several times. There was one instance where cursive lost the resolutions again: cursive ok -> clojure extras enabled -> lost resolves But I couldn't reproduce it. Now I've got cursive and clj-extras enabled and re-started Intellij several times to make sure, but everything seems fine for now. Intellij 2021.3 + cursive 1.12.3-eap1#2022-04-2014:09Björn Ebbinghaus@U0567Q30W The "Resolve as" intention is missing entirely if the symbol couldn't be resolved because it was defined in a macro. This is also the case, if the symbol in question is defined in a library. So not only I have to "resolve as" my own symbols, but symbols in libraries as well. Maybe Cursive should be more "trustful". Warn about an unresolved symbol, but assume that it is a real symbol. State now is that if Cursive can't resolve the symbol, it is like it doesn't exist. :requires are marked as "unused" and removed by optimize import, and you can't resolve that symbol as something else… This makes the whole situation just worse. To a point where I can't really use Cursive for now, except if I keep it running all the time, or I have to resolve everything again.#2022-04-2014:28Björn EbbinghausI think false-negatives would be more forgiving than false-positives.#2022-04-2105:31cfleming@U4VT24ZM3 I agree that swapping out false positives for negatives is a better solution, but it’s not always easy unfortunately. I think I can make the Resolve as… intention more robust in that case, and also the import optimisation. I’ll look at that now.#2022-04-2105:53cfleminghttps://github.com/cursive-ide/cursive/issues/2682#2022-04-2115:04tony.kayI got it to start working again by reverting to Nov 29th (install plugin from disk) release of Cursive on 2021.3.2. I did not notice this issue until I updated Cursive past that version of Cursive, if it is any help.#2022-04-2115:39Björn EbbinghausThat seems to be the only way for me to use Cursive for now… 😞 @U0567Q30W Is it possible to provide a version 1.12.1 for IntelliJ 2022.1? And: How about a fallback to the clj-condo config for symbol resolution?#2022-04-2115:45imre> fallback to the clj-condo config for symbol resolution While this would be super nice to have, don't think it would be particularly easy to support. kondo's config mechanism is rather advanced with hooks and imported configs, so to be sure you'd have to invoke it as a tool to get correct info.#2022-04-2115:48Björn Ebbinghaus@U08BJGV6E As a fallback, you would just have to read the :lint-as map in the config.edn#2022-04-2115:49Björn EbbinghausThis could even serve as a way to prepopulate the resole settings when importing a new project with existing clj-kondo config.#2022-04-2115:49imreThat only work as far as you have a :lint-as map there. Not if you use :config-paths which refer to configs that have their own :lint-as maps and so on#2022-04-2115:50Björn EbbinghausStill better than nothing. 🙂#2022-04-2115:53Björn EbbinghausAnd even with :config-paths clj-kondo already copies them into the .clj-kondo folder. Wouldn't be so hard to read all configs and merge the :lint-asmaps.#2022-04-2116:09imreAs someone being on the receiving end of "shouldn't be so hard" assumptions, I'm generally cautious in that regard.#2022-04-2116:26Björn Ebbinghaus@U08BJGV6E Being cautious with such assumptions is good. 👍 But maybe we are talking about different things? I don't propose supporting custom hooks for symbols. Just the plain symbol->symbol resolution. Supporting custom hooks is hard, but reading some .edn files could be as simple as:
(defn get-lint-as [path-to-config]
  (if-let [config (edn/read-string (slurp path-to-config))]
    (let [{:keys [config-paths lint-as] :or {config-paths [],  lint-as {}}} config]
      (->> config-paths
        (pmap (fn [config-path] (get-lint-as (str ".clj-kondo/" config-path "/config.edn"))))
        (reduce merge lint-as)))
    {}))

(get-lint-as ".clj-kondo/config.edn")
#2022-04-2116:29Björn EbbinghausJust for completeness:
(defn lint-as->cursive-resolve-settings [lint-as-map]
  (xml/emit
    {:tag :project
     :attrs {:verison 4}
     :content
     [{:tag :component 
       :attrs {:name "ClojureProjectResolveSettings"}
       :content
       (conj
         (for [[k resolve-as] lint-as-map]
           {:tag :item 
            :attrs {:key (str k) :resolve-as (str resolve-as)}})
         {:tag :currentScheme
          :content ["PROJECT"]})}]}))

(lint-as->cursive-resolve-settings (get-lint-as ".clj-kondo/config.edn"))
This would emit the config usable for Cursive. (minus the HTML character escaping)
#2022-04-2117:29imreI could imagine this as a repl command even#2022-04-2118:30imreWhat I'm cautious about is that as you said this is far from complete. In the project I'm on right now it wouldn't help due to significant use of imported configs and hooks. But if this becomes a feature in cursive, it will have to be maintained and extended as people start depending on it and that's always a burden. That being said, I'd love config sharing between kondo and cursive.#2022-04-2121:04cfleming@U4VT24ZM3 Unfortunately the first report of this error used Cursive 1.12.1, so even that version is not immune.#2022-04-2121:08cflemingre: taking config from clj-kondo, I’ve been looking at something similar for cljfmt, too. IntelliJ doesn’t make it easy to update the config dynamically when the file changes unfortunately, but there is some prior art there (EditorConfig) so I can look at how that works. However, I’m not convinced it will help in this case. I did some debugging with aratare the other day and his config was correct, both in the editor and in memory, so 🤷 I really have absolutely no idea what is happening with this one, and I can’t reproduce it no matter what I do. I’m going to prepare some more debugging to try today.#2022-04-2201:13aratare@U0567Q30W One thing I haven’t tried is to pull down the repo from GH into a different place and import it into IntelliJ (so hard hard reimport). I’ll try this later today, and if the bug is present then perhaps you can try it on your machine.#2022-04-2203:20cfleming@U013F1Q1R7G Thanks, I’d be interested to know. I was planning to get a copy of your repo and try it out.#2022-04-2212:30cflemingJust to let everyone on this thread know that there is an EAP release out (1.12.3-eap2) which I’m hoping fixes this issue.#2022-04-2212:36Björn EbbinghausAt the first look it seems to work. 👍:skin-tone-2: The only unresolved symbols are the usual JavaScript stuff.#2022-04-2212:37cflemingFantastic! Thanks for letting me know. I’m going to work on the JavaScript stuff next as part of ClojureDart support.#2022-04-2212:39Björn EbbinghausAnd reader conditionals in ns, but that is another, less critical problem.#2022-04-2212:40cflemingI’m interested to hear about that one, but perhaps in another thread (or issue) to keep this one on topic.#2022-04-2416:54wilkerlucio@U0567Q30W have been testing here and so far its working as expected! 😄#2022-04-2423:03cfleming@U066U8JQJ Great, thanks for letting me know, that’s great news!#2022-05-2620:22genekimFWIW, I was having this problem of >defn functions not showing up in the Structure window — it was fixed after upgrading Cursive version. 🎉#2022-04-1517:21markaddlemanI'd like to script a few IntelliJ tasks but the existing scripting languages are unpalatable. Can I use Clojure(script) to orchestrate IntelliJ?#2022-04-1521:21cflemingSo there is a type of IDE console, and at one point it did actually support Clojure, which is why Clojure-Kit is a thing. But it never seemed very official or very well documented, and I never managed to figure it out. There’s also just been a plugin developers’ webcast about dynamically modifying the IDE which I haven’t had time to watch yet.#2022-04-1521:22cflemingAll this is to say, there isn’t a great option at the moment. What sort of things do you want to script?#2022-04-1521:26cflemingActually, it is documented: https://www.jetbrains.com/help/idea/ide-scripting-console.html#2022-04-1521:28cflemingAccording to this: https://gist.github.com/gregsh/b7ef2e4ebbc4c4c11ee9, you can use this: https://plugins.jetbrains.com/plugin/12469-intellij-scripting-clojure to use Clojure#2022-04-1521:39markaddlemanI've got a really simple thing that I want to automate. We manage our tasks using Jira. When I pick up new work, I use IntelliJ's "switch task" to create a new work context and automatically create a branch. Then, I manually create a new "repl" file which serves as the experimentation and testing namespace for the work. I copy the repl file from a read-only repl.clj file and then I rename the new repl file as repl-<jira ticket>.clj. It's a very simple workflow but it would be convenient to automate it.#2022-04-1521:40markaddlemanI'll take a look at the scripting console. I'm sure this could easily be done in one of the existing, supported languages but I'm a curmudgeon when it comes to learning new languages 🙂#2022-04-1523:48cfleminghttps://twitter.com/CursiveIDE/status/1515114283436474368#2022-04-1602:23kennytiltonSo I am starting to explore porting Matrix to #clojuredart and wondering how to get IJ/Cursive to handle the *.cljd file type. I added that to the editor clojure filetypes and that is working great. Is there some way I can also get .cljd supported when creating a new file or renaming one?#2022-04-1605:56cflemingUnfortunately not, although you should be able to manually create a file with any name, you just won’t be able to use New Namespace to do it. I’ll add this basic support for the next EAP and look into better support integrating with the Dart plugin ASAP.#2022-04-1606:06cfleminghttps://github.com/cursive-ide/cursive/issues/2679#2022-04-1616:47armedHello, everyone. Updated to 1.12.3-eap1 few moments ago, but fn arity bug still persists. Or maybe I misconfigured something? Attaching minimal example.#2022-04-1902:54armed
(defprotocol Fly
  "A simple protocol for flying"
  (fly [this] "Method to fly"))

(defrecord Bird [name species]
  Fly
  (fly [this] (str (:name this) " flies...")))
#2022-04-1916:57BayeHi, Can somebody help or point me to a clear resource on how to (1) set up a reagent project in cursive and (2) git clone a reagent project and have it working on Cursive. My main issue is: after I successfully set up a reagent project via the command line (or git clone), when I open on Cursive, the reagent package is not recognized and in the case of the cloning even the .core file is not recognized (see pic below). Thanks#2022-04-2000:17cfleming@U01BDCAV7NZ dvingo’s answer in the main channel is for you. Either you move the deps into deps.edn, or you get Shadow to generate a pom as described in the Shadow doc.#2022-04-1917:09BayeAnd below after git cloning#2022-04-1921:31dvingothings to check: • set an SDK (JDK) project settings -> project -> SDK • deps aliases are active (View -> Tool Windows -> Clojure Deps -> enable the appropriate checkbox) and click refresh ohh now I see you don't have a deps.edn file or project.clj or pom.xml -> cursive doesn't know how to deal with just a shadow project#2022-04-1921:32dvingoshadow can generate a pom for you, but you may have a better time using deps.edn file (just move all the deps in the shadow-cljs.edn file to deps.edn and add :deps true to shadow)#2022-04-2007:18thhellersee https://shadow-cljs.github.io/docs/UsersGuide.html#_cursive no need to switch to deps.edn unless you really want to#2022-04-2013:14BayeHi, Thanks all for your time. Set an SDK (JDK) project settings -> project -> SDK This setting does not exist in Cursive version I have (IntelliJ Ultimate Paid)...but a proper SDK is already set up for the project • deps aliases are active (View -> Tool Windows -> Clojure Deps Clojure Deps does NOT show up View -&gt; Tool Windows -&gt; see https://shadow-cljs.github.io/docs/UsersGuide.html#_cursive no need to switch to deps.edn unless you really want to
shadow-cljs pom does not run on Terminal (intelliJ)
Now all of this maybe due to the fact I am a newbie...for that I apologize but my problem is still NOT resolved. Interestingly though the reagent app is running OK on the browser: ONLY issue I cannot find how to run the any REPL
#2022-04-2013:15thhellerdid you follow the steps from the docs? I mean create the a new project from existing sources? fixing an incorrectly setup project is much harder than just creating a new one from scratch#2022-04-2013:16thhellerand what "does not run" mean?#2022-04-2013:44BayeI tried to follow this but does not work#2022-04-2013:46BayeAlso for a normal clojure project, I run the REPL by find an option after right-clocking on the project.core file...for a reagent project I cannot find where to run the REPL anywhere#2022-04-2014:04thheller@sowsoule what does "does not work" mean? was the project created successfully? did you follow the rest of the instructions?#2022-04-2014:04thheller> You can run npx shadow-cljs server inside the Terminal provided by IntelliJ and use Clojure REPL → Remote Run Configuration to connect to the provided nREPL server. Just select the "Use port from nREPL file" option in Cursive Clojure REPL → Remote or configure a fixed nREPL port if you prefer.#2022-04-2019:47Baye> creating the pom file was not working with the cloned project, but works now with the new proejct I created. Thanks again. However, i am still not sure how to run the repl. I don't understand the following instruction: "lojure REPL → Remote Run Configuration to connect to the provided nREPL server. Just select the "Use port from nREPL file" option in Cursive Clojure REPL → Remote ". I don't how to open the repl server port. Second, and my main issue, how do you open the clojure repl, so that if I want to evaluate code and see output in the repl (not the browser)? Appreciate your patience with me.#2022-04-2015:03joshkhmy IntelliJ is stuck “Synchronizing Clojure Deps project”. i’m sorry if this has been answered before.. i found a few archived Slack chats but no solution. any ideas? so far i’ve tried invalidating my cache and restarting. • IntelliJ Build #IC-221.5080.210, built on April 12, 2022 • Cursive 1.12.2-2022.1#2022-04-2015:06joshkhi’ve also tried right click deps.edn > Refresh Clojure Deps Project, but the background task gets stuck at Stopping - Synchronizing Clojure Deps Project#2022-04-2105:25cfleming@U0H46T23C When this is happening, could you take a thread dump and mail it to me at <mailto:/cdn-cgi/l/email-protection|/cdn-cgi/l/email-protection>? Instructions are here: https://intellij-support.jetbrains.com/hc/en-us/articles/206544899-Getting-a-thread-dump-when-IDE-hangs-and-doesn-t-respond#2022-04-2020:52tony.kaySo the ns parsing is better on the latest EAP, but the indexing of resolved macros seems all hosed. When I tell it to “resolve as” something it seems to not reindex (possibly because I already had told it that resolution before, but it was no longer doing it). Is anyone else experiencing these kinds of “unresolved symbol” warnings in the IDE even though you’ve set the resolution for the macro in question? I’m going to try to invalidate caches and restart, but it has been weird ever since the change to the ns parsing in Cursive.#2022-04-2022:11markaddlemanThe work around us to resolve as something else (I choose none) and then resolve as th coreext definition#2022-04-2022:13tony.kayYeah, for now I just reverted to the Nov 29th version. That one works as expected. I’ll wait till this stabilizes 🙂#2022-04-2101:02aratarethere’s an entire thread about this issue https://clojurians.slack.com/archives/C0744GXCJ/p1649982190489009#2022-04-2101:02arataretl;dr is it’s still WIP#2022-04-2105:20cfleming@U0CKQ19AQ Yes, this is something I’m working on at the moment. The issue has been present for a while, it definitely predates the ns parsing stuff, but for some reason it seems to be getting more frequent recently. I still suspect changes in IntelliJ rather than changes in Cursive, since there’s very little code involved on the Cursive side, and most of it hasn’t changed in a long time.#2022-04-2115:00tony.kayI’ll keep an eye out. The Nov 29th release definitely works well for me in 2021.3.2#2022-04-2023:45qmrwDoes anyone know if it's possible to get a history (preferably with vi keys) in the nREPL input section?#2022-04-2107:38cflemingTools | REPL | Search REPL History#2022-04-2115:03kennyCan you open a REPL using a project's Tool Aliases?#2022-04-2122:15cflemingUnfortunately not at the moment, but I want to fix that in this EAP series: https://github.com/cursive-ide/cursive/issues/2653. But I’m working on the symbol resolution issue at the moment.#2022-04-2122:30cflemingI have filed this issue for the symbol resolution bug that’s been plaguing you all recently: https://github.com/cursive-ide/cursive/issues/2683. If the description is missing anything, please let me know.#2022-04-2122:31cflemingIf anyone is suffering from that, has a project which currently exhibits the problem and has a few minutes to spare to debug the problem, please DM me.#2022-04-2211:59cfleminghttps://twitter.com/CursiveIDE/status/1517473008872755200 (hopefully 🎉, but I’ll wait for feedback before officially proclaiming it)#2022-04-2212:03imreGood man Colin, this is super later for you there#2022-04-2212:04cflemingYep, I’ll be off to bed shortly 🙂#2022-04-2212:04imrelet me give it a quick try#2022-04-2212:04imre(you don't have to wait for it lol)#2022-04-2212:04cflemingHaha, I’ll be here for a little bit anyway#2022-04-2212:07imreWas it something stupid that broke it?#2022-04-2212:09cflemingIt’s an extremely weird one. I can’t figure out how it ever worked at all. And I’ve trawled through the history of all the related files, and nothing changed in them recently. So I’m still not sure that I’ve fixed it, although the thing I fixed was definitely broken.#2022-04-2212:09imreWow. Was it resolution-related or settings-management related?#2022-04-2212:13imreI installed this from disk, loaded up a project that showed this problem before and had my symbols resolved properly, so the first try succeeded#2022-04-2212:13cflemingIt was a confusing combination of the two. When the settings for the resolution customisations are loaded, there’s a map which wasn’t being initialised, which goes from the short name (e.g. defmutation) to a set of vars which have that short name (e.g Pathom’s defmutation, Fulcro’s defmutation, and any others you might have configured). That short name cache was correctly initialised for all the built in extensions, but not for the customisations, which is why they didn’t work. However, that code has been like that forever, so I don’t know how the customisations (at least the ones relating to indexing, e.g. resolve as def/defn) ever worked at all.#2022-04-2212:14cflemingRe-customising did set that cache correctly, but that would have been lost on every restart. So this should have lost everyone’s customisations on every restart, which clearly wasn’t happening.#2022-04-2212:14cflemingGreat news!#2022-04-2212:15cflemingSo, there’s something I still don’t understand, which is frustrating.#2022-04-2212:21imrewow that does sound weird#2022-04-2212:21imreI'll keep trying and let you know#2022-04-2212:21imreif I see any more issues#2022-04-2212:22cflemingThere are definitely some IntelliJ indexing bugs in there too, probably in 2022.1 since I haven’t seen them previously. The IDE would occasionally just stop resolving anything at all, and e.g. not find any namespaces to navigate to. That’s definitely a platform issue, but I’ll just have to hope they can fix that, I don’t have enough for a coherent bug report yet.#2022-04-2212:22cflemingGreat, thanks.#2022-04-2213:06aratareupgrading now#2022-04-2213:12aratare@U0567Q30W Can confirm it's no longer throwing errors and all ops (navigate, quick doc, etc.) are looking fine.#2022-04-2213:12cflemingThat is definitely 🎉#2022-04-2213:16aratareJust wanna say, really appreciate you staying up late trying to get this fixed 🙂#2022-04-2213:17cflemingNo problem! I am very glad to hopefully have it fixed.#2022-04-2315:47AJ JaroYes, thank you! I'll pull this in and check it out but I certainly appreciate the efforts here as well#2022-04-2322:08cflemingNo problem, I’m sorry this has been painful for so long.#2022-04-2411:08Oliver GeorgeIs it my imagination or does Introduce Variable not work for anonymous functions?#2022-04-2411:10Oliver GeorgeAs quick example, lets say I'd like the callback function to be a variable defined in a let#2022-04-2413:11jaimeHi, is anyone using juxt edge? How do you connect to repl for projects created using bin/app acme/blog --cljs --sass? I'm getting error when running the (go)
Connecting to local nREPL server...
Clojure 1.10.1
nREPL server started on port 59979 on host localhost - 
(dev)
(go)
[Edge] Loading Clojure code, please wait...
[Edge] Enter (go) to start the dev system
=> #object[clojure.lang.Namespace 0x7d4ecdf7 "dev"]
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by clojure.lang.InjectedInvoker/0x00000008000cb840 (file:/Users/jaime/.m2/repository/org/clojure/clojure/1.10.1/clojure-1.10.1.jar) to method com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl.parse(org.xml.sax.InputSource,org.xml.sax.HandlerBase)
WARNING: Please consider reporting this to the maintainers of clojure.lang.InjectedInvoker/0x00000008000cb840
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
Execution error (FileNotFoundException) at java.io.FileInputStream/open0 (FileInputStream.java:-2).
{:libs /private/var/folders/3c/61nb7g9x0vnfbn6nnzmjk5f40000gn/T/libfile12425.libs} (No such file or directory)
#2022-04-2416:58genekimMight be slightly off-topic, but this seemed like a good place to post my question: Over the past couple of months, I had the opportunity to pair with Eric Normand and Tudor Girba, a lifelong Smalltalker, who developed Glamorous Toolkit, and incredibly ambitious offshoot from Pharo, to enable what he calls "moldable development" — which I would describe as the desire to push interactivity into the earliest and every stage of development. It has been (and continues to be) a wild learning adventure, but one of the most startling things about programming in the Pharo/GT image (development and runtime environment) was how exceptions are handled. All the stories of the birth of test-driven development are true! You send a message to an object that doesn't yet have a handler for it, the debugger comes up with the "exception", you write the handler, and then you click a button to resume running! It was a mind-blowing experience — and it was funny to hear them yell at me to not close the debugging window when that happened, and to instead fix the code there, and resume. Repeat enough times, and you've built out the entire program, without even having to ever restart the program from the beginning! Is anything resembling this even remotely possible in Clojure on JVM? At the earliest stages of my Clojure journey in 2016, I remember watching the earliest videos from @cfleming on how Cursive can leverage the IntelliJ debugger, etc. Upon reflection, it seems to me that one of the magical elements of Clojure and REPL is the ability stay inside the running program, and fully explore/leverage/change the dynamic runtime environment. The one place where that falls apart is when exceptions are thrown —  It seems like it would be magical if somehow the REPL state could halt at the point of an exception being thrown, see the complete state of program, even change it, rewind the program counter to before the exception is thrown, and resume. Is this already possible with Cursive and IntelliJ debugger? (Sorry for not completely thought through post — but this has been a wondering of mine for months...). Thank you!#2022-04-2417:06Alex Miller (Clojure team)I imagine you could combine something like https://github.com/IGJoshua/farolero with a custom restart handler#2022-04-2418:36genekimHi, @U064X3EF3 — hope you're doing well! I had listened to @U5NCUG8NR on defn podcast, and had cursorily studied Farolero, but didn't have enough expertise to asses to what extent it could support this type of working style. So this is super helpful! If I hear you correctly, the exception handlers could be potentially modified to support a "restart the read / eval" loop from the specified point... Joshua, is there a better channel to have this discussion — otherwise, maybe we could continue the discussion in this thread? PS: Your episode on defn was fabulous and mind expanding on many fronts. I had no idea such human created languages existed outside of Esperanto, etc.!#2022-04-2420:04Joshua SuskaloWell we do have #farolero. There's a good portion of this style of development that can happen when using farolero, but unfortunately without getting into rewriting bytecode at runtime or the other sorts of magic that IntelliJ and others do for debugging Java code, or without e.g. a fork of Clojure that's built with something like this from the ground up, you can't get farolero quite to the level of these other languages. That is, this style of debugging is well-supported. You run your code, an error hits, program execution halts, you have a full repl, fix the problem, continue as if nothing went wrong. However, exceptions are a sticky business and I can't realistically catch them at their source like I would need to when providing this sort of experience, so libraries (like the Clojure compiler with exceptions on unresolved vars) that already throw exceptions can only be wrapped in a way to provide partial explicit support for this sort of development. That said, I do have underway some experiments like nrepl integration and more that will hopefully get Clojure as close to the likes of Common Lisp and Smalltalk as possible.#2022-04-2420:26Alex Miller (Clojure team)with Java agents, you can hot replace loaded bytecode#2022-04-2420:26Alex Miller (Clojure team)I'm not saying that any of that path is easy of course :)#2022-04-2420:27Joshua SuskaloAh, that's good to know! I need to look into that at some point, I might consider making an extension library for farolero that is able to hijack some of the errors at the bottom of Clojure. Definitely don't want to that to be a part of the main library.#2022-04-2421:03genekim@U5NCUG8NR This is so cool — I'm going to try farolero for a bunch of scenarios, including exceptions. I've never used the Java debugger before in Cursive, but I'll give that a try, too. (I mentioned that I had watched @cfleming's earliest video on Cursive which highlighted the debugger, but this was so long ago, I didn't even have a basis to understand what he was showing.) Alas, I'm during a peak busyness period right now, so it may be a couple of weeks. Joshua: maybe after 4 weeks, could we perhaps get on a call? I'd love to better understand the problems that seem important to you, and see if there's any areas that I could help with. (Compilers were my area of study in graduate school, and some of my worst memories involved using hardware debuggers on Win 3.1 to implement multicast network protocols, with no memory protection, etc.) After having seen what is possible in Smalltalk, suddenly this area seems so ripe for resurrecting in the Clojure context. Thx!#2022-04-2421:06genekim@U064X3EF3 Super interesting. Any chance you could send me a URL on hot reloading code for Java agents? I'm not even sure I'm googling for the right thing... :) #2022-04-2421:08Joshua SuskaloI'm always happy to talk with other Clojurians about just about anything. I'm definitely willing to schedule a call at some point. Just let me know when you'll be more free so we can schedule something then.#2022-04-2421:22Alex Miller (Clojure team)It's the Java Instrumentation API - you use the Java Attach API to do dynamic loading with a ClassFileTransfomer#2022-04-2421:24Alex Miller (Clojure team)https://docs.oracle.com/en/java/javase/17/docs/api/java.instrument/java/lang/instrument/Instrumentation.html#2022-04-2421:32genekimThanks, Alex — just read this: https://technology.amis.nl/software-development/java/java-agent-rewrite-java-code-at-runtime-using-javassist/ The mind reels at the possibilities. 😀. Thanks for sending this — literally had no idea this type of things were possible in the JVM. (And starting to realize why and how so many PhD dissertations were done on/around/on top of the JVM.) (Until now, I was thinking that some of the topics above could only be done in an interpreted environment, such as interpreted Java on TruffleVM [Espresso]. But I think you're suggesting that things like this make the JVM might be sufficiently dynamic.)#2022-04-2421:35genekim(Colin: jaw is on the floor, watching in your video how easy it is to start a "debug REPL." I'm going to try that tonight.)#2022-04-2500:08cflemingYes, if you’re using the debugger, I don’t think you need agents, you can just reload a class using JDPI. I’ve been meaning to improve Cursive’s debugger support for a while now, it has some annoying bugs that have crept in as the IntelliJ platform has improved, and there’s a lot more good stuff that could be done (e.g. a debug REPL for when the process is stopped at a breakpoint, breaking when vars are called, etc). But breaking on an exception is by far my most-used feature, and AFAIK you can’t really replicate that in any good way except with the debugger.#2022-04-2500:11cflemingI’d also love to integrate with the stream debugger for seqs and transducers: https://www.jetbrains.com/help/idea/analyze-java-stream-operations.html#2022-04-2500:12Joshua SuskaloRight, if I want to integrate something like this into farolero I can't leverage intellij unfortunately, as it has to be editor-agnostic, and ideally even work over terminal-based repl with no additional dependencies#2022-04-2500:13cflemingYes, and it’s tricky since the JVM has to be started in debug mode, and you then need an external debugging process to control that.#2022-04-2500:14cflemingIf it’s something that is designed to work from e.g. a REPL client that’s probably ok, but if farolero is something that just works in any Clojure process, then that’s much harder.#2022-04-2500:15cfleming@U6VPZS1EK I’m jealous though, Glamorous Toolkit is really a fantastic system. I’ve been meaning to sit down and learn it well enough to try to do something with it, but since that means learning a new language, ecosystem, editor, and way of working, the bar to entry is high enough that I’ve never actually done it.#2022-04-2500:15cflemingI’ve been watching it from a distance for a while now though.#2022-04-2500:16cflemingI saw a demo of someone working with Pharo at Curry On, it was pretty amazing.#2022-04-2500:29genekim@cfleming I finally re-watched your video from 2015 on Debugging in IntelliJ/Cursive, and my head literally exploded numerous times. When you showed how you can “drop frame,” which basically pops the stack, and program state is now from before you called the function. And seeing how all local variables have values rendered in the editor. 🤯 I’m blown away by this black magic / sorcery!! This is incredible!! (Colin, this was the video that made me decide in 2016 to use Cursive, which has been utterly wonderful. In hindsight, I see only grokked about 5% of what you were presenting. This is mind-expanding to see what is possible.) https://youtu.be/ql77RwhcCK0#2022-04-2500:32cfleming@U6VPZS1EK Yeah, I think that frequently you need some decent amount of time feeling the pain before the solution makes sense! The same is true of Clojure itself I think - I’ve had the experience of trying to explain the benefits of immutability to someone who can program but it’s not their main thing (my stepfather, who’s a mathematician and has programmed for ages, but always hacking stuff together in the service of something else). He really was skeptical, until he tried to program some christmas lights on a RPi using multithreaded Python - after a couple of months he at least appreciated what I was talking about 🙂#2022-04-2500:33genekimI’m sitting down to try a debug REPL for the first time ever — I’m thinking I might get almost everything I hoped for just by using the IntelliJ debugger. Half-joking: it reminds me of this video, where this woman discovers a way to do something that has involved so much toil, and you can see the anguish on her face, part joy, and even angry/resentment, realizing how much time she’s wasted. It’s priceless. In my case, it’s all joy and delight — because there is no flipping way I could have used a debugger effectively until now. 🙂 https://twitter.com/cabel/status/1296213351479930880#2022-04-2500:34cflemingI should warn you, there are some frustrating bugs that have worked their way in over time, and I think they’re due to changes in the platform. I’ve been meaning to fix them for ages, and you might have just prompted me to do it!#2022-04-2500:37genekimPS: I did almost cry when you described that you’re working inside of IntelliJ, “which is millions of lines of Java code”, and your characterization of it being at times bewildering, and that was even before it was rearchitected to be a platform for other languages/IDEs, resulting in some crazy situations. But it’s amazing that Cursive can leverage all of that R&D effort. I have a very clear notion of what I want to get out of the experience: a way to deal with exceptions besides looking at stack traces and restarting the program — I’m excited by what I see!#2022-04-2500:38cflemingYes, things have changed a lot, and JetBrains (to their credit) have done a huge amount to make plugin development easier compared to how it used to be. And to think - people developed plugins even before IntelliJ was open source! The mind truly boggles.#2022-04-2500:39cflemingGoing back to the debugger, personally I think that even if nothing else at all works, just being able to break on exceptions is worth the price of entry.#2022-04-2500:39cfleming(the rest is nice too, of course)#2022-04-2500:40cflemingThere is still a huge amount of stuff in the JVM debugger that I’m sure I could leverage, if only I knew it was there, or how it worked. I have plenty of Julia moments still to come, I’m sure!#2022-04-2500:41genekimHoly crap — I feel a little like that woman in Photoshop video. It only takes one menu click to start a Debug REPL?!? The REPL just… started…. Holy crap. Stand by — I’ve gotta see what happens when an exception is thrown…. OMG…#2022-04-2500:42genekim#2022-04-2500:50genekimOMG. Ability to navigate the call stack, and then see the exact line of code where the exception was thrown. I’m actually tearing up… Thank you, Colin!!!!
#2022-04-2500:51genekimSeriously, is there a reason not to run Debug REPL mode all the time?!?#2022-04-2500:51Joshua SuskaloI would imagine it has some pretty significant performance implications#2022-04-2500:52Joshua Suskalosince the JIT can't work anywhere near as hard, if it works at all. I don't know how IntelliJ does it, but it's entirely possible it's falling back on bytecode interpretation all the time in debug mode.#2022-04-2500:52cflemingIt’s actually not too bad, and depends on what you’re doing. When I’m developing Cursive, I pretty much always run it in debug mode.#2022-04-2500:52Joshua SuskaloThat's good to know#2022-04-2500:53cflemingNo, it’s not bytecode interpretation. This is a built-in JVM feature, not something that IntelliJ implements.#2022-04-2500:54cflemingWhat I do find is that sometimes the JVM can get into a funky state, that happens from time to time, so I do end up restarting more often when debugging.#2022-04-2500:54Joshua SuskaloAh, I see#2022-04-2500:55cflemingSorry, I mixed up my acronyms there, JDPA is the platform bit, and JDI is the interface you would almost certainly use to it: https://www.baeldung.com/java-debug-interface#2022-04-2500:56cflemingBut the JVM is actually very efficient at debugging. I wouldn’t want to run my prod systems in debug mode, but for development it’s a no-brainer IMO.#2022-04-2501:00genekimHoly cow. I’m seeing the local vars in the editor. Seeing if I can change that b to (inc b), and rerun that division operation…#2022-04-2501:01genekimOh, no… I can’t do that, because there’s no running JVM to recompile the JVM bytecode, when I reload the namespace, is that right, @cfleming?#2022-04-2501:02genekimI.e., I can’t just reload this namespace, “drop frame”, and resume program, correct?#2022-04-2501:03cflemingWell, the JVM is paused, correct. That’s what I mean when I talk about a debug REPL, it would be a REPL that would evaluate code over the debug interface rather than the REPL interface, since the REPL isn’t currently listening.#2022-04-2501:04cflemingThere’s some UI trickiness to work out there, since a REPL is a single conceptual context, and the debugger is really lots of them. What I mean by that is that you can evaluate expressions at any level in the stack frame, and in each one your locals etc are different.#2022-04-2501:05cflemingSo I’m not 100% sure how to expose that to the user. You might want to be able to evaluate REPL commands ten levels down in your stacktrace to see what was going on at that time.#2022-04-2501:10genekimSorry — lots of neurons firing right now. What you’re describing would be amazing — like, brainmelting amazing, right? I feel like I need to think about what would be most useful before I even opine on this — can I share with you some excerpts of the Glamorous Toolkit sessions, to frame some of the aha moments that even led to asking about the debugger? I think it may trigger some thoughts on what people are talking about when they gush about what’s been lost in the post Smalltalk era. (I’ve been working on a blog post to try to articulate and share these aha moments behind GT, membrane, cljfx, and ultimately Fulcro and RAD. I think it’s be around 8K words.)#2022-04-2501:12genekimIn the meantime, thanks for helping me understand the power of the debugger — I know this will change the way I problem solve issues. As you said, “hammocks are good,” but in many situations, “debuggers are better,” because you can actually see what you’re doing!#2022-04-2501:15genekimColin, I’d recommend watching at the 20m mark in this video — you can see how quickly Tudor is able to get tweet images displayed inside GT, something difficult (impossible?) to do in typical IDE — which is why I use Portal so rabidly now, as well as Clerk. I’ll try to find the video where they keep yelling at me to stop closing the Pharo debugger! 🙂#2022-04-2501:15genekimhttps://twitter.com/RealGeneKim/status/1469389359249956869#2022-04-2501:29cflemingYes, I’m always interested in understanding how other systems work! I’ll take a look at that in a minute, BRB#2022-04-2501:33cflemingOne thing I have considered is whether to just let people open a REPL on their Cursive instance (which is just a JVM instance, after all) and go wild. The risk is that you bork your IDE terribly and have to restart, but it opens up more possibilities in terms of using the same UI for the editor and the app, which both Smalltalk and Common Lisp systems tend to do. Unfortunately it also does mean that you can’t debug, though.#2022-04-2501:35genekim(PS: Armed with my newfound ability to write UIs quickly using Fulcro, I have all Zoom recordings in XTDB… I’m searching for my Zoom sessions w/Eric and Tudor, so I can upload them to YouTube. Finding these recordings are such a pain w/o something like it!)#2022-04-2501:39aratareSurprisingly I feel like I don’t ever use debug mode in Cursive because of how tight the feedback loop is, i.e. an exception thrown can be handled by just a simple workspace reload away. To the point where I always forget to use debug mode when working with Java.#2022-04-2501:40aratareBeing able to code handler on the fly sounds really amazing but I struggle to see how useful it is, or may be that’s just because I haven’t seen it in action yet#2022-04-2502:07cfleming@U6VPZS1EK I think I’m going to have to go through those videos when I have more time, and probably try to replicate them myself in GT. Just watching them without the background of what is going on, I feel like I miss a lot without understanding the basics, and those videos are pretty long to catch up 🙂#2022-04-2502:09cflemingUnfortunately their getting started doc is pretty much “Here’s how you open your IDE, have at it!” which isn’t really enough to get started, as a curious bystander.#2022-04-2502:10genekimNo worries at all — I’ll send you 2 or 3 more selected excerpts which I think you’ll find interesting. Sorry they’re not edited down, they don’t have much background. I do put in a tweet a summary. I’ll send those your way, as well. (And you’ll definitely see the rough edges around GT — it was tough sledding at times, esp for Eric, who seemed to step on every landmine there was. 🙂#2022-04-2502:11genekimOnly watch if it gives you joy. 🙂 I will try to narrow down 10m that I think would be of specific interest w.r.t our discussion above! (In next couple of days.)#2022-04-2502:11cflemingThanks, I’d definitely be interested to see them. Are you aware of any good getting-started resources, apart from getting personally tutored by the creator? 🙂#2022-04-2502:11cfleming(that looks like a great way to do it BTW)#2022-05-0719:46phronmophobicAs food for thought, making the feedback loop more granular can, in some ways, be better than an imperative debugger. Especially with a functional language like clojure, you get all the incremental feedback, but without having to manually step because functions are pure and time isn't an input. I'm not sure how to best integrate side effects, but it's unclear if the "debugger approach" handles including side effects gracefully either.#2022-05-0903:12genekimWhat sorcery are you potentially unleashing unto the world, @U7RJTCH6J ?!? That's utterly wild. I'm not even sure what I'm looking at, but it's amazing!! 🤯🤯 Written in membrane? And some sort of container for ns forms, with live evaluation? Tell us more!!!#2022-05-1320:29genekim@U7RJTCH6J Are you going to ever tell us what magic you’re working on, that you’re showing us above? 🙂#2022-05-1321:28phronmophobicI've been reluctant to share because I haven't thought of a cool name for the project. I'm working on a pure clojure, coding environment. Some of the goals are: • strong support for direct manipulation • create programs incrementally and reduce burden on your working memory • run everything local and in-process • leverage the full capabilities of jvm clojure and ecosystem • make the leap from text editing to code editing It's still a work in progress. I gave a short demo at one of the visual tools meetings: https://youtu.be/tse4gKFj45c?t=2585#2022-05-1417:20genekim@U7RJTCH6J Holy cow. That is freaking incredible!! I feel like you are definitely onto something amazing. This moment blew my mind, when you talked about feeling like this is one level closer to your code, than even being in the REPL. “Imagine not being able to work in a REPL. That's how I'm starting to feel about working in this environment, if i has to go back to a regular REPL.” And to do it all within your membrane environment, inside the JVM. No browser. It's really 🤯🔥#2022-04-2510:20BayeHi. How do you open IntelliJ on Terminal such as "code ." for opening vscode?#2022-04-2706:15onetomI usually manage my IDE versions with JetBrains Toolbox, which I install with brew install --cask jetbrains-toolbox That toolbox app can let you turn on the creation of those command-line launcher scripts, like idea. I usually have an EAP version installed too, so I set in the toolbox to call the script for that idea-eap.#2022-04-2511:33aratarethere's a command called idea but iirc you will have to install it#2022-04-2511:35aratarehttps://www.jetbrains.com/help/idea/working-with-the-ide-features-from-command-line.html#2022-04-2823:06BayeI am still struggling to make it work#2022-04-2905:32aratareWhat was your original intention?#2022-04-2917:35Bayeopen my project from the terminal type "idea ." like one can do vscode or atom "code ." or "atom ."#2022-05-0217:25aratareI haven't tried it so I'm not sure if it works similarly#2022-04-2520:42UlisesMACHi all! Does anybody know how to display the cursive/diff feature in a shadow repl? I can use it before using the shadow-cljs REPL but I get the next error:
(shadow/nrepl-select :app)
To quit, type: :cljs/quit
=> [:selected :app]
(cursive/diff "a" "b")
------ WARNING - :undeclared-ns ------------------------------------------------
 Resource: <eval>:1:2
 No such namespace: cursive, could not locate cursive.cljs, cursive.cljc, or JavaScript source providing "cursive"
--------------------------------------------------------------------------------

------ WARNING - :undeclared-var -----------------------------------------------
 Resource: <eval>:1:2
 Use of undeclared Var cursive/diff
--------------------------------------------------------------------------------

=> nil
#2022-04-2521:23cflemingIn the release notes there’s a workaround detailed, using a tagged literal: https://groups.google.com/g/cursive/c/djESICRaiHs/m/l1ZVtyxbBgAJ#2022-04-2614:28UlisesMACThanks! :)#2022-04-2520:43UlisesMACI think that a fix could be to put the full namespace (not only cursive )#2022-04-2600:25BayeHi. can I turnoff "symbol" abbreviation in Cursive: instead of F I want defn, instead of ∀ I want doseq...#2022-04-2600:26cflemingCursive doesn’t do that, do you have another plugin installed which does that?#2022-04-2607:18imreOh, I want to hear what that plugin is#2022-04-2608:24cflemingI guess they’re ligatures, which is a built-in feature these days: https://www.jetbrains.com/webstorm/guide/tips/font-ligatures/. But there are still things like this around: https://plugins.jetbrains.com/plugin/14736-ligatures-limited#2022-04-2608:24cflemingI have a feeling there was also a more Clojure-specific one, but I can’t find it now.#2022-04-2611:01xcenoI think you mean this one: https://plugins.jetbrains.com/plugin/8224-clojure-pretty-symbol#2022-04-2611:25imreThank you.#2022-04-2612:29BayeI am not aware that I am using some other plug in, will double check now...#2022-04-2612:39Bayeyeah it was clojure pretty symbol doing it...Thanks#2022-04-2608:52Ernesto GarciaHi. This weekend I tried to work with Intellij + Cursive on Windows, on a project in the WSL (Windows Subsystem for Linux). Cursive seemed to be running tools.deps on Windows, and it failed if I had a git dependency in deps.edn. Would there be a way for Cursive to run tools.deps on WSL2? From what I saw, Intellij is running Maven and Git on WSL2 for such projects.#2022-04-2622:02nottmeyHi everyone, I have a deps.edn alias :test and when running it with clj -M:test it executes all tests, but when I configure it in Cursive, it only executes some of them 😕
{:paths   ["src"]
 :deps    {com.datomic/client-api  {:mvn/version "1.0.58"}
           com.hyperfiddle/rcf     {:mvn/version "20220405"}
           com.walmartlabs/lacinia {:mvn/version "1.1"}
           org.clojure/clojure     {:mvn/version "1.11.1"}}
 :aliases {:repl {:extra-paths ["dev"]}
           :test {:extra-paths ["test"]
                  :extra-deps  {io.github.cognitect-labs/test-runner {:git/tag "v0.5.0" :git/sha "b3fd0d2"}}
                  :main-opts   ["-m" "cognitect.test-runner" "-d" "src" "-d" "test" "-r" "datomic-lacinia.*"]
                  :exec-fn     cognitect.test-runner.api/test
                  :jvm-opts    ["-Dhyperfiddle.rcf.generate-tests=true"]}}}
Does anyone have any advice on how to achieve the same behavior?
#2022-04-2623:24cflemingAll those tests are in that module under the test folder, correct? I can’t see any reason why they wouldn’t be found. Is this a public project I could look at?#2022-04-2707:02nottmeythe schema-test is in the test folder, the rest ist in the src folder as https://github.com/hyperfiddle/rcf macros next to the implementation#2022-04-2707:03nottmeythe repo ist not public yet, but will be in the next days, I’ll let you know#2022-04-2707:57imreI'm not convinced Cursive is able to discover those rcf tests#2022-04-2707:57imrehttps://cursive-ide.com/userguide/testing.html says Currently the test integration only supports the default clojure.test#2022-04-2708:18nottmeyok, fair point, rcf interacts with clojure.test, but if it actually generates clojure tests like deftest does, i don’t know#2022-04-2708:22nottmeyI guess I need to try with an own test macros what’s possible#2022-04-2708:29cflemingI haven’t tried with rcf, but Dustin is a Cursive user, or at least was for a long time.#2022-04-2708:30cflemingBut I suspect that it might only look for tests under test roots, not source roots - I’d have to check the code for that though.#2022-04-2708:40nottmeyok, I could test that hypothesis first (in my evening), if checking the code is too tedious#2022-04-2715:23Dustin GetzRCF macroexpands to deftest when a JVM flag is set, i don't see why Cursive shouldn't pick it up, the theory about Cursive not looking in src directory makes the most sense to me#2022-04-2715:24imre> JVM flag is set curious#2022-04-2715:26Dustin GetzIt was not our intended use case to integrate with clojure.test at dev time, RCF is meant to be used at the REPL like rich comment forms, the deftest generation is meant for CI use case (to get test runners, reporters, coverage plugins etc). However we've gotten a bit of feedback that people want to integrate RCF into their old workflows. So we may support that officially in the future#2022-04-2719:44nottmeyyea, I see why it’s no direct concern, because the main usecases CI and REPL are covered. I would still argue that it would feel very natural to have them show up next to the “normal” tests (where people will still likely implement long running or integration tests). It would also be handy for them to be respected in coverage report of the IDE, so that one could easily add tests where coverage is missing. But I’m still very happy without this working, so no worries. For now I’m going to test whether deftests in src will be picked up, and whether rcf tests in test will be picked up.#2022-04-2720:12nottmeyOk, RCF tests are picked up in test folder by cursive, but fail. (They succeed when run with clj -M:test ; for config, see above.)
(tests                ; in my case schema_test.clj line 8
  "true is true"
  true := true)
Testing datomic-lacinia.schema-test
.java.lang.ClassCastException: class java.lang.String cannot be cast to class clojure.lang.Symbol (java.lang.String is in module java.base of loader 'bootstrap'; clojure.lang.Symbol is in unnamed module of loader 'app')
 at clojure.core$find_ns.invokeStatic (core.clj:4127)
    clojure.core$the_ns.invokeStatic (core.clj:4161)
    clojure.core$ns_name.invokeStatic (core.clj:4165)
    clojure.core$ns_name.invoke (core.clj:4165)
    cursive.tests.runner$eval577$report__22180__auto____584.invoke (run-tests8310960651276941006.clj:81)
    clojure.test$do_report.invokeStatic (test.clj:357)
    clojure.test$do_report.invoke (test.clj:351)
    datomic_lacinia.schema_test$fn__557.invokeStatic (schema_test.clj:8)
    datomic_lacinia.schema_test/fn (schema_test.clj:8)
    clojure.test$test_var$fn__9856.invoke (test.clj:717)
    ...
#2022-04-2720:15nottmeyInteresting, when I add one deftest to a src namespace, the test is picked up and RCF tests are also run#2022-04-2720:39nottmeyI like how interactive RCF feels, but I see that simply using deftest next to the implementation in src can feel pretty similar. My solution:
(deftest- uppercase-first-test
  (is (= (uppercase-first "hellO") "HellO"))
  (is (= (uppercase-first "s") "S"))
  (is (= (uppercase-first "S") "S"))
  (is (= (uppercase-first "") ""))
  (is (= (uppercase-first nil) nil)))
;; instead of
(tests
  (lowercase-first "HellO") := "hellO"
  (lowercase-first "S") := "s"
  (lowercase-first "s") := "s"
  (lowercase-first "") := ""
  (lowercase-first nil) := nil)
And a REPL Command:
#2022-04-2722:02cflemingThat exception looks like a bug in Cursive, could you file an issue for that one and I’ll look at it?#2022-04-2722:07nottmeyyes, I can, will do 🙂#2022-04-2723:13nottmeyfyi https://github.com/cursive-ide/cursive/issues/2686#2022-04-2723:30cflemingGreat, thank you!#2022-04-2707:11nodenameHello, I have a little problem with a core.async reference in my code. I have core.async in my project.clj :dependencies, and all my core.async API calls are working fine. But in one file I have:
#?(:clj (:import (clojure.core.async.impl.channels ManyToManyChannel)))
and when I start up a debug REPL, sometimes it is fine, and sometimes I get a ClassNotFoundException! Not sure if this is something specific to Cursive but ???
#2022-04-2708:34onetomIs there a way to reduce the number of spelling mistake markers to more relevant ones? I think Cursive should consider symbols and keywords, from the libraries a Clojure IntelliJ module depend on, spelled correctly, since we can't do anything about those (unless they are pointing to our code via :local/root) That way, we can't easily introduce typos into the new code we are writing anew, but we won't be bothered by the choices of the library developers whos' libs we depend on. Similarly, in deps.edn there is no reason to spell-check artifact names, like lambdaisland/kaocha-junit-xml or com.hyperfiddle/rcf. In fact, those should probably contribute to the spelling dictionary automatically too. Eg. I have the following alias in deps.edn:
:ci.run/test
  {:extra-deps {lambdaisland/kaocha-junit-xml {:mvn/version "0.0.76"}}
   :main-opts ["-m" "kaocha.runner" "--plugin" "junit-xml"]}
and these words are underlined: • lambdaislandkaocha, twice! 1. in the maven artifact name 2. in the 2nd arg of :main-opts while nothing should be underlined.
#2022-04-2708:35cflemingPossibly, I haven’t checked to see if there’s a way to programmatically specify exceptions - I assume so. Could you file an issue with your exception cases, please, and I’ll look at it?#2022-04-2804:27salamColin, the keyboard shortcut for the REPL window (E) in the Switcher (Control-Tab) seems to be case-sensitive. in other words, when Caps Locks is off, Shift-E works but E doesn't.#2022-04-2805:52cflemingThat’s very odd.#2022-04-2806:10cflemingI’ll take a look at this tomorrow, but I don’t think there’s much that I can do about this on the Cursive side, since that’s all IntelliJ.#2022-04-2810:18onetomneither e or E switches anywhere for me under IntelliJ 2022.1, JBR 17.0.2+8-315.1-nomod & Cursive 1.12.3-2022.1 under macOS. i've activated the Switcher via the Cmd-Shift-A action menu and I indeed saw, there is a capital E, next to the REPL entry. btw, in Cmd-E (Recent Files action), when I selected the REPL item, also nothing happened; I've stayed in the current editor tab. after some clicking around, suddenly both approaches started to work and focus the REPL tool window from the Switcher (activated via the action menu), when I pressed the lower-case e. though they focus the output pane, not the input pane, or the one which was focused the last time. not sure if that's the intended behaviour.#2022-04-2805:52cfleminghttps://twitter.com/CursiveIDE/status/1519554360342159360#2022-04-2807:43imreThank you, Colin! Does this version have any differences from 1.12.3-eap2 ?#2022-04-2808:26cflemingNo, it’s just released in the main stable channel, so that everyone not signed up for EAPs will get it too.#2022-04-2808:27cflemingFor those on the EAP channel there’s no change.#2022-04-2808:47imreThanks for the info!#2022-04-2811:05akielThanks for the new release! I have now a problem running a REPL from by deps test alias that includes a
:main-opts ["-m" "kaocha.runner"]
It seems to have something to do with https://github.com/cursive-ide/cursive/issues/2322 Kaocha is complaining Unknown option: "-i". > Cursive now adds them prior to the -i option, If I remove the Kaocha main-opts, it works. Should I have a separate test-repl alias?
#2022-04-2811:09imre@U07MC8H4Z I experienced this with -eap2 a day or two back. For me it only affects repl configs that are set to run with deps so I worked around it by selecting run with intellij project classpath and selecting the aliases I need in the deps tool window#2022-04-2811:15akiel@U1ZD6QX4G Thanks. I don't know if using the intellij project classpath is the best solution. I just separated my test und kaocha dependencies and use only the test alias for the REPL and test+kaocha for the CI. Seem more clear to me to use two separate aliases. What do you think?#2022-04-2811:17imreWhatever works for you 🙂 my case was a little different, I wanted to stay with a single alias#2022-05-0306:16imreAdded a comment on https://github.com/cursive-ide/cursive/issues/2322#issuecomment-1115769457 - I think main-opts could use a bit more thinking. Afaik :main-opts is a clojure.main thing, not an nrepl one anyway?#2022-05-0306:17cflemingYes, it does need more thought. I have to say I find the deps aliases super confusing, I haven’t managed to make a coherent mental model of them at all.#2022-05-0306:18cflemingThey started out quite simple, but now are not, and that’s going to make the UI for running things via deps tricky - I was thinking about it the other day.#2022-05-0307:54imreWithout knowing how difficult this part is in Cursive, I'd try and lean on tools.deps as much as possible so stuff works preferably the same way outside of Cursive as inside of it#2022-05-0308:04cflemingYeah, that’s my plan.#2022-05-0308:10imredeps is confusing sometimes. I find it useful to create minimal projects to try some aspects of it out like https://github.com/imrekoszo/try-deps-tool-replace#2022-05-0308:13akielAren't aliases just named parts of config that are merged together depending on what aliases one selects?#2022-05-0308:16cflemingNot any more. Depending on the flag you use, the config is merged in different ways. For example, using -T deps will use a completely different classpath.#2022-05-0308:22imreI don't think it's that serious - -T just implies an extra 'alias' containing :replace-deps {} :replace-paths ["."]#2022-05-0308:23imreThe repo I linked shows these#2022-04-2907:56onetomam I not supposed to get an "intention" when I press Opt+Enter on a qualified keyword, which uses a namespace alias (eg. ::anom/fault), to require that namespace with the corresponding :as clause? maybe im not getting such an option, because the alias is ambiguous?#2022-04-2907:57onetomit's quite tiring to keep requiring this cognitect.anomalies NS 🙂#2022-04-2908:51octahedrionI went to paste some core.async code having a < in it and this popped up#2022-04-2909:13cflemingYes, the detection seems a little aggressive sometimes.#2022-04-2909:25octahedrionfound it#2022-04-2909:27octahedrionI think it would be better to offer a special paste-as-hiccup operation that can be bound to a keyboard shortcut as desired#2022-04-2917:18onetomC-u Cmd-V 🙂#2022-04-2920:50cflemingI think discoverability of a special command would be far worse, and the detection doesn’t mess up that frequently (and could definitely be improved).#2022-05-0414:06octahedrionbut I had to discover how to disable it#2022-05-0421:37cflemingWell, you can also always just click the “Paste Normally” button, right? How often does this happen?#2022-04-2917:03Jakub Holý (HolyJak)It seems Cursive doesn't deal well with assertions when they are not in a test but in a function called from the test (in my case it is even in another ns). No indication the fn "failed" or that the assertion in the fn (test/is) failed#2022-04-2920:54cflemingYes, that’s https://github.com/cursive-ide/cursive/issues/823. I’ll see if I can look at that soon, I’m planning some work on the test integration.#2022-04-3008:27Jakub Holý (HolyJak)awesome, thx!#2022-05-0119:11BayeHi. are there "dot" files for Cursive that one can copy for one's setup?#2022-05-0317:33serioga@U01BDCAV7NZ there are some IDEA's files, like here https://github.com/serioga/webapp-clojure-2020/tree/master/.idea#2022-05-0322:18BayeThanks, will check it out#2022-05-0323:56onetomSome more useful settings from our project: .idea/ClojureProjectResolveSettings.xml:
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
  <component name="ClojureProjectResolveSettings">
    <item key="com.rpl.specter/cond-path" resolves-as="clojure.core/cond" />
    <item key="com.rpl.specter/defcollector" resolves-as="clojure.core/defn" />
    <item key="state-flow.api/flow" resolves-as="clojure.test/testing" />
    <item key="state-flow.api/for" resolves-as="clojure.core/for" />
    <item key="richelieu.core/defadvice" resolves-as="clojure.core/defn" />
    <item key="clojure.spec.alpha/fdef" resolves-as="clojure.core/def" />
    <item key="clojure.template/do-template" resolves-as="clojure.test/are" />
    <item key="com.rpl.specter/defdynamicnav" resolves-as="clojure.core/defn" />
    <item key="com.rpl.specter/defnav" resolves-as="clojure.core/defn" />
    <item key="com.rpl.specter/defrichnav" resolves-as="clojure.core/defn" />
    <item key="com.rpl.specter/defmacroalias" resolves-as="clojure.core/def" />
    <item key="state-flow.api/defflow" resolves-as="clojure.test/deftest" />
    <item key="clojure.core.match/match" resolves-as="clojure.core/case" />
    <item key="com.rpl.specter/if-path" resolves-as="clojure.core/if" />
    <item key="clojure.core/defonce" resolves-as="clojure.core/def" />
    <currentScheme>PROJECT</currentScheme>
  </component>
</project>
.idea/codeStyles/Project.xml:
<component name="ProjectCodeStyleConfiguration">
  <code_scheme name="Project" version="173">
    <option name="RIGHT_MARGIN" value="100" />
    <option name="SOFT_MARGINS" value="80" />
    <ClojureCodeStyleSettings>
      <option name="commentAlignColumn" value="40" />
      <option name="keepNsSorted" value="false" />
      <option name="indentCustomisations">
        <map>
          <entry key="clojure.core.match/match" value="-1" />
        </map>
      </option>
    </ClojureCodeStyleSettings>
    <codeStyleSettings language="CSS">
      <indentOptions>
        <option name="INDENT_SIZE" value="2" />
        <option name="TAB_SIZE" value="2" />
      </indentOptions>
    </codeStyleSettings>
    <codeStyleSettings language="JavaScript">
      <indentOptions>
        <option name="INDENT_SIZE" value="2" />
        <option name="CONTINUATION_INDENT_SIZE" value="2" />
        <option name="TAB_SIZE" value="2" />
      </indentOptions>
    </codeStyleSettings>
    <codeStyleSettings language="Markdown">
      <option name="RIGHT_MARGIN" value="80" />
    </codeStyleSettings>
  </code_scheme>
</component>
#2022-05-0500:07BayeThank you for sharing#2022-05-0120:58roklenarcicHow can I REPL into a tools alias? I tried starting a REPL with a tools alias selected in the deps menu and the dependencies are not added to classpath#2022-05-0122:48cflemingThat’s https://github.com/cursive-ide/cursive/issues/2653, which will hopefully be in the next EAP build.#2022-05-0306:31roklenarcicthanks#2022-05-0212:36imreAnyone had a problem with replace-deps in aliases recently? Cursive doesn't appear to see the ones specified like that for me#2022-05-0212:37imreIf I change it to extra-deps and refresh the project, they show up among Dependencies and I can navigate to those namespaces, but not with replace-deps#2022-05-0212:38imre
IntelliJ IDEA 2022.1 (Community Edition)
Build #IC-221.5080.210, built on April 12, 2022
Runtime version: 11.0.14.1+1-b2043.25 x86_64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
macOS 12.3.1
GC: G1 Young Generation, G1 Old Generation
Memory: 4096M
Cores: 8
Registry:
    scala.erase.compiler.process.jdk.once=false

Non-Bundled Plugins:
... com.cursiveclojure.cursive (1.12.3-2022.1)
#2022-05-0306:03imre@U0567Q30W does this ring a bell or should I create an issue?#2022-05-0306:06cfleming@U08BJGV6E Could you file an issue please? That doesn’t ring a bell, and I can’t find anything like it.#2022-05-0306:11imreSure thing will do later#2022-05-0308:36imreOpened https://github.com/cursive-ide/cursive/issues/2689#2022-05-0214:24Marko VukovicHi everyone, is it possible to eval a from in the repl and then jump to the next form?#2022-05-0214:25imreThis should be macroable using intellij macros#2022-05-0323:58onetomi'd be interested to see such a macro! i tried to use intellij macros for the 1st time a few weeks ago and they just didn't work as expected, AT ALL. 😞#2022-05-0400:04onetomanother useful feature would be to clone the current top-level form, keep the cursor where it was, so we can start modifying the form, without loosing its previous "version". this would result in a REPL workflow, which is more similar to working from a unix shell, which is not too bad, imho... eshell can be configured to work almost this way. looking at my config, probably these lines activate this special behaviour for eshell:
(require 'em-smart)
(add-to-list 'eshell-modules-list 'eshell-smart)
#2022-05-0411:20imreto record: 1. place caret at the end of form to eval 2. start recording macro 3. eval sexp before caret 4. paredit-forward 5. stop macro recording to use: 1. caret at end of form to eval 2. execute eval-move macro#2022-05-0214:41kennyHas anyone noticed that when using the Cursive clojure.test integration, if you hover a large, failing test, it will completely freeze your UI? It's a really frustrating behavior. I often find myself really trying to avoid putting my mouse on the red squiggly, else I'll lose several seconds to a full ide lockup.#2022-05-0214:49imreit's a known issue, there are several related open issues: https://github.com/cursive-ide/cursive/issues?q=is%3Aissue+is%3Aopen+hover#2022-05-0214:49kennyk#2022-05-0223:09wilkerlucioyes, I feel you, a thing that helps is using Clear all test markers to avoid the mouse dance around the failures#2022-05-0223:09kennyThat unfortunately hides the button to open the diff viewer 😞 got a workaround for that one? #2022-05-0223:10wilkerlucioin this case the mouse dance still required, to get the mouse in the marker without hovering the failure#2022-05-0223:25cflemingSorry, I’m planning to do some work on this soon, I’ll put that in the current EAP series.#2022-05-0223:26kennyThat would be huge! Thank you!!#2022-05-0223:57cflemingIt’s not quite clear what the best thing to do is when the output is really big. My plan is to print the current output, then if that’s too big then diff the results and print some kind of diff, and if that’s too big then fall back to “x changes in y top-level keys” or something like that. Does that sound reasonable?#2022-05-0223:58kennyPrint where?#2022-05-0223:58cflemingIn the tooltip.#2022-05-0223:58wilkerluciois there a way to know the size quickly? one option is to disable the hover tip with the result#2022-05-0223:59wilkerlucioa simple dummer solution is to have a config option to disable the tooltip result entirely (getting it only by opening the diff)#2022-05-0223:59cflemingYes, perhaps the hover tip could just show a summary like “x changes in y keys” or something. I pretty much immediately go for the diff anyway. But it might be helpful to see “x changes under keys :foo, :bar and :baz” or something similar.#2022-05-0300:00kennyfwiw, I never use the hover, so would be totally ok with it gone.#2022-05-0300:00wilkerlucioabout the test, in cases where clojure can't determine the actual/expected, currently when clicking for the diff nothing happens, can we instead have a window with the raw result?#2022-05-0300:00cflemingI’ll look at that, sure.#2022-05-0300:01cflemingActually, could you file an issue for that just so I don’t forget?#2022-05-0300:01wilkerluciosure#2022-05-0300:33wilkerluciohttps://github.com/cursive-ide/cursive/issues/2687#2022-05-0300:34cflemingThanks - is that check macro from matcher combinators?#2022-05-0300:35wilkerlucioit uses matcher combinators under the hood, you can get check from: https://gitlab.com/mauricioszabo/check#2022-05-0300:35cflemingThanks, I’ll add that to the repro case.#2022-05-0300:36kennyThe match? macro from the matches combinators lib is the main one where this comes up for me. #2022-05-0300:36cflemingOk, I’ll check that one too.#2022-05-0300:41wilkerlucioI think the way to handle those should be the same down the line, unless you are going to give it some specialised implementation#2022-05-0305:57imreThere's alsonthe case when something (like a clojure.test/are or clojure.template/do-template) results in something passing a number of times and failing some times#2022-05-0305:58cflemingYes, that needs a list popup when clicking on the gutter icon.#2022-05-0305:58cflemingI’m not sure if there’s an issue for that one, but that annoys me regularly so I won’t forget about it 🙂#2022-05-0306:01imreMy 2 priorities are keyboard navigability even if I have the gutter hidden and that it doesn't make the ui hang. Wondering if the intention could offer an action to put the fails into a tool window? Might be an overkill though#2022-05-0306:04cflemingYes, there’s an issue for the keyboard thing but I can’t find it right now.#2022-05-0306:05imrehttps://github.com/cursive-ide/cursive/issues/2229 is an example#2022-05-0306:05cflemingAh, yes, thanks.#2022-05-0400:24onetomim thinking about a better REPL flow for awhile. here is what i came up with so far: 1. use special REPL files for establishing and working with various contexts of a bigger application, eg. one file per 3rd-party API, database, http layer, etc 2. most REPL files are probably development only and contain destructive operations, which is don't want to execute accidentally in a production Clojure process, so they should live under a directory, eg. <project-root>/dev/, so they are not deployed to production. 3. we should use file-based evaluation, NOT buffer-based, by default, so we can't accidentally load such code through a production REPL 4. the namespaces for these REPL files should be shallow, in case we need to type their names out manually. eg. project.name.datomic-repl (which would reside in dev/project/name/datomic-repl.clj) 5. the x.y.datomic-repl.clj naming scheme - as opposed to x.y.datomic.repl.clj - helps to distinguish multiple REPL files being open in various editors, which might chop off, abbreviate or display with a pale color the x.y.datomic part. 6. we should use rich-comments in such REPL files, so we can just reload them any time without side-effects. and here is the workflow part (position of the caret shown as •): 1. start with this:
(comment
  (-> *1•)

)
where *1 is highlighted. we edit this form:
(comment
  (-> some-seq
      (doto pprint)
      (->> (map :some/key•)
           (keep :other/key)))

)
then eval it and i'd expect a copy of the evaluated form appear above the form itself and my cursor stay in place:
(comment
  (-> some-seq
      (doto pprint)
      (->> (map :some/key)
           (keep :other/key)))

  (-> some-seq
      (doto pprint)
      (->> (map :some/key•)
           (keep :other/key)))

)
so i can keep iterating on the form, while maintaining a history of its evolution, which i can clean up later. i'd also expect the undo operation to remove the copied form, in case im just repeating the same operation for its side-effect. eg. maybe im just polling something manually.
#2022-05-0400:28cflemingSomewhat related, one thing I’ve thought of recently which I think would be really useful, similar to https://github.com/cursive-ide/cursive/issues/2623. I’d like a command to be able to execute a rich-comment form from anywhere in the file. So probably a command which pops up a searchable list of all the comment-commands in the current file, and allows me to execute them.#2022-05-0400:29onetomother useful approach which has emerged in my usage is this form:
(comment
  @(def some-var *1)

  @(def some-var
      (-> (some computation) (print-summary)))
  )
so i can see the result of the computation, while also capturing it
#2022-05-0400:30cflemingInteresting idea.#2022-05-0400:33onetom@U0567Q30W yes, that bookmarked evaluation is also a great building block, i've just realized in the last 2-3days. i often need to modify some function definition in an NS and re-run a form in another NS, to test out the effect of my change. so far im just using the Re-execute last command option of a Cursive REPL Command, but the last action gets overwritten, when I execute another Cursive REPL Command.#2022-05-0400:35cflemingYes, definitely, I’ve been feeling that recently too.#2022-05-0611:26JAtkinsA while back I used a "save command" repl command that saved the text of your current editor selection and your current ns. Was able to run that code again in the future from any context. It's super useful, and it'd be nice to have some more official support for something like that#2022-05-0416:46BayeHi. How do you get "on the same line" repl eval on Cursive?#2022-05-0416:52imreCursive doesn't provide that, but there's another plugin on top of Cursive that does: see #clj-extras-plugin#2022-05-0417:03BayeThanks!#2022-05-0510:03mhuebertJust added my thumbs-up to this issue - https://github.com/cursive-ide/cursive/issues/2690 - it should be possible to have cyclic dependencies when using :as-alias, makes repl-ing in these namespaces quite difficult at the moment#2022-05-0522:55cflemingYes, I’m sorry about that one, I’ll fix that for the next build.#2022-05-0618:11nottmeyHow can I set the clojure language version to 1.10? I’m writing a library and I keep using functions which are not available in older clojure version 🙈 (e.g. update-vals and update-keys)#2022-05-0618:26Alex Miller (Clojure team)those are actually in Clojure 1.11.1, but you just need to set that as your Clojure dependency for the project - how will depend on whether you are using project.clj, pom.xml, or deps.edn#2022-05-0618:31nottmeyI use deps.edn, so I just add org.clojure/clojure {:mvn/version "1.10.3"} to my :deps ? Doesn’t this bother someone who want’s to use my library with Clojure 1.11.1?#2022-05-0618:55imreIt shouldn't#2022-05-0618:57nottmeyHmm, ok 😄#2022-05-0618:57imreBut you can also put it in a dev alias for example#2022-05-0618:58imreJust make sure you tick that alias in the deps tool window in cursive#2022-05-0618:57folconHmm, would it be possible that when a file reload is triggered that if parinfer is enabled it's temporarily disabled or something? I find when >>>>>>> from git conflicts occur, recovering what your s-expressions used to look like is sometimes really problematic?#2022-05-0918:50gravActually made an issue about this a while ago 🙂 https://github.com/cursive-ide/cursive/issues/2505#2022-05-1017:37kennytiltonSo I type (try and then hit return and now my code looks like this:
(when-let [^State state (:state-ref (meta me))]
      ((try

         (catch Exception e
           ))(.setState state (fn [] (do)))))
Kinda cool because I always struggle to remember all that, but...why is that happening? Is cursive doing that, or do I have some unknown plugin doing that? Anyone know how to make this stop? Thx!
#2022-05-1018:24isakIt is probably this:#2022-05-1018:25isakBut on mine the default is it expands with TAB, not Enter, so I wonder why it is doing that for you if you haven't changed it#2022-05-1022:33cflemingYes, that sounds like the live template. I’ve actually found them expanding unexpectedly recently too, what I suspect is happening is that IntelliJ is adding them to the autocomplete, and you have to pay attention to see whether what’s being completed is the symbol (e.g. try) or the live template.#2022-05-1209:01kennytiltonFinally dug into this and tested a bit. I do get the expansion on both tab and return, tho the setting si for tab. Anyway, not a feature I need so I just turned it off. Thx for the pointer to the relevant pref, @U08JKUHA9! 🙏#2022-05-1108:54danmWe're seeing behaviour where if there is a long running process in the REPL (particularly if it's attempting to connect to some remote and and waiting for a timeout), IntelliJ as a whole seems to lock up. Specifically the terminal built into IntelliJ stops accepting input. Is this a known issue?#2022-05-1401:03AJ JaroNo, I haven't experienced this before. I've had things run for over 10 minutes but I don't know what kind of "long" you mean#2022-05-1116:31ingesolWe have a monorepo tools.deps project where each sub-project is loaded as a module in Cursive. As an example, Module A uses functions from Module B. But “Find usages” on a function in Module B does not find usages in Module A, only internally in Module B. Is this supposed to work across modules?#2022-05-1117:06imreIs this a polylith project by any chance?#2022-05-1117:21imrehttps://github.com/cursive-ide/cursive/issues/2554 whether or not it is, it is probably related to the cause of the linked issue and the workaround could be similar#2022-05-1121:21ingesolNot polylith. And sorry, forgot to mention one important fact: Module B is a dependency of Module A by using :local/root. I suppose that’s the main reason, that Module A knows how to find Module B, but not the other way around.#2022-05-1122:10cflemingYes, dependencies normally only work in one direction. Is there a reason code in B should be able to access A?#2022-05-1123:32danielcomptonTo more concrete, we have an “app” module and a “lib” module. app depends on lib via :local/root. When doing find usages on a function in lib, it only shows other uses in lib, not the uses in app#2022-05-1220:21cflemingI see, thanks - I’ll take a look at that.#2022-05-1121:21ingesolNot polylith. And sorry, forgot to mention one important fact: Module B is a dependency of Module A by using :local/root. I suppose that’s the main reason, that Module A knows how to find Module B, but not the other way around.#2022-05-1123:35folconWhat controls how much indentation auto-format lines adds to comments? Both ; and #_ tend to move with added spacing and all it seems to do is break parinfer...#2022-05-1621:16cflemingThis shouldn’t break parinfer, could you give an example of each?#2022-05-1711:09folconI'll PM you?#2022-05-1800:00cflemingThanks!#2022-05-1305:11Nom Nom MousseAfter I use load-file I do not see any autocompletion for the loaded namespace in the REPL. Like I load-file
(ns rules)

(def cursive "is great") 
and there is no autocomplete for rules/cursive afterward. Is this something you might consider adding?
#2022-05-1322:52cflemingThat should definitely work, I’ll check it when I’m back at my computer.#2022-05-1409:26Nom Nom MoussePerhaps it has to do with my project code or setup then.#2022-05-2011:05onetom@U0232JK38BZ u should have a module defined for your clojure project as either a Clojure / Leiningen or Clojure / Deps type. you should check out the Cursive User Guide on the topic: https://cursive-ide.com/userguide/first-repl.html also the next, BUILD TOOLS section is useful to really understand what's all this extra complexity is about. eg, the section about using deps.edn file based Clojure projects is what you want to learn probably: https://cursive-ide.com/userguide/deps.html#2022-05-2011:15Nom Nom MousseThanks, I'll look into it. Perhaps part of the problem is that my file is not on the classpath. I evaluate the ns myself with load-file.#2022-05-1617:25salamColin, can you please add the ability for Cursive to pick up a socket REPL port from a file in the Edit Configuration Settings window? similar to the “Use port from nREPL file” option for nREPL or a more generalized version of it? i know there’s not a similar standard for socket REPL yet but this is going to be really handy with tools that provide such files (e.g., shadow-cljs writes the socket REPL port to a file named .shadow-cljs/socket-repl.port) thanks in advance!#2022-05-1621:15cflemingSure, I filed https://github.com/cursive-ide/cursive/issues/2695 and will get it done in this EAP series.#2022-05-2010:57onetomIntelliJ 2022.2 EAP feels significantly snappier than 2022.1.1! @cfleming any estimate, when can you release a Cursive version for it?#2022-05-2011:10onetomi was trying to use recent EAP and non-EAP versions of IntelliJ with an M1/ARM version of JBR17 from 2022 February and the only issue I've experienced with Cursive, was related to some SVG rendering, if I understood correctly.#2022-05-2011:11onetombut i might have just imagined that and it was actually related to the new Vector API, which i just saw being mentioned in https://blog.jetbrains.com/idea/2022/05/intellij-idea-2022-2-eap-1/#2022-05-2019:18imrenice#2022-05-2019:18imrewould love to upgrade to this#2022-05-2021:01cflemingI’ll get on it 🙂#2022-05-2110:34cflemingOut now!#2022-05-2110:34cfleminghttps://twitter.com/CursiveIDE/status/1527960614215495680#2022-05-2110:39imreImpressive changelog!#2022-05-2110:39cflemingThat one has been a while in the making!#2022-05-2110:39cflemingThere’s lots of behind-the-scenes changes there too, which will no doubt result in new and exciting bugs 🙂#2022-05-2316:24thumbnailThanks for this one! I’ve been trying it out and it’s working well so far ! I noticed there’s some sort of ‘git lens’-feature added to IntelliJ which works at least for Ruby; is something we could support for clojure too?#2022-05-2320:44cflemingI’m not sure what that is, do you have a screenshot of it or a description of how it works?#2022-05-2321:21bedersand IJ feels snappier on MacOS indeed#2022-05-2408:31thumbnailsure thing! Here you go: If I click my name there, it opens the ‘git blame’-panel on the left#2022-05-2408:32cflemingAh, yeah, I looked at this the other day, it’s actually not too tricky. Could you file an issue for this please, and I’ll get it in the next EAP?#2022-05-2506:50thumbnailhttps://github.com/cursive-ide/cursive/issues/2698 there you go 🙂.#2022-05-2315:33chrisbroomeIs there a keyboard shortcut to convert a string to a keyword?#2022-05-2315:45Jordan Robinsonlike shift + ; ?#2022-05-2315:55chrisbroomeThat just puts a : before the string - I want to also get rid of the surrounding double quotes. For example, I want "path" to become :path .#2022-05-2319:42mike_ananevTry “String manipulation” plugin.#2022-05-2412:47chrisbroomeI don't see this option int he key bindings section#2022-05-2320:47cflemingIn case anyone is feeling brave: https://blog.jetbrains.com/idea/2022/05/take-part-in-the-new-ui-preview-for-your-jetbrains-ide/#2022-05-2408:49imresigning up#2022-05-2408:50imrehave you tried it yourself, or has it not started to roll out yet?#2022-05-2408:50cflemingI’ve signed up for it to see how Cursive works with it, but I haven’t heard back yet.#2022-05-2408:50imreoh, and have you any info on fleet? are you planning to support it?#2022-05-2408:51cflemingPersonally I’m a fan of default everything, so I doubt I’ll use it, but I’d like to kick the tyres.#2022-05-2408:53cflemingNot much is known about Fleet yet. Supporting it will probably be a pretty major rewrite, so I’m not sure whether that will happen or not.#2022-05-2408:53cflemingThere’s no information for plugin devs yet, really.#2022-05-2408:53imregotcha, thanks for the insight#2022-05-2408:55imreI'm looking forward to anything that can make intellij (or fleet) work better as a general editor in addition to being a great Clojure ide#2022-05-2408:55cflemingFor myself, I think I’d use fleet as a general editor which will feel more familiar, but not as my main driver.#2022-05-2408:56cflemingBut maybe it will surprise me. Currently I use Sublime Text, which is nice but feels weird when I’m so used to IntelliJ. I expect Fleet to feel much more familiar.#2022-05-2408:59imreYeah I'm also running sublime for some general stuff. I envy those who can stay in their favourite editor the entire time but I'm not prepared to give Cursive up so I'm hoping Cursive and its host ide(s) will move in a direction that enables me to ditch everything else for them#2022-05-2408:59cflemingHave you tried the IntelliJ Light Edit mode?#2022-05-2408:59cflemingIt’s still not what you’d call super light, but better.#2022-05-2409:00cflemingI should probably try to use that more, actually.#2022-05-2409:03imreI have tried it, but unfortunately it isn't light enough and it's still too lean in terms of features. For example I like to write commit messages in an editor with https://git-scm.com/docs/git-commit#Documentation/git-commit.txt---verbose so I see the diff right there. IJ light doesn't highlight stuff in that diff while Sublime but even Micro do.#2022-05-2409:04imreAnd both of those load quicker and much more reliably than IJ LE#2022-05-2409:04cflemingYeah, I can believe that.#2022-05-2409:04imre(I prefer using git from the command line and not via my ide. I would try magit but that's bound to emacs unfortunately)#2022-05-2409:06cflemingI do most of my git from the command line, but I use the Git Toolwindow a lot because the graph is really nice, and makes it easy to see what’s going on. I also do some things from the IDE these days, like checkout+rebase, and updating forks from Github.#2022-05-2409:08imre> checkout+rebase, and updating forks from Github These are the things I'm probably most uncomfortable trusting the IDE with, partly due to IJ putting its own vocabulary on top of git vocab#2022-05-2409:08cflemingSure, I get that, but I’ve found it convenient and reliable.#2022-05-2409:09imreI do use it for file history and inline annotation and "open on github"#2022-05-2403:46aratareis it just me or that new UI looks similar to vscode?#2022-05-2404:25cflemingYes, soon Cursive will look just like Calva!#2022-05-2412:50chrisbroomeIs there a way to tell cursive to format maps differently? What I'm looking for is instead of this:
(def my-map {
             :a 1
             :b 2
            })
I'd like this:
(def my-map {
  :a 1
  :b 2
})
So, 2 spaces indent relative to the previous indent instead of 1 space indent relative to the opening curly bracket
#2022-05-2412:51imrethat's a rather java/script-y formatting style#2022-05-2412:53imreas far as I know Cursive's indenter works in relation to the containing form (which in the case of the contents of the map would be the curly brackets themselves), not in relation to the previous indentation level#2022-05-2412:53imreI believe most Clojure formatters work in this way#2022-05-2412:54imreIs there any specific reason you are looking to achieve such a clojure-unorthodox style?#2022-05-2412:56chrisbroomepersonal preference i guess#2022-05-2412:57chrisbroomeit's really difficult to get used to this formatting style coming from other languages#2022-05-2412:57imre
(def my-map
  {:a 1
   :b 2})
#2022-05-2412:57chrisbroomebut also: if you have nested maps, the indentation can easily pushed off the side of the screen#2022-05-2412:58chrisbroomenested data structures* - not specific to maps#2022-05-2412:58imre
(def my-map
  {:a 1
   :b 2
   :c
   {:foo 1
    :bar 2
    :baz
    {:qux 1
     :quux 2}}})
#2022-05-2412:59chrisbroomethat's fine but not gonna lie - the 1 space relative to opening brace just kinda kills me. it makes it very hard to see where the nesting begins/ends#2022-05-2413:01imreWhile I respect your preferences (I also have my own nits here and there) but I think I'd rather suggest that you familiarize yourself with the conventions that are more established in existing codebases, otherwise you might have a hard time reading others code and vice versa (and potentially collaborating with others)#2022-05-2413:01chrisbroomeI suspect I'm not the only clojure user coming from C-syntax-style-languages that feels this way#2022-05-2413:02imreI don't know about any clojure editors that support the style you are trying to achieve so I'd imagine it could feel like pissing against the wind a bit#2022-05-2413:02chrisbroomeyeah... just feels like yet another hurdle to overcome for new Clojure users. but i do agree that if there's a standard I probably should familiarize myself with it#2022-05-2413:03imre#2022-05-2413:04imrewhat you can do to help you judge where forms start and end is set up the matching brace highlighting#2022-05-2413:04chrisbroomealready have that enabled#2022-05-2413:04chrisbroomeappreciate your help though#2022-05-2413:06imreWelcome to the community! I'm sorry I couldn't have better news. If you haven't so far, do also check out paredit/structural editing. Coming from C#, that was the feature that made me never want to go back to editing c-style code ever again#2022-05-2413:08chrisbroomeI use it in a very limited way right now. I love the power/capability, but I do need to learn all the keyboard shortcuts. Honestly Tony Kay's fulcro tutorials have been amazing for seeing what's possible in a "real world" setting using structural editing#2022-05-2413:10imreI found Cursive's keybinds good for the operations I mostly use, which are slurp, barf, raise and splice#2022-05-2416:03cap10morganIs there a workaround for the build.clj is not under a source root issue w/ tools.build when build.clj is in the project root? Or is putting it in a subdir still the best one? Searched back through the channel history and cursive user guide a bit but didn't see anything.#2022-05-2416:05R.A. PorterHave you tried doing this, checking the build tool alias?#2022-05-2416:07cap10morganno, where is that?#2022-05-2416:07R.A. PorterClojure Deps window. By default it should be in the upper right application margin.#2022-05-2416:08cap10morganah, yep. I have that hidden by default. found it though. thanks I'll give that a try!#2022-05-2416:08R.A. PorterYou'll need to hit the refresh icon in that plugin's toolbar after checking the alias.#2022-05-2416:11cap10morganhmm... that fixed the "not under source root" but it still can't resolve the library fns I'm calling from build.clj (e.g. b/uber)#2022-05-2416:13cap10morganoh, but a full restart of intellij fixed that. great! thanks again!#2022-05-2416:13R.A. PorterDoes your build alias in your deps file include the dep for io.github.seancorfield/build-clj?#2022-05-2416:13R.A. PorterAh. Cool. 👍
#2022-05-2418:35Ivar RefsdalNot sure what you are using build.clj for, but yesterday I tried https://github.com/liquidz/build.edn and it worked great.#2022-05-2418:36R.A. Porterhttps://github.com/seancorfield/build-clj#2022-05-2418:36cap10morganOr slightly more officially: https://clojure.org/guides/tools_buildhttps://clojure.org/guides/tools_build:)#2022-05-2421:40cfleming@U06FS3DLH Yes, the initial indexing can be flakey after selecting that alias, generally just opening and closing the project (without a full restart) works. I think it’s an IntelliJ thing.#2022-05-2502:04steveb8nThe new “organise imports” feature is so nice. thanks!#2022-05-2505:49cflemingGreat, glad it’s helping! I have some more improvements for that on the way, including making it work better for CLJC.#2022-05-2507:40Ivar RefsdalYeah, that's a great feature, thanks!#2022-05-2507:44imre+1, I use it every day. I only wish I could make it force a newline after :require/:import 🙂#2022-05-2508:04steveb8nfunny how some features seem small but have an outsized DX effect#2022-05-2508:05cflemingDefinitely. I’m planning inline eval soon which I think will be the same.#2022-05-2508:42nottmeyHow do I use this? is it a keybind? (did not stumble upon it yet)#2022-05-2508:43cfleming@U3ZG4CAF8 Code | Optimise Imports…#2022-05-2508:44cflemingThe menu item will show any keys you have bound for it.#2022-05-2508:44nottmey:star-struck:#2022-05-2508:44nottmeyok, works like a charm#2022-05-2508:44nottmeythanks!#2022-06-0208:39Ivar RefsdalPS: it's also possible to optimize imports automatically just before committing#2022-06-0208:40Ivar Refsdal#2022-06-0208:43Ivar Refsdal(just discovered this myself now)#2022-06-0209:05imrenice#2022-06-0918:15tony.kay@U0567Q30W how do you detect requires that are used just for side-effects? Some of my systems, for example, use require to pull in multi-methods, but they are never called directly? Do you look for multimethods and deftype/defrecord as a way to prevent accidental cleanup that would affect operation?#2022-06-0918:15imreI think if a require is pulled in without an alias it won't be removed during cleaning#2022-06-0918:17tony.kayHm…I’m also seeing a bug where it creates duplicates in the require…I just ran it a few times and it did this:
(:require
    [cheshire.core :as cheshire]
    [cheshire.core :as cheshire]
    [cheshire.core :as cheshire]
    [cheshire.core :as cheshire]
    [cheshire.core :as cheshire]
    [cheshire.core :as cheshire]
    [cheshire.core :as cheshire]
    [cljc.java-time.zone-id :as zone-id]
    [cljc.java-time.zone-id :as zone-id]
    [cljc.java-time.zone-id :as zone-id]
    [cljc.java-time.zone-id :as zone-id]
    [cljc.java-time.zone-id :as zone-id]
    [cljc.java-time.zone-id :as zone-id]
    [cljc.java-time.zone-id :as zone-id]
    [clojure.core.async :as async]
    [clojure.core.async :as async]

    [clojure.core.async :as async]

    [clojure.core.async :as async]
    [clojure.core.async :as async]
    [clojure.core.async :as async]

    [clojure.core.async :as async]
    [clojure.data.json :as json]
    [clojure.data.json :as json]
    [clojure.data.json :as json]
    [clojure.data.json :as json]
    [clojure.data.json :as json]
    [clojure.data.json :as json]
...
#2022-06-0918:17tony.kayit adds a new copy of those each time I run it#2022-06-0918:17imreWow#2022-06-0918:18tony.kayI think maybe it is trying to preserve “sections” via the whitespace (which is how this ns was written), but it is getting confused or something. CLJ file.#2022-06-0918:21tony.kayI manually cleaned it up a bit and that made it work right…trying to pinpoint the bug…#2022-06-0918:24tony.kayFound it. There was a comment and that confuses it. I’ll open an issue @U0567Q30W https://github.com/cursive-ide/cursive/issues/2707#2022-06-1108:50cfleming@U0CKQ19AQ Great, thanks, I'll get that fixed.#2022-05-2516:34folconI've been getting really high cpu spikes and I was speaking to jetbrains support and they were saying that cursive might be to blame. I have a memory snapshot I can share if that helps?#2022-05-2522:14cflemingYes please! Do you have a YouTrack issue or something?#2022-05-2601:37folconI'll PM#2022-05-2701:03steveb8nQ: is there a new exception behaviour for the test integration. this doesn’t report an exception any more….
(deftest foo
  (/ 1 0)
  (is (= 1 1)))
#2022-05-2701:17steveb8nseems like all exceptions, including assertion failures, are no longer reported in the console#2022-05-2701:18steveb8nthe red failure popup is correct. just no details of why#2022-05-2701:18steveb8nversions….#2022-05-2701:18steveb8nIntelliJ IDEA 2021.3.2 (Ultimate Edition) Build #IU-213.6777.52, built on January 28, 2022 Runtime version: 11.0.13+7-b1751.25 aarch64 VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.#2022-05-2701:19steveb8nCursive 1.12.4-eap1-2021.3#2022-05-2705:56cflemingI’ll check that, thanks. In general I tidied things up a lot, and was wondering if I’d done too much.#2022-05-2705:57cflemingBut when I checked the stacktrace still came out in the REPL, that might have been broken by a subsequent change.#2022-05-2908:07cfleminghttps://github.com/cursive-ide/cursive/issues/2700#2022-05-2908:13steveb8nThanks. I've switched back to stable for now#2022-05-2908:13cflemingCool, I should have a fix for this out in a day or two.#2022-05-3004:17cflemingThat’s out now.#2022-05-3007:38steveb8nthx. I’ll give it a roll#2022-05-3022:37steveb8n@U0567Q30W this EAP release handles exceptions a little too well. they appear as red gutter markers but there’s no obvious way to see the stack trace. Am I missing a stack trace feature or is there another explanation?#2022-05-3022:37cflemingThe stack trace should come out in the REPL console.#2022-05-3022:39cflemingDo you see it there? That was what happened in releases prior to the current EAPs - would you also expect to see it in the tooltip?#2022-05-3022:47steveb8nit did not appear in the console. console would be my preference as there’s plenty of room and I can reach it with keybindings#2022-05-3022:50cflemingThat’s definitely on 1.12.4-eap2, correct? That’s odd. And you’re seeing the exception marked as a failure in the editor?#2022-05-3022:52steveb8nit was the most recent EAP. I’ve gone back to stable because I’m testing a lot today#2022-05-3022:52steveb8nyes the exception showed a red marker in the left gutter#2022-05-3022:53cflemingOk, I’ll see if I can figure out any situations where that wouldn’t happen.#2022-05-3022:53steveb8nthx. maybe one of the other interested users could confirm? it could be specific to me#2022-05-3022:56steveb8ncould also demo if you want to see/capture the behaviour. the advantage of similar timezones shouldn’t be wasted 🙂#2022-05-3022:57cflemingThat would be great, thanks.#2022-05-3022:57cflemingI’d like to see that.#2022-05-3022:57steveb8nok. taking a brekkie break, then open all morning#2022-05-3022:57cflemingSure, me too - let me know when you’re back.#2022-05-3023:37steveb8nback now but it’s a false alarm. while getting ready to demo, I’ve update to EAP and restarted a few times. now I see stack traces in console#2022-05-3023:38steveb8nmust have been IDE in an odd state (or my brain without caffiene)#2022-05-3023:40cflemingPhew!#2022-05-3023:40cflemingI just spent some time staring at the code and couldn’t figure that one out.#2022-05-3023:43cflemingThe only think I can think of that might have caused it would be if there were an exception which provoked an assertion failure in clojure.test, rather than provoking an error. I think the logic there might have changed slightly in this EAP.#2022-05-3023:55steveb8nsorry for the confusion. I’ll restrict bug reports till after morning cuppa in future#2022-05-3023:56cflemingNo worries. If you do see anything like that let me know, I’m planning to get another build out this afternoon.#2022-05-3023:56steveb8nwill do#2022-05-2717:51nottmeyHi there, where is this information stored and can I store it in the project somehow?#2022-05-2717:56Jordan Robinsonhey, from my notes, this is at Settings → Languages & Frameworks → Clojure → Symbol Resolution#2022-05-2717:56Jordan Robinsonhopefully that hasn't changed in the versions since I wrote those notes#2022-05-2717:56Jordan RobinsonI also wanted to store them in the project but couldn't find a way, hopefully someone else knows#2022-05-2717:58nottmeyah found it, there seems to be a way, i’ll check where this info is stored#2022-05-2717:58nottmey(your notes where right, thank you!)#2022-05-2717:59Jordan Robinsonyeah, I think from memory it stores it with .idea but I was kind of hoping to have it store somewhere in the root so it could be shared with others#2022-05-2717:59Jordan Robinsonbut like I say this is all from memory so I could be wrong, hope it helped though 🙂#2022-05-2718:00nottmey#2022-05-2718:00nottmeyso that’s how you store it, nice#2022-05-2718:57AJ JaroI think there is a way to export the data as well#2022-05-2807:03cflemingYes, various people have come up with scripts to fiddle with that data. I don’t explicitly choose where to store it, it’s just using IntelliJ’s standard config mechanism.#2022-05-2718:52R.A. PorterI use parinfer, but when I paste code, I sometimes need to set structural style to off, paste, then turn back on. I looked to see if there was an option under Copy/Paste Special... to paste as though structural were off, but there was not. Is there a way to do that? If not, I'd request it as a very low-importance feature.#2022-05-2721:59johndoeIs it possible to declare somehow a custom resolve form? https://cursive-ide.com/userguide/macros.html Particularly a combination of def+let.
(some-ns/def some-sym 
  [a 0
   b 1
   ...]
  ...
  (+ a b)
  ...)
This snippet wouldn't work if mark some-ns/def as def or let because it's both of them. defn isn't suitable too. I know it's uncommon and rare someone would need this stuff, however I really-really need this.
#2022-05-3006:26johndoeJust curious, have I asked some well-known non-issue or is this just how support works with selective ignoring?#2022-05-3007:13cflemingSupport is just busy, sorry. There’s no good way to do this currently, sorry. I’m gradually working towards it, but it’s not there yet.#2022-05-3009:06onetom@U44T5FWA3 is some-ns/def defined by your project, or is it a 3rd-party one? if it's yours, then you might want to consider being less tricky with your some-ns/def and just compose it via the built-in clojure.core/def and your custom macro, which then u can set to be resolved as clojure.core/let. eg.:
(def some-sym
  (some-ns/custom-let
    [a 0
     b 1
     ...]
    ...
    (+ a b)
    ...))
it
#2022-05-3009:07onetomit's probably a small price to pay, in exchange for having symbol resolution available and hence code navigation and refactoring too.#2022-05-2722:01johndoeAll bindings are unresolved but actually are easily resolvable 😞#2022-05-3006:26johndoeJust curious, have I asked some well-known non-issue or is this just how support works with selective ignoring?#2022-05-3003:44cfleminghttps://twitter.com/CursiveIDE/status/1531118868412133376#2022-05-3004:50onetomthe fix for the cross-module symbol resolution seems to work well too! it was quite a bit of a hindrance, because even rename-refactors didn't work correctly because of it, but now that works too.#2022-05-3004:51cflemingGreat news, thanks for letting me know!#2022-05-3108:52imre@cfleming I was thinking would it be feasible to treat paths of :local/root deps (direct and transitive alike) that resolve to within the intellij project as source roots as opposed to library roots?#2022-05-3108:53imreleft a bit more detail on https://github.com/cursive-ide/cursive/issues/2554#issuecomment-1141009961 about it#2022-05-3110:23cfleming@U08BJGV6E I commented over there - I’m instinctively reluctant, but I haven’t really thought it through.#2022-05-3110:24cflemingEvery time I go back to that issue I have to refresh my memory of how Polylith works, so it takes me a while to get back into it. Real world cache invalidation!#2022-05-3110:31imreThanks for that. My suggestion isn't polylith-specific, really (I'd prefer a general solution anyway). I'll review what you wrote there and see if I can support the idea a bit more. This should solve the polylith problem in a general way I think.#2022-05-3110:33cflemingThanks, if you think it’ll support polylith in a general way I’m all ears!#2022-05-3110:36imreIt should support any monorepo project that builds on local root deps#2022-05-3116:29imreI've added a new demo case there that isn't polylith and could benefit from the same change.#2022-06-0205:45imreDoes that make sense, @cfleming?#2022-06-0210:27cfleming@U08BJGV6E I'm super busy with non-work stuff, I haven't had a chance to think it through, sorry. I'll definitely look at it, though.#2022-06-0210:34imreNo worries and thanks for replying. I just didn't want it to be forgotten 🙂 Do you mind if I check back in a few weeks if there isn't any activity on it by then?#2022-06-0210:51cflemingNot at all!#2022-06-0210:57imrethanks Colin, good luck with nonwork stuff :)#2022-06-2708:51imreHey @cfleming, have you by any chance had time to check my suggestion there?#2022-06-2801:24cflemingHey @U08BJGV6E, no I haven't, but I haven't forgotten about it either!#2022-06-2813:29imreThanks, I'll check back in another few weeks then 🙂#2022-06-2903:44cflemingI'll be back from vacation by then and will care more 🙂#2022-07-2507:22imreHey @cfleming, I thought I’d ping you again about this. Hope you had a good time off#2022-05-3110:14cfleminghttps://twitter.com/CursiveIDE/status/1531578465886932992#2022-05-3114:32chrisbroomequick question/comment: i think i found a bug in the way that the cursive repl outputs long strings that have a backslash following by the letter n: here's my input form:
{:path "C:\\some-really-long-path\\that-would-make-the-string-wrap\\and-is-followed-by-a-part-that-starts-with-the-letter-n\\new.txt"}
but the output when evaluated looks like this:
{:path "C:\\some-really-long-path\\that-would-make-the-string-wrap\\and-is-followed-by-a-part-that-starts-with-the-letter-n\
        ew.txt"}
#2022-05-3114:37chrisbroomeI think it has to do with line wrapping - strings over 120 characters exhibit the bug, but strings under that length do not#2022-05-3114:45chrisbroomeHmm... it doesn't do it if Split and align multi-line strings isn't checked... Not sure if that's a Cursive thing or not - this is under the Languages & Frameworks -> Clojure section in Preferences#2022-06-0107:48cflemingHmm, that looks like a bug, looks like it’s incorrectly treating that \n as a newline. Could you file an issue for that, please?#2022-06-0112:13chrisbroomeIssue submitted: https://github.com/cursive-ide/cursive/issues/2704#2022-06-0106:17thhellerhmm did something change in cursive formatting or is this related to my idea upgrade? suddenly it indents #_ comments even stranger than before as seen in this commit https://github.com/thheller/shadow-cljs/commit/c2c1804edd5dcdc0e188115dd95e693df48201ac#diff-627331f67433ba87fbab3a5eccd603010cfc7818f4fc1e7f8ac698214c2d7285R268-R271#2022-06-0121:24cflemingI don't think anything has changed in that code for ages, I'll take a look#2022-06-0106:17thhellerbasically I only pressed reformat code on the file which has a bunch of #_#_ comments and indented all of them differently than before#2022-06-0106:18thhellercan't really infer by what rule it is indented now https://github.com/thheller/shadow-cljs/blob/master/shadow-cljs.edn#L234-L248#2022-06-0106:19thhellerappears to be consistent between all of them though#2022-06-0110:48Rachel WestmacottI think this one has seemed odd to me for a while, but I'm mentioning it now. I use 'Extend|Shrink Selection' a lot and it seems odd after a string in the last position of a form. F.e. assuming | is the cursor position before and < / > defines the selection after I press Ctrl+W (Extend Selection) then I would expect to go from (foo "bar"|) to (foo <"bar">) but instead I seem to end up at <(foo "bar")> which seems inconsistent with other behaviour (i.e. if "bar" isn't a String) and also wasteful as I can get there from (foo "bar")| with Ctrl+W. Perhaps there's a good reason for it I've overlooked?#2022-06-0121:24cflemingI'll check this, thanks.#2022-06-0908:37Rachel WestmacottAlso does something odd with #-style anonymous functions: Again if | is the cursor and I extend selection in (juxt #(subs % 0 4)|) then current behaviour definitely violates POLA for me.#2022-06-1013:13Rachel WestmacottAlso worth checking symbols that end in a question mark. f.e. (foo pred?|)#2022-06-1013:15Rachel Westmacottor a ! or - - they also seem to break it. (though who in their right mind ends a symbol with a hyphen?)#2022-11-3017:05Rachel WestmacottStill getting inconsistencies like [foo bar|] vs. [foo bar?|] . It breaks my flow when I hit things like this but I guess this isn't a high priority.#2022-06-0114:01dvingoI am on Cursive 1.12.3-2021.3 and getting the cyclic dependency error in a clojurescript repl: https://github.com/cursive-ide/cursive/issues/2690 was this only fixed for clojure?#2022-06-0121:23cflemingUgh, I hope not, I'll check.#2022-06-0122:00dvingotried restarting intellij to see if that would help - still getting the error. this is the intellij version and cursive#2022-06-0122:01dvingothere is an intelij update - do i need to use the 2022.1.2 ?#2022-06-0205:15cflemingAh, no, the problem is that that bug is fixed in the current EAP series, not in 1.12.3. You can upgrade to the EAP, see here: https://cursive-ide.com/userguide/#choosing-to-receive-eap-beta-builds. Otherwise, I'm hoping to get a new stable build out tomorrow.#2022-06-0215:38dvingook sweet - sorry for the noise, I just clicked the "view full release notes" in the UI and it listed that fix.#2022-06-0215:39dvingoI see now, the fix is listed under the EAP build#2022-06-0213:08Lucio AssisIs there a reason why anyone would not want to "Generate stubs"? It just comes up as an annoyance to me, and I also found https://github.com/cursive-ide/cursive/issues/2556, but just curious if there would be a reason not to.#2022-06-0215:04dvingoI am in support of auto-gen too. or make it opt out with an option.#2022-06-0301:31cflemingI've moved that into the new release, and will look at it soon.#2022-06-0311:28cfleminghttps://twitter.com/CursiveIDE/status/1532685437739081728#2022-06-0311:51imreNice one, thank you! I'm assuming there are no changes since -eap3?#2022-06-0320:30cflemingNo, this is just the stable channel release, no changes for EAP users.#2022-06-0320:56imre👍:skin-tone-3:#2022-06-0314:12markaddlemanWould anyone else find it convenient to support File Structure for EDN files? My specific use case is deps.edn . I'd like to open the file structure browser, type in a few characters of a dependency to jump to that point in the file. I believe IntelliJ's has file structure support for JSON files and I imagine EDN support would be very similar.#2022-06-0314:18imreIs there no open issue about this?#2022-06-0314:18markaddlemanI didn't find one after a quick search#2022-06-0314:19imreI'd suggest you create one, perhaps with a screenshot of how it works for json?#2022-06-0314:19markaddlemanSure#2022-06-0315:05markaddlemanhttps://github.com/cursive-ide/cursive/issues/2706#2022-06-0315:10imreNice, thank you!#2022-06-0816:57Jeffrey Bayhi all - i feel like i may just be missing something obvious, but what is the keystroke to execute the current form in the cursive repl? (not the current form in the editor buffer, but the form in the repl code window where you can write little snippets of code. If you're at the end of the form, you hit enter but because of the structure of clojure code, I'm very rarely at the end of the form when i finish fixing my prior attempt.#2022-06-0818:17apbleonardI think ctrl+enter does it? If not you could try alt+enter. There's definitely a shortcut for this, which is presumably configurable in the Keymap setttings :)#2022-06-0818:27Jeffrey Bayi'm on mac, and it is cmd-enter duh, thanks. i had tried alt-enter and shift-enter and ctrl-enter and it took you mentioning ctrl-enter for me to remember the cmd key because i'm on mac. thanks 😆#2022-06-1001:10danielcomptonPSA: https://intellij-support.jetbrains.com/hc/en-us/community/posts/5996157714578-Unable-to-Download-Plugins-in-IntelliJ-IDEA-or-on-plugins-jetbrains-com#2022-06-1001:11danielcomptonYou also get a 403 if you try and download the sources from the Jetbrains plugins page: https://plugins.jetbrains.com/plugin/8090-cursive/versions/stable/181473 -> https://plugins.jetbrains.com/files/8090/181473/cursive-1.12.4-2022.2.zip?updateId=181473&amp;pluginId=8090&amp;family=INTELLIJ#2022-06-1002:02d-t-wThanks @danielcompton was just trying to bump cursive to latest and getting that 403. Guess it'll get resolved by jetbrains at some point shortly.#2022-06-1005:03parameme(Could it be AWS us-east-1 shenanigans?)#2022-06-1108:55cflemingFrom the JetBrains Platform slack: > During the last several hours, the Marketplace service couldn’t continuously provide access to the plugin updates hosted on CDN for every region. Due to the configuration issue, the target files in the cloud storage weren’t correctly resolved. > As for now, we have recognized the root cause and fixed it – the CloudFront started requesting files using duplicated parent directory in the final path of the archive file, like .../files/files/plugin-update.zip. > The problem was not immediately visible to us because of the CloudFront cache.#2022-06-1221:03danierouxSanity checking. I expected a "Resolve cursive-macro.the-macro/defc as..." to popup. And it is not? What am I missing?#2022-06-1221:03danierouxcursive_macro/macro_user.cljs:
(ns cursive-macro.macro-user
  (:require [cursive-macro.the-macro :refer [defc]]))

(defc Component
      [this props])
cursive_macro/the_macro.cljc
(ns cursive-macro.the-macro
  #?(:cljs (:require-macros cursive-macro.the-macro)))

(defmacro defc
  [& args])
#2022-06-1221:04danieroux#2022-06-1221:04danierouxAnd this leads to my Component not being resolved. Which is surprising:#2022-06-1221:04danieroux#2022-06-1300:09AJ JaroIt looks like you might be right-clicking on the definition of the macro instead of the implementation. Can you try right-clicking the 'defc' by Component instead?#2022-06-1304:40cflemingEither should work. Can you check under Preferences | Editor | Intentions | Clojure and make sure that Resolution is enabled?#2022-06-1411:00danieroux... It was not. Thank you!#2022-06-1310:31Oliver George@cfleming I think Cursive should support as-alias in require forms for CLJS now.#2022-06-1313:54dvingoit's in this EAP https://github.com/cursive-ide/cursive/milestone/205?closed=1#2022-06-1322:56cflemingYes, I believe this should be working for CLJS now, let me know if it's not.#2022-06-1323:14Oliver GeorgeHuh, perhaps I'm missing something. Here's what happens when I try :as-alias (lots of unresolved stuff highlighting) - using 1.12.4-2022.1#2022-06-1422:03cflemingI'll check that, thanks.#2022-06-1423:50kennyLoving the removal of huge tooltips from the clojure.test integration. Perhaps this is already know, but these huge, ui-freezing tooltips still occur when big exceptions are thrown. This will be noticeable with most exceptions from spec instrumentation.#2022-06-1519:50cflemingDo you mean when big exceptions are thrown in tests? I thought I had caught all those cases. Can you give an example of a simple case where the exception is still shown in a tooltip?#2022-06-1522:00kennySure. Here's a smaller example like the one I mentioned. Since Spec includes the original value in its exceptions, you can imagine with a sufficiently large value, this exception will get massive and lock up the UI like before. In this case, I'm hovering around is. I'm not quite sure why the docs are below the exception but they are in this case. I pasted the code below for convenience.
(defn my-add
  [x y]
  (+ x y))

(s/fdef my-add
  :args (s/cat :x number? :y number?)
  :ret number?)

(deftest my-add-test
  (clojure.spec.test.alpha/instrument)
  (is (= 3 (my-add 1 "")))
  (clojure.spec.test.alpha/unstrument))
#2022-06-1909:22cflemingThanks, that helps, I'll try to handle this case better. The docs are shown because they're shown when you hover in the editor, and then it tacks the tooltip (if any) on the front. I was surprised by that too.#2022-06-1513:14heliosany idea how i can teach cursive the name of a defmethod as in https://clojuredocs.org/clojure.core/defmethod#example-542692c7c026201cdc3269cd ?
(defmethod foo "a" name-of-method [params] "was a")
#2022-06-1513:17imreThere is a related discussion in the google groups https://groups.google.com/g/cursive/c/u7uhXSaai1A#2022-06-1513:18imreI don't think it's supported currently#2022-06-1513:19imreIt appears there is a related issue as well https://github.com/cursive-ide/cursive/issues/899#2022-06-1513:20heliosyep#2022-06-1513:20imregive it an upvote 🙂#2022-06-1518:55serioga@helios you can define ordinary function and assign it to multimethod using addMethod#2022-06-1518:55serioga@helios you can define ordinary function and assign it to multimethod using addMethod#2022-06-1617:00Andrei GalatynHei folks! I have an issue with the latest version of Cursive. After updating Cursive many of our tests are not working. I have discovered that the issue is somehow related to use (metrics.ring.instrument/instrument) in our middleware. With latest Cursive i can see strange errors in console, one of them:
`Error handling response - class java.lang.IllegalArgumentException: Argument for @NotNull parameter 'name' of com/intellij/psi/search/FilenameIndex.getVirtualFilesByName must not be null
` Any ideas on this? Minimalistic project to reproduce: https://github.com/galatyn/demo-cursive-error
#2022-06-1618:46Andrei Galatyn@U0567Q30W?#2022-06-1622:33cflemingAre you able to create a small repro case? That would make it much easier to look at this, I don't know how metrics.ring.instrument works.#2022-06-1707:32Andrei GalatynI will try to prepare minimalistic example.#2022-06-1915:51Andrei GalatynHi @U0567Q30W! Sorry, it took some time to extract minimal details to reproduce the issue. But now it is here: https://github.com/galatyn/demo-cursive-error#2022-06-1921:51Andrei GalatynSorry if project name is a bit offensive 🙂 I do not really know where is the issue. Most probably either Cursive or IDEA.#2022-06-2105:42cflemingNo, no problem on the name 🙂. I'll try to look at this in a bit.#2022-06-2214:08Andrei Galatyn@U0567Q30W Just updated IDEA to 2022.1.3, issue is still here. Let me know if you have any ideas what can be wrong.#2022-08-0305:17cfleming@U03LPK2G932 My apologies for the long wait for this, but this fix is out in the new EAP.#2022-08-0807:57Andrei Galatyn@U0567Q30W No problems at all! Thank you a lot for fixing the issue.#2022-06-2016:38Jordan RobinsonHey all, I have kind of a weird one where when I paste my parentheses are reordered incorrectly when using parinfer. The gif probably shows it better than I can explain, but basically with that macro that resolves as a let, the square brackets reorder and are wrong. It doesn't happen with all parentheses but does happen consistently with the same text. I'll put it in a thread to not spam the main channel too much. I recently upgraded to 2022.1.2 and 1.12.4-2022.1 and didn't see the issue up till now so it might be that's related. Please let me know if there's any more details I can provide as I appreciate it's a bit of a weird one.#2022-06-2016:38Jordan Robinsonthe snippet I'm using is
(ns service.consultation.resource-test)

(deftest foo
  (let []
    (example/macro
      []
      (kp/with-producer
        [foo bar]
        (println 
         "foo")))))
#2022-06-2016:39Jordan Robinsonand as I mentioned the kp/with-producer macro resolves as a let. If I make it resolve as none, the issue goes away, but the macro does follow the structure of a let.#2022-06-2105:47cflemingI'll try to reproduce that, thanks.#2022-06-2106:49Jordan RobinsonThanks Colin, please do let me know if there's any way I can help 🙂 loving having updated apart from this#2022-06-2104:49aratareHello @cfleming, is Cursive currently supporting standalone scripts like Babashka’s? For some of the Java projects I work on, there are a few Babashka scripts. Since I’m using IntelliJ for these Java projects, I thought I could use Cursive for these scripts but currently various features like autocomplete and code formatting don’t work very well. If the answer to the previous question is no, do you have any future plan for this?#2022-06-2105:30borkdudeHave you tried adding a bb.edn file?#2022-06-2105:46aratare@U04V15CAJ Not yet, but is that a requirement? I would like to keep things simple if possible.#2022-06-2105:46cfleming@U013F1Q1R7G Have you added Babashka as a facet to the module? Info on how to do that is here: https://cursive-ide.com/userguide/babashka.html.#2022-06-2105:48aratare@cfleming Ah I was an idiot for not checking out cursive doc first. It works beautifully now. Thanks a lot 🙂#2022-06-2105:50cflemingI'm glad to know it works for non-Clojure modules, I can't remember if I tested that or not.#2022-06-2105:50cflemingI can't think of any reason why it wouldn't, but it's good to know.#2022-06-2417:07folconJust trying this out myself, is this expected to also cover pod support?#2022-06-2422:29cflemingSo, I'm not sure. I think pod deps are returned by bb when getting dependencies from bb.edn, but my knowledge of this is hazy.#2022-06-2423:28folconIt's fine, @U04V15CAJ says they are only repl visible symbols. I've not looked at the source, but I'm assuming that they’re dynamically generated.#2022-06-2118:54Jakub Holý (HolyJak)I am constantly fighting with the formatting in Cursive which differs from my colleague's Emacs, namely I'd like:
(:require
 [myapp :as x] ; <--- [ below : not below 'r' as Cursive wants

"edge" ;; comment ; <---- no extra space between the sexp and comment (whether ;; or ;)
Any tips? 🙏 The first can be fixed by "One space list indent" but it sets that also for many other places, which is undesirable.
#2022-06-2119:41mike_ananevtry to use cljstyle https://github.com/greglook/cljstyle#2022-06-2119:43mike_ananevhere is my config for cljstyle https://github.com/redstarssystems/apptemplate/blob/master/.cljstyle#2022-06-2119:44mike_ananevHere is the example how to enable cljstyle inn IDEA https://bogoyavlensky.com/blog/clojure-formatting-cljstyle/#2022-06-2119:46mike_ananevBut I prefer not use it from IDEA, just run in terminal bb format before commit.#2022-06-2122:25Jakub Holý (HolyJak)Thank you. Our experience is that cljstyle doesn't manage to format some things the way we need (mainly custom macros) 😭#2022-06-2208:54cflemingThe comment problem can be fixed using Preferences | Editor | Code Style | Clojure | General | Comment alignment column - set that to 0.#2022-06-2208:55cflemingI don't think the requires can be formatted as you want without doing it globally using "One space list indent", though.#2022-06-2209:30Jakub Holý (HolyJak)Ok. Thank you!#2022-06-2215:15Jeffrey Bayhey all - cursive feature request - is there a reason that the "find files" dialog doesn't have an override in it to make it so that foo-bar also looks for foo_bar automagically? this is particularly difficult for new users of clojure/cursive, and even as a fairly experienced developer i make this mistake pretty frequently and have to fix the - chars to _ which just seems like something the tool could be doing for me. It does so much already that seems much more complicated!#2022-06-2215:16isakI make that mistake all the time. simple_smile#2022-06-2215:17Jeffrey Bayright? like "wtf i know this file is... oh right" 😆#2022-06-2215:20imrewhy find files over find namespaces?#2022-06-2215:21Jeffrey Baythe short answer is because I use multiple languages, and my projects even in clojure have java and txt and other files in them, so my default "search for file-like thing" is the file search#2022-06-2215:22imregotcha#2022-06-2215:23Jeffrey Baythat said, realizing there is a separate key for find namespace is at least a helpful refinement of my process for when i think of it, thanks for that#2022-06-2215:23imreHave you tried searching without - or _ ? I usually just type stuff without them and get pretty good results#2022-06-2215:23imreeven mnemonics have good results#2022-06-2215:24Jeffrey Bayyeah, that works okay too i guess. i've never been able to break myself of the habit of trying to type real names first though#2022-06-2215:24imrefbqt -> com.company.foo-bar.qux-test#2022-06-2215:24Jeffrey Bayi do sometime use the more fuzzy search that idea offers, but it's generally either because i memorized a short name (too long to type frequently) or can't find what i'm looking for#2022-06-2215:25imreIt isn't a bad feature request though, I'm not certain whether this is a change to Cursive or Idea itself#2022-06-2215:25Jeffrey Bayi would generally try to type qux- first (to disambiguate between qux and qux-test quickly.#2022-06-2215:26Jeffrey Baythe reason i default to the beginning of the name rather than abbeviations is because that's what i'm frequently typing in the code so my fingers develop macros for the names 🙂#2022-06-2215:26imregotcha#2022-06-2400:04cflemingI'm not sure about this actually, definitely seems a reasonable request though. Could you file an issue, and I'll check? Not sure it's possible though, depends whether IntelliJ permits it.#2022-06-2400:42Jeffrey Bayi'm not sure how to file an issue#2022-06-2400:43Jeffrey Bayis this it? cursive-ide/cursive on github?#2022-06-2400:43Jeffrey Baylmk and if so i will file an issue there in the morning#2022-06-2410:19imreThat's the one. Theres even a bookmark in the slack channel#2022-06-2415:49Jeffrey Bayissue #2709 submitted#2022-06-2215:42mbjarlandMeh so I'm trying to get cursive to grok pathom's defresolver macro. Can't get it to work and I suspect I'm doing something less than brilliant here. I have three issues (and perhaps solving number one solves the other two...not sure): 1. Even though I think cursive is not understanding the macro correctly I do not get the intention lightbulb which is how most of the docs seem to suggest fixing the macro interpretation 2. If I go to settings > languages & frameworks > clojure > symbol resolution I can see an empty list but as far as I can see there is no way of actually manually adding one here 3. Formatting: if I go to settings > editor > code style > clojure > form parameters there seems to be some custom stuff there (fulcro, etc) and there is a + button, but hitting it does nothing. I was hoping to add the macro as a form and perhaps get closer to correct formatting for it. I have a custom scheme selected so I assume it should be possible. This one might be by design?#2022-06-2215:48mbjarlandok...I take it back...I invalidated my indexes and magically things started working again...lightbulb is back and macro added to symbol resolution#2022-06-2215:49markaddlemanNot sure if you know this already: defresolver can be resolved as defn#2022-06-2215:50mbjarlandyes, thank you I saw that in the docs and that was my intent as well. Problem was there was no way to do that when the lightbulb was absent. All good now though after invalidating indexes. Thanks for the heads up.#2022-06-2215:50mbjarlandwas not aware of the brittleness with the indexes...interesting.#2022-06-2215:52markaddlemanyeah, intellij's indexes can be brittle - although i've noticed things are much better in later versions. The one thing that I've seen screw them up regularly is an intellij crash.#2022-06-2216:31Colin P. HillAnyone ever have an issue like this? This always happens in my leiningen projects until I run lein deps on the command line.
12:29	Dependency resolution error
		Error synchronising <my project>:
		Failed to collect dependencies at babashka:process:jar:0.1.2
#2022-06-2312:27kennytilton@cfleming, where did we leave the Cursive implementation of https://www.emacswiki.org/emacs/MouseCopy? ISTR a 90+% solution in a patch or sth. Is that out there and I do not know it?! 🙂 Hmm, I always forget to check your excellent doc. 👀 now...#2022-06-2316:39kennytiltonDid not see anything in the doc or the keymap, FWIW.#2022-06-2400:05cflemingI don't think that ever got released. IIRC there was a change I was going to make to make it work better, I'll try to take a look soon.#2022-06-2411:11kennytiltonThx, @cfleming. This is an amazing feature once one gets a chance to use it for a few days. Please let me know if I can clarify the expected behavior at any point.#2022-06-2409:28onetomis it intentional, that i can jump from arbitrary vars - defined by simply a def - to their tests, only from ones defined with defn? jumping from a test back to its var works, though. i would often use this defining datomic queries, but also for rmaps, which are just seemingly maps, but contain deferred computations, in form of recursive values, aka rvals (https://github.com/aroemers/rmap).#2022-06-2422:36cflemingNo, it's not - there shouldn't be any difference.#2022-06-2413:18Tatiane BerrocalHello. I have a little problem with my repl. I don’t know why but stop to run.Does anyone have any ideas?#2022-06-2422:35cflemingLooks like you have a unicode escaped char in your deps.edn which is invalid.#2022-06-2416:59folconIs there any support for babashka? Just wondering as I loaded a project and I'm getting a lot of stuff not being resolved.#2022-06-2417:01dpsuttonthis thread is a few days old and might be helpful: https://clojurians.slack.com/archives/C0744GXCJ/p1655786947469479#2022-06-2417:39borkdudehttps://cursive-ide.com/userguide/babashka.html#2022-06-2417:40folconThanks @U04V15CAJ, one thing that I've not gotten working is pod support. Symbols don't appear to resolve there#2022-06-2417:41borkdude@U0JUM502E those symbols aren't statically visible, just in the REPL#2022-06-2417:42folconOh ok#2022-06-2417:42folconThat makes sense#2022-06-2520:07Tatiane BerrocalHello people, I still have problem with my cursive x intellij. When I try to run nrepl, cursive response “No nREPL connection details received”. I installed new version of cursive but still have a problem. (I am not able to see all functionality like “load namespace”)… Has anyone seem it?#2022-06-2600:37Ashwin Bhaskarhello cursive developers, I have a registered cursive plugin on intellij. For some reason I don't get the intention light-bulb anymore. What could be the reason for this?#2022-06-2621:32cflemingCheck under Settings | Editor | Intentions and ensure that the Clojure ones are enabled.#2022-06-2610:43Yevgeni TsodikovHi all, Does Cursive support https://github.com/bbatsov/clojure-style-guide#document-references, as suggested in the Clojure style guide?#2022-06-2610:47Ivar RefsdalDoes not seem like it here, no link for kangaroo in this example/test.#2022-06-2611:30Yevgeni TsodikovDoesn’t work for me either, at least with the out-of-the-box settings. I was wondering if this is an opt-in behavior or a missing behavior?#2022-06-2621:32cflemingIt doesn't right now, but will soon.#2022-06-2621:59Ivan KozDo we have a way to set default namespace for nrepl started via deps.edn? Lein does it via middleware, nrepl team is just thinking of implement the directive for that.#2022-06-2801:27cflemingYou could use the same middleware using this: https://cursive-ide.com/userguide/repl.html#configuring-middleware-for-nrepl-repls#2022-06-2717:59Jeffrey Baythe codebase i'm in has several "multi-def" macros, where the code looks like:
(this-macro-defines-each-arg 
  arg1
  arg2
  arg3
  ...)
Is there any way to tell it about this so that it will "know" that all of these symbols are def'd here? I.e., treat it as a (def form for each symbol encountered? I tried telling it it was a def but that only gets the first one (which makes sense as that's how def works...)
#2022-06-2719:13imretry telling it to treat as declare#2022-06-2815:45Jeffrey Baythat worked, btw, sorry, i meant to reply that, thanks much!#2022-06-2815:54imreNice. It is fortunate that your macro behaves similarly to declare, unfortunately there isn't too much flexibility in Cursive right now in this area#2022-06-2719:35wilkerluciois there a way to export/import REPL commands?#2022-06-2719:57imre
#$ ~/Library/Application Support/JetBrains/IdeaIC2022.2/options
; ls repl-commands.xml
repl-commands.xml
#2022-06-2719:58imreI have it symlinked to my dotfiles#2022-06-2913:42wilkerluciothanks, that worked great!#2022-06-2913:42imreglad it was useful!#2022-06-2813:19reefersleepHow can you prevent a module from being managed by maven?
15.12	Maven module detected: Module x is managed by Maven and cannot be managed by  Leiningen at the same time.
#2022-06-2813:22reefersleepI also have the following error in the run configuration for the module: Run Configuration Error: The Clojure jar is not attached to this module#2022-06-2813:23reefersleepAnd what I’m really trying to solve is not the error messages, but that Cursive does not recognise the code:#2022-06-2813:34reefersleepRemoving and re-adding the module “fixed” these problems. I learned nothing about what caused them, though 🙂 🤡#2022-06-2813:23reefersleepMaybe the error messages are related, maybe not, idk#2022-06-2813:28JAtkinsHas anyone had cursive “run away” on cpu usage? For some reason in the past 2 weeks this has happened 3 times, where cursive starts taking ~500% cpu until I kill it. FWIW I’m on a brand new M1 mbp. I captured a performance profile from IJ last time this happened if that’s helpful. It seems to be related to indexing kicking off, though it continues well after indexing has finished#2022-06-2813:34reefersleepRemoving and re-adding the module “fixed” these problems. I learned nothing about what caused them, though 🙂 🤡#2022-06-2909:18simongrayLately I’m not receiving most log messages that I was used to. I wonder what changed? If I require e.g. clojure.tools.logging and try to execute some of the logging functions nothing is printed… I have no idea what changed or how to get back my logging output.#2022-06-2909:34Ivar RefsdalIs this a remote repl? Does it print on the console there?#2022-06-2909:37Ivar RefsdalI opened this issue in 2019 (!): https://github.com/nrepl/nrepl/issues/119#2022-06-2909:37Ivar RefsdalIt has a gist that solves the issue...#2022-06-2909:49simongrayno, local one#2022-06-2910:07simongrayMystery solved: I recently switched my REPL invocation in Run Configurations from Run with deps to Run with IntelliJ project classpath and apparently using the latter kills most logging…? Very odd, but going back to Run with deps solves the issue for me so… 🤷#2022-06-2910:48simongray@U0567Q30W Do you have any idea why this differs?#2022-06-2912:14Alex Miller (Clojure team)If you can try both cases, start a repl and (System/getProperty “java.class.path”) and compare#2022-06-2912:15Alex Miller (Clojure team)If I had to guess, in one case you're missing a logging config resource or something like that#2022-06-3001:33staypufd@U4P4NREBY Was what Alex mentions the issue?#2022-06-3007:20Ivar RefsdalRun with IntelliJ project classpath works, and is what I usually choose, here. What type of REPL are you starting? clojure.main or nREPL?#2022-06-2909:18simongraynot even sure it’s a Cursive issue tbh…#2022-06-3005:35onetomI seems, that in a REPL command definition, with the options shown on the screenshot, Before executing: Sync all modified files happens BEFORE Save all files before executing. 1. is it really the case? 2. what's the rationale for this order? 3. would it be possible to swap the order? Reason for the swap: If my REPL command would run eg. kaocha.repl/run, I would expect the current editor tab to be saved AND also reloaded, because now it's considered modified (on the filesystem too). This would enable me to change the implementation of a function-under-test and re-run the corresponding tests with a single keystroke, without jumping to the test namespace. It would also work, if I would be modifying the test namespace only, OR if i modified the implementation (without explicitly saving it), BUT also jumped to the test namespace.#2022-06-3005:36onetomfor reference, the rest of the REPL command is: > Name: Run all tests or selected one with Kaocha Execute command:
(do (when-not (resolve 'user/focused-test) (intern 'user 'focused-test (atom nil)))
    (when (:test (meta #'~current-var)) (reset! user/focused-test '~current-var))
    (time
      (if-let [t @user/focused-test]
        (do (require (symbol (namespace t)) :reload)
            ((requiring-resolve 'kaocha.repl/run) t))
        ((requiring-resolve 'kaocha.repl/run-all)))))
#2022-06-3005:39onetomthis would be a great workflow enhancement, because it has derailed our though processes numerous times, when we saw unexpected test results, because the tests ran against an older implementation. practically all of our namespaces are reload-friendly and won't reset any application state, so instead of keeping track of what defs and defns being modified and evaluating them all the time, we just load complete namespaces, or simply all modified namespaces.#2022-06-3005:39onetomthat way we can trust that whatever is in our editor buffers is what runs in the REPL.#2022-06-3005:52onetomwe also have a Re-execute last command REPL command, as shown on the screenshot. and a probe function, which is available in most of our namespaces:
(defn probe
  ([x]
   (println "\nPROBE: ")
   (pp x)
   x)
  ([xform x]
   (probe (xform x))
   x))
#2022-06-3005:56onetomhaving these to facilities, we can just drop a probe - without any parens - into threading forms, in any implementation namespace, and without saving or evaluating the changed def or defn, we can either 1. with Cmd-R, re-run the last test 2. with Cmd-Ctrl-Enter, re-run the expression, we evaluated the last time
#2022-06-3005:57onetomit would be a wonderfully simple workflow, if it wouldn't be for the issues arising from the ordering of saving and loading files before executing REPL commands.#2022-07-0703:32onetomi just remembered, that this issue was already filed here: https://github.com/cursive-ide/cursive/issues/2612#2022-06-3006:50stammiHey all, I was delighted to find the menu item Help -&gt; Show Cursive Cheat Sheet, which I imagine to be quite helpful in our team. Unfortunately it opens file:///tmp/cheat-sheet.html in the browser, which does not exist.#2022-07-0101:17onetomi guess, it must be an OS-specific issue, because for me, on macOS, it works and it opened file:///private/var/folders/bf/twwtz52n1mxc4psynq8xkfb40000gn/T/cheat-sheet.html on Cursive 1.12.4-2022.1 & IntelliJ Ultimate 2022.1.3#2022-06-3006:55stammiJust realized that feature is quite old 😀#2022-06-3010:43Rachel WestmacottMinor feature request: if I (:require [foo.core :as-alias foo]) and then later I try to actually use foo (f.e. (foo/some-function x y z) it would be super handy if Cursive told me off before it failed to load in the REPL.#2022-06-3010:52imreI wonder if #clj-kondo has a linter for this (cc @U04V15CAJ)? If yes, you should be able to use that via #clj-extras-plugin on top of Cursive to get a warning/error.#2022-06-3010:53Rachel Westmacottoh, that's a good point. Last time I tried clj-extras-plugin it all went horribly wrong, but I heard more recently that it's quite good so I should give it another try anyway!#2022-06-3010:54Rachel Westmacott(not sure what happened - it may have been a case of pebkac rather than anything wrong with the tools)#2022-06-3010:54imreI’ve been using it without trouble lately. Mind that if you want to use it with 2022.2 EAP you’ll need a custom build#2022-06-3010:55borkdudeclj-kondo might not already have a linter for this#2022-06-3010:55borkdudebut feel free to post an issue and or PR#2022-07-0101:20onetomon the release version - 2022.1.3 - of intellij ultimate, i don't have any serious issues with the #clj-extras-plugin either.#2022-07-0101:31onetomi do see an occasional false positive warning, but it doesn't throw exceptions randomly. my main reason for using it is to have the namespace part of keywords and symbols highlighted differently. clj-kondo integration in it is nice, too but it very very rarely tells me anything useful, which i wouldn't already know or Cursive itself wouldn't indicate anyway. on the other hand, the false positives as are annoying... but i guess, that's just me, because im staring at clojure code for ~7+ years by now and my brain already does a lot of linting 🙂 the inline evaluation is also very nice, but i don't use that either, because i often pair-program, and having ephemeral evaluation results gets in the way for staying in sync with the pairing partner. but even alone, i find myself scrolling back the evaluation history to review the results of previous evaluations, to revise the conclusions i made about them. i can clearly see, if i forgot to evaluate a form or forgot to reload a namespace. that's all lost with inline eval, so i don't quite understand why so many people want it. regardless, it great to have these options and clj-extras is a solid addition to the clojure toolbox!#2022-07-0101:46onetom@U0FR9C8RZ > ... Cursive told me off before it failed to load in the REPL why is it a problem to find out the issue at load time? i have the feeling, that you are not reloading your REPL namespace often and routinely for some reason. probably, because u have some state in it, which u don't want to lose. that can be avoided by using defonce. i also combine it with redelay (https://functionalbytes.nl/clojure/redelay/rmap/2020/06/26/redelay.html), so i can do something like this:
(defonce some-state (redelay #(define initial state 123)))
(comment
  (.close some-state)
  (-> @some-state ...)
  )
or if u don't like the @, u can also have (defn some-state [] @some-state*) or perhaps it does side-effects at load time? u can put those into try/catch, if u really must do some side-effects. otherwise, just define a function and keep an example invocation of it in a rich-comment. that means, now 2 have to load the REPL NS, find the side-effecting call in the rich-comment and eval it. it's slightly more involved, BUT now it's extremely unlikely to end up with a broken REPL NS. finally, i can imagine that you are putting stuff, which can break, into a user.clj. don't do that, because it's indeed annoying, that u can't even have a REPL, which would allow u to start diagnosing some problems. instead, we are using a bunch of *-repl namespaces, which are under a dev/ source path, so they won't get deployed.
#2022-07-0108:24Rachel WestmacottIt would be better to find out from a specific linting rule, rather than from a REPL error, because the message could be more helpful and more local to the problem. FWIW I think I load/reload my namespaces quite a lot (I too have been staring at Clojure code for 7+ years 😉 - maybe as many as 10 in fact.)#2022-07-0108:26borkdude@U0FR9C8RZ I posted an issue here: https://github.com/clj-kondo/clj-kondo/issues/1742 I agree that it would be quite useful.#2022-07-0106:56RomanHi all, I am trying to cofigure a local REPL in Intellij but it would not run. See the attached stack traces. Any idea on how to approach the problem?#2022-07-0106:57Romanhere is my config#2022-07-0108:31imreI see nothing wrong with your config. I do note that you have “run with intellij project classpath” selected - have you also selected the needed profiles in the Leiningen tool window (and refreshed the project afterwards)?#2022-07-0111:46Romanthanks a lot @U08BJGV6E, I figured out by chance what the problem was. I am on ubuntu and clojure code does not compile on an encrypted file system. Normally the compilation ends up with a 'File name too long' error. I had this problem before but in this case I failed to connect the dots since I have not seen this exact error message. I tried to run lein test on the cli and this time I got the 'File name too long' error plus the error from above. So I moved the project to an unencrypted partition and the errors disappeared both for lein test and for starting a local REPL.#2022-07-0111:46imreokay, that’s a weird one 😅#2022-07-0116:45aptHi folks. I’m not familiar with the intellij/cursive plugins ecosystem, I’d like to know if it would be possible to add a plugin (or something like that) that does something like this: 1) user uses some shortcut 2) cursive evaluate a predefined function, taking the thing at the cursor as the argument. For example, in (f|oo/bar xum), where | is the cursor, cursive would send (my-predefined-fn foo/bar) to the repl. 3) interpret the response (it’s a json string) for presenting a menu to the user. the menu represents a list of actions. 4) choose and action and, again, evaluate a predefined function with the given response I implemented this in Emacs, I’m wondering if it would be possible to create a similar plugin for Intellij. (I know, this use case is a bit strange, the lib I’m developing could present a GUI using Clojure in a separate window, but I’m evaluating if integration with editors is possible).#2022-07-0116:48imreI think https://cursive-ide.com/userguide/repl.html#repl-commands is what you’re looking for#2022-07-0116:51aptCool! I think this is part of the answer. Now, I’m wondering if I can get the evaluation result and somehow present a menu to the user, using IntelliJ’s GUIs stuff. Something like the print below, which is from Emacs.#2022-07-0116:59imreThe result of the repl command is going to go to the repl#2022-07-0117:01aptGot it. So I guess it’s not possible to manipulate the output and do other stuff in the editor itself. Thanks :thumbsup:#2022-07-0117:01imreAnd I’m not sure there’s an easy way to access it. I’m thinking for what you want to do you’d need to write your own intellij plugin. #clj-extras-plugin does something similar, it extends Cursive’s functionality with stuff like clj-kondo integration and inline eval#2022-07-0117:03aptOh, that’s a good pointer. Yeah, it might require writing a plugin. If the plugin you mentioned eval stuff and presents it inline, I suppose it’s possible to do what I want. Thanks again gratitude#2022-07-0313:54onetom@U976F1AR2 if u depend on such a custom workflow, then what is your motivation for using intellij/cursive?#2022-07-0323:32aptI don’t use cursive, I’m evaluating if integrating some functionality with editors is worth it (for making other ppl have a similar experience).#2022-07-0700:43onetom@U976F1AR2 in other words, you are looking into the Cursive features/workflow, to see how to achieve something similar in Emacs? Because I'd be interested in something like that too! What I found to be great about Cursive, compared to CIDER, are the following: 1. prints the evaluated forms into the REPL window, not just the evaluation results 2. evaluation results are pretty-printed, but with extra intelligence for long strings, which are automatically chopped up into a sequence of narrower strings 3. stack traces are also printed into the REPL window, they are unmangled and often have links back to the code (although, it's also a hindrance too, because it often obscures error messages, which might be printed several pages above) 4. stdout, stderr & REPL client errors are all printed to the same REPL window, as the evaluated expressions and their evaluation results, so i don't have to hunt them down in separate windows. (this is kinda like what u would get with any inferior process integration in Emacs, including inf-clojure) 5. it has a great compromise regarding the set of evaluation and structural navigation/editing commands, so it's not as overwhelming as CIDER, which is great for onboarding new Clojure programmers. we can save them from choice-paralysis.... (this is one of those cases, where the "less is more" principle worked well. i started to miss other evaluation options though, but only after 7 years!) 6. it's not Emacs-level customizable, BUT still have a "REPL commands" feature for extension, which can also be delivered to every developer of a project via version control. i could do similar thing with run configurations, using .dir-locals.el, but im not sure how can i distribute CIDER "extensions" in a way that they are automatically picked up by other Emacs devs. 7. the whole REPL client / REPL middleware injection is nicely kept seamless. i wish i would know more about how it works, but for beginners it's a blessing not to deal with such gory details 8. "Sync modified files" is a great feature and saves you from integrating clojure.tools.namespace/refresh into your project and making it aware of it. of course it's not as good, because it doesn't unload namespaces, but highly simplifies the workflow.#2022-07-0700:48onetom9. built-in auto-formatting is great, IF your whole team is on Cursive, because it's just there, without installing anything extra, comes with great default settings, integrated to the version control interface, so it can auto-format before committing and it only has a single keyboard shortcut, which works on the whole file or the selection. no electric-indent, indent-aggressively, reindent current form with tab (though, there is some Emacs-like TAB feature), clj-format, joker, etc etc. simply gets out of the way. it's not so great for multi-editor teams though, because no other formatting tool formats exactly the same way as Cursive 😄#2022-07-0701:23aptHi @U086D6TBN. > in other words, you are looking into the Cursive features/workflow, to see how to achieve something similar in Emacs? It’s actually the other way around, for a specific feature. Let me explain my use case. I use Emacs with inf-clojure. I like its simplicity and I have my own customizations that replicate some cider features, add some keybindings, etc. Now, I’m experimenting a new workflow. The basic idea is getting context-sensitive actions based on symbol at point, that is, the symbol the cursor is over (I suppose you know Emacs terminology). The actions are selected by a Clojure lib (let’s call it lib) So, for example, if the cursor is over schema.core, I can do this: • Press a keybinding • Emacs calls a lib macro passing the symbol or form at point as argument, using inf-clojure--process-response. • The lib calculates what are the apropriate actions given its put (more on that later). It returns a json. • Emacs reads the json and presents the results using completing-read, as shown in the image. Some actions examples: clojure test: run test, run last test (it holds state); ns: switch, dir, remove file: slurp function: doc, source map, vector & others: inspect, inspect tree Now, those actions are mostly already provided by editors, in a way or another. And you can obviously just call them manually anyway. So having them is, well, not impressive. However, it has a few advantages: 1) only actions that make sense for the thing at point are displayed. 2) the emacs command can be called from any buffer. It works in source code, but also in the repl. So, if there’s an ns printed in the repl, you could switch to it, to give a trivial example. 3) lib is supposed to be extensible. To extend on 3: I’m adding actions that know what the a test is an integration test (ie, uses https://github.com/nubank/state-flow, for the purposes of nubank) and provides actions for generating sequence diagram related to them. The code that generate the sequence diagrams do not reside in lib, but this workflow makes it possible to remember that it exists and call it easily. In fact, one of the motivations for lib is that even if we create great tools that are useful in a dev context, simply remembering their namespaces and libs might be hard.#2022-07-0701:27aptIn any case, I’ve used IntelliJ for a few months and I see other people using it at work, and I agree with your remarks. On 5), I was surprised that it doesn’t have a convenient way of evaluating the last sexp (or maybe I’m missed it). But then, in any case, people don’t miss it 🤷#2022-07-0701:40aptSo, that’s the motivation of my original question. I’m wondering how difficult it would be to have this workflow in intelliJ. (I could also make lib have a GUI that implemented this menu, sure, but having to switch windows and loose context would be slightly less convenient)#2022-07-0306:32Ivan KozWin 10, latest CLJ, Idea and Cursive, OpenJDK
java.lang.RuntimeException: Unsupported escape character: \.
Exception at com.github.brcosta.cljstuffplugin.actions.AnalyzeClasspathAction$analyzeWithBuiltinLinter$1.run(AnalyzeClasspathAction.kt:81)
#2022-07-0307:04imreThis isn't cursive, try #clj-extras-plugin#2022-07-0307:08Ivan Kozty#2022-09-2902:33joshuamzmI'm having the same problem with the Unsupported escape character: \ expection in IntelliJ. I've already installed Clojure Extras plugin, but it is not helping. Is anyone else experiencing this problem as well?#2022-09-2907:49imre-> #clj-extras-plugin#2022-09-2902:33joshuamzmI'm having the same problem with the Unsupported escape character: \ expection in IntelliJ. I've already installed Clojure Extras plugin, but it is not helping. Is anyone else experiencing this problem as well?#2022-07-0609:59KamuelaI'm guessing this is fairly simple to solve, but I've got an existing project that doesn't have a JDK configured. I'm not sure how to configure it after a project is already loaded into IntelliJ. In fact, I only seem to get an option to choose a JDK when creating a new project. The docs show an "import" option, but if I delete the .idea directory and Open the project, there's no prompt for what kind of project it is or anything. Just loads it up as, what I can see, a fairly normal leiningen project, but then complains that REPL can't be launched on a right click of project.clj because a JDK runtime could not be found. So yeah, where in the preferences can I set the project's JDK?#2022-07-0610:06kennytiltonIntelliJ is a bit huge, eh? Even the attempts to explain where to find things fall short. But their own doc may show how to get to the JDK: https://www.jetbrains.com/help/idea/sdk.html#manage_sdks Happy hunting. 🙂 Ah, half way down on the right "Set up the project JDK". hth#2022-07-0610:14KamuelaThank you. File -> Project Structure. Wasn't in settings at all#2022-07-0612:02kennytiltonbtw, @U0KLE4WHZ, the way I start using I/J initially with a given existing project is "File>New>Project from existing sources". I can do that safely with a project already being worked. At the end it will ask if you want to overwrite any existing .idea. Just confirm. You are right, btw, "Open" just opens the directory for editing.#2022-07-0701:00onetom@U0KLE4WHZ Cursive documentation mentions the Project SDK setup, though for creating/importing new projects only: https://cursive-ide.com/userguide/first-repl.html https://cursive-ide.com/userguide/leiningen.html https://cursive-ide.com/userguide/deps.html https://cursive-ide.com/userguide/projects.html#2022-07-0701:02onetomworth reading that whole user guide! it's written very concisely, but yet in enough detail, to get a solid understanding of all of Cursive's capabilities. definitely worth the time reading it!#2022-07-0620:10reefersleepI recently learned about git worktree and would love to use this ability to have different branches of a project checked out at the same time. However, it seems a manual hassle to set up the new project, run configuration etc in Cursive. Is there a good solution for this?#2022-07-0700:57onetomi'd very interested in something like this, because it's quite a hassle to switch between branches and constantly stashing/shelving changes. i would much prefer to just have just duplicate source trees checked out, but there should be some good way to distinguish them when opened in parallel and that should probably be a IDE-level feature, which doesn't exist IMHO#2022-07-0702:13cflemingI'm not sure what the answer to this is, I'll have to investigate git worktree.#2022-07-0702:15cflemingIt seems like this would probably have to be supported by IntelliJ's git support, but there's not much out there, basically this: https://stackoverflow.com/questions/36438333/how-do-i-use-git-worktrees-in-intellij-idea-2016-1#2022-07-0722:19cflemingIs there anything Cursive-specific you would want from this, or is it more of an IntelliJ question?#2022-07-0807:20reefersleepI guess it’s more of an IntelliJ question, but I’d love for the Cursive stuff to work as well. I don’t care about IntelliJ’s git support in this regard. What I envision is this: I’m working on feature A and I’m spinning up the environment. Someone asks me about feature b. I create a worktree, check out their branch, look at their code (in Cursive), answer their question, delete the worktree, and start using Cursive for feature A, which is now done spinning up. The problem, as I see it, is not git support. I do my git stuff elsewhere. It’s the setting up of the project files, REPL and other project specific stuff to do with IntelliJ/Cursive, that I want to avoid having to do every time I do git worktree add ./temporary.#2022-07-0807:24reefersleepI know git worktree is probably not widely used, so I didn’t expect any specific support for it 🙂 I was just hoping that there was! 😄#2022-07-0807:28reefersleepI read a different thread where Dmitriy Smirnov, one of the IntelliJ maintainers, said that you could commit the idea project files. I don’t like that for this project at work, lots of different people working on it, and I’d like the project to be free of cruft like that. But I get the idea (heh)#2022-07-0807:32reefersleepAlternative; git worktree add ./alternate and then never remove it. Set up project files once, then reuse it every time I want to do some temporary stuff. I figure that might work for most of my use cases. It’s nowhere near as limber as I’d hoped for, but I can still git worktree add ./another when I don’t need to use IntelliJ, e.g. when I just need to read something as plaintext in nvim or less or whatever.#2022-07-0807:34reefersleepMaybe there’s some easy, git-worktree-unrelated way to copy idea files and have them “just work”™ under a different folder? (tbh I haven’t even tried just copying them, yet 😅 )#2022-07-0807:44reefersleepThread is here: https://youtrack.jetbrains.com/issue/IDEA-209749#2022-07-0817:24justinhi there -- clojure/cursive newbie here and trying to get things set up to work with colleagues using emacs. in the Clojure for the Brave and True book (emacs chapter) it says:
When editing Clojure, it's best to have a set of Clojure-specific key bindings, like C-c C-k to load the current buffer into a REPL and compile it.
is there a cursive equivalent for this keybinding to compile? we have some downstream tools that have compilation prerequisites and i'm trying to figure out how to compile individual files in cursive. thank you!
#2022-07-0819:02kennytiltonMy fingers want to say "shift-command-L"...yep, that loads the current file/namespace. "shift-command-P" sends the current top-level sexp to the repl.#2022-07-0819:22justinoh nice, let me give it a try. thanks!#2022-07-0819:44imreThe intellij action name is "load file in repl" afair#2022-07-0820:59kennytiltonbtw, @U03N2FSMV42, once you have launched a Clojure repl in I/J, there will be a whole new submenu for "REPL" on the Tools menu. It will have the clojure logo next to it. That will then show you various repl commands and their keychords, if any. And you can change keychord assignments in InteliJ with sufficient preferences/settings bashing.#2022-07-0823:43justinworked like magic -- thank you!#2022-07-1102:01onetomthis article put together a very emacs-like keybinding config for cursive: http://mishadoff.com/blog/idea-for-clojure/ your cider colleagues might feel right at home with it.#2022-07-0901:21justinone other question... in emacs we have some keybindings that provide shortcuts to custom test commands. one such test is "take the line of text that the cursor is on in the test file, and run a particular type of test with this line of text as its input." i'm trying to figure out how to set up the same type of thing in cursive. it looks like there is this "Create new REPL command" dialog that seems promising, but i'm not sure where to begin with variables, etc. is there any documentation for this / advice about a better way to do something similar? thank you!#2022-07-0920:14imreSee about two thirds down this page https://cursive-ide.com/userguide/repl.html#2022-07-0922:05justingreat! this is helpful — thank you! i’ll play around some with this.#2022-07-1018:05Ivan Kozis this a bug or am i missing something?
Starting nREPL server...
"C:\Program Files\Microsoft\jdk-17.0.2.8-hotspot\bin\java.exe" -Dclojure.tools.logging.factory=clojure.tools.logging.impl/slf4j-factory "--add-opens java.base/java.util.concurrent=ALL-UNNAMED" ....

Unrecognized option: --add-opens java.base/java.util.concurrent=ALL-UNNAMED
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.

deps.edn
:aliases {:dev {:jvm-opts ["-Dclojure.tools.logging.factory=clojure.tools.logging.impl/slf4j-factory"
                           "--add-opens java.base/java.util.concurrent=ALL-UNNAMED"]}
#2022-07-1019:12Bob BI think the option name and the value need to be separate strings - also not sure if this is really a cursive thing - seems to be recreateable just using the CLI with the alias#2022-07-1019:28Ivan Kozwow ty, strange thing indeed, this has worked
{:jvm-opts ["--add-opens" "java.base/java.util.concurrent=ALL-UNNAMED"
            "-Dclojure.tools.logging.factory=clojure.tools.logging.impl/slf4j-factory"]}
#2022-07-1118:35Vincent PizzoIs there anyway to have Cursive honor the following or achieve the same behavior once can do with disabling reload with tools namespace?
(:require [clojure.tools.namespace.repl :as ctnr])
(ctnr/disable-reload!)
We very occasionally get Cursive reloading our defprotocol namespace which then essentially breaks our code until we do a clean or surgically reload classes. It looks like it just adds a :clojure.tools.namespace.repl/load false to the metadata on the namespace and was wondering if Cursive has any built in logic to do this same thing?
#2022-07-1222:51cflemingNo, there’s nothing like that at the moment. If it’s a useful thing to do, could you file an issue for it?#2022-07-1222:52Vincent PizzoAbsolutely. Thanks, Colin!#2022-07-1222:53Vincent Pizzohttps://github.com/cursive-ide/cursive/issues/2714 . Cheers.#2022-07-1320:31imreDo note that Cursive does not re load namespaces as tns does, it simply loads them, often transitively.#2022-07-1218:47Jeffrey Bayhas anyone ever seen the cursive nrepl cause the target JVM to shut down when you close the repl tab? It doesn't happen consistently, but it has happened several times today as I was trying to reproduce it.#2022-07-1222:50cflemingIs this a JVM that Cursive started, or one that you started and connected with a remote REPL?#2022-07-1223:07Jeffrey Bayremote nrepl connection using "connect to server" with a local port forward#2022-07-1223:07Jeffrey Bay(local port forward meaning the connect to server connection is localhost and hard coded port)#2022-07-1223:08cflemingIn that case, I can’t think of anything that could cause Cursive to shut down the remote JVM - it doesn’t know anything at all about the process.#2022-07-1223:08Jeffrey Baythe port forward is to another machine, and the repl works correctly, but intermittently (1/10?) when i close the repl tab, the jvm on the other end shuts down#2022-07-1223:09cflemingThere must be something else going on, but I can’t imagine what it might be.#2022-07-2615:47Björn Ebbinghaus@U03A0EGF82E I had a similar problem with a Babashka nREPL, I don't know if this may be related to your problem. After I have produced a stack overflow, when I disconnected from the nREPL, that nREPL process crashed with a segfault. https://github.com/babashka/babashka/issues/1104#2022-07-2615:49Jeffrey Bayah - mine was to a non-bb nrepl session#2022-07-2615:51Jeffrey Baybut interesting thing to try, anyway#2022-07-1316:44scarytomI noticed that there are thousands of files in my tmp directory of the form system-deps1234.edn that are being produced by the IntelliJ process. I assume this is a by-product of something Cursive is doing? I know they aren't harmful, but I'm intrigued as to why hundreds seem to be added every day.#2022-07-1319:33Jeffrey Bayi'm on a mac, so probably slightly different environment, but I don't experience this behavior. I would suspect that you have something in your specific setup that is causing it?#2022-07-1319:34Jeffrey BayHave you tried creating an empty intellij/cursive project and seeing if it still happens?#2022-07-1319:34Jeffrey Bayif not, you could binary chop parts back in to see if you can figure out what is actually causing it#2022-07-1319:35Jeffrey BayI'm using cursive in an SOA type project with 20+ individual intellij project files, btw, and I have none of these files at all. I did reboot yesterday, so it would only be files generated from my cursive usage today, but I've been working all day...#2022-07-1321:05scarytominteresting. Thanks for looking Jeffrey. I've asked a few of my colleagues and they all see these files, so I suspect it is something to do with our project configuration.#2022-07-1323:36cfleming@UCQV87CN7 Are you using the “Use tools.deps directly” option? I think what’s happening is that Cursive has to pull the system deps file out of the deps jar, and it puts it in a temporary file. It’s possible those are not cleaned up correctly - I’ll check. But you can delete them with no ill effects.#2022-07-1522:42scarytomNo, I'm not using that option @U0567Q30W#2022-07-1523:06cflemingInteresting, thanks. I’ll investigate that.#2022-07-1810:08scarytomWhat's strange is quite how prolific these are. I have 4 clojure projects open in IntelliJ, but right now I'm not actively working in the IDE at all (just reading email in another window) yet another 25 edn files have been written in the last 5 minutes! If it helps, I've attached one of the files.#2022-07-1822:33cflemingRight, that’s the system deps.edn file, which is extracted from the deps jar. I’ll check when those are generated, I thought I was creating a stable path for them but it looks like I’m not.#2022-07-2921:40scarytomDid you discover anything interesting?#2022-07-2923:49cflemingSo, I’m not creating a stable path for them, I just create a temporary file. However, deleteOnExit() is called on them - does closing IntelliJ tidy them up?#2022-07-2923:49cflemingStill not a great solution, of course.#2022-07-2923:57cfleminghttps://github.com/cursive-ide/cursive/issues/2719#2022-07-2923:58cflemingAnswering my own question, it looks like they are cleaned up correctly on process exit (at least on my macOS machine), but it’s probably a better idea to clean them up earlier.#2022-07-3020:06scarytomYes, they do seem to vanish if I close IntelliJ... I just never do that. Thanks for looking into this#2022-07-3021:31cflemingI’ve made a change such that there’s only one file created per version of deps in use. That will still hang around until you close the IDE, but you’ll probably only have a couple of them at any one time.#2022-07-3113:33scarytomThat's great, thanks#2022-08-0305:16cflemingThis is out in the new EAP.#2022-07-1420:34Jeffrey Bayi have a deps.edn src path to a relative dir outside my project... i guess that isn't supported by cursive/babashka?#2022-07-1420:35Jeffrey Bay(all of the relevant namespaces/symbols are showing as unfound symbols even though the executable runs fine)#2022-07-1420:36borkdudedeps.edn doesn't support ../../ directories in :paths, but :local/root does#2022-07-1420:36Jeffrey Baynot familiar with :local/root do you have docu you can point me to?#2022-07-1420:36Jeffrey Bayor an example?#2022-07-1420:37Jeffrey Bay(google has been unhelpful for that - local roots farm? 😆 )#2022-07-1420:37borkdude:)#2022-07-1420:37Jeffrey Bayoh i think i found it#2022-07-1420:37borkdude
{my/other-project {:local/root "../../some-dir"}}
#2022-07-1420:38Jeffrey Baynice - can even name it that way, that's actually better. thanks#2022-07-1420:41Jeffrey Bayhmm, that doesn't seem to change anything#2022-07-1420:44Jeffrey Bayi suspect the other project isn't configured right for using the deps structure to work#2022-07-1420:44Jeffrey Bayit's really just "another src dir"#2022-07-1420:46Jeffrey Bayit's possible it has to do with the naming - i'm not quite clear on what the name corresponds to in the deps.edn :deps key vs where it is being used in a :require keyword and what the connection across is. i guess i'll have to read more about deps#2022-07-1421:33Mr. SavyIs there any point to connecting a remote cursive nrepl to a headless leiningen nrepl server vs just spinning up a local repl in cursive with leiningen?#2022-07-1421:34cflemingNot really. The only reasons would be if you can’t start the REPL inside Cursive for some reason (it can happen due to lein plugins), or you need to start it in some strange way. But those edge conditions aside, there’s no reason to do so.#2022-07-1421:35Mr. Savyawesome, thanks colin!#2022-07-1519:39serioga@U012MJU8XNU remote repl can survive idea restart 🙂#2022-07-1720:08Ernesto GarciaIs there a way to prevent that nested forms change indentation when barfed in, or slurped out? Like in:
(if (neg? i)          
  ())                 
(cons (get s i)       
      (rec s (dec i)))
After barfing at the if form:
(if (neg? i)         
  ()                 
  (cons (get s i)    
    (rec s (dec i)))) ; <-- re-indented
#2022-07-1808:46imreI think that’s because Cursive reformats modified code after the slurp. If the above one is your preferred formatting for cons, you can set its indentation to “Function” I believe to keep it after reformats#2022-07-1808:50Ernesto GarciaI choose the proper indentation based on the function used, or on the context sometimes. I would want Cursive to respect the existing indentation. There is no reason to change it.#2022-07-1808:53imreWhat would you expect to happen in this case when you ask idea/cursive to reformat the file? Or would you just avoid using that action altogether?#2022-07-1808:53Ernesto GarciaThank for your suggestion though. That might help me most of the time, if I configure the functions for which I typically use aligned parameters.#2022-07-1808:54Ernesto GarciaI don't rely on automatic formatting of Clojure code. Indentation is part of the way I express code.#2022-07-1808:56imreGotcha#2022-07-1808:56imreJust asking as this sounds like a feature request and it would be great to get most of it right on the first try in case it’s implemented#2022-07-1809:08Ernesto GarciaThat would depend on the expectations. From my pov, one wouldn't expect barf and slurp to change the format of existing nested forms.#2022-07-1814:53isakYou are going against the grain here, I wouldn't expect this to change. Paredit isn't really about artistic code freedom, it is more like the opposite.#2022-07-1815:42Ernesto GarciaI think it is quite valuable for these structural editing operations to preserve existing code layout as much as they can, both for the case of intentional deviations from the formatting rules currently set at the IDE, and for the maintenance of existing code for which we don't want to introduce collateral formatting changes. This doesn't go against applying automatic reindents when needed. Those may be done explicitly anytime. (In my experience this is an extremely rare operation. Basically, I never need to do it when using Clojure).#2022-07-2006:44octahedrionI wish Cursive didn't reformat my code after structural editing too#2022-07-2007:36Ernesto GarciaI opened https://github.com/cursive-ide/cursive/issues/2716. You may want to support it.#2022-07-2401:03AJ JaroRecently, in a deps.edn project, files come up in search and usage search from a directory marked as excluded. In my case, these are “compiled” files so it’s pretty annoying because I should not be editing those. Is there an additional configuration I need for this or did this break recently?#2022-07-2409:08cflemingI can’t think of anything that should cause this. This all happens at the IntelliJ level, rather than Cursive, so something must have changed there. It’s possible the project has just gotten funky, have you tried unmarking the directory and then remarking it as excluded?#2022-07-2411:46AJ JaroI haven't but I will try that and get back to you#2022-07-2508:15danielcompton@UGMAVSMUM does your deps.edn file include that directory anywhere in an alias?#2022-07-2516:36AJ JaroThe deps.edn does not include that directory in an alias, but it includes it in path. Could that be why?#2022-07-2518:03danielcomptonYeah, if you have enabled that alias in Cursive settings #2022-07-2521:07cflemingIs the directory marked in the project view as excluded? It’ll have a different colour, and if you right click it you’ll see an option “Mark directory as… | Not excluded”.#2022-08-0914:32AJ JaroI changed my project configuration now and have everything as modules. That solved this problem but made another one…#2022-07-2514:56Victor MataréHey... I'm having some issues with remote debugging over a kubernetes port-forwarding. It works perfectly when I connect directly to a local JDWP socket (i.e. on localhost), but when I run the exact same jar in a container and connect to the JDWP port through a kubernetes port forwarding, I can't set breakpoints on clojure code or step through it. I know that the JDWP does work in principle because I can interrupt execution (with the pause button), which will take me to a decompiled Java frame, from where I can step through the Java code, but can't seem to get to the clojure level in any way. When I try to set a breakpoint, the red dot appears and everything seems fine, only the debugger will never stop there. When monitoring the TCP connection with tcpdump, I can see that setting the breakpoint causes an endless back-and-forth on the JDWP port (thousands upon thousands of packets if I let it go for 10-15 minutes), which doesn't appear to ever terminate. When setting a breakpoint locally (successfully), I see a few (maybe 10-20) packets going back and forth on the connection. Is there some known issue here or does anyone know a better way to debug what's going wrong on the JDWP connection?#2022-07-2602:48cflemingHmm, this is probably a bit specialised, sorry - I really don’t know. Do breakpoints work in Java over the port forwarding?#2022-07-2610:58Victor MataréYes, I can debug the underlying Java code completely fine. Breakpoints work, values are displayed, I can see all threads, etc. I can even set breakpoints in the Java implementation of Clojure functions and then step out of the Java level and into our Clojure application code from there. Amazingly, I can then step through our Clojure code, see its locals and it all looks fine. It appears that I just can't set any breakpoints. I even put a breakpoint on the exact line the program is stopped at, and it just triggers this endless network traffic. The little check mark also never appears btw. Is there some additional logging on the Cursive debugger implementation that I could activate? Or any other way to figure out what's going on there?#2022-07-2611:39Victor MataréOh wow, I've just let it run for almost half an hour and it seems that the breakpoint is finally set and the debugger is breaking there. Now I wanted to disable the breakpoint (not remove, just disable), and again I'm seeing huge amounts of network traffic that will probably again take ages to complete. Seems to me like there's a lot of unnecessary overhead going on there. In particular, why could there be so much more traffic than when I'm debugging a locally started JAR? I really need some way to find out what information the Cursive debugger is exchanging (or trying to exchange) with the debug server here...#2022-07-2709:05cflemingSo, I can’t fully explain this, but what I suspect is that you’re being bitten by the fact that Clojure bytecode is poorly designed for debugging using JDI. My memory of this is that to set a breakpoint, you have to specify the class that the breakpoint is in. In Java this is trivial, but in Clojure it’s impossible since class names tend to have autogenerated numbers in them. To work around this, I seem to recall that I could use a simple wildcard, but that means that I basically had to do namespace$* for the classname, which can match a lot of classes. I suspect this is why debugging Clojure code is so slow.#2022-07-2709:06cflemingI’ve been meaning to reach out to JetBrains to see if they could help me fix this - I’ll try to get around to this since I would like to know definitively if there’s a better way. I can’t be the only one with this problem.#2022-07-2713:25Victor MataréRight, I watched your talk about the Cursive debugger on youtube and I remember you briefly mentioning this issue. So basically what I'm seeing here is Cursive querying all (generated) class names that exist in our namespace(s)? Several things come to mind: • You query everything every time I manipulate a breakpoint because code might have changed? If this true, can't we have a switch to disable that if we know that we won't be live-changing any code? • You said there's no way to predict the generated class names. Maybe there is a way to query them locally? At the very least there could be a way for Cursive to simply look at the compiled class files and find all the required information in there...?#2022-07-2720:42cflemingSo, maybe? But I’m not so familiar with the debugger infrastructure, and it’s very complex these days. I’ll reach out to JetBrains and see if I can get some help.#2022-07-2808:42Ovidiu StoicaHello, first of all thank you for this amazing tool. I come from a js background and I am curious what it would take for cursive/intellij to do static analysis on the JS dependencies in clojurescript since it seems to do that already in the java code. • Example 1: Go to definition works on Java (maybe IntelliJ and not cursive?) But when importing something from an NPM module, you cannot go to the definition of that file • Example 2: Autocomplete on JS objects. I played around with emacs and I saw that when you start a REPL with cider, you get autocomplete on keys from javascript objects and so on but this is not the case in Cursive since all the completion relies on static analysis if i’m not mistaken. IntelliJ already provides static analysis for JS dependencies/files. What would we need to use that functionality inside ClojureScript files to benefit from completion, documentation and go to definitions?#2022-07-2808:44Ovidiu StoicaAs a side node, I think this is the only thing missing for me to make this the best ClojureScript editor experience and have more JS devs migrate I tried emacs just to get better completion but I just couldn’t get away from using cursive because it is way too good. Only after not using it, did I realize how good it actually was 😄#2022-07-2809:09imreNot trying to drive you away from Cursive (I have been a happy and constant user since 2014) but have you had a look at VS Code + Calva? While I haven’t been doing ClojureScript for years now, for some reason I think it currently might have an edge over Cursive in modern cljs support. I’m not certain though, just asking whether you tried it.#2022-07-2809:56Ovidiu StoicaYes, I tried Calva + VS Code. VS Code has been my editor for 4-5 years. Couldn’t go back after switching to Cursive + IntelliJ, even for pure JS projects. Main issue (for me) is that it does not support vim which is a deal breaker for me. I think you are right, since it uses cider underneath, it should have the same functionality as Emacs. Still, I find the best experience is in Cursive and since this is important to JS devs, I figured to open the discussion#2022-07-2901:16cflemingI’ve been unwilling to add support to Cursive relying on IntelliJ’s JS support, because that support would only be available on paid versions of IntelliJ. However, the sad fact is I’m not getting around to a better solution on my own because of the enormous nature of the task. So I’m reconsidering this at the moment.#2022-07-2904:40Ovidiu StoicaI’m already on the paid version, so for me it would be perfect. Indeed, I see what you mean that even if you include it, it would be limited to paid users, which I’m not sure the % of cursive users who are. If you put a survey on wether to include intelliJ’s JS support on the paid version I would say yes 😄#2022-07-2904:41cflemingHehe, for sure. Originally (which is going back a long time now) I was quite resistant to the idea. But I’ve toyed with it from time to time, I think I’ll try a PoC to see how much better it works and how much work is involved.#2022-07-2904:42cflemingBasically the alternative is a huge amount of work. One thing I was considering was to use TypeScript types for IDE functionality, I think they’re available for almost everything these days. But that still doesn’t work properly for e.g. navigation to source.#2022-07-2906:07Ovidiu StoicaI see. Yes indeed. Other IDEs from what I know use LSP for all of that, but it would tax performance quite a bit. Here’s the scenario for a JS dev that also does clojure (which means semi dabling in java source from time to time) You either pay for intellij or buy webstorm. However intellij paid already has all of webstorm installed so you get a better deal with intellij at a cheaper price. This is why I didnt buy webstorm after my student license expired. What I’m trying to say with this is that people that work in the jet brains ecosystem, if they do clojurescript, most likely already have the paid intelliJ. Disclaimer: This is a conclusion from my individual experience and may not apply to others#2022-07-2906:08Ovidiu StoicaRegarding to the PoC, I will gladly test it out for feedback if you like!!#2022-07-2923:27surferHalo@cfleming https://tscrowley.dev/#/posts/2020-20-07-boonmee?id=boonmee Check this, Please make it happen. IntelliJ has best Java Interop experience, If Cursive make ClojureScript intellisense of Javascript/Typescript .d.ts in npm package, I will definitely switched from vscode to cursive and being a paid user. As @ovidiu.stoica1094 said and with my experience, the dynamic nature of LSP is not smooth as IntelliJ’s.#2022-07-3002:08salami, for one, would want proper JS support even if it means it’s only available on the paid edition. #2022-07-3011:28steveb8nI'm interested in this. I have a typescript react UI layer in a reframe app using interop. If exported types were useful it would definitely be a DX upgrade#2022-07-2813:04Ertugrul CetinHi 👋:skin-tone-2:, I'm using Cursive and I set aliases to dev, when I run the REPL it does not load the namespace that defined in deps configuration file
:aliases {:dev {:main-opts ["--init" "src/my/server/core.clj"
                             "--eval" "(my.server.core/-main)"]}}
Here is my https://stackoverflow.com/questions/62193057/what-is-equivalent-of-leiningen-repl-options-init-ns-user-for-tools-deps-in Also there is https://old.reddit.com/r/Clojure/comments/fzjyw8/depsedn_how_to_declare_init_ns_and_init_fn_for_a/ I guess Cursive is using -R on aliases rather than -A ?
#2022-07-2901:18cflemingSo there’s a recent issue which is similar to this, I commented on it here: https://github.com/cursive-ide/cursive/issues/2322#issuecomment-1097566491#2022-07-2901:18cflemingHowever that doesn’t look exactly like your case.#2022-07-2901:20cflemingJust checking, is your dev profile enabled in your REPL run config?#2022-07-2907:00Ertugrul CetinYes, it is enabled (I'm able to run dev-specific fn in REPL). I think this looks like my problem. I need :repl-options 's :init and :init-ns functionality like leiningen has.#2022-07-2923:27surferHalo@cfleming https://tscrowley.dev/#/posts/2020-20-07-boonmee?id=boonmee Check this, Please make it happen. IntelliJ has best Java Interop experience, If Cursive make ClojureScript intellisense of Javascript/Typescript .d.ts in npm package, I will definitely switched from vscode to cursive and being a paid user. As @ovidiu.stoica1094 said and with my experience, the dynamic nature of LSP is not smooth as IntelliJ’s.#2022-07-2911:07Ernesto GarciaHi all. Right now I'm seeing Re-frame reg-event-*s listed inside my "Structure" Tool Window, but not reg-sub s. What could be the reason for that?#2022-08-0406:01cflemingI’m not sure, it looks like that should work, looking at the code. I’ll try to reproduce that.#2022-08-0803:31cflemingI just tried to reproduce this, and I’m not seeing reg-event-*s in the structure either.#2022-08-0804:29cflemingOk, I think I have figured out the problem here. Could it be that your events are registered using namespaced keywords, and the subs are registered using bare non-namespaced ones?#2022-08-0808:11Ernesto GarciaThanks for looking into it. I have namespace-qualified keywords in both cases.#2022-08-0808:12Ernesto GarciaNavigation to the subscriptions does work.#2022-08-0808:12cflemingIn that case, I’m not sure what’s going on, I can’t reproduce that. I’ll fiddle around a little more. Is this a public project I could look at?#2022-08-0808:13Ernesto GarciaIt is not. But I could try to reproduce it in a toy project.#2022-08-0808:13cflemingThat would be great, if you could.#2022-08-0808:14Ernesto GarciaSo, on your side, you see both events and subscriptions in the Structure window?#2022-08-0808:16cflemingYes, I do, e.g. this from the conduit example app. Note that the second sub isn’t shown, but that’s because it’s using a non-namespaced keyword. There was a really long discussion at one point about why this was so, but I can’t find it now.#2022-07-3015:20Joe R. SmithIs it possible to get cursive to resolve method names using the java interop .. macro? e.g.:#2022-07-3015:24imrethere should be at least one related issue at https://git.io/cursive-issues - feel free to upvote them#2022-07-3016:10Joe R. SmithI did not find one that matched, but I opened a new one 🙂 https://github.com/cursive-ide/cursive/issues/2720#2022-07-3017:10imrehttps://github.com/cursive-ide/cursive/issues/2413#2022-07-3017:11imrecould be related#2022-07-3017:11imrehttps://github.com/cursive-ide/cursive/issues/321#2022-07-3015:55imreIs there a way to configure indentation for a symbol to be absolute zero? Example in thread.#2022-07-3015:56imre
(my-macro

(+ 1 1)

)
#2022-07-3015:56imreSo to not indent the args of the macro at all#2022-07-3022:32cflemingHmm, I don’t think there is, sorry. There are no forms like that at the moment, even comment gets indented (although I can see why you might not want it to be).#2022-07-3022:37imreshould I open an issue?#2022-08-0207:59cflemingUmm, sure, but no guarantees on that one, I’ll have to think about it.#2022-08-0208:01imrehttps://github.com/cgrand/macrovich has a few macros that could utilise this#2022-08-0208:01imreI'll open one later today for your consideration#2022-08-0208:01cflemingYes, and I can see why you might want it for other top-level wrapping forms.#2022-08-0208:03imreTop-level is probably an important phrase there, I don't see wanting to do this elsewhere. Or perhaps inside nested wrapping forms#2022-08-0210:22imreI ended up finding an existing issue, from @U051KLSJF, obviously https://github.com/cursive-ide/cursive/issues/979#2022-08-0110:45kwladykascicloj/scicloj.ml {:mvn/version "0.2.1"}
(ns ai.scicloj-experiment
  (:require [scicloj.ml.core :as ml]
            [scicloj.ml.metamorph :as mm]
            [scicloj.ml.dataset :as ds]))
Is it possible to do something to make Cursive see this ns?
#2022-08-0110:49imreCursive sees the namespace alright, it’s the way that namespace exports stuff that throws it off. I think the solution would be to add it to Cursive’s stub generation but that’s a Colin thing#2022-08-0110:53kwladykaI got this info: > This problem is specific to Cursive and other tools that do some code analysis to determine if things are defined or not. http://scicloj.ml does some tricks with its namespaces, which are not compatible with the approach of these tools. If I remember Curisve doesn’t see ns which are created dynamically or something like that#2022-08-0110:56imre> Curisve doesn’t see ns which are created dynamically This is probably right as Cursive (similarly to clj-kondo) does static analysis which work off the set of source files. I don’t think this is what’s happening in your case. It appears to me that the namespace in question exists as a source file: https://github.com/scicloj/scicloj.ml/blob/main/src/scicloj/ml/dataset.clj#2022-08-0110:56imreCursive can resolve ds as far as I understand, just not ds/dataset#2022-08-0110:57kwladykacorrect#2022-08-0110:58imrehere’s a related issue https://github.com/cursive-ide/cursive/issues/2573#2022-08-0111:50kwladykaI am just thinking if: 1) there is anything what I can do as an user to make it works 2) scicloj can fix this 3) curisve can fix this and on which one I should really “wait” 😉#2022-08-0112:05imreI think this is a 3#2022-08-0121:23cflemingYes, I’ll have a look at that issue and see if it’s an easy fix.#2022-08-0212:11kwladykaThank you#2022-08-0212:12kwladykaBTW you are doing really good work @U0567Q30W. Cursive is the best.#2022-08-0300:39cflemingThanks for the kind words!#2022-08-2110:02kwladykahey, do you have any ETA for this one?#2022-11-1510:22ABeltramoI'm hitting the same issue, does ml/pipeline or mm/model work for you? It's not being picked up in my IDE as well..#2022-11-1521:33cflemingI’ll try to look at this today.#2022-11-1620:12Carsten BehringI will change to "code generation" in the next version of This requires first a new release of tech.ml.dataset PR was made: https://github.com/techascent/tech.ml.dataset/pull/334#2022-11-1703:07cfleming@U7CAHM72M Does this mean that all the code will be explicitly generated into the project, rather than being dynamically created at runtime? If that’s the case, hopefully Cursive (and I guess clj-kondo and the like) will be able to index it easily.#2022-11-1922:04Carsten BehringYes, exactly. I have it working locally, just some depended project needs to be slightly adapted and released#2022-11-2000:05cflemingGreat, I will wait for that then and do some testing to ensure it works with Cursive - thanks for doing this! I’ve been meaning to fix the scicloj stuff up with Cursive but hadn’t got around to it.#2022-08-0112:15Ivar RefsdalAdd option "Always generate stubs (for this project|for all projects)" #2556 is fixed for the next build! Thanks Colin! https://github.com/cursive-ide/cursive/issues/2556#2022-08-0305:16cflemingThis is out now!#2022-08-0304:56cfleminghttps://twitter.com/CursiveIDE/status/1554692477499899904#2022-08-0310:00JoniHas anyone ran into this kind of an issue that when Idea is restarted, the module settings automatically generate additional content roots based on the source-paths given in the project.clj file? These extra content roots cause that the “find usages” feature breaks and doesn’t work from the “common” module to the other modules. The common project is code shared by a few different projects and this same issue is in all of the projects that are using the shared project in the source path. Is there some better way to manage this so these extra content roots are not generated or can I somehow stop idea from analyzing project sources on each startup and every time some dependencies change?#2022-08-0311:00JoniThe other approach to this is that you use https://codeberg.org/leiningen/leiningen/src/branch/stable/doc/TUTORIAL.md#checkout-dependencies in which the commonly shared project which is being developed simultaneously is added to the /checkouts/ folder as a symlink, but that causes the common module to get all kinds of crazy with the content roots. And this happens everytime you restart Idea or the dependencies change. This pretty minor inconvenience is driving me nuts, and would really appreciate if anyone had any insight as to how this kind of project structure should be managed with Idea. 😄#2022-08-0314:49Sam AdamsI have definitely run into this, but unfortunately I don't have any workaround#2022-08-0405:50cflemingYes, checkout dependencies have some issues at the moment, I’ll try to look at them soon. It’s definitely the case that IntelliJ only likes one module at a time to be using a single source root. I’m looking at a similar issue at the moment with deps, so I’ll try to look at this in the next couple of days.#2022-09-1411:19souenzzo@UMBC73RK9 you are using lein checkout ? I'm trying to use it. Using REPL with Run with Lein etc but it never includes my checkouts in the classpath,#2022-09-1411:23JoniDo you mean this https://github.com/timvisher/lein-checkout? If you do we are not using that, we just created the checkouts folders ourself and added those to the source-paths where necessary#2022-09-1411:23souenzzooh. OK!#2022-09-1411:24souenzzoI can't understand how cursive works with https://mvnrepository.com/artifact/lein-parent/lein-parent but do not work with lein-checkout. Does it have special code to handle lein parent @U0567Q30W?#2022-08-0417:01salami’m not sure if this was reported before but this started happening when using the Socket REPL since the latest EAP. i usually see these after my computer wakes up from the sleep mode, if that helps:#2022-08-0417:09salamhere’s the relevant portion of the log:#2022-08-0422:24cflemingHmm, I’ll take a look at that. Some of the connection code changed in the latest EAP to support picking up the port from a file, but that shouldn’t affect the connection once established.#2022-08-0507:27cflemingJust to clarify, you mentioned that you see this after your computer wakes up from sleep, but do you see this on a new connection after it wakes up, or is it an existing REPL that you opened before putting the computer to sleep?#2022-08-0516:42salamit's the latter. #2022-08-0802:55cflemingDid that definitely work in previous versions? I can’t see anything that has changed that might have caused that.#2022-08-0805:26salamaha! https://clojurians.slack.com/archives/C0744GXCJ/p1640297485457300#2022-08-0805:35cflemingAh, yes, that looks like it might be the same issue, and the sleeping is a red herring. I filed an issue, but it turns out there already was one: https://github.com/cursive-ide/cursive/issues/2603. I’ve moved that to the current EAP series.#2022-08-0510:06Rachel WestmacottDoes anyone know how to change the font size in the REPL input/output panes?#2022-08-0510:21imreeditor > color scheme > console font#2022-08-0519:32kwladyka
[binance-api.trade :as binance-trade]
Curisve can resolve this vs
[binance-api
             ...
             [trade :as binance-trade]]
but can’t resolve this
#2022-08-0616:27KamuelaShould my workflow be save to editor and then Restart REPL? Or am I missing something fundamental?#2022-08-0616:33thhellerhttps://cursive-ide.com/userguide/repl.html#using-the-repl#2022-08-0617:16KamuelaSync files in REPL is likely what I'm looking for then#2022-08-0617:17KamuelaMaybe not... I dunno, that restart REPL does feel like a heavy operation, but it kinda does what I expect#2022-08-0617:17Alex Miller (Clojure team)there are a few different ways people work (restarting the repl is not one of them)#2022-08-0617:17Alex Miller (Clojure team)some people only (or mostly) evaluate individual expressions from the editor#2022-08-0617:18Alex Miller (Clojure team)that page does not seem to cover that, but there are actions to evaluate the prior form at the cursor or top level form you're in#2022-08-0617:19Alex Miller (Clojure team)often people work like this in (comment ) blocks in the file they're in#2022-08-0617:20Alex Miller (Clojure team)other people tend to reload the current file as they edit (load file in repl) ... this is my typical mode of working. I'm not sure it's the best, but it is a habit I developed long ago#2022-08-0617:22Alex Miller (Clojure team)and then other people follow the mode of "refreshing" or "syncing" the repl by reloading all changed files. you might also see this called the "reloaded" pattern. Cursive's "Sync files in REPL" seems to be of this mode. I didn't even realize Cursive had that, but I've never used it.#2022-08-0617:25Alex Miller (Clojure team)typically I find that just reloading the current file is sufficient for me to have the repl runtime state "follow" my changes. there are a few well-known cases where the Clojure runtime stores things that can go stale - namely protocol and multimethod implementations, well and I guess things like defonce. if you are reloading a sufficient set of files and have a good mental model of how those work, you can avoid issues there. in last case, I'll restart.#2022-08-0617:31KamuelaI removed a function and added a dummy function called thing, and when I did the sync files after removing it, it remained in the REPL. When I restarted the REPL, it was gone. That's what I'm noticing with sync files. Is that expected behavior? Because I, too, am banking on sync files to be the way to go, but that's strange behavior, and if I restart the REPL, I get what I expect#2022-08-0617:32KamuelaAlso, perhaps in a larger project restarting the REPL would be a heavy operation, but it takes under a second in my toy situation at the moment#2022-08-0617:36KamuelaLoad file in REPL also keeps removed functions. Perhaps that makes sense to people and I just need to change my expectation?#2022-08-0617:37KamuelaIn the case of changing an implementation, I confirm that both sync and load do reflect those changes. So maybe it's not an issue#2022-08-0617:38Alex Miller (Clojure team)that is expected - the clojure runtime stores state across the set of loaded namespaces, which have vars, which have state. syncing and reloading will re-populate that state, but won't generally remove it.#2022-08-0617:40Alex Miller (Clojure team)there are ways to remove vars, like (ns-unmap *ns* 'fn-to-remove)#2022-08-0617:45Alex Miller (Clojure team)the reloaded workflow actually unloads, then reloads to avoid this. generally, I do not find that to be worth doing. if I remove enough stuff that it's annoying me (like renaming a bunch of tests), then I'll restart the repl#2022-08-0620:12Jordan RobinsonRelated; is there a nice way to list what's loaded and, crucially, when it was loaded in? I tend to use re-run last test in repl a lot, and it does seem to sometimes miss things. At the minute I just restart repl if things seem off, but if there's a way to avoid that it would be great#2022-08-0620:26dpsutton(comment (require ‘the-ns :reload)) can give you confidence#2022-08-0621:26cflemingThat doc page about using the REPL could really do with some love.#2022-08-0700:15salamhave you thought about crowdsourcing the Cursive doc? 🙂#2022-08-0706:12cflemingSo, yes I have. What’s holding me back at the moment is that the build of the doc is very complicated. Maintaining the screenshots was a nightmare, so I now script and automate the IDE to take them, and take them with a frankentool which calls Apple APIs directly. So now it’s a different sort of nightmare 🙂#2022-08-0706:12cflemingTo be clear, it’s much much better, but it would be hard to get someone other than me using it.#2022-08-0707:53BenjaminOn linux I would like to figure out something for actually copying some text into the system clipboard. Do you know how to achieve this? If I can define a command (ideavim is an option, I use it) where I can subst in the current selected text, that would be the fix#2022-08-0707:54Benjaminctrl+c puts it into the x selection#2022-08-0709:12cflemingI’m not sure what you mean by this. What is the difference between the x selection and the system clipboard? Is that a Linux thing?#2022-08-0709:13Benjaminyes there is at least 2 clipboards. I'm not sure but I think there is a third#2022-08-0709:14cflemingHmm, I’m not sure about this to be honest. But that would be an IntelliJ thing, so there might be info on the internet about this for IntelliJ in general.#2022-08-0709:14Benjaminyea true#2022-08-0709:15Benjaminthe kind of results on intellij googles are usually really basic usage stuff, that's why I came here#2022-08-0709:16cflemingYeah, definitely, it can be hard to find good info. I don’t use Linux though, there should be more Linux users around who might have a better idea.#2022-08-0709:17Benjamin:thumbsup:#2022-08-0709:17Benjaminfor my question I have a good enough solution. If I do ctrl+c in intellij, I can get the string with xclip -o#2022-08-0719:32joshkhafter setting up Intellij + Cursive on a new MacOS machine, one project is giving me loads of unresolved symbols. the https://cursive-ide.com/userguide/troubleshooting.html#help-lots-of-symbols-don-t-resolve was insightful but no luck here.. i think it's down to:
Errors during project resolution
The following errors were found during project resolve: /MyProject/deps.edn: status code: 401, reason phrase: Unauthorized (401) 
which i suspect is from the deps.edn dependency:
{:mvn/repos {"datomic-cloud" {:url ""}}}
everything else seems fine. starting a REPL outside of IntelliJ works. i've (re)loaded the project as a deps.edn project, invalidated caches, and confirmed the JRE is set up in the project/modules. and if it matters my aws CLI is configured properly. currently on the latest version of IntelliJ and Cursive. maybe someone can help? thanks!
#2022-08-0721:42cflemingHi @U0H46T23C, can you do a clojure -Stree or something similar on the command line?#2022-08-0721:56joshkhthanks @U0567Q30W. that works as expected from the command line. i get the full tree without any issues.#2022-08-0722:09cflemingDoes that repo need any authentication from env vars, or anything like that?#2022-08-0921:11joshkhsorry for disappearing there, @U0567Q30W. i think that repo is accessible when one has a valid profile configured via the AWS CLI, which i do have and tested by successfully firing up the repl from the command line.#2022-08-0921:25joshkhi figured it out. it was actually this dependency:
{:mvn/repos {"cognitect-dev-tools" {:url ""}}}
which required me to include some auth data in my ~/.m2/settings.xml file 🙂 sorry for the noise!
#2022-08-0922:51cflemingPhew! No problem, I love resolutions when I don’t have to do anything 🙂. It would be nice if the error included the repo name, I’ll check if that comes back in the error at all.#2022-08-0807:35heliosI am not able to see the actual error message for a test failure, what's up? FWIW in this project i've never been able to 😞 There's no way of showing the difference#2022-08-0808:19cflemingHmm, I’m not sure. Is this a project I can look at?#2022-08-0808:19cflemingWhich version of Cursive are you on?#2022-08-0808:20heliosUnfortunately not. Latest intellij and EAP cursive#2022-08-0808:20heliosBut it has been like this for a while now (i just wasn't writing too many tests 😂)#2022-08-0808:21heliosFor what is worth we're using https://github.com/nubank/state-flow#2022-08-0808:21heliosSo even though they are normal clojure tests, there's a few layers in between that maybe hide it from cursive#2022-08-0808:44imreI guess a minimal repro case could help#2022-08-0809:01cflemingThat would definitely help.#2022-08-0808:25danmIs there any plan to work on this: https://github.com/cursive-ide/cursive/issues/1929 at some point? I can see that ticket was raised in 2018, and has had no comments or similar on it since. We've just started running REPLs via bazel, because we're also using it for all our builds etc, and at the moment we're getting output appear in the terminal that the REPL itself is running in, not in the IntelliJ window that is connected to it. We also sometimes connect REPLs to our running system (K8s pods in AWS) to debug it, and hit the same problem there - some of the output we want ends up going to the pod log rather than the IntelliJ window#2022-08-0809:28cflemingYou might actually be able to do that these days with no change to Cursive, using the .nrepl.edn config file, see https://cursive-ide.com/userguide/repl.html#configuring-middleware-for-nrepl-repls.#2022-08-0809:28cflemingIf that won’t work for whatever reason, let me know and I’ll look at that issue more closely.#2022-08-0809:30cflemingJust to be clear, I think you should be able to use that config file to configure the CIDER middleware for your REPL.#2022-08-0811:11danmOoh, interesting. Will give it a whirl, ta 😄#2022-08-0816:09danmHmm, so I've gone digging, and we're already launching the REPL with all the relevant middleware running#2022-08-0816:09danmAnyone who is already using Emacs+CIDER gets their output as expected
#2022-08-0816:10danmBut I don't in Cursive#2022-08-0816:11danmBut I have to admit I don't understand why, if the REPL server is being loaded with that middleware running, it would not send the output back to the connected Cursive REPL session#2022-08-0817:21danmAhha, asking in #nrepl and I got this https://clojurians.slack.com/archives/C17JYSA3H/p1659976888613829 Looks like I need to work out how to get the nREPL client from within Cursive, and send the out-subscribe message to it. But this is something that is lower level than the REPL I'm used to interacting with, I think. Need to dig more. If I can do it in our user space that'll do for now, though if Cursive would do it automatically if the middleware was loaded, like Emacs does, that would be 🎉#2022-08-0818:18Ivar RefsdalCross post from #nrepl as well, this gist has solved this issue for me (and other people here as well): https://gist.github.com/daviesian/4517859 nrepl issue: https://github.com/nrepl/nrepl/issues/119#2022-08-0819:21danmI've fixed it with the following, which runs on REPL load because it's in our auto-loaded user ns:
(ns user
  (:require [nrepl.core :as nrepl]
            [nrepl.misc :refer [uuid]])
  (:import ( ConnectException)))

(try
  (let [client (-> (nrepl/connect {:host "localhost" :port 4005})
                   (nrepl/client 1000))]
    (nrepl/message client {:id (uuid) :op "out-subscribe"}))
  (catch ConnectException _)) ; Don't care if it fails, we're probably not a remote REPL
#2022-08-0819:23danmObviously it's a bit hacky, and you'd probably want something cleaner in Cursive proper, if it ran on every REPL start. Probably using the hostname/port provided in the config (I just know ours is always localhost with port forwards, and 4005), and actually checking if the middleware is loaded, like CIDER does, rather than just a try...catch#2022-08-0822:12cflemingOk, thanks for all that investigation! I’ll look at robustifying Cursive there.#2022-08-0822:16cflemingIs it a reasonable assumption that if that middleware is present then the client will always want to subscribe? I’m thinking probably yes.#2022-08-0905:58danmThat certainly seems to be the assumption that CIDER makes#2022-08-0907:45cflemingActually, I’m not sure about that, in this code snippet: https://clojurians.slack.com/archives/C17JYSA3H/p1659977276803309?thread_ts=1659976888.613829&amp;cid=C17JYSA3H#2022-08-0907:45cflemingThe cider-redirect-server-output-to-repl bit looks like a config flag to me - I’ll check that.#2022-08-0909:42danmhttps://github.com/clojure-emacs/cider/blob/9577dbbdae8cffe023442427b97f963b4447983a/cider-connection.el#L329-L330 is where it's called, and https://github.com/clojure-emacs/cider/blob/9577dbbdae8cffe023442427b97f963b4447983a/cider-connection.el#L48-L55 is the definition. So you're definitely right that it's a config flag. I don't know where you'd see any default values. Certainly everyone in the team here who uses CIDER (or vim-fireplace, which also makes use of cider-nrepl extensions) has said "Oh, that Just Works for me", so either it's default true or everyone has cargo culted someone else's config file and never looked into what that option does 😉#2022-08-0922:51cflemingWhich sounds eminently possible 🙂#2022-08-0922:52cflemingHowever dpsutton confirmed over in #nrepl that it’s an opt-out flag, so on by default.#2022-08-0907:19augustlI’m trying out Fleet, the brand new IDE from JetBrains that’s in closed beta. Are there any plans on making Cursive work for Fleet as well as IDEA?#2022-08-0907:35cflemingMaybe, but it’s a totally unknown quantity at this point. There’s no plugin API or information for plugins devs yet, and since the UI framework is totally different it’s likely to be a non-trivial amount of work. It’s a little unclear to me where Fleet sits in JB’s product offering too, and how many people are likely to pay for it.#2022-08-1516:39ozymandias33I have a grandfathered license for all products and will definitely try it out upon release. This feels like a competitor to VS Code. The JetBrains IDEs are standalone versions of IntelliJ features for different languages / environments. In a polyglot world, the feature bloat of IntelliJ and plugin overhead is now an oft recurring headache. However, these features and plugins are robust enough to keep me tied to the platform. I would use Fleet for most editing and navigation if the lightweight mode works well enough. Yet still imagine myself using IntelliJ / Cursive for Clojure work to take advantage of the REPL integration.#2022-08-0912:26d-t-wHey Colin, just dropping in to say that I installed the latest eap of Cursive and I really like the author annotations addition - completely took me by surprise and is a great addition ta!#2022-08-0923:05cflemingNo worries, glad you’re liking it! There are probably a bunch more I can add similar to what’s around for other languages, but they’ll need a little more investigation.#2022-08-0918:17JoelI have a macro that evaluates to a (deftest...) is there a way to have it play friendly with the cursive test support?#2022-08-1106:30olttwaHey @cfleming Firstly, thank you for creating such an awesome plugin in Cursive. I'm developing a project Goose: https://github.com/nilenso/goose Apart from src & test folders, I've created a separate folder for load-testing called perf I've added perf folder to Source root as can be found in goose.iml However, upon restart, IntelliJ won't compile with a warning & I've to re-add perf to Source root every time. > File load.clj is not under a source root Any idea why IntelliJ does that & how to fix this?#2022-08-1106:31cflemingThanks for the kind words! It looks like goose is a deps project, so you probably want: https://cursive-ide.com/userguide/deps.html#working-with-aliases#2022-08-1106:36olttwa@cfleming I added all aliases in the Clojure Deps toolwindow, added load.clj as source root & restarted IntelliJ. Still I'm facing same issue.#2022-08-1106:37olttwaI cannot even load the file into REPL despite it being configured in REPL's config#2022-08-1106:38olttwaIt works after I've done Add source root in IntelliJ#2022-08-1107:56cfleming@U03HVBGMRJ5 When you select the aliases in the toolwindow, you don’t have to restart IntelliJ, just refresh the project from the toolwindow. So, could you open the toolwindow and refresh the project now?#2022-08-1107:57cflemingOnce you’ve done that, does the perf folder appear as a source root? It should be the same colour in the project view as the src folder.#2022-08-1110:55olttwa> just refresh the project from the toolwindow Doing this doesn't fix the issue > Does the perf folder appear as a source root? It should be the same colour in the project view as the src folder This happens only after I click on Add Source root from IntelliJ, not by adding the alias from Deps toolwindow#2022-08-1110:56olttwa@cfleming all these changes disappear upon restart 😓#2022-08-1121:23cflemingOne thing I’ve just noticed, shouldn’t the key in the :perf alias be :extra-paths instead of :paths in Goose’s deps.edn?#2022-08-1207:00olttwa@cfleming modifying Clojure Deps tool window & s/:paths/:extra-paths/ fixed the issue. cc @U38004EG7 I had modified :perf alias in the past to see if :paths worked. Thanks a lot :hugging_face:#2022-08-1108:20Ernesto GarciaHi all. Is there a way to see REPLs side by side, instead of overlapping tabs? I would want to see Clojure and ClojureScript REPLs at the same time if possible.#2022-08-1109:10cflemingSo, there isn’t at the moment, but JetBrains have recently added the ability to do that in toolwindows and I’m planning to add it for REPLs. There are some open UX questions about how it should work. Currently, sending forms to the REPL send to the currently selected REPL, which is harder to determine if there are multiple REPLs visible at once.#2022-08-1109:11cflemingAnother option is to allow the user to open the REPL in a normal editor rather than a toolwindow, then you could just arrange them using the normal editor arrangement commands. It still has the same problem of identifying where to send forms etc.#2022-08-1110:02Ernesto GarciaYes, sending automatically to the proper REPL would further accelerate development. Sending based on to what module the file belongs could be a nice first guess. Doesn't work for multiple REPLs running from the same module of course. In that case, the last one might be a good guess. I'm not sure if many people use to have several REPLs for the same module.#2022-08-1121:24cflemingWell, having one for clj and another for cljs would be a common use case. When sending forms from clj or cljs the correct one could be chosen based on the file type, but cljc is trickier.#2022-08-1109:15souenzzoAny news on this ticket? https://github.com/cursive-ide/cursive/issues/1918 There is some trick to run midje facts in cursive REPL?#2022-08-1109:16cflemingI’m very unlikely to support Midje. It has been effectively dead for ages and is a tangled mass of macros. Sorry 😞#2022-08-1217:40Joel@cfleming What is “Run ‘x-test’ in REPL” doing? I was curious if I could get a macro that evaluates to a deftest to be evaluated similarly.#2022-08-1221:35cflemingI think you can run Midje tests by just using deftest directly and having Midje assertions in the tests.#2022-08-1111:09roklenarcicAfter upgrading to JDK17 I get these errors after each expression in REPL:
Error updating class definitions:
Execution error (NullPointerException) at java.util.concurrent.ConcurrentHashMap/get (ConcurrentHashMap.java:936).
Cannot invoke "Object.hashCode()" because "key" is null
#2022-08-1111:18markaddlemanAre you using tools.namespace? I sometimes see this when reloading namespaces. I have never investigated but it seems to be some kind of race condition and the error has not impacted my development.#2022-08-1111:21roklenarcicI don’t get it when running JDK 8 or 14, but always when using 17, so that looks a bit less than a race condition then#2022-08-1203:53salamwe've been using Java 17 at work shortly after it was released and have never seen this error. is it possible for you to post the full stack trace?#2022-08-1409:57roklenarcicI cannot, because it doesn’t happen on the same thread#2022-08-1409:57roklenarcicif I say *e it just returns nil#2022-11-2216:45folconNot sure if this was ever solved, I've just started getting this error as well appearing...
Connecting to remote nREPL server...
Clojure 1.11.1
Error updating class definitions:
Execution error (NullPointerException) at java.util.concurrent.ConcurrentHashMap/get (ConcurrentHashMap.java:936).
Cannot invoke "Object.hashCode()" because "key" is null
*e
=> nil
Error updating class definitions:
Execution error (NullPointerException) at java.util.concurrent.ConcurrentHashMap/get (ConcurrentHashMap.java:936).
Cannot invoke "Object.hashCode()" because "key" is null
So this is connecting to a shadow-cljs nrepl running:
openjdk version "19.0.1" 2022-10-18
OpenJDK Runtime Environment Homebrew (build 19.0.1)
OpenJDK 64-Bit Server VM Homebrew (build 19.0.1, mixed mode, sharing)
#2022-11-2219:21onetomI saw the error lately, but it happens very rarely#2022-11-2219:23onetomim on M1 macOS 13.0.1 (22A400) /nix/store/280df465g5isik8ljjnc8c31ncq2s4is-zulu17.34.19-ca-jdk-17.0.3/bin/java#2022-11-2220:13folconOk, good to know :)#2022-08-1111:09roklenarcicanyone else got these?#2022-11-2216:45folconNot sure if this was ever solved, I've just started getting this error as well appearing...
Connecting to remote nREPL server...
Clojure 1.11.1
Error updating class definitions:
Execution error (NullPointerException) at java.util.concurrent.ConcurrentHashMap/get (ConcurrentHashMap.java:936).
Cannot invoke "Object.hashCode()" because "key" is null
*e
=> nil
Error updating class definitions:
Execution error (NullPointerException) at java.util.concurrent.ConcurrentHashMap/get (ConcurrentHashMap.java:936).
Cannot invoke "Object.hashCode()" because "key" is null
So this is connecting to a shadow-cljs nrepl running:
openjdk version "19.0.1" 2022-10-18
OpenJDK Runtime Environment Homebrew (build 19.0.1)
OpenJDK 64-Bit Server VM Homebrew (build 19.0.1, mixed mode, sharing)
#2022-08-1216:00João Galritohi.. I'm trying to help someone setup a leiningen project in cursive, but the "load file in REPL" option is grayed out, even when the repl is running#2022-08-1216:15imreis the file you’re trying to load on the classpath? is it under a source root?#2022-08-1216:15João Galritoit's in the source root#2022-08-1216:15João Galritosrc folder#2022-08-1216:16João Galritocreated by default when creating a lein project through IntelliJ#2022-08-1216:18João Galritohe was trying to run an existing project and it wasn't working, so we tried to create a new project from scratch and it still doesn't work#2022-08-1216:18João Galritoopening the same project on my computer works fine#2022-08-1216:44imreare yous running the same ide/cursive version?#2022-08-1313:17augustlmore intellij related than cursive itself, but maybe someone here knows: is there a way to customize intellij “emacs style”? Would be nice if I could have a config file that I could manage fully myself, that overrides defaults in IntelliJ. So far it’s mostly keybindings I want to manage this way. Anyone know if this is possible?#2022-08-1315:58jasonjcknif you get the intellij vim plug-in there’s a vimrc file that loads on startup, i can send you mine if you'd like #2022-08-1315:58augustlah, that’s an interesting way to do that 🙂 I’ll look into it#2022-08-1318:00Ivar RefsdalI have not tried this myself, but how about: https://www.jetbrains.com/help/idea/sharing-your-ide-settings.html#settings-repository#2022-08-1318:01augustlI’ve tried that before actually, but it just ends up being an unmanagable repo of XML files you don’t manage yourself, and for some reason one of the few things it didn’t save was my key bindings. Maybe it’s improved though, this was a couple of years ago#2022-08-1318:16Ivar RefsdalHere ~/.config/JetBrains/<product><version>/linux.keymaps is rather readable XML with stuff such as:
<action id=":cursive.testing.actions/run-single-test">
    <keyboard-shortcut first-keystroke="alt t" />
  </action>
via https://www.jetbrains.com/help/idea/configuring-keyboard-and-mouse-shortcuts.html#ecbc0a87
#2022-08-1318:16augustlah, good point, I could just do it “by hand” and maybe some symlinks etc#2022-08-1318:17Ivar RefsdalYeah, I suppose so.#2022-08-1401:33cflemingI use the Settings Repository, it definitely syncs my keybindings.#2022-08-1318:49SchpaaI have no idea if this is a cursive issue, but IDEA is refusing to generate stubs, giving me a
Execution error (NoSuchMethodError) at com.google.javascript.jscomp.deps.ModuleLoader/createRootPaths (ModuleLoader.java:257).
'java.util.stream.Collector com.google.common.collect.ImmutableSortedSet.toImmutableSortedSet(java.util.Comparator)'
#2022-08-1504:14cflemingDoes this error appear in your logs? If so, could you send them to me, either via DM here or to <mailto:/cdn-cgi/l/email-protection|/cdn-cgi/l/email-protection>?#2022-08-1318:50SchpaaI’ve been working in the same codebase for so long I dont know when this started to happen#2022-08-1718:50Colin P. HillI have a codebase with test assertions in a (= expected actual) convention, but Cursive assumes the opposite when you pull up the diff for a failed test. Is there any way to configure this?#2022-08-1817:06Jeffrey Bayit seems like cursive (sometimes) offers to add namespaces to the ns :require form, but not always. We have a theory that it is because it is doing a calculation and only adding it if it is not already required in the namespace's dependency chain, which satisfies the compiler. Is that the correct interpretation of what's happening? It is also considered bad style by basic linter options (`clj-kondo`) so if that is the correct interpretation it seems like it would be a good option to add in the namespaces section. If not - anyone have pointers as to what's going on?#2022-08-1907:31Otto NascarellaI wonder if Cursive will ever get support for Promises in Clojurescript… .then not being recognized as a symbol in 2022 feels wrong#2022-08-2201:27danielcomptonI got this error when trying to report crashes inside IntelliJ. Build #IU-221.5787.30, built on June 1, 2022 Cursive: 1.12.4-2022.1#2022-08-2209:11imreI had that several times in the past year or so#2022-08-2215:45tengstrandI just got my new MacBook Pro with M1 chip. The problem is that I can't set up a clojure.deps (deps.edn) project. When I try to, I get an IDEA error + that I can't see the "Clojure Deps" tool bar on the right side.#2022-08-2215:45tengstrandThis is how the exception/error message looks like: com.intellij.execution.ExecutionException: Cannot execute: Clojure command not configured at cursive.deps.DepsProjectsManager$Companion.classpath(DepsSupport.kt:145) at cursive.deps.DepsProjectsManager$Companion.resourceConfigFile(DepsSupport.kt:120) at cursive.deps.DepsProjectsManager$Companion.configFiles(DepsSupport.kt:76) at cursive.deps.DepsProjectDetails.doGetDetails(Project.kt:173) at cursive.deps.DepsProjectDetails.doGetDetails(Project.kt:87) at cursive.build.BuildSystemProjectDetails.getProjectDetails(BuildSystem.kt:45) at cursive.build.BuildSystemProjectsManager.reimportAllProjects$lambda-3$lambda-2(BuildSystemManager.kt:149) at cursive.build.BuildSystemUtil$runTask$1$1.run(BuildSystemUtil.kt:83) at com.intellij.openapi.progress.impl.CoreProgressManager.startTask(CoreProgressManager.java:442) at com.intellij.openapi.progress.impl.ProgressManagerImpl.startTask(ProgressManagerImpl.java:114) at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcessWithProgressAsynchronously$5(CoreProgressManager.java:493) at com.intellij.openapi.progress.impl.ProgressRunner.lambda$submit$3(ProgressRunner.java:252) at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$2(CoreProgressManager.java:188) at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$executeProcessUnderProgress$12(CoreProgressManager.java:608) at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:683) at com.intellij.openapi.progress.impl.CoreProgressManager.computeUnderProgress(CoreProgressManager.java:639) at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:607) at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:60) at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:175) at com.intellij.openapi.progress.impl.ProgressRunner.lambda$submit$4(ProgressRunner.java:252) at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1768) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:702) at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:699) at java.base/java.security.AccessController.doPrivileged(AccessController.java:399) at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1.run(Executors.java:699) at java.base/java.lang.Thread.run(Thread.java:833)#2022-08-2215:50imreClojure command not configured#2022-08-2215:50imrehave you got it installed and set up in idea preferences?#2022-08-2215:50imreI’m on a m1 without problems#2022-08-2215:51tengstrandAhh, that’s probably the problem! Thanks!#2022-08-2215:51imre#2022-08-2215:52tengstrandYeah, now I remember, that’s in the “Install Cursive” instructions!#2022-08-2215:52imre👍:skin-tone-3:#2022-08-2216:03tengstrandYes, now everything works. Next time I will look closer to the error message! 🙂#2022-08-2300:09cflemingYeah, homebrew changes location on the M1 for some reason.#2022-08-2219:52Takis_#2022-08-2219:56Takis_i want to lein clean to delete the target before run, can i put somewhere this? or edit the project.clj to delete the target before new compile?#2022-08-2219:56Takis_i have some aot and doesnt work, unless i delete the target by hand#2022-08-2220:01Takis_i am asking how to delete the target before run, with intellidjea, if no other way i can run it as bash script#2022-08-2221:38Takis_for now i made it shell script and its fine, but i was wondering if i can do delete the target, while running it as clojure application with intellijdea#2022-08-2316:00Sam AdamsWhen I 'Run Test Under Caret in REPL', it seems that required namespaces which I've edited are automatically loaded; this can cause problems if the reloaded namespace contains protocol definitions. Is there a way to disable this automatic-reload behavior?#2022-08-2316:25imreperhaps this?#2022-08-2322:37Sam Adamsthere it is, thanks!#2022-08-2409:03mathias_dwHi, i saw the same question was asked a couple of times in the past, but no easy solution: is there a way to clear the repl search history? I have a few large blobs of data in there, and the search history has become unworkably slow. The repl search history is essential, so it’s rather important that it works smoothly…#2022-08-2412:43Rachel Westmacottone ugly workaround would be to turn the REPL history size down to 0, and then perhaps you can increase it again once it has forgotten what you did. (I haven't tested this!) downside is you'll lose the rest of the history.#2022-08-2413:19mathias_dwthanks, I’ll try that when it happens again. Half an hour ago the big blobs fell out of the history, so things work as normal again…#2022-08-2723:36cflemingI have a plan to do this, but I haven’t got around to it yet, sorry.#2022-08-2412:25Rachel WestmacottIs there a way to hook into the way specific types get printed at the REPL? It says it will pretty print in the settings, but if I modify the clojure.pprint/simple-dispatch multimethod it seems to ignore what I've done. (vs. eg. calling pprint manually which does pick up the change)#2022-08-2723:34cflemingThere isn’t at the moment, unfortunately. The way this works is that Cursive assumes that the form returned is (roughly) readable, then it will parse it using a similar mechanism to the one it uses for parsing normal code. That representation is then pretty-printed with fipp, and that process can’t be controlled at the moment. However, if you override printing on the server side to output a Clojure representation of e.g. a Java object, a record or something, then those customisations should work.#2022-08-2723:36cflemingIf that doesn’t mesh with what you’re trying to achieve, let me know and I’ll see if I can help work out a solution.#2022-08-2412:38Rachel WestmacottAlso while I love the 'Add forms sent from editor to REPL history' being disableable, it would be nice if when it was off there was some sort of feedback when you send a form to the REPL. I occasionally send some long-running things to the REPL and would aid user-confidence if there was some immediate feedback.#2022-08-2412:40Rachel WestmacottI really like not seeing the whole form printed in the output pane though, so I don't want that.#2022-08-2412:48markaddlemanWhat if the form sent to the REPL was folded up by default?#2022-08-2801:43cflemingThat sounds like it might be a good option. Note that that option also disables the forms being added to the history, not just them being printed in the output. I’m not sure what other sort of feedback might be appropriate, it seems like you’re looking maybe for some kind of spinner saying that something is being evaluated? That’s been suggested before.#2022-08-2518:56salami'm not sure if it's just happening for me but i noticed today that Navigate to Namespaces (Ctrl-Shift-O on macOS) shows duplicate entries for namespaces defined in CLJC files. this is not a deal breaker but a minor annoyance that causes confusion. is there a GitHub issue tracking this?#2022-08-2522:19cflemingI’m not sure, there are various issues tracking problems with CLJC. I’m going to have to re-work the whole CLJC bit at some point, it was a fairly horrible hack to begin with, and is really breaking at the seams now that ClojureDart, bb, and so on are also using it.#2022-08-2608:38reefersleepI’m on Cursive 1.12.5-eap1-2022.2. When I do Find Usage on a keyword like ::something/body, Cursive seems to look for :body in my code. It used to be able to find usages of the fully qualified keyword. Is something broken in my setup, or is this a regression in Cursive functionality? (I updated recently)#2022-08-2608:41reefersleepAh… My bad. We’re using some custom macro to do some trickery about the namespace part.#2022-08-2608:42reefersleepThe longer I work with code, the more I appreciate boring, predictable code. 🙂#2022-08-2608:43cflemingAmen!#2022-08-3018:47souenzzowrong highlight on schema after for+let+array destruct + map destruct#2022-08-3110:33souenzzoMinimal:
(for [m [{:a 1 :x 2}]
      :let [x (:a m)]
      {:keys [x]} [m]]
  x)
#2022-08-3110:34souenzzo#2022-08-3121:53cflemingGreat, thanks for the repro case!#2022-08-3114:13JAtkinsI just thought of this today - would it be possible for cursive to highlight all instances of a uuid literal in a file? Or, even better in the repl? I like being able to put my cursor on a keyword and see all usages, and for tests it'd be great to cross reference UUIDs without breaking out cmd-c cmd-f all the time#2022-08-3121:43cflemingThat’s actually a really nice idea. I can try to implement that, it might be tricky though since UUIDs are hard to identify - they’re basically just strings with hex chars in them.#2022-08-3121:43cflemingCould you file an issue for that and I’ll think about it?#2022-09-0519:36JAtkinsOops only saw this now#2022-09-0519:36JAtkinshttps://github.com/cursive-ide/cursive/issues/2727#2022-09-0609:33cflemingJust to be clear, your main use case is in the REPL output pane, right? So do you plan to jump to that and move around in the output to see the UUID matching?#2022-09-0611:03JAtkinsPrimarily - though it would also be nice in a clojure file. I used to, but do not now, write raw data in my tests. I now use generators and now have very few uuids in the actual code. #2022-09-0115:19Takis_hello, i am using [potemkin "0.4.5"] that allows us to import-vars and make a core.clj without the implementation of the functions in 1 file#2022-09-0115:20Takis_and it works fine when i require the core, i get autocomplete etc, but it doesn't work when the vars i try to import are defined in .cljc file, code works but no autocomplete#2022-09-0115:21Takis_at least when i test it, i had this problem, can i do something about it?#2022-09-0708:25wontheone1Hello I have a question, While I can execute some code on REPL start from terminal, I don't know how to do that for Cursive REPL startup.#2022-09-0708:26wontheone1#2022-09-0708:27wontheone1I have put the same options in Parameters field but the REPL doesn't print 6 as I expected. Can anybody help me with this?#2022-09-0715:45wontheone1Anyone please?#2022-09-0713:40helioscan you configure to put (or not put) a space in tagged elements? i.e. Clojure CLI
$ clj
(random-uuid)
Clojure 1.11.1
user=> #uuid "46744ee8-a11c-4a4b-9e27-9e3dc4110702"
Cursive
(random-uuid)
=> #uuid"58a6af18-34d9-45eb-90f3-d6446d4016bf"
it leads to unnecessary whitespace changes
#2022-09-0714:39seriogaIf you disable “Pretty print REPL return values” then whitespace will be OK.#2022-09-0714:43seriogaBut pprint itself is fine so the reason is not clear
(clojure.pprint/pprint (random-uuid))
#uuid "4130e408-256e-4ee3-b765-10de9a849e4b"
#2022-09-0721:57cflemingThis is because Cursive pretty-prints values on the client side. I’ll look at making those values match what Clojure does.#2022-09-0713:41Alex Miller (Clojure team)it's surprising to me that those are different. should be controlled by the print-method for UUID, which should be the same?#2022-09-0721:56cflemingCursive pretty-prints elements on the client side, which would cause this.#2022-09-0714:39seriogaIf you disable “Pretty print REPL return values” then whitespace will be OK.#2022-09-0714:43seriogaBut pprint itself is fine so the reason is not clear
(clojure.pprint/pprint (random-uuid))
#uuid "4130e408-256e-4ee3-b765-10de9a849e4b"
#2022-09-0716:44Jeffrey Bayit seems like cursive (sometimes) offers to add namespaces to the ns :require form, but not always. Does this only work for some reason if it detects an alias has been used in the project?#2022-09-0716:47imrehttps://clojurians.slack.com/archives/C0744GXCJ/p1615993736013900#2022-09-0716:48Jeffrey Bayum, yeah, i agree with that poster - i'd like for it to require it without a shorthand if the project doesn't have a shorthand (we don't use them) - is there an issue I can upvote or something?#2022-09-0716:56imrenot sure, there is an issues bookmark at the top of the channel, I would try searching there#2022-09-0717:05Jeffrey BayI couldn't find an existing issue, so I created a new one: https://github.com/cursive-ide/cursive/issues/2728#2022-09-0808:58Vincent CantinHi, I updated Cursive to the latest version today and I get an error when trying to open a remote nREPL to a local Shadow-CLJS runtime: Exception starting REPL: java.lang.IllegalStateException: Could not open new session; :clone response: Disconnected from remote server. Do you have an idea where the problem comes from and how to work around it?#2022-09-0809:24cflemingI don’t, sorry. Perhaps try asking in #shadow-cljs, and if you don’t get anywhere there I’ll look at it tomorrow morning.#2022-09-0809:25Vincent CantinIt was working before I update intellij and cursive.#2022-09-0809:27cflemingDo you know which version you were on before?#2022-09-0809:27cflemingThis is connecting to the Shadow Clojure REPL, right? Not the CLJS one?#2022-09-0809:27Vincent CantinYes, the Clojure one#2022-09-0809:28cflemingOk, I’ll try this with a Shadow project tomorrow. Is your project public?#2022-09-0809:29Vincent CantinI don't know which version exactly, but I know that it was the latest intellij and cursive version I was able to use with my license expired on March 23th. I renewed the license this morning.#2022-09-0809:29Vincent CantinThe project is not public.#2022-09-0809:30cflemingOk, I’ll try with some shadow projects I have lying around.#2022-09-0809:32Vincent CantinI just found that it works if I connect by setting the host + port#2022-09-0809:34Vincent CantinIt also works when I set the port file to .shadow-cljs/nrepl.port manually#2022-09-0809:35Vincent CantinIt doesn't work when I choose the "Use standard port file"#2022-09-0817:04thhelleryou probably have another port file lingering around with a dead port?#2022-09-0903:57Vincent CantinI didn't find such file. When shadow-cljs (2.19.5) is not running and I try to connect a repl from the IDE using "Use standard port file", I get a different error from the IDE in a notification bubble saying "Cannot find port from port file". So I guess it is not a problem with a lingering port file. for info, when shadow-cljs is running:
$ ls .shadow-cljs
babel-worker     cli-repl.port    jar-manifest     server.pid       socket-repl.port
builds           http.port        nrepl.port       server.token
#2022-09-1220:28Dustin GetzI also have this – i updated Cursive first, and then a couple days later upgraded CLJS and Shadow to
org.clojure/clojurescript {:mvn/version "1.11.60"}
thheller/shadow-cljs {:mvn/version "2.20.1"}
at which point i believe i got the error. Found this thread by global search, I did not suspect Cursive. Sitting down now to try to triangulate
#2022-09-1220:44Dustin GetzOk, on Cursive 1.12.5-eap1-2022.1, Cursive Clojure Local REPL, nREPL, Run With Deps, on startp a .nrepl-port is produced in project root.
Starting nREPL server...
WARNING: compile already refers to: #'clojure.core/compile in namespace: user, being replaced by: #'user/compile
Connecting to local nREPL server...
Clojure 1.11.1
nREPL server started on port 56232 on host localhost - 
Immediately - now Cursive Remote REPL, nrepl, use port from REPL file in project ..., use standard port file:
Connecting to remote nREPL server...
Clojure 1.11.1
Close remote REPL Now when I run
(def shadow-start! (delay @(requiring-resolve 'shadow.cljs.devtools.server/start!)))
(@shadow-start!)
output is now:
Starting nREPL server...
WARNING: compile already refers to: #'clojure.core/compile in namespace: user, being replaced by: #'user/compile
Connecting to local nREPL server...
Clojure 1.11.1
nREPL server started on port 56232 on host localhost - 
(@shadow-start!)
shadow-cljs - server version: 2.20.1 running at 
shadow-cljs - nREPL server started on port 9001
=> :shadow.cljs.devtools.server/started
additionally, a second .nrepl-port file is produced shadow-cljs/.nrepl-port Cursive Remote REPL, autodetect port:
Connecting to remote nREPL server...
Exception starting REPL: java.lang.IllegalStateException: Could not open new session; :clone response: Disconnected from remote server.
#2022-09-1220:45Dustin GetzClojure and Shadow version doesn't impact this, I can repro these steps with the following two configurations:
org.clojure/clojurescript {:mvn/version "1.11.60" #_"1.11.4"}
thheller/shadow-cljs {:mvn/version "2.20.1" #_"2.18.0"}
#2022-09-1220:46Dustin GetzExplicitly setting the CLJS nrepl port to shadow-cljs/.nrepl-port obviously fixes the error#2022-09-1220:46Dustin GetzDid the autodetect rules change or did the generation of the file change in either Cursive or Shadow recently? Not sure why this is suddenly happening or where the bug is or if there even is a bug#2022-09-1221:00cflemingThanks for the repro information, I’ll try to repro that today. I don’t think the autodetect rules have changed recently. Thomas might know if shadow’s generation of port files has changed, although it seems like maybe a change to nREPL is generating the .nrepl-port rather than Shadow doing it.#2022-09-1221:01thhelleryeah, shadow-cljs parts haven't changed in forever#2022-09-1221:01thhellerhowever I upgraded to nrepl 1.0 and didn't check what it is doing in those regards#2022-09-1221:01Dustin Getzwhen#2022-09-1221:01thhellermaybe it just always creates this file?#2022-09-1221:01cflemingOk, I’ll try to repro that and see if I can figure out what’s going on.#2022-09-1221:02thheller2.20.0 was the upgrade to nrepl 1.0#2022-09-1221:02Dustin GetzOk I will check again now, maybe I didn't cleanly test when i reverted back to 2.18.0#2022-09-1221:03cflemingJust to be clear, it looks like you’re starting the Shadow REPL using a Cursive nREPL config rather than on the command line, correct?#2022-09-1221:04Dustin GetzUm i am calling shadow.cljs.devtools.server/start! from cursive Local repl to start shadow's nrepl#2022-09-1221:04Dustin Getzthis results in two running nrepl services, one from the Cursive local repl and one from Shadow – which I did not realize I was doing until today#2022-09-1221:05Dustin Getz#2022-09-1221:06cflemingSo in that case, I’d expect to see what you’re seeing in terms of port files. Starting the nREPL server via the Cursive nREPL config will create .nrepl-port, and Shadow’s nREPL will create .shadow-cljs/.nrepl-port. However I don’t think any of that has changed in a long time, and it shouldn’t cause an error obviously.#2022-09-1221:07cflemingHowever my impression is that Vincent wasn’t doing that, since he said he didn’t find an .nrepl-port file.#2022-09-1221:09Dustin GetzCarefully testing with shadow-cljs "2.18.0" (rm -rf .shadow-cljs && rm .nrepl-port) and I still repro - i can see the Cursive Local REPL create .nrepl-port within a few seconds of startup#2022-09-1221:09Dustin Getzi dont think a shadow 2.20 change is in play#2022-09-1221:11cflemingOk, thanks.#2022-09-1406:06AronI have this error too, but in my case neither of the options result in a running repl I suspect it's because I want to connect to a shadow repl inside wsl2 from windows#2022-09-1514:38Aronmoved from wsl2 to just using git bash and I am here https://gist.github.com/ashnur/9264574919de333e463e591a9fcba008 Not even sure where to look after this. Will have to try with a different editor.#2022-09-2614:48Dustin GetzCursive 1.12.5-eap1 - 2022-08-03 Add ability for socket REPL to pick up the port from a file #2695#2022-09-2616:10Aronhttps://imgur.com/N7sKjS8#2022-09-0814:59octahedrionI don't know if this is Cursive thing or an IntelliJ thing but is there a way to make project structure > modules default to excluded for all subfolders ? I'm pretty sure IntelliJ eagerly indexes everything not exluded in there, including folders like .cpcache, .git, .circleci etc#2022-09-0815:15Jordan Robinsonthis may or may not help, but I've found if you open the .gitignore in intellij in recent versions it will ask you if you want to add everything there into excluded folders#2022-09-0815:16Jordan Robinsonthough I can't say I've seen intellij indexing the .git folder myself#2022-09-0819:58salamthis may help: https://www.jetbrains.com/help/idea/creating-and-registering-file-types.html#ignore-files-folders#2022-09-0908:14octahedrionthanks but that tells IntelliJ to totally ignore those files/folders, i.e. they won't even appear in the project view, whereas I still want to see some such folders in the project view, but I want them excluded from indexing#2022-09-1308:14polymerisHello! I am running into an issue where IntelliJ, under some circumstances, leaks memory. I am not sure what the root cause is, but I’d like to try updating Lein. Cursive’s Leiningen settings dialog doesn’t show versions above 2.9.3, even though I have 2.9.10 installed. The Cursive version is 1.12.4.#2022-10-1008:23polymeris@U0567Q30W could the list of supported lein versions be expanded in the next release? I tried the EAP and it’s still the same#2022-10-1008:58cflemingYes, sorry, I’ll make sure that gets done for the next release.#2022-10-1008:58polymerisThank you! :D#2022-09-1413:36danmHow do I tell Cursive that I want to start a REPL within the context of a specific alias? Like, the equivalent within a run configuration of clj -A:dev? Setting -A:dev under 'Parameters' gives:
Execution error (FileNotFoundException) at java.io.FileInputStream/open0 (FileInputStream.java:-2).
-A:dev (No such file or directory)
and then the REPL exits
#2022-09-1413:45danmAah, I just had to tell it to use Run with Deps instead of Run with IntelliJ project classpath#2022-09-1413:54imreI use the latter and tick the aliases I want in the deps tool window#2022-09-1413:54imrefollowed by Refresh Clojure Deps Projects#2022-09-1414:59danmI've got a deps.edn with an alias specified as:
:cider {:main-opts ["-e" "(require (quote griffin.user))" "-m" "nrepl.cmdline" "--middleware" ["cider.nrepl/cider-middleware"]]}
When I launch the REPL in a terminal via clj -M:cider it works fine. When I try and use IntelliJ run configurations to launch an nREPL run with deps and include cider as an alias, it bombs out with
nREPL middleware: --interactive has no namespace
Does anyone have any pointers as to where I even begin to debug that? o.0
#2022-09-1415:01imreWhy do you need that alias?#2022-09-1415:05danmTechnically I only need the ["-e" "(require (quote griffin.user))"] bit of it, which I can put in another alias just fine. This is just curiosity. The :cider alias is for our team mates who are using Emacs (or Vim with the right plugins), but I thought all Cursive was doing was launching the REPL in the background with clj and connecting to it from an nREPL client, so I don't get why that alias would work on the CLI but not through a run config. It's just a bit of a faff to say "Emacs users need alias X, IntelliJ users need alias Y"#2022-09-1415:05danmI Googled the error I got back, and got 0 results#2022-09-1415:06danmI was at least expecting to see where it was generated on GitHub or similar...#2022-09-1415:08imreyeah you certainly don't need cider for cursive#2022-09-1415:08imreand I don't think ["-e" "(require (quote griffin.user))"] works in Cursive#2022-09-1415:08danmOh that does, definitely#2022-09-1415:08imreoh does it?#2022-09-1415:08imrethat's new 🙂#2022-09-1415:09imreat least to me#2022-09-1415:09imrenice#2022-09-1415:09danmI do recall at one point trying to set up the cider middleware, but I forget why I wanted it now. There was one specific feature it offered that I thought was handy and it'd be good to try and get in the Cursive REPL#2022-09-1415:09danmCan't have been that important if I forgot what it was 😉#2022-09-1415:10imreI'd use 2 aliases and emacs people could use -M:startupcommand:cider and cursive just startupcommand#2022-09-1423:47Cora (she/her)is there a way to show the file extension when searching for a file by filename in the project files panel?#2022-09-1612:34eskosWhich search are you referring to specifically? IDEA has a bazillion ways to slice the search ham 🙂#2022-09-1613:00Cora (she/her)cmd+shift+o#2022-09-1613:01kwladykaI see extensions, can you upload a screenshoot what is missing for you?#2022-09-1613:04Cora (she/her)where do you see the .clj file extension in that screenshot?#2022-09-1613:05kwladykaoh you are right… lol. sorry#2022-09-1613:06kwladykaI think I used to look on icons#2022-09-1613:06Cora (she/her)haha I was genuinely confused#2022-09-1613:06Cora (she/her)that's what i've had to do, too, but I really don't like it#2022-09-1613:07kwladykaI can’t help. I have never tried to find a solution for this.#2022-09-1613:09Cora (she/her)thanks for checking, though!#2022-09-1613:55eskosI was slightly confused for a moment - I’ve rebound my cmd+shift+o to be actually the Namespaces search instead of Files. Namespaces shows file types in ambigous cases.#2022-09-1613:57eskosThe correct action to bind is in Settings > Keymap / Plugins > Cursive > Namespace... (and possibly also Main Menu > Navigate > Namespace...)#2022-09-1614:03eskosJust to prove a point, I did this rebinding change some time ago when I was working on a project which had a certain preference to naming things and realized that the cmd+shift+o wasn’t doing the thing I assumed it should… 😅#2022-09-1614:05Cora (she/her)I don't only search for clojure files though?#2022-09-1614:09eskosThen the double-shift/“all” search would be more appropriate imo. It shows paths.#2022-09-1423:48Cora (she/her)probably not a cursive question#2022-09-1423:50Cora (she/her)I just have a hard time believing people don't need to see this#2022-09-1612:58kwladykahey, any chance to make Cursive auto code complete for https://github.com/clj-python/libpython-clj ? Should I make an official issue for this one?#2022-09-1623:18cflemingUm, sure, an issue would be good. I don’t know anything about it, but it looks like it might be tricky to support that one.#2022-09-1707:29kwladykahttps://github.com/cursive-ide/cursive/issues/2731#2022-09-1709:12cflemingYep, I saw that later, thanks!#2022-09-1700:20genekim@borkdude Well, wow. I was so inspired by the “binaural beats” project, that uses scittle to enable using ClojureScript in <script> tags, that I’m attempting to modify a Chrome Extension that scrapes my order information from a https://amazon.com, which was written in JavaScript. (By someone on Upwork, who has since disappeared!) https://clojurians.slack.com/archives/C8NUSGWG6/p1663273758784879?thread_ts=1663232347.793979&amp;cid=C8NUSGWG6 I’ll have some proposed doc changes, or at least a writeup of my experiences trying tog et a simple “hello, world” app running. But I’m having a strange problem connecting to the browser nREPL, which is preventing big leaps in progress. Here’s what I’m seeing in my REPL session inside of Cursive. 1. Anyone have any ideas how I can make these REPL errors go away? I used used Cursive “create remote REPL session”, port 1339. It executes the forms, but I always get these errors. 2. less big of a deal: “Executing this form” inside of a comment always sends the entire comment form to the REPL session, instead of just the one form. Thank you all — I am really quite excited by the idea of writing these 10-50 line programs inside of html files!
(.-innerHTML q)
=> "Read <a href=\"index.html\">the main page</a> for more details."
Error updating completions:
"#error {:message \"Could not resolve symbol: cursive.repl.runtime/completions\", :data {:type :sci/error, :line 1, :column 1, :message \"Could not resolve symbol: cursive.repl.runtime/completions\", :sci.impl/callstack #object[cljs.core.Volatile {:val ({:line 1, :column 1, :ns #object[Ao bookmarklet], :file nil})}], :file nil, :phase \"analysis\"}, :cause #error {:message \"Could not resolve symbol: cursive.repl.runtime/completions\", :data {:type :sci/error, :line nil, :column nil, :file nil, :phase \"analysis\"}}}"Error updating completions:
"#error {:message \"Could not resolve symbol: cursive.repl.runtime/completions\", :data {:type :sci/error, :line 1, :column 1, :message \"Could not resolve symbol: cursive.repl.runtime/completions\", :sci.impl/callstack #object[cljs.core.Volatile {:val ({:line 1, :column 1, :ns #object[Ao bookmarklet], :file nil})}], :file nil, :phase \"analysis\"}, :cause #error {:message \"Could not resolve symbol: cursive.repl.runtime/completions\", :data {:type :sci/error, :line nil, :column nil, :file nil, :phase \"analysis\"}}}"
#2022-09-1700:22genekimJust in case it’s helpful, here’s a screenshot of REPL settings.#2022-09-1700:24genekim…and here’s what shows up in babashka serving up the REPL session:
:msg "{:err \"\\\"#error {:message \\\\\\\"Could not resolve symbol: cursive.repl.runtime/completions\\\\\\\", :data {:type :sci/error, :line 1, :column 1, :message \\\\\\\"Could not resolve symbol: cursive.repl.runtime/completions\\\\\\\", :sci.impl/callstack #object[cljs.core.Volatile {:val ({:line 1, :column 1, :ns #object[Ao bookmarklet], :file nil})}], :file nil, :phase \\\\\\\"analysis\\\\\\\"}, :cause #error {:message \\\\\\\"Could not resolve symbol: cursive.repl.runtime/completions\\\\\\\", :data {:type :sci/error, :line nil, :column nil, :file nil, :phase \\\\\\\"analysis\\\\\\\"}}}\\\"\", :id \"a4c7a151-0844-4908-87f0-14d9b1a5996e\", :session \"d130a53e-3b69-48fa-8e09-23ab6295b104\", :ns \"bookmarklet\"}"
:msg "{:ex \"\\\"#error {:message \\\\\\\"Could not resolve symbol: cursive.repl.runtime/completions\\\\\\\", :data {:type :sci/error, :line 1, :column 1, :message \\\\\\\"Could not resolve symbol: cursive.repl.runtime/completions\\\\\\\", :sci.impl/callstack #object[cljs.core.Volatile {:val ({:line 1, :column 1, :ns #object[Ao bookmarklet], :file nil})}], :file nil, :phase \\\\\\\"analysis\\\\\\\"}, :cause #error {:message \\\\\\\"Could not resolve symbol: cursive.repl.runtime/completions\\\\\\\", :data {:type :sci/error, :line nil, :column nil, :file nil, :phase \\\\\\\"analysis\\\\\\\"}}}\\\"\", :status [\"error\" \"done\"], :id \"a4c7a151-0844-4908-87f0-14d9b1a5996e\", :session \"d130a53e-3b69-48fa-8e09-23ab6295b104\", :ns \"bookmarklet\"}"
#2022-09-1700:42cflemingSo I think this is a problem in Cursive which was discussed recently (messy on Twitter): https://twitter.com/jackrusher/status/1525092640286560258#2022-09-1700:43cflemingIn particular: https://twitter.com/CursiveIDE/status/1525249387487961088#2022-09-1700:44cflemingAnd here: https://github.com/nrepl/nrepl/discussions/273#2022-09-1700:45genekimHa! Thank you, @U0567Q30W — I saw that on Twitter, and filed that away as, “sounds academically interesting, but I doubt it will ever affect me.” 😆#2022-09-1700:45cflemingHaha!#2022-09-1700:45cflemingSadly, famous last words.#2022-09-1700:46cflemingI’ll try to get the generic completion into the next EAP build.#2022-09-1700:48genekimSeriously, I’m reading the discussion with avid interest, but also telling myself, this is like reading the standards for floating point numbers. (ala, super important to make the world work, but in the domains of control vs. influence vs. concern, this is definitely under “concern,” like the weather. I am in awe of the people on the thread who are actually in control of this stuff!#2022-09-1700:49genekimThanks so much for explaining this, @U0567Q30W — eager to see what y’all come up with!#2022-09-1700:50cflemingThe TL;DR is that Cursive tries to sniff the REPL server type, and falls back to assuming JVM Clojure if it can’t work it out. It should really fall back to something more generic than that, which nREPL supports but Cursive doesn’t take advantage of.#2022-09-1700:50genekimJust curious: what causes the second issue, of “send current form to REPL” to send not one form, but the entire comment form?#2022-09-1700:54genekimPS: Holy cow. “(nREPL, socket REPL, direct IDE eval, debug REPL etc)“. 😆 My apologies if laughing isn’t quite appropriate, but yow, this stuff is complicated!#2022-09-1701:06cflemingYeah, it really is, and CLJS adds an entire new dimension to the matrix (browser, node, things like scittle and nbb)#2022-09-1701:06cflemingThe comment form thing is interesting. Is this in a CLJS file?#2022-09-1701:08cflemingOne workaround is to select the form you want to send, send to REPL will always use the selected form if any before deciding which to send if nothing is selected.#2022-09-1701:09cflemingIt’s a bit crap, obviously, it would be better to figure out why your comments aren’t working.#2022-09-1701:09genekimYes — CLJS to bb, as per here: https://github.com/babashka/scittle/tree/main/doc/nrepl at first I didn’t think anything was getting evaluated, but I noticed it was sending entirety of (comment … ) form.#2022-09-1701:09cflemingIn your source file, is comment being resolved properly? i.e. it’s not highlighted, and you can get doc and so forth from it?#2022-09-1701:09genekimNo worries for now — I’ll send you a movie of this happening, with more of the context. May not be for a week or two. Hardly urgent. Thanks as always!#2022-09-1701:12genekimOh! That’s interesting! You’re right — nothing was highlighted correctly. Like defn everything not being highlighted. Cursive didn’t show the “add source root?” message, either. I’ll show you in the movie the repo, deps.edn file, bb.edn file. and all the strangeness. I’m sure the details will illuminate, versus my vague descriptions!#2022-09-1701:12cflemingOk, thanks! Or just a repro repo on github would be good, then I can check it out and try it myself.#2022-09-1701:13cflemingNot sure if that’s more or less work than the movie…#2022-09-1701:13genekimRoger! Have a wonderful weekend!#2022-09-1701:13cflemingThanks, you too!#2022-09-1711:25roklenarcicWhen using :as-alias in cljs files, the require with as-alias for non-existing namespace will cause all requires above it to appear invalid:#2022-09-1711:25roklenarcicsame thing in clj file:#2022-09-1711:26roklenarcic#2022-09-1721:19cflemingI’ll check that, thanks.#2022-09-1917:03kanweiHey! has there been any progress with cljfmt support? We have team members using a mix of Cursive and CIDER#2022-09-1920:54cflemingThere hasn’t, but if you can show me cases which are causing you problems, I can try to help configure Cursive to match whatever your team needs.#2022-09-1921:55hadilsHi! Thank you for this excellent product! I am wondering if Cursive works with modules. I have recently refactored my deps.edn project into a monorepo consisting of several modules. I have noticed two things: the heap is getting exhausted (at 10GB) and stub generation seems to be failing.#2022-09-1923:03cflemingYes, it should do, I use multi-module projects all the time. Do you get an error with the stub generation? Also, do you have a memory report from when it runs out of memory?#2022-09-1923:04hadilsI got a notification for the stub generation. Is there a log file that I should read/post?#2022-09-1923:05cflemingYep, Help | Show log in Finder/Explorer. You can either post it here or email it to <mailto:/cdn-cgi/l/email-protection|/cdn-cgi/l/email-protection> if it contains sensitive info.#2022-09-1923:06hadilsThank you Colin. I appreciate your excellent work!#2022-09-1923:06cflemingThanks for the kind words!#2022-09-2021:35Cora (she/her)it would be so nice if cursive had protection from more protection from deletes causing unbalanced parens#2022-09-2021:37R.A. PorterAre you using paredit or parinfer? I've found that, as long as the file is formatted correctly, parinfer is slightly better about maintaining balance.#2022-09-2021:37Cora (she/her)paredit, but I'm using built-in facilities for deleting a line, and the vim plugin's line deletion#2022-09-2022:06cflemingJust so I’m clear, you mean that e.g. if a line is deleted, that the parens are rebalanced?#2022-09-2022:08Cora (she/her)any full forms (including opening and closing) on that line are deleted, any parameters within a form are deleted, any closing parens/curlies/brackets are moved up to the end of the previous line#2022-09-2022:08Cora (she/her)evil-cleverparens and lispy handle this in the emacs world#2022-09-2022:09cflemingWhat you’re describing is basically what parinfer does. It works on general edits to the document, and tries to always fix up the parens correctly. It’s not perfect, but it’s pretty close these days.#2022-09-2022:09Cora (she/her)doesn't that require specific indentation?#2022-09-2022:10Cora (she/her)whatever I use has to be workable by an entire team with lots of different editors#2022-09-2022:10cflemingIt requires the indentation to be within various (sane, imo) parameters, yes. However, Cursive won’t automatically reformat files which don’t conform, it will just mark where the problems are and turn parinfer off for that file until they’re fixed.#2022-09-2022:11cflemingI have plans to make parinfer more local, i.e. only operate at the level of a top-level form, but that’s just a pipe dream at the moment.#2022-09-2022:12Cora (she/her)I don't think this is an option for my team 😞#2022-09-2022:13cflemingUnfortunately there’s not much middle ground here. IntelliJ has hundreds and hundreds of editing actions, and I can’t modify all of them to fix up parens.#2022-09-2022:13R.A. PorterI've tended to run cljfmt prior to commit to ensure compatibility, but that only works if everyone else is also good with cljfmt's choices.#2022-09-2022:13Cora (she/her)one of my coworkers pointed out the same issue with "I love Cursive except" and I tried to find a solution to no avail#2022-09-2022:14Cora (she/her)deleting whole lines is the main use case for me and the two people I've spoken to about this feature.#2022-09-2022:14Cora (she/her)I suppose I'd need to make my own intellij extension to work around this#2022-09-2022:15Cora (she/her)thanks for chiming in @U0567Q30W!#2022-09-2022:15cflemingProbably, yes. But I bet you’d quickly find a lot of other cases you’d like to work too.#2022-09-2022:15Cora (she/her)and thanks for the input @U01GXCWSRMW#2022-09-2022:15Cora (she/her)hmmm maybe#2022-09-2022:15cflemingDo evil-cleverparens and lispy work generally for any emacs action, or do they just monkey-patch certain common actions?#2022-09-2022:16cflemingOr do they require the user to use their own variants?#2022-09-2022:17Cora (she/her)evil-cleverparens (the one I use) uses their own function as the key binding in place of the default#2022-09-2022:17Cora (she/her)so if I checkout what is bound to dd (delete line, in vim) it has evil-cp-delete (evil-cleverparens functions start with evil-cp )#2022-09-2022:18cflemingOk, so it only works for certain actions. That’s really hard to do in IntelliJ land, because the actions work together in various ways, and are surprisingly complicated due to things like code folding and language injection.
#2022-09-2022:18Cora (she/her)I need to run, headed out to dinner with my family. I'm happy to discuss it more later!#2022-09-2022:18cflemingNo worries.#2022-09-2022:19Cora (she/her)ahhh yeah I can see it getting real complicated. this is probably why there are a million bridge extensions between different extensions in emacs-land. like if cursive had something equivalent it would be a vim-cursive extension that makes them play well together#2022-09-2022:20cflemingYeah, I don’t know how extensible IdeaVim is, I don’t use it myself.#2022-09-2022:35Cora (she/her)that seems like a good place to start#2022-09-2100:43Cora (she/her)http://monosnap.sutton.me/20220920194258-hvc4j-cursive-action-list.png#2022-09-2100:44Cora (she/her)so with ideavim I can execute those options (and more) from key combinations and I think even from functions. I imagine I can hack together something that would be similar to what I want#2022-09-2101:33Cora (she/her)I wonder how backspace keeps parens balanced. because deleting a line is really just jumping to the end of the line and deleting using backspace until it jumps you to the next line#2022-09-2101:36Cora (she/her)because deleting a line using it could just be programatically hopping to the end of the line and backspaceing until the whole line is gone. balance maintained#2022-09-2103:50cflemingYep that would work. I’d have to check the code for the details, but IIRC backspace just jumps over closers, and for openers if they immediately precede the corresponding closer then both are deleted. A more efficient method would be to count the openers and closers on a line (maintaining a stack to check matching) and then depending on whether the final count is positive or negative you stack some closers at the end of the previous line or some openers at the start of the following line.#2022-09-2103:51cflemingBut there are lots of edge cases too - what to do if they’re unbalanced, you might be inside a long string, or you might have a string ending at the beginning of the line, or starting at the end of the line. If you insert openers at the start of the following line then do you indent the affected forms? etc etc#2022-09-2103:52cflemingAnd before you know it you have an ad hoc, informally-specified, bug-ridden, slow implementation of half of parinfer 🙂#2022-09-2103:53cfleming(per Greenspun: https://en.wikipedia.org/wiki/Greenspun%27s_tenth_rule)#2022-09-2104:05Cora (she/her)sure but this is more like a 95/5 where just exploiting backspace would work for the vast majority of cases. I likely can't have perfection without a massive amount of work and so I'll take what I can get#2022-09-2104:12cflemingThat’s fair enough, for sure.#2022-09-2116:32genekimA public service announcement, on the value of (sometimes? always?) using REPLs with classpath set with deps.edn, instead of IntelliJ project classpath. I spent hours while trying to get the Google Secret Manager library working, thinking I was struggling with conflicting google library dependencies, which I’ve heard people complain about. I must have made 20+ changes to dependencies, to no avail. Inspired (and desperate for answers) by the 2019 message, I tried running it in a clj repl session, and to my utter shock, it worked. (So, I guess it was indeed a conflicting google library dependency, but nothing to do with deps.edn ! 😂 https://clojurians.slack.com/archives/C02BJCKN0R4/p1663777642867749#2022-09-2116:42imrehave you figured out how the rogue dep got onto the IJ classpath?#2022-09-2116:44genekimAlas, no — I was just happy to get it working. I barely know what a classpath is. 🙂 I was thinking it may have been clojurescript and the google-closure-compiler, but ruled that out. Maybe? I may revisit it tonight — will keep you posted, as I suspect it’s worth understanding more fully.#2022-09-2116:47imreWhen you start up a cursive nrepl (if it's nrepl you're talking about), the second line in it, (the one that starts with something like /Users/myuser/... is clickable and contains the classpath#2022-09-2116:49imreat least for me, this could depend on your OS, how you have java installed etc#2022-09-2116:34caleb.macdonaldblackAnyway to disable ~tag literals for maps with keywords~ namespace map syntax? Instead of this:
{:foo/bar 1
 :foo/bar2 2}
=> #:foo{:bar 1, :bar2 2}
I could get this:
=> {:foo/bar 1, :foo/bar2 2}
Also no commas would be nice too
#2022-09-2116:42caleb.macdonaldblackIt’s a clojure setting
(set! *print-namespace-maps* false)
#2022-09-2116:45Alex Miller (Clojure team)Just for reference, this is “namespace map syntax” and not tagged literals (although they look similar at a glance)#2022-09-2117:31caleb.macdonaldblackAh no worries. Thanks for the correction. It’s clear to me now they’re completely different. > Tagged literals are Clojure’s implementation of edn tagged elements.#2022-09-2118:21dpsuttonthe commas come from the printer (they aren’t a part of the datastructure of coure). I haven’t seen any pretty printers that omit them. I think they are pretty hard coded in there. I have often wanted to get rid of them#2022-09-2120:12NoahTheDukezprint can exclude them, but that's a much more opinionated and complicated tool#2022-09-2119:09Dustin GetzThe new auto-require on typing of recognized namespace is excellent, I just noticed it#2022-09-2306:30cflemingWhich one do you mean? I don’t think anything new has been added there in a while.#2022-09-2216:56onetomhas anyone know how to use the built-in IntelliJ Profiler with Cursive? I'm getting a Deferred configurations cannot be run with standard runners error, when I try to start my local clojure repl with the Profile with 'IntelliJ Profiler' run config action. I've documented the issue here: https://github.com/cursive-ide/cursive/issues/2514#issuecomment-1255297521#2022-09-2306:25cflemingThanks, I’ll take a look at this and see if I can figure out what’s going on.#2022-09-2312:38onetomit worth a quick look, but i think it was pretty painless to setup https://github.com/clojure-goes-fast/clj-async-profiler instead (as i mentioned in my follow-up comment), so if u can just mention that in https://cursive-ide.com/userguide/ that should be a sufficient solution.#2022-09-2313:08onetommaybe link this intellij page from the cursive docs: https://lp.jetbrains.com/intellij-idea-profiler/ and mention, that while this is a fancy and tight integration of async-profiler with intellij, cursive unfortunately does not support it (and maybe mention that known Deferred configurations ... error), but the clj-async-profiler is a great alternative in the meantime and it's still reasonable comfortable to use.#2022-09-2313:08onetomat least that's what i would love to read in your users guide to make me a happy customer 🙂#2022-09-2405:49cflemingI guess even better would be that it just work with IntelliJ 🙂#2022-09-2416:28Jeff EvansIs anyone having issues getting the assertion failure diff to render properly in the IDE? I double checked that I am current on license/IDE/plugin version, and still, hovering over the squiggly lines doesn’t show the actual diff between expected and actual. It only shows “Assertion failed. <test context name”. Also, clicking on the warning icon in the left line number bar tries to set a breakpoint, instead of popping up the diff view. Both of these behaviors used to work fine, so I’m wondering what changed? Maybe something I need to update on my end? Edit: figured out what was going on. The actual value was (quite unexpectedly) nil instead of some map. In this case, the little “Show difference” option is not even available on hover over. Might be a nice enhancement for it to still allow the “Show difference” option, and show the full expected map on the left, with simply nil on the right?#2022-09-2417:02Ivar RefsdalI've seen more people been confused by this as well..#2022-09-2504:01cflemingCould you file an issue for that so it doesn’t get lost? That definitely sounds like something that needs fixing.#2022-09-2820:33Jeff EvansWell, truth be told, I’m unable to repro the problem in a standalone, dead simple test case I tried, so I’m wondering what might be causing it for my complicated project :thinking_face: Cursive is doing the right thing for both of these:
(deftest sample-test
  (is (= nil {:a 1})))
(deftest sample-test
  (is (= {:b 1} {:a 1})))
#2022-09-2523:39cfleminghttps://twitter.com/CursiveIDE/status/1574181375556481024#2022-09-2604:58onetomi tried the New UI temporarily in the latest IntelliJ EAP, but it has affected the look and feel of the IntelliJ Release installation, so I have to use the EAP version. Thanks to this quick Cursive release, I can continue coding!#2022-09-2605:04onetomok, nvm, i did 1 more restart of the release version and the UI looks like the old one, correctly now.#2022-09-2605:00onetomBTW, I had a quick look at Analyze Plugin Startup Performance and Cursive takes the most time to initialize:
❯ pbpaste|awk '{cnt=$NF; $NF=""; print cnt, $0}'       
1896 Cursive 
1710 Grazie 
677 Database Tools and SQL 
447 JavaScript and TypeScript 
...
I'm wondering, if there would be any low-hanging fruits, which could lower this initialization time. Have you looked into this @cfleming yet?
#2022-09-2605:01onetomHere is a full list of my plugin startup times:
❯ pbpaste|awk '{cnt=$NF; $NF=""; print cnt, $0}'       
1896 Cursive 
1710 Grazie 
677 Database Tools and SQL 
447 JavaScript and TypeScript 
238 Shared Indexes 
159 GitHub 
152 Configuration Script 
146 Git 
41 FTP/SFTP/WebDAV Connectivity 
36 Maven 
34 IDE Settings Sync 
25 HTTP Client 
24 Gradle 
22 Machine Learning Code Completion 
19 Vue.js 
19 CSS 
16 Shared Project Indexes 
13 SSH Remote Run 
11 YAML 
10 Diagrams 
9 EditorConfig 
9 Node.js 
8 Properties 
8 JavaScript Debugger 
7 WebP Support 
7 Markdown 
5 Webpack 
4 Shell Script 
3 Node.js Remote Interpreter 
3 JUnit 
3 Completion Stats Collector 
3 Nyan Progress Bar 
2 Package Search 
2 Project Wide Analysis 
1 HTML Tools 
1 Images 
1 Karma 
1 Settings Sync 
1 Java Bytecode Decompiler 
1 Prettier 
1 Live Edit 
1 Polymer & Web Components 
1 Terminal 
0 Machine Learning in Search Everywhere 
0 Next.js Support 
0 Plugin DevKit 
0 Bytecode Viewer 
0 Gradle-Java 
0 Projector Libraries for Code With Me and Remote Development 
0 Maven Extension 
0 com.intellij.dev 
0 IntelliLang 
0 JetBrains maven model api classes 
0 Gradle Extension 
0 com.intellij.tracing.ide 
0 Gradle Dependency Updater Implementation 
0 JavaScript Intention Power Pack 
0 macOS Light Theme 
0 W3C Validators 
0 Gradle DSL API 
0 Vite 
0 Solarized Themes 
0 Remote Development Server 
0 Maven server api classes 
0 WSL File System Support 
0 Project Wide Analysis for Java 
0 Tailwind CSS 
0 ML in Search Everywhere for Microservices 
0 JetBrains Repository Search 
0 Machine Learning Code Completion Models 
(I just copy-pasted from this table from the IntelliJ UI and that little awk script at the beginning moves the last time column to be the 1st, so it's more readable as plain-text.)
#2022-09-2605:07onetomim also curious, how would u measure this startup performance. would u use the async-profiler or yourkit? it would be exciting to see a few notes / screenshots about how do u go about investigating something like this, even if u can't improve the performance. just a few sentences would already be inspiring; i wouldn't expect a technology deep-dive.#2022-09-2605:13onetomHere is an example from our project, where I was looking into our usage of the https://github.com/oliyh/martian library. Under the hood we happen to traverse the whole HTTP request payload 4 times with clojure.walk, which can take seconds, when the payload is tens of thousands of Google Sheets spreadsheet cells.#2022-09-2605:14onetommore precisely, 3 times with clojure.walk and 1 time with clojure.data.json#2022-09-2605:23onetomI just checked the plugin startup times in the release version (`2022.2.2`) of intellij and those are much better, so probably it doesn't worth worrying about the startup time:
592 Cursive 
274 AWS Toolkit 
183 Database Tools and SQL 
170 JavaScript and TypeScript 
75 Git 
75 Grazie 
58 Package Search 
56 Python 
40 Shared Indexes 
35 Maven 
24 PlantUML Integration 
18 DOT Language 
18 IDE Settings Sync 
16 CSS 
15 .ignore 
13 FTP/SFTP/WebDAV Connectivity (ex. Remote Hosts Access) 
11 EditorConfig 
9 YAML 
8 Configuration Script 
8 Markdown 
...
here some more exact version numbers:
IntelliJ IDEA 2022.2.2 (Ultimate Edition)
Build #IU-222.4167.29, built on September 13, 2022
Licensed to Tamas Herman
Subscription is active until November 26, 2022.
Runtime version: 17.0.4+7-b469.53 aarch64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
macOS 12.6
GC: G1 Young Generation, G1 Old Generation
Memory: 2000M
Cores: 8
Metal Rendering is ON
Registry:
    documentation.show.toolbar=true

Non-Bundled Plugins:
    some.awesome (1.14)
    ski.chrzanow.foldableprojectview (1.1.3)
    org.plugin.dot.id (1.4.1)
    org.jetbrains.plugins.rest (222.4167.21)
    org.jetbrains.plugins.localization (222.4167.21)
    org.intellij.RegexpTester (1.0.8)
    nix-idea (0.4.0.5)
    name.kropp.intellij.makefile (222.4167.21)
    de.dieploegers.develop.idea.shellfilter (4.3.0)
    com.yanncebron.intellipikchr (0.3.1)
    com.intellij.javafx (1.0.4)
    com.github.b3er.idea.plugins.arc.browser (0.32)
    com.4lex4.intellij.solarized (2.4.0)
    mobi.hsz.idea.gitignore (4.4.2)
    PlantUML integration (5.17.1)
    com.cursiveclojure.cursive (1.12.5-eap2-2022.2)
    com.intellij.plugins.html.instantEditing (222.4167.21)
    com.dmarcotte.handlebars (222.4167.21)
    Pythonid (222.4167.37)
    ru.adelf.idea.dotenv (2022.2)
    aws.toolkit (1.51-222)
    com.github.pshirshov.bytecodeeditor (0.2.1)
    AceJump (3.8.8)
    AWSCloudFormation (222.4167.21)

Kotlin: 222-1.7.10-release-334-IJ4167.29
#2022-09-2605:23onetomunless those startup times will be the new norm in intellij 2022.3...#2022-09-2905:30cflemingCursive takes the most time to initialise, mostly because it uses Clojure - Clojure’s startup time is a well-documented problem. I have a plan to defer actually loading Clojure until something requiring Cursive is performed, so that e.g. opening a non-Clojure project should not cause that to happen. It’s a long-term, ongoing project though.#2022-09-2608:03tlonisthow can I apply vertical align for let bindings where there is a destructuring?
(let [{:keys [id]} users ; this line cannot be vertically aligned
       a [1 2 3]
       b {:a :b :c :d}] ...)
#2022-09-2608:48onetomindeed the Align let-binding values suggests that the destructuring form would be aligned too, but i can imagine it being an exception from the rule, because such destructuring forms would push other, simpler binding so far to the right, that it would become hard to see which symbol is bound to which value.#2022-09-2609:09tlonistso I'd like to know if there is any forcible way for cursive users to do this. Do you have any idea?#2022-09-2905:27cflemingThere isn’t at the moment, no. Destructuring elements are excepted from the rule, because they tend to be very long. But they’re not always, as in your case. This has been discussed before, I’ll see if I can dig up the discussion.#2022-09-2614:45Dustin GetzIs the Cursive extension "clojure-extras" considered standard at this point? I didn't even know about it#2022-09-2614:52imrecompletely independently developed afaik, see #clj-extras-plugin#2022-09-2816:26souenzzocursive can't resolve or vars inside destructure in reify it is supported by /cdn-cgi/l/email-protection not sure about cljs.#2022-09-2816:27souenzzohere the code
(clojure.core.protocols/coll-reduce
  (reify clojure.core.protocols/CollReduce
    (coll-reduce [this {:keys [x]
                        :or   {x 42}}]
      x))
  {})
it returns 42
#2022-09-2905:31cflemingThanks for the repro case, I’ll check that.#2022-09-2909:57Thanh NguyenHi. When I try to press "Add as Clojure Deps project", I got a error notification "Cannot execute: Clojure command not configured" from Cursive. What should I do in this case? I fiddled around with the project configurations and stuff, but nothing seems to be the case here#2022-09-2911:40Thanh NguyenSorry for not researching more carefully. Basically I have to configure the Build Tool to let Cursive now how to invoke clj. I did it and things seem to work fine now#2022-09-2919:52kwladykais it possible in Curisve to print something like progress bar, but keeping it updating instead of print new line with each change? something like: 1% which after a while change into 2% instead of 1% 2% 3% …#2022-09-3009:49Ivar RefsdalYes, that's possible... You can use (str \u001b "[1K") instead of the usual \r and use (str \u001b "[0K") for clear to end of line#2022-09-3009:53Ivar RefsdalExample autoclosable ticker-thingie I've used tor Cursive: https://gist.github.com/ivarref/e50b7906f0e50c2129781c2ec87e7eb2#2022-09-3009:53Ivar RefsdalI did turn it off though, don't remember why.#2022-09-3009:54Ivar RefsdalCode is slightly modified from: https://github.com/ivarref/clj-paginate/blob/main/test/com/github/ivarref/clj_paginate/ticker.clj which have some basic tickers for performance tests#2022-09-3009:58Ivar Refsdaland issue: https://github.com/cursive-ide/cursive/issues/2555#2022-09-3010:38kwladykaThank you#2022-09-3020:16kwladykaDoes (str \u001b "[1K") work outside cursive?#2022-10-0116:22Ivar RefsdalYes I think so#2022-10-0123:16cflemingYes, Cursive interprets a limited set of escape codes.#2022-10-0123:16cflemingIt’s far from a full terminal interpreter, but simple cases like this should work ok.#2022-10-0708:56onetomis it any better to use \u001b instead of "\033"? eg:
(def cr
  "Carrige Return as ANSI escape sequence"
  "\033[1K")

(println (str "Hello" cr "World"))
#2022-09-2919:53kwladykaI would like to have some progress information when process large data#2022-10-0110:55kingmobIs there a way to disable Cursive’s built-in linting? I work on Aleph, which uses many funky potemkin macros, and I’m trying to cut down on the number of false positives I see. I’ve sort of got kondo configured to the point where it’s ignoring what I want it to, but I’m still getting a lot of spurious warnings from Cursive itself. (The “resolve as” functionality doesn’t cut it.)#2022-10-0113:38imreSee the inspections panel of intellij settings#2022-10-0114:14kingmobAhh, thank you#2022-10-0114:28NoahTheDukeCould also use #clj-extras-plugin to get better clj-kondo support within cursive#2022-10-0203:55cflemingI’ll take a look at Aleph again, back in the day I did add support for Potemkin, but perhaps that got broken.#2022-10-0203:57kingmobThanks, Noah, I already use it. The issue is kondo now understands certain Potemkin things correctly, but Cursive doesn’t, so I need to disable its linting. #2022-10-0203:57kingmobThanks, @U0567Q30W #2022-10-0204:05cfleming@U10EC98F5 Just to be clear, do you get these errors when writing apps which use Aleph, or when working on Aleph itself?#2022-10-0206:18kingmobWorking on Aleph itself. I’m the current maintainer#2022-10-0206:18kingmobAlong with a couple others.#2022-10-0221:26cflemingHmm, yeah, it’s possible that might not work as well - I did put some effort into ensuring that projects using Aleph would work. I’ll take a look at Aleph them.#2022-10-0608:22kingmobFWIW, there’s a few proto-potemkin fns/macros here and there in Zach’s codebase, and they’re not always the same 😬 as the potemkin versions.#2022-10-0412:19roklenarcicI think Cursive falsely reports dependency cycles, when two namespaces include each other with :as-alias option. The app works, but when I try to load namespace into REPL with CMD+Shift+L it says there’s a dependency cycle.#2022-10-0418:56cflemingI’ll check this, thanks.#2022-10-0516:26antonmosHello! When I use the debugger, i have to hit “step into” up 3 times to get to the next line of code. I also cant set breakpoints in let bindings. I also sometimes see that the debugger go to the else form of if and then goes back to the “then” form. I dont see any of these issues in github. Does anyone else have these issues?#2022-10-0522:44cflemingAs Alex mentions, this is to do with how Clojure compiles to bytecode. I’m planning to discuss this with JetBrains to see if I can work around it, but I haven’t done so yet.#2022-10-0522:44antonmosThank you for clarifying!#2022-10-0805:19cflemingI’ve filed this issue as a catch-all for these sorts of problems: https://github.com/cursive-ide/cursive/issues/2739. I’d like to get some simple repro cases in there I can take to JetBrains, I’ll try to come up with some next week but if anyone else has any drop them either here or over on the issue.#2022-10-0517:20Alex Miller (Clojure team)A lot of this has to do with how Clojure code is translated into bytecode with source mappings#2022-10-0517:24Alex Miller (Clojure team)I have definitely seen some of those issues#2022-10-0611:03danmOne of my colleagues has just introduced me to a cool IntelliJ feature that I'd not come across before. F6 in a file loads up a dialog with all of the functions/classes in that file (in Java, Python, TypeScript etc), and asks which ones you want to move to the new file location. Then it intelligently finds all the references to those functions/classes and updates them to import from the new location. F6 on a Clojure file in Cursive just gives a much simpler "Move File" dialog, and doesn't even update the namespace in the file to represent the new file system path (just warns you when you open it in the new location). Is there something I need to enable to get the enhanced functionality in Cursive? And if it's just not supported yet, is there somewhere I can officially request it as a feature?#2022-10-0700:09cflemingThis is something that isn’t in Cursive yet, but I should be able to do it now. This feature relies on being able to reliably rewrite ns forms, which was only added to Cursive recently.#2022-10-0611:04danmDuring refactors it'd be really handy to be able to automatically move forms to a new namespace and add references to that namespace where the old was was imported and the forms used. Even if it only did it as a full ns import rather than trying to guess a reasonable :as#2022-10-0618:49devurandomHi! When right clicking a deps.edn file, there is a "Add as Clojure Deps Project" menu entry. How do I undo that? Is there a "Remove Clojure Deps Project" somewhere? I already tried clicking the project root folder and "Open Module Settings", but cannot find anything that seems related.#2022-10-0618:54danmIn the view -> tools menu (or is it toolbars? On phone right now), there is a Clojure deps projects sidebar. The option to display it only appears if you actually have a Clojure deps project set up in the current IntelliJ workspace. You can delete it from in there#2022-10-0618:55devurandomThanks a lot!#2022-10-1017:32danmWhat's the chances of Cursive being made to parse templated strings from clojure.core.strint? We quite often use << from that module, and at the moment Cursive tells us that all our bindings which are only used within the templated string are unused.#2022-10-1103:17cflemingHmm, I’m not sure about that, it looks like it’s been incubating since 2012. Can you give me a simple example of something that doesn’t work correctly?#2022-10-1218:58danmFair. I’ve been told by @U09LZR36F that it is very much “here be Dragons” territory that is unlikely to ever move into core proper (as, for example, I discovered that
(let [a “foo”]
  (<< “test ~{a}”))
interpolates properly, but
(let [a “foo”
      tmpl “test ~{a}”]
  (<< tmpl))
totally doesn’t), so it might well not be worth your time. Anyway, if it is, it’s simply a case that Cursive would grey out the a var in the let binding as unused in my first (i.e. working) example above, because it doesn’t recognise the ~{a} within the string arg to << as a use of the var.
#2022-10-1219:00danmSemi-related, but non-Cursive: how the hell do you turn off smart quotes on iPhone? ;)#2022-10-1021:04ChrisHey, when doing
(require '[java-time :as jt])
cursive will often complain that jt can’t be resolved and won’t offer completions. Is this happening to anybody else? Do I need to restart something to get it recognized?
#2022-10-1103:18cflemingIs java-time added to your project correctly? Can you see it in External Libraries in your project view?#2022-10-1106:15Chrisyes, it’s in project.clj and in external libraries as well EDIT: I can also use the functions from java-time in the REPL#2022-10-1106:21ChrisI also get this behavior for org.httpkit.client which I’m refering to as http: http/post cannot be resolved#2022-10-1120:12cflemingCan I look at your project, is it public?#2022-10-1208:35ChrisI made a minimal project for you here: https://github.com/jakuzure/cursive-intellij-unresolved-minimal after creating the new project I was asked to generate stubs, which I did, after that java-time aka jt was resolved correctly and also fixed in my previous project. I still get the same behavior for httpkit though#2022-10-1107:45simongrayHaving a #?(...) in a let form inside a CLJC file seems to break Cursive’s ability to resolve the remaining symbols in the let form:#2022-10-1112:56seriogaThe workaround is
?#@(:clj [state' {}] :cljs [state' (rum/react state)])
#2022-10-1120:55hlshipDoes cursive care about a pom.clj file somehow? I have a project I've inherited that generates a pom.xml from a pom.clj and Cursive appears to be stumbling on it with a parse error. Once I delete the file, Cursive is able to load pom.xml successfully.#2022-10-1120:55hlship#2022-10-1121:13hlshipRenaming pom.clj to pom-template.edn appears to fix this; now I just have to make the rest of the team accept the change.#2022-10-1200:41cflemingI can’t find or remember anything in Cursive that treats that file specially.#2022-10-1200:43cflemingLooking at the stacktrace, it actually looks like the Maven support is picking it up for some reason.#2022-10-1202:23Ian FernandezAnyone has used Lein-monolith in IntellijIdea?#2022-10-1202:23Ian FernandezHow is the integration for it?#2022-10-1206:32eskosIIRC Cursive does nothing special with it, so practically no integration.#2022-10-1219:14Roman OstashHi, Are there any plans for porting/writing Cursive plugin for JetBrains Fleet? IDE looks very promising so far. https://www.jetbrains.com/fleet/#2022-10-1220:54cflemingTotally unknown at this point. There’s no plugin API yet or any information at all about what plugin development will be like. It’s likely to be a non-trivial amount of work since the UI layer is completely different, and I’ll have to get some idea of how popular Fleet is likely to be to make a judgement call about whether it’s worth it.#2022-10-1302:54onetomfor its supposed, turn-key collaborative capabilities, im also very interested in Fleet. i've tried it recently, but it also eats shitload of memory and its startup time is non-trivial, so im a bit disappointed in it at the moment, BUT i guess the developers are aiming for a better architecture and the usage of more modern OS & graphics APIs first and perf and resource utilization optimization will come a lot later. for now, they are probably aiming for being only just noticably better than intellij.#2022-10-1415:50Roman OstashThat makes sense. Fleet is still in early stages of development. Thank you for the update!#2022-10-1303:06onetomif i have a function with a multi-line argument list, eg:
(defn handle-auth
  [{:as             req
    requesting-user :xxx/user
    claims          :jwt/claims
    params          :body-params}])
it appears in the Structure tool window and the File Structure popup on a single line. the newlines are removed from the function signature, BUT the spaces are not compacted, so it makes those windows horizontally scrollable, which is annoying. also, i can't see the full arg list, without scrolling to the far right. i think this format would be more useful:
(-> '[{:as             req
       requesting-user :xxx/user
       claims          :jwt/claims
       params          :body-params}]
    pr-str)
=> "[{:as req, requesting-user :xxx/user, claims :jwt/claims, params :body-params}]"
#2022-10-1303:08onetommaybe sprinkled with some unicode chars for even better readability:
(str/replace #"," " ·"))
=> "[{:as req · requesting-user :xxx/user · claims :jwt/claims · params :body-params}]"
#2022-10-1401:20onetomfor the record, I've just tried to use https://github.com/borkdude/deps.clj with Cursive instead of the official Clojure CLI tool. it worked out of the box for our projects. not sure what the benefits of it would be, because it seems to run just as slow/fast as the Clojure CLI.#2022-10-1401:23onetomClojure CLI =========== 1st run, without ./.cpcache:
❯ rm -rf .cpcache/ ; time clojure -M:test:dev -e 1
1
clojure -M:test:dev -e 1  4.60s user 0.21s system 280% cpu 1.714 total
2nd run, using ./.cpcache:
❯ time clojure -M:test:dev -e 1 
1
clojure -M:test:dev -e 1  1.40s user 0.08s system 201% cpu 0.734 total
deps.clj ======== 1st run, without ./.cpcache:
❯ rm -rf .cpcache/ ; time deps -M:test:dev -e 1
1
deps -M:test:dev -e 1  3.97s user 0.26s system 248% cpu 1.703 total
2nd run, using ./.cpcache: ` ❯ time deps -M:test:dev -e 1 1 deps -M:test:dev -e 1 1.28s user 0.08s system 201% cpu 0.675 total
#2022-10-1407:44borkdude> because it seems to run just as slow/fast as the Clojure CLI. The benefit is that you can use it as a binary on Windows which solves some problems that exists there with Powershell. When you have an already running JVM, and load this as a library, then it would still be "just as fast" as the clojure CLI since the startup time of the bash CLI or deps binary is neglectible. A JVM is started once to calculate the classpath / download deps but for the same set of dependencies it is cached.#2022-10-1516:44onetombut in the examples above, i didn't have an already running JVM and didn't have .cpcache either, yet running clojure took about the same amount of time (`1.7s`) as running deps. which is a pretty good time, but I remember clojure taking a lot longer in the past...#2022-10-1516:45onetomi have the feeling that my test methodology is flawed somehow#2022-10-1516:49borkdudeclojure and deps are expected to be roughly equally as fast. the most time taken is by the jvm is launched, the rest is just shell or executable checking the cache and starting java, which takes just a few ms#2022-10-1516:49onetomgood to know about the windows support of deps. I'm consciously avoiding Windows, but if I ever need to program on it again, deps.clj will certainly be the 1st thing I install on it! :)#2022-10-1516:50onetomor babashka, right away :)#2022-10-1516:58onetomfor the sake of completeness, here is a baseline run of clojure on the same 2020 M1 Mac mini, where the execution times above came from:
❯ rm -rf ./.cpcache ; time clojure -M -e 1
1
clojure -M -e 1  0.49s user 0.05s system 165% cpu 0.327 total

❯ time clojure -M -e 1
1
clojure -M -e 1  0.50s user 0.05s system 164% cpu 0.337 total
#2022-10-1517:01onetomwaaaait a second, deps is not an ARM binary!
❯ file $(which deps)
/Users/onetom/bin/deps: Mach-O 64-bit executable x86_64
so it was an apple to oranges comparison! sorry, my bad. there is not ARM version of deps.clj yet, right?
#2022-10-1517:55borkdude@U086D6TBN Ah good call. Try bb clojure instead, there is an arm binary for that. deps doesn't have one at the moment, but could be made (if enough people ask)#2022-10-1517:55borkdude
bb clojure ...
is essentially the same as
deps ...
#2022-10-1703:48onetomindeed with bb clojure, instead of deps, the runtime is 0.4s/`0.2s` less:
❯ rm -rf .cpcache/ ; time bb clojure -M:test:dev -e 1
1
bb clojure -M:test:dev -e 1  4.73s user 0.28s system 364% cpu 1.375 total

❯ time bb clojure -M:test:dev -e 1 
1
bb clojure -M:test:dev -e 1  1.16s user 0.08s system 215% cpu 0.577 total
#2022-10-1401:31onetom@cfleming how come, when I run a local clojure run config with Run with Deps option, there is no ./.cpcache/* is generated (yet, the REPL starts up surprisingly fast)? I use the Use CLI tools (recommended) setting, with Path to 'clojure' command being /nix/store/lfrdycq43509a9s7m6dk7m4jscmaq7qf-clojure-1.11.1.1149/bin/clojure. and when i run rm -rf ./.cpcache ; clojure -M:test:dev -e 1, which is theoretically equivalent to the intellij run config, it does generate a ./.cpcache/*.#2022-10-1401:35cflemingCursive actually doesn’t do any caching of the classpath for run configs at the moment, although it’s something that I’m planning. It does do it for deps project sync, but not for lein.#2022-10-1415:32folconIs there any way of exporting indentation config in cursive to use as a git commit hook or something so I can get some of the nice indentation rules that we have consistently applied inside the codebase?#2022-10-1415:56tanzoniteblackif you have a script that reformats your file, you can always set that up as an “after save” hook in intellij#2022-10-1415:57tanzoniteblacklook for “Actions on save” in the settings menu#2022-10-1615:37folconAh, that's not quite what I meant, I think cursive's indentation is pretty good, I want to run it or something equivalent as a command line hook.#2022-10-1703:09cflemingIntelliJ does support a command line formatter, see https://www.jetbrains.com/help/idea/command-line-formatter.html. However it starts a whole IntelliJ instance to do it, so it may not be a great option for what you want. A better option would probably be to come up with the corresponding cljfmt config, and just run that.#2022-10-1713:58folconHmm, ok I'll dig into cljfmt, thanks @cfleming! Out of curiosity, does cursive's indenter use the same approach or is it compatible with cljfmt? I quite like what you're doing / options you offer, so being able to do something similar would be good.#2022-10-1717:27Ivar RefsdalThere is also zprint: https://github.com/kkinnear/zprint#get-zprint Which has a graalvm binary that starts in under 50 ms if you want fast(er) feedback..#2022-10-1717:27Ivar RefsdalI haven't tried either myself#2022-10-1720:16cflemingSo Cursive doesn’t use the same approach as cljfmt, but I believe they should be able to be made pretty compatible. Let me know if there are things you’d like to achieve but can’t. zprint is also an option, although it’s extremely configurable - philosophically, I think it’s too much and prefer tools with the minimum of config required to achieve a sane result.#2022-10-1418:19Mark MacDoes Cursive support Jetbrains Gateway?#2022-10-1505:40onetomsome related tickets: 1. https://github.com/cursive-ide/cursive/issues/2721 2. https://github.com/cursive-ide/cursive/issues/2533 and i think there was one more at least. i tried jetbrains gateway, when it came out and it didn't support opening the REPL window at that time and i doubt it has changed.#2022-10-1507:25Mark MacThanks, 2721 sounds like the issue I'm facing. Will watch the ticket.#2022-10-1703:09cflemingI haven’t had a chance to get to this yet, sorry.#2022-10-1710:15Mark Mac@cfleming the following announcement might trigger more interest https://blog.jetbrains.com/idea/2022/10/remote-development-in-jetbrains-ides-now-available-to-google-cloud-workstations-users/ possibly making it worthwhile fixing this problem. Thanks.#2022-10-1806:47JAtkinsAny idea how to prevent IJ from inserting hard breaks within strings?#2022-10-1810:02imreperhaps?#2022-10-1815:15JAtkinsah, thank you. I didn't find that when looking last night. It would be nice if cursive told IJ that formatting was sensitive in strings, but I don't think I care enough about the feature to say either way 🙂#2022-10-1819:57Ian FernandezHi, how can I start a REPL with lein monolith#2022-10-1819:57Ian Fernandezas I use
lein monolith with-all repl
in my machine it occurs ok
#2022-10-1819:57Ian Fernandezbut#2022-10-1819:59Ian Fernandez#2022-10-1913:40the-alchemistDid you try “Run With Leiningen” instead of “Run with IntelliJ project classpath”?#2022-10-1913:42Ian Fernandezyeah, it had the same problem#2022-10-1819:59Ian FernandezI’m having this problem#2022-10-1819:59Ian Fernandezfor Run Configuration error#2022-10-1922:18hlshipHere's an odd question: I'm trying to make io.aviso.pretty smarter about when to emit ANSI escape codes, and when not to. I have a default based on whether (System/console) returns non-nil. This works well for clj and does the right things in pipes and background jobs (it will be nil, so no ANSI). However, in a REPL launched by Cursive, console is still nil. Is there another cheap test I can make to determine if in a Cursive-launched REPL? Otherwise, I have to lean on setting an environment variable to override the console check.#2022-10-2016:58hlshipHad the idea of checking loaded namespaces and saw cursive.repl.runtime may be a good indicator of running under Cursive.#2022-10-2107:35Ivar RefsdalI've used
(def is-cursive?
  (try
    (require '[cursive.repl.runtime])
    true
    (catch Exception _
      false)))
successfully before. Not sure if it's the best solution
#2022-10-2110:56flowthingYou could probably just do (find-ns 'cursive.repl.runtime).#2022-10-2417:39hlshipUltimnately, I looked for nrepl.core (see https://github.com/AvisoNovate/pretty/blob/master/src/io/aviso/ansi.clj#L35) as this worked for Cursive and for lein repl and for clj. It probably works for Emacs and other editors too, I have to assume that those can handle ANSI color/font codes.#2022-10-2116:16Jared LangsonGot a REPL question. I have anonymous functions defined in a let binding. When I try to send a piece of code inside the let binding to the repl it tells me that the var is undefined. I've used "Load File in REPL". Is there a way to use the repl with let forms? The code
(let [get-tile-values (fn [m n] (str (get-in m [:resources n]) " " (get-in m [:rolls n])))
        get-tile-css (fn [m n] (color-classes (str (get-in m [:resources n]))))]
    [:div.grid.grid-cols-5.gap-1
     [:div.text-white.text-center.p-2 (get-tile-values m 1)
      {:style {:class (get-tile-css m 1)}}]
;...
When I try to use the send X to REPL command it says it can't find the var. For example send (get-tile-values m 1) to REPL results in a "Use of undeclared Var front-end.views/get-tile-values" error message
#2022-10-2116:19imresend top form to repl#2022-10-2116:21imretry that#2022-10-2116:22Jared LangsonTried that and got the same error. I used send (defn map->grid) to repl. Running the functions declared inside the let binding gives the same error#2022-10-2116:22imretry sending the entire let form#2022-10-2116:24imreif there is no namespace-wide binding of get-tile-values then when you send (get-tile-values m 1) , clojure won't know what you mean by get-tile-values#2022-10-2116:24imreor m for that matter#2022-10-2116:24Jared LangsonI manually loaded m into repl from a comment#2022-10-2116:25Jared Langsonsending the let form still doesn't let me use the methods declared inside the let#2022-10-2116:25Jared LangsonI can declare the functions globally, but that's a workaround#2022-10-2116:26imre> sending the let form still doesn't let me use the methods declared inside the let you mean you send the let form and it errors out?#2022-10-2116:26imreor you send the let form and then you try to send (get-tile-values m 1)?#2022-10-2116:27Jared Langsonthe second. I can send the let form fine, but when I call the (get-tile-values m 1) it errors#2022-10-2116:27imrebindings established in the let form are only available in the let form#2022-10-2116:28imrethat's why it doesn't work#2022-10-2116:28Jared LangsonI'm using the send at cursor function. Even though my cursor is inside the let form, it has no knowledge of the let form's binding?
(let [get-tile-values (fn [m n] (str (get-in m [:resources n]) " " (get-in m [:rolls n])))
        get-tile-css (fn [m n] (color-classes (str (get-in m [:resources n]))))]
    [:div.grid.grid-cols-5.gap-1
     [:div.text-white.text-center.p-2 (get-tile-values m 1)
      {:style {:class (get-tile-css m 1)}}]
#2022-10-2116:29imreyeah so when you say send let form, that will send your entire let form#2022-10-2116:29imrebut when from inside the let form you send (get-tile-values...) then it will literally send only that#2022-10-2116:29imrethat's akin to typing#2022-10-2116:30imre`(let [myfn ...]#2022-10-2116:30Jared Langsondang. What's the best way to use the repl for testing anonymous functions in let bindings? The only thing I can think of is declare them globally during development and move them into let for production#2022-10-2116:30imreyou can comment out the body of the let form and only make the body the form you want to evaluate in the scope of that let form#2022-10-2116:31imreand then send the let form in#2022-10-2116:31imreso (let [...] (get-tile-values m))#2022-10-2116:31imreor you can go#2022-10-2116:32imre
(let [get-tile-values ...]
 (def get-tile-values get-tile-values)
...
)
#2022-10-2116:32imreand then#2022-10-2116:32imre(get-tile-values m#2022-10-2116:32Jared LangsonAppreciate it. Thanks!#2022-10-2116:34imrejust make sure you don't check in the inline def#2022-10-2116:34Jared LangsonSuper helpful. Thanks a lot 🙂#2022-10-2116:35imreyw, good luck#2022-11-0212:48apbleonard@U01ES0TF6V6 I've used this macro in the past for exactly this problem. In the repl you just make sure you have switched to the namespace of your editor, type (deflet []) and cut and paste the let bindings you want to "inline def" as its first argument (i.e. replacing the empty vector.) The macro will inline def them all for you so you can get on with the repling. Much quicker for large let blocks. https://gist.github.com/henryw374/5dfcbf9d27ec89b360058e81339cbe4e#2022-11-0212:52apbleonardWhen inline defing a lot it can be useful to "zap" the namespace a la https://clojurians.slack.com/archives/C0744GXCJ/p1667378949616179 :)#2022-11-0215:54Jared Langson@U3TSNPRT9 with deflet, could it also work if I changed let to deflet in the function? And then I could change it back to let when I was done messing with it?#2022-11-0215:56Jared LangsonWhat's the advantage of zapping? I can reload the file and I can def the vars a second or third time. I tend to throw things in comment blocks so I can quickly reload useful snippets.#2022-11-0217:39apbleonardChanging let to deflet might indeed work - never tried that! If you reload it won't "forget" anything previously "def'd". That's why to really clean up you have to "zap" or restart the repl. Reloading also doesn't drop other things like aliases you previously defined in your ns requires. Swapping aliases in your requires can similarly leave you unable to reload completely.#2022-10-2407:11steveb8nQ: I’ve started using a babashka repl. has a few rough edges but overall it’s going well. I’ve hit a problem with deps - I have a :git/url dep that works via the bb task runner but is not available via the REPL. How does the Cursive bb repl calculate the classpath and resolve deps?#2022-10-2407:12steveb8nI’ve tried using deps.edn. didn’t fix it#2022-10-2407:12steveb8nAlso tried using bb.edn (because it’s docs say that it can manage deps for a REPL) but no luck that way either#2022-10-2407:39cflemingHmm, I’m not sure on this one, will try that out tomorrow.#2022-10-2408:06steveb8nthanks. I can workaround by invoking from the terminal for now#2022-10-2408:32steveb8nit appears to be :git/url specific. if I add a normal clojars dep to bb.edn the repl loads/includes it#2022-10-2408:37steveb8nhmm, not sure about that either. worked for zprint git dep but not for my own git repo. I’ll dig deeper tomorrow as well#2022-10-2518:37dvingoanyone have tips for setting *print-namespace-maps* to false for all REPLS? (clj and cljs)#2022-10-2703:00onetomi was trying put the following into my src/user.clj:
(alter-var-root #'*print-namespace-maps* (constantly false))
(prn {:asd/qwe 123 :asd/zxc 456})
and when i start a cursive local repl, it indeed just prints {:asd/qwe 123 :asd/zxc 456}, BUT 1. if i comment out the alter-var-root, it still prints the same 2. when eval the prn form manually, it prints the undesired #:asd{:qwe 123, :zxc 456}, regardless of whether the alter-var-root is commented out or not i haven't tried this in an isolated project yet, though, so i might have some interference from other libraries.
#2022-10-2715:24dvingothanks I'll try that out as well. I know how to affect printing maps by binding the var, but the output in the REPL pane is still using namespace maps 😞#2022-10-2703:23cjsauerIs it possible to evaluate a form in the buffer, and have its result replace the form itself? For example, say I have (random-uuid) in the buffer. What I want is for that form to replaced by #uuid"c1ebe545-11a0-46ce-a047-263138a59451" for example.#2022-10-2708:50cflemingIt isn’t right now, sorry. I have a plan to extend the REPL commands to allow things like this, so you would be able to build commands to do the things you want along these lines. But I haven’t got to that yet.#2022-10-2711:34cjsauerNo worries. Looking forward to the new REPL features. #2022-10-2721:02cfleming@U6GFE9HS7 Actually, something similar was discussed a while ago, with a nice solution: https://clojurians.slack.com/archives/C0744GXCJ/p1644978986077219#2022-10-2721:07cjsauerOh nice!! That’ll work for now#2022-10-2714:43onetomi've monkey-patched kaocha, so it prints the stack traces for for test failures & errors in a way, that cursive can convert them into links back to the source code. the output of https://github.com/nubank/matcher-combinators failures are also more readable after the expected & actual values are printed starting on a new line, from column 0, so multi-line values are indented correctly. https://gist.github.com/onetom/e39b8cc67d97e9afe3d7b2199024a84b#2022-10-2715:57imreThis is nice. Have you thought about contributing this to kaocha proper?#2022-10-2716:01imrekaocha is nicely pluggable, I could imagine this possible as a plugin#2022-10-2717:21onetomi thought just enough about it to get it working and that already took more time, than what i should have spent on it right now 🙂 i saw, that the kaocha.report/print-expr is a multi method of the 1st symbol of the assertion expression (just like clojure.test/assert-expr), so i should have probably just do a (defmethod print-expr 'match? [m] ...) to only affect the matcher-combinator output.#2022-10-2717:22onetombtw, i've tweaked things further a bit and now the expected form is pretty-printed as code, with clojure.pprint/pprint, so u should check out the latest version of the gist.#2022-10-2717:25onetomit would be nicer, if Cursive would have more relaxed rules for recognizing stack trace elements and i shouldn't put that single trace on a newline after FAIL or ERROR...#2022-10-2717:28onetombut not sure how would that affect the performance of the REPL window, if the stack trace pattern would be something like #".* (at|in) ...", instead of the current, presumably #"^ at ...". though, it does recognize the output of https://github.com/mmcgrana/clj-stacktrace too.#2022-10-2718:26imrealso works with https://github.com/AvisoNovate/pretty#2022-10-2800:23cflemingYes, this is just something I’d have to add to Cursive. It’s possible that it could be made generalisable (i.e. using user-defined patterns or something) but I’d have to investigate that.#2022-10-2800:24cflemingIt’s also true that multi-line patterns are hard in IntelliJ (which is annoying for e.g. printed error objects)#2022-10-2715:20onetomExample of enhanced Kaocha + matcher-combinators + Cursive output:#2022-10-2716:56onetomi've also managed to include the name of the tests, defined by clojure.test/deftest, into the stacktrace output, using this small tweak:
(alter-var-root
  #'clojure.test/deftest
  (constantly
    (fn deftest
      [&form &env name & body]
      (when clojure.test/*load-tests*
        `(defn ~(vary-meta name assoc :test `(fn ~name [] 
it will print
at demo.better_deftest$enhanced_stack_trace_test__600.invokeStatic (better_deftest.clj:19)
    demo.better_deftest/enhanced_stack_trace_test (better_deftest.clj:19)
instead of the default anonymous fn:
at demo.better_deftest$fn__513.invokeStatic (better_deftest.clj:4)
    demo.better_deftest/fn (better_deftest.clj:4)
#2022-10-2716:57onetomcomplete test code to repro this result:
(ns demo.better-deftest
  (:require [clojure.test :refer :all]))

(deftest default-stack-trace-test
  (is (throw (Exception. "BAMM"))))

(clojure.test/run-test default-stack-trace-test)

;;; `clojure.test` improvements
(alter-var-root
  #'clojure.test/deftest
  (constantly
    (fn deftest
      [&form &env name & body]
      (when clojure.test/*load-tests*
        `(defn ~(vary-meta name assoc :test `(fn ~name [] 
#2022-10-2717:23imreI wonder if there's a clj ticket about this#2022-10-2717:29onetomyeah, i thought about that too, but hasn't dug into it yet. im not very confident, whether this change could cause any issues, but our test suite seems to run with it at least.#2022-10-2719:03imreLooks like https://clojure.atlassian.net/jira/software/c/projects/CLJ/issues/?jql=project%20%3D%20%22CLJ%22%20AND%20text%20~%20%22deftest%22%20AND%20statuscategory%20%3D%20%22New%22%20ORDER%20BY%20created%20DESC - if this is something that is visible outside of kaocha it might be worth raising it on ask.clojure#2022-10-2812:00onetomthis one is slightly related though: https://clojure.atlassian.net/browse/CLJ-2639#2022-10-2819:04kwladykaanyone find a way to use .envrc with Cursive?#2022-10-2821:11nwjsmithIt would probably be simple to add support to https://github.com/Fapiko/intellij-better-direnv#2022-10-2821:11nwjsmithI haven't been using it for Clojure projects, but works great in my other ones#2022-10-2822:01cflemingI’m not sure if this is the same thing, but Cursive does support https://github.com/Ashald/EnvFile#2022-10-2910:34kwladykathank you, the https://github.com/Ashald/EnvFile work I added a comment here https://github.com/cursive-ide/cursive/issues/2742#2022-10-2910:34kwladykaBetter direnv didn’t work for me for Cursive.#2022-10-3012:18onetombetter direnv needs every kind of run configuration supported by it and Cursive is not yet supported. i use direnv to have a nix-shell environment for our Clojure projects, but what IntelliJ and the REPLs started from it, should be concerned about is only a few things, so in practice, I just setup the following manually: 1. clojure CLI path (`which clojure`) 2. JDK path (`which java`) 3. node & npm or yarn (`which node`)#2022-10-3010:16tskardalWhen starting cursive I get this error:
com.intellij.execution.ExecutionException: Cannot execute: Could not find :version in command output when executing /usr/local/bin/clojure
And I get zero results when searching for this error message 😬 – any suggestions?
#2022-10-3102:32cflemingI can’t reproduce this, sorry. What do you get if you run clojure -Sdescribe?#2022-10-3105:07tskardalNo worries 🙂 Here’s the output:
❯ clojure -Sdescribe
{ version "1.11.1.1182"
  config-files ["/usr/local/Cellar/clojure/1.11.1.1182/deps.edn" "/Users/thomas/.clojure/deps.edn" ]
  config-user "/Users/thomas/.clojure/deps.edn"
  config-project "deps.edn"
  install-dir "/usr/local/Cellar/clojure/1.11.1.1182"
  config-dir "/Users/thomas/.clojure"
  cache-dir "/Users/thomas/.clojure/.cpcache"
  force false
  repro false
  main-aliases ""
  repl-aliases ""}
#2022-10-3105:20cflemingHere’s what I see:
~/d/cursive (master)> clojure -Sdescribe
{:version "1.11.1.1182"
 :config-files ["/opt/homebrew/Cellar/clojure/1.11.1.1182/deps.edn" "/Users/colin/.clojure/deps.edn" "deps.edn" ]
 :config-user "/Users/colin/.clojure/deps.edn"
 :config-project "deps.edn"
 :install-dir "/opt/homebrew/Cellar/clojure/1.11.1.1182"
 :config-dir "/Users/colin/.clojure"
 :cache-dir ".cpcache"
 :force false
 :repro false
 :main-aliases ""
 :repl-aliases ""}
#2022-10-3105:21cflemingSee how your keys are symbols rather than keywords? I think that’s the problem, but I have no idea why that would happen.#2022-10-3105:46cflemingIf you’re not sure why that might be happening, it would be worth asking over in #C6QH853H8#2022-10-3107:12onetom@U06DX1ANS i would probably upgrade or reinstall homebrew, because that's a bit suspicious, that your built-in deps.edn file is under /usr/local/ and not under /usr/homebrew/. alternatively, i'd recommend using Nix instead of homebrew for managing non-GUI apps, because it yields in more reproducible environments. u can even have multiple environments side-by-side, without affecting each other and it's also completely isolated from your homebrew installation or the built-in macOS programs. just install with
sh <(curl -L ) --daemon
as described in https://nixos.org/manual/nix/stable/installation/installing-binary.html#multi-user-installation (the install script explains very precisely what it will do and why) then, in a newly opened terminal window, either try clojure temporarily with:
nix-shell -p clojure
which will downloads Clojure CLI tools for the 1st time, then starts a new bash shell, where clojure is on your PATH:
[nix-shell:~]$ clojure -Sdescribe
{:version "1.11.1.1177"
 :config-files ["/nix/store/q6sxn9lcb5rj5b7rhrwqsk9p8fhr63xp-clojure-1.11.1.1177/deps.edn" "/Users/onetom/.clojure/deps.edn" ]
 :config-user "/Users/onetom/.clojure/deps.edn"
 :config-project "deps.edn"
 :install-dir "/nix/store/q6sxn9lcb5rj5b7rhrwqsk9p8fhr63xp-clojure-1.11.1.1177"
 :config-dir "/Users/onetom/.clojure"
 :cache-dir "/Users/onetom/.clojure/.cpcache"
 :force false
 :repro false
 :main-aliases ""
 :repl-aliases ""}
or you can install it in a way, that's it's always available for your user:
nix-env -iA nixpkgs.clojure
then remove with
nix-env -e clojure
in case u want the homebrew version found first on your PATH again.
#2022-10-3109:17cflemingIIRC (it’s been a while) I think brew on Intel installs binaries, at least, to /usr/local. I might be wrong on that, though.#2022-10-3119:54tskardalyes, symlinks are put in /usr/local/bin#2022-10-3119:55tskardalI’ve been using nix too, but not on macOS 🙂#2022-11-0219:43tskardalFYI, the problem was that I was using the default bash on macOS. The script behaves differently on a more recent one. https://clojure.atlassian.net/browse/TDEPS-233#2022-11-0222:20cflemingGlad you found the answer! That was very weird indeed.#2022-10-3012:44tskardalI’ve tried both stable and EAP. This is macOS btw.
❯ clojure --version
Clojure CLI version 1.11.1.1182
❯ which clojure
/usr/local/bin/clojure
#2022-10-3116:14DumchFor guys who use Idea with IdeaVim. I wrote an https://www.reddit.com/r/Clojure/comments/yig9cu/vim_objects_for_forms_like_in_sexp_plugin_for/ on how to set up vim text objects for forms selection/deletion/changing with “f”.#2022-10-3121:46cflemingGreat use of LivePlugin, very nice!#2022-11-0100:21kwladykahttps://github.com/cursive-ide/cursive/issues/2743#2022-11-0208:49apbleonardAny thoughts about adding a REPL submenu item or similar to "zap" a namespace like this? https://github.com/seancorfield/vscode-calva-setup/blob/4399acdc762188df25fecd52436bb6b61efc9d90/calva/config.edn#L25 I know it's possible to similarly set up custom commands in Cursive, but it would really aid those starting out with REPL ing to be able to start afresh with a namespace that's gone bad, without having to constantly restart the REPL, which saps their faith in it.#2022-11-0308:23cflemingIt’s something I could think about adding, but really it seems like a good use case for the REPL commands to be honest. Perhaps a more general solution would be to have a good way of sharing REPL commands.#2022-11-0409:35apbleonard@U0567Q30W Custom REPL commands (bindable to keyboard shortcuts) are awesome, and power users need that for their preferred "refresh" workflows. But for new users Cursive has "out of the box" a core set of operations that is essential for using the REPL. I guess my feeling is that some opinionated choice of "refresh" or "clean" or "zap" namespace operation is "essential" for new users. It's well established in UX that the ability to start afresh is critical to usability - no matter the tool. Right now all new users have to start afresh is the REPL restart button, which you are told is a slow frustrating last resort - and yet they use it constantly - or worse they give up on the REPL entirely seeing it as unreliable. Clojure sells itself as a playful interactive experience, where learning is done by doing, but that only works if you can start afresh reliably. I work in an enterprise setting with a smattering of Clojure in a sea of Java, and a rolling set of partner staff who are not Clojure enthusiasts and may never be. They are not determined enough to read up on "tips and tricks" around the internet on how best to use the REPL and expect tooling guidance. Many are confused by the REPL and avoid it. So my plea is to consider helping to grow Clojure and the Cursive user base towards those non enthusiasts by adding a small feature that will help them start afresh :)#2022-11-0214:01EmpperiI got back to writing some Clojure code and I'm seeing a problem that was not there before. When executing tests in the REPL and getting test failures I do not get the gutter icon/inline results anymore in the editor. This makes the test execution in REPL almost useless since I do not get the assertion differences and information on which test failed. Anyone else seeing this?#2022-11-0214:09Jordan Robinsonit's now a context action, and can be bound to a keyboard shortcut, so you may see it with alt+enter#2022-11-0214:09Jordan Robinsonthough I've noticed if one of the sides is nil sometimes that doesn't show#2022-11-0214:09EmpperiDon't see it?#2022-11-0214:10EmpperiThere's literally nothing in the editor that shows I actually executed tests#2022-11-0214:10EmpperiI do get the small notification box#2022-11-0214:10EmpperiThis one#2022-11-0214:12Jordan Robinsonah that's a bit more significantly weirder, though I've seen a similar thing if your test file is named the same as a src file#2022-11-0214:12EmpperiDifferent name#2022-11-0214:13Jordan Robinsonthis is what it should look like when it fails#2022-11-0214:13EmpperiNope. If that would happen I would have not asked 🙂#2022-11-0214:14Jordan Robinsonsorry that meant to have this bit in with the context menu:#2022-11-0214:14EmpperiSo, it is a bug/issue and manifests on my system#2022-11-0214:14Jordan Robinsonyeah sorry, I don't have any other ideas#2022-11-0214:15EmpperiNo worries. Just wanted to know if it is turned off by default and can't just find the proper setting that would turn it on or something like that#2022-11-0214:15EmpperiBeen diving into settings#2022-11-0214:15EmpperiBut this does make executing tests with Cursive pain#2022-11-0214:17EmpperiI can execute a single test with that gutter icon but that executes the test in a separate jvm process which takes tons of time. In the output there's a link "click to see the differences" which opens the diff#2022-11-0214:17EmpperiTotally losing the fast iteration speed with REPL#2022-11-0214:17Jordan Robinsonyeah that's not great - if you start a new project with leiningen or similar and run the test that comes with that, does that work?#2022-11-0214:17Jordan Robinsoncould rule out the code vs the ide settings at least#2022-11-0214:18EmpperiI'll try that just to be sure, one moment#2022-11-0214:19EmpperiTotally blank project created from scratch with lein new testing-cursive and opened as a new project suffers from the same issue#2022-11-0214:20Jordan Robinsonwell that rules out a lot of stuff at least but I don't have any other ideas I'm afraid, maybe someone else in the channel does#2022-11-0214:20EmpperiYeah. I'll try to cope with this until someone might figure out wth is going on#2022-11-0214:20EmpperiI'm out of ideas myself too#2022-11-0214:30EmpperiJust in case Fleming happens to look at this or someone else with more knowledge, here is my about dialog content:
IntelliJ IDEA 2022.2.3 (Ultimate Edition)
Build #IU-222.4345.14, built on October 5, 2022
Licensed to Niklas Collin
Subscription is active until February 22, 2023.
Runtime version: 17.0.4.1+7-b469.62 amd64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
Windows 11 10.0
GC: G1 Young Generation, G1 Old Generation
Memory: 2048M
Cores: 8
Non-Bundled Plugins:
    org.jetbrains.kotlin (222-1.7.20-release-201-IJ4167.29)
    mobi.hsz.idea.gitignore (4.4.2)
    com.intellij.kubernetes (222.4345.14)
    intellij.prettierJS (222.4345.14)
    com.nekofar.milad.intellij.nextjs (1.2.3)
    com.intellij.lang.jsgraphql (3.3.0)
    com.cursiveclojure.cursive (1.12.5-eap2-2022.2)

Kotlin: 222-1.7.20-release-201-IJ4167.29
#2022-11-0214:30EmpperiMight try this also on my home desktop computer if it suffers from this issue or not#2022-11-0307:48cfleming@U7MRZK43B Do you have anything in your log file that might indicate what’s going on? Are you getting error reports in your IDE?#2022-11-0308:04EmpperiNo error messages#2022-11-0308:04EmpperiStuff just doesn't show#2022-11-0308:05cflemingThat is really wierd.#2022-11-0308:06cflemingI’ll look through the code tomorrow morning to see if I can see anything that might cause this.#2022-11-0308:07EmpperiLike this#2022-11-0308:09cflemingAre you using nREPL?
#2022-11-0308:09cflemingI guess so, since you mentioned lein.#2022-11-0308:10EmpperiYes#2022-11-0308:12cflemingCould you try this? Go to Help-&gt;Diagnostic Tools-&gt;Debug Log Settings and add #cursive.testing.actions in the dialog box. Then repro the issue, and hopefully you should see some lines in the log file from cursive.testing.actions.#2022-11-0308:12EmpperiChecking#2022-11-0308:14Empperi
2022-11-03 10:13:22,076 [269000779]   INFO - #c.i.d.DebugLogManager - Set DEBUG for the following categories: #cursive.testing.actions, cursive.testing.actions
2022-11-03 10:13:28,408 [269007111]   FINE - #c.t.actions - {:type :begin-test-ns, :ns "backend.collection-utils-test"}
2022-11-03 10:13:28,409 [269007112]   FINE - #c.t.actions - {:type :begin-test-var, :ns "backend.collection-utils-test", :name "test-update-map", :file "C:/Users/niklas.collin/code/nb-id/backend/test/backend/collection_utils_test.clj", :line 50, :column 1}
2022-11-03 10:13:28,410 [269007113]   FINE - #c.t.actions - {:type :pass, :trace [{:file "collection_utils_test.clj", :line 51, :class "backend.collection_utils_test$fn__10106$fn__10107", :method "invoke"} {:file "collection_utils_test.clj", :line 50, :class "backend.collection_utils_test$fn__10106", :method "invoke"}]}
2022-11-03 10:13:28,410 [269007113]   FINE - #c.t.actions - {:type :pass, :trace [{:file "collection_utils_test.clj", :line 60, :class "backend.collection_utils_test$fn__10106", :method "invokeStatic"}]}
2022-11-03 10:13:28,410 [269007113]   FINE - #c.t.actions - {:type :end-test-var, :ns "backend.collection-utils-test", :name "test-update-map", :file "C:/Users/niklas.collin/code/nb-id/backend/test/backend/collection_utils_test.clj", :line 50, :column 1}
2022-11-03 10:13:28,411 [269007114]   FINE - #c.t.actions - {:type :begin-test-var, :ns "backend.collection-utils-test", :name "test-update-map-vals", :file "C:/Users/niklas.collin/code/nb-id/backend/test/backend/collection_utils_test.clj", :line 24, :column 1}
2022-11-03 10:13:28,411 [269007114]   FINE - #c.t.actions - {:type :pass, :trace [{:file "collection_utils_test.clj", :line 25, :class "backend.collection_utils_test$fn__10079$fn__10080", :method "invoke"} {:file "collection_utils_test.clj", :line 24, :class "backend.collection_utils_test$fn__10079", :method "invoke"}]}
2022-11-03 10:13:28,412 [269007115]   FINE - #c.t.actions - {:type :pass, :trace [{:file "collection_utils_test.clj", :line 33, :class "backend.collection_utils_test$fn__10079", :method "invokeStatic"}]}
2022-11-03 10:13:28,412 [269007115]   FINE - #c.t.actions - {:type :end-test-var, :ns "backend.collection-utils-test", :name "test-update-map-vals", :file "C:/Users/niklas.collin/code/nb-id/backend/test/backend/collection_utils_test.clj", :line 24, :column 1}
2022-11-03 10:13:28,412 [269007115]   FINE - #c.t.actions - {:type :begin-test-var, :ns "backend.collection-utils-test", :name "test-cond-fn", :file "C:/Users/niklas.collin/code/nb-id/backend/test/backend/collection_utils_test.clj", :line 44, :column 1}
2022-11-03 10:13:28,412 [269007115]   FINE - #c.t.actions - {:type :pass, :trace [{:file "collection_utils_test.clj", :line 46, :class "backend.collection_utils_test$fn__10092$fn__10093", :method "invoke"} {:file "collection_utils_test.clj", :line 44, :class "backend.collection_utils_test$fn__10092", :method "invoke"}]}
2022-11-03 10:13:28,413 [269007116]   FINE - #c.t.actions - {:type :pass, :trace [{:file "collection_utils_test.clj", :line 47, :class "backend.collection_utils_test$fn__10092$fn__10097", :method "invoke"} {:file "collection_utils_test.clj", :line 44, :class "backend.collection_utils_test$fn__10092", :method "invoke"}]}
2022-11-03 10:13:28,413 [269007116]   FINE - #c.t.actions - {:type :pass, :trace [{:file "collection_utils_test.clj", :line 48, :class "backend.collection_utils_test$fn__10092", :method "invokeStatic"}]}
2022-11-03 10:13:28,413 [269007116]   FINE - #c.t.actions - {:type :end-test-var, :ns "backend.collection-utils-test", :name "test-cond-fn", :file "C:/Users/niklas.collin/code/nb-id/backend/test/backend/collection_utils_test.clj", :line 44, :column 1}
2022-11-03 10:13:28,413 [269007116]   FINE - #c.t.actions - {:type :begin-test-var, :ns "backend.collection-utils-test", :name "test-update-map-keys", :file "C:/Users/niklas.collin/code/nb-id/backend/test/backend/collection_utils_test.clj", :line 7, :column 1}
2022-11-03 10:13:28,413 [269007116]   FINE - #c.t.actions - {:type :pass, :trace [{:file "collection_utils_test.clj", :line 8, :class "backend.collection_utils_test$fn__10066$fn__10067", :method "invoke"} {:file "collection_utils_test.clj", :line 7, :class "backend.collection_utils_test$fn__10066", :method "invoke"}]}
2022-11-03 10:13:28,414 [269007117]   FINE - #c.t.actions - {:type :pass, :trace [{:file "collection_utils_test.clj", :line 16, :class "backend.collection_utils_test$fn__10066", :method "invokeStatic"}]}
2022-11-03 10:13:28,414 [269007117]   FINE - #c.t.actions - {:type :end-test-var, :ns "backend.collection-utils-test", :name "test-update-map-keys", :file "C:/Users/niklas.collin/code/nb-id/backend/test/backend/collection_utils_test.clj", :line 7, :column 1}
2022-11-03 10:13:28,414 [269007117]   FINE - #c.t.actions - {:type :end-test-ns, :ns "backend.collection-utils-test"}
2022-11-03 10:13:28,414 [269007117]   FINE - #c.t.actions - {:type :summary, :pass 9, :fail 0, :error 0, :test 4}
#2022-11-0308:15EmpperiOh... And should probably fail the test too 😂#2022-11-0308:15EmpperiOne more time!#2022-11-0308:16Empperi
2022-11-03 10:15:42,378 [269141081]   FINE - #c.t.actions - {:type :begin-test-ns, :ns "backend.collection-utils-test"}
2022-11-03 10:15:42,378 [269141081]   FINE - #c.t.actions - {:type :begin-test-var, :ns "backend.collection-utils-test", :name "test-update-map", :file "C:/Users/niklas.collin/code/nb-id/backend/test/backend/collection_utils_test.clj", :line 50, :column 1}
2022-11-03 10:15:42,380 [269141083]   FINE - #c.t.actions - {:type :pass, :trace [{:file "collection_utils_test.clj", :line 51, :class "backend.collection_utils_test$fn__10232$fn__10233", :method "invoke"} {:file "collection_utils_test.clj", :line 50, :class "backend.collection_utils_test$fn__10232", :method "invoke"}]}
2022-11-03 10:15:42,380 [269141083]   FINE - #c.t.actions - {:type :fail, :left "{:FOO \"BAR_lo\", :KIKKA \"KUKKA_lol\"}", :right "{:FOO \"BAR_lol\", :KIKKA \"KUKKA_lol\"}", :trace [{:file "collection_utils_test.clj", :line 60, :class "backend.collection_utils_test$fn__10232", :method "invokeStatic"}]}
2022-11-03 10:15:42,385 [269141088]   FINE - #c.t.actions - {:type :end-test-var, :ns "backend.collection-utils-test", :name "test-update-map", :file "C:/Users/niklas.collin/code/nb-id/backend/test/backend/collection_utils_test.clj", :line 50, :column 1}
2022-11-03 10:15:42,385 [269141088]   FINE - #c.t.actions - {:type :begin-test-var, :ns "backend.collection-utils-test", :name "test-update-map-vals", :file "C:/Users/niklas.collin/code/nb-id/backend/test/backend/collection_utils_test.clj", :line 24, :column 1}
2022-11-03 10:15:42,385 [269141088]   FINE - #c.t.actions - {:type :pass, :trace [{:file "collection_utils_test.clj", :line 25, :class "backend.collection_utils_test$fn__10205$fn__10206", :method "invoke"} {:file "collection_utils_test.clj", :line 24, :class "backend.collection_utils_test$fn__10205", :method "invoke"}]}
2022-11-03 10:15:42,385 [269141088]   FINE - #c.t.actions - {:type :pass, :trace [{:file "collection_utils_test.clj", :line 33, :class "backend.collection_utils_test$fn__10205", :method "invokeStatic"}]}
2022-11-03 10:15:42,385 [269141088]   FINE - #c.t.actions - {:type :end-test-var, :ns "backend.collection-utils-test", :name "test-update-map-vals", :file "C:/Users/niklas.collin/code/nb-id/backend/test/backend/collection_utils_test.clj", :line 24, :column 1}
2022-11-03 10:15:42,385 [269141088]   FINE - #c.t.actions - {:type :begin-test-var, :ns "backend.collection-utils-test", :name "test-cond-fn", :file "C:/Users/niklas.collin/code/nb-id/backend/test/backend/collection_utils_test.clj", :line 44, :column 1}
2022-11-03 10:15:42,385 [269141088]   FINE - #c.t.actions - {:type :pass, :trace [{:file "collection_utils_test.clj", :line 46, :class "backend.collection_utils_test$fn__10218$fn__10219", :method "invoke"} {:file "collection_utils_test.clj", :line 44, :class "backend.collection_utils_test$fn__10218", :method "invoke"}]}
2022-11-03 10:15:42,385 [269141088]   FINE - #c.t.actions - {:type :pass, :trace [{:file "collection_utils_test.clj", :line 47, :class "backend.collection_utils_test$fn__10218$fn__10223", :method "invoke"} {:file "collection_utils_test.clj", :line 44, :class "backend.collection_utils_test$fn__10218", :method "invoke"}]}
2022-11-03 10:15:42,385 [269141088]   FINE - #c.t.actions - {:type :pass, :trace [{:file "collection_utils_test.clj", :line 48, :class "backend.collection_utils_test$fn__10218", :method "invokeStatic"}]}
2022-11-03 10:15:42,386 [269141089]   FINE - #c.t.actions - {:type :end-test-var, :ns "backend.collection-utils-test", :name "test-cond-fn", :file "C:/Users/niklas.collin/code/nb-id/backend/test/backend/collection_utils_test.clj", :line 44, :column 1}
2022-11-03 10:15:42,386 [269141089]   FINE - #c.t.actions - {:type :begin-test-var, :ns "backend.collection-utils-test", :name "test-update-map-keys", :file "C:/Users/niklas.collin/code/nb-id/backend/test/backend/collection_utils_test.clj", :line 7, :column 1}
2022-11-03 10:15:42,386 [269141089]   FINE - #c.t.actions - {:type :pass, :trace [{:file "collection_utils_test.clj", :line 8, :class "backend.collection_utils_test$fn__10192$fn__10193", :method "invoke"} {:file "collection_utils_test.clj", :line 7, :class "backend.collection_utils_test$fn__10192", :method "invoke"}]}
2022-11-03 10:15:42,386 [269141089]   FINE - #c.t.actions - {:type :pass, :trace [{:file "collection_utils_test.clj", :line 16, :class "backend.collection_utils_test$fn__10192", :method "invokeStatic"}]}
2022-11-03 10:15:42,386 [269141089]   FINE - #c.t.actions - {:type :end-test-var, :ns "backend.collection-utils-test", :name "test-update-map-keys", :file "C:/Users/niklas.collin/code/nb-id/backend/test/backend/collection_utils_test.clj", :line 7, :column 1}
2022-11-03 10:15:42,386 [269141089]   FINE - #c.t.actions - {:type :end-test-ns, :ns "backend.collection-utils-test"}
2022-11-03 10:15:42,386 [269141089]   FINE - #c.t.actions - {:type :summary, :pass 8, :fail 1, :error 0, :test 4}
#2022-11-0308:16cflemingOk, thanks. That narrows it down for me tomorrow. It looks like the testing events are coming through ok, I’ll see if I can find anything that might stop the UI from showing.#2022-11-0308:16EmpperiGreat, thanks for your help!#2022-11-0308:17EmpperiI can live with this for a while but it is annoying#2022-11-0308:17cflemingNo worries. It’s probably a good idea to remove that line from the log settings, or you’ll get tons of junk in your logs.#2022-11-0308:17cflemingYeah, I can imagine - sorry 😞#2022-11-0308:17EmpperiYup#2022-11-0308:17EmpperiHey, stuff happens#2022-11-0308:17EmpperiOne more thing that might have something to do with this#2022-11-0308:17EmpperiI have Fleet beta installed#2022-11-0308:17EmpperiI can see logging from Fleet in the idea logs#2022-11-0308:18EmpperiIt is a far reaching thing but just an idea#2022-11-0308:18cflemingThat’s…. not expected, at least not by me, but I don’t know much about Fleet. I can’t see how it would interfere though.#2022-11-0308:18EmpperiYeah. It only connects to Idea if it is available for Idea language servers#2022-11-0308:19cflemingAh, ok, that makes sense, it might be the server components for that.#2022-11-0308:19cflemingOk, I’ll look at this tomorrow and report back.#2022-11-0308:19EmpperiI would be extremely surprised if Fleet would be the cause but just one more thing in my env#2022-11-0308:19EmpperiYup. Good night! I think its time there 🙂#2022-11-0308:20EmpperiHere it's 10am#2022-11-0308:20cflemingIt’s definitely getting that way!#2022-11-0407:42cflemingSo I looked at this today, and I can’t immediately see any reason this should happen. I’ll add some more debug logging and get you to try that out, hopefully I should have that tomorrow.#2022-12-2215:35grega100kI recently started seeing this issue where the result of the test is not indicated in the gutter. This thread is 2 months old and I'm not seeing anything more about it. Is there a fix?#2022-12-2215:38EmpperiCan't confirm. I'm between jobs and don't have the laptop anymore. Let's wait for Fleming to jump in from his timezone#2022-11-0218:39jmmkIs there any difference in functionality between running a Local nrepl vs connecting to a Remote nrepl?#2022-11-0308:24cflemingNo, they should be about the same. One slight difference is that uncaught stdout printing will come out in the REPL console for a local REPL, but will go to wherever the REPL server’s output goes in that case.#2022-11-0300:57Ian Fernandezis there any flag that you can detect if clojure is running in IntelliJ in runtime?#2022-11-0301:58salamI wouldn’t expect such a flag to exist. But I would definitely check the IntelliJ IDEA classpath (`System.getProperty("java.class.path")`) for the presence of any Clojure JAR in the https://www.jetbrains.com/help/idea/ide-scripting-console.html.#2022-11-0308:25cflemingWhat’s your use case for this?#2022-11-0314:16Ian FernandezI would like to know if the repl is started in cursive to use portal#2022-11-0314:22Ian Fernandez
(def p (p/open {:launcher :intellij}))
#2022-11-0315:23Ian FernandezIf it’s in intellij, add this kv to p/open properties map#2022-11-0321:42cflemingOh, I see - so you want to see if your app is running in a REPL started by Cursive? You could test for the presence of the cursive.repl.runtime ns.#2022-11-0311:08wontheone1I try to run Clojure script REPL with Cursive (with clojure.main) it doesn't find the file (class path).#2022-11-0311:09wontheone1It's deps edn project#2022-11-0311:09wontheone1
:cljs {:extra-paths ["src"]
         :main-opts [
                     ; "-i" "src/sharetribe/console/ui/figwheel_entry.cljs"

                     "-m" "sharetribe.console.ui.figwheel-entry" "-b" "dev" "-r"]}
cljs alias is defined like above
#2022-11-0311:10wontheone1The error I get is
Execution error (FileNotFoundException) at clojure.main/main (main.java:40).
Could not locate sharetribe/console/ui/figwheel_entry__init.class, sharetribe/console/ui/figwheel_entry.clj or sharetribe/console/ui/figwheel_entry.cljc on classpath. Please check that namespaces with dashes use underscores in the Clojure file name.
#2022-11-0311:11wontheone1Could someone help me find out the problem? It seems that Cursive REPL does not find files under src directory.#2022-11-0318:06thhellerit looks like you are trying to run a .cljs file? that doesn't work. the REPL is started via Clojure and clojure.main can only run CLJ code#2022-11-0402:12wontheone1Thanks! I finally got it to working by setting up a remote nREPL with piggieback middleware, inspired by a question below!#2022-11-0422:53malMy aliases are prefixed with : so for you :cljs instead of cljs?#2022-11-0707:07wontheone1I don't think I need to put : @UH1MELU4U, I just think Cursive REPL doesn't work with CLJS so I had to use a remote REPL#2022-11-1404:14mal@U354VUKQA I think I got cljs in a Cursive repl…#2022-11-1407:23wontheone1@UH1MELU4U How do I see these options. Mine only shows "which type of REPL to run" and nREPL and clojure.main option.#2022-11-1418:25malI think that’s from a Clojure Application not repl configuration. I think I’m using the repl one however. I just made the repo public if you wan’t to try it https://github.com/xicubed/grok-cljs#2022-11-1507:15wontheone1> mal [8:25 PM] > I think that’s from a Clojure Application not repl configuration. I don't know what this means, where can I see the same panel anyways? Thanks for the repo!#2022-11-2217:22malWhen you add a new run configuration with the + on this screen one of the options is Clojure Application…#2022-11-0311:19mbjarlandso not sure which channel this is most suited to, but I'm trying to start a repl under cursive for a build.clj tools.build build file and can not for the life of me figure out how to get this working. After a restart of intellij I finally got the IDE to load the tools.build dep and can now navigate to the code in tools.build. Trying to load the build.clj (which is in the root of the project next to deps.edn) into the repl results in:
Execution error (FileNotFoundException) at build/eval1926$loading (build.clj:1).
Could not locate clojure/tools/build/api__init.class, clojure/tools/build/api.clj or clojure/tools/build/api.cljc on classpath.
even though I have the build alias defined in the run configuration etc.
#2022-11-0403:59cflemingThere are a couple of issues slated for this EAP series which should fix this - for the moment the remote REPL is the best solution.#2022-11-0410:06mbjarlandThank you @U0567Q30W! Are there any tickets I could watch etc?#2022-11-0508:17cflemingYep, https://github.com/cursive-ide/cursive/issues/2653 and the related https://github.com/cursive-ide/cursive/issues/2409, both marked for the current EAP (although it’s taken a while for reasons, so things might get bumped to the next one. But soon.)#2022-11-0311:20mbjarlanddeps.edn
{:paths   ["src"]                                           ;; project paths
 :deps    {org.clojure/clojure   {:mvn/version "1.11.1"}
           ...}
 :aliases {:build {:deps       {io.github.clojure/tools.build {:git/tag "v0.8.4" :git/sha "8c3cd69"}}
                   :ns-default build}}}
#2022-11-0311:25mbjarlandand in fact when I look at the repl process I can see that the deps from the build alias are not there in the repl classpath (checked by starting a clj -A:build on the command line which does add them). Guess I'm missing something massively obvious here.#2022-11-0311:27mbjarland#2022-11-0311:30mbjarland
; build.clj
(ns build
  (:require [clojure.tools.build.api :as b])) ; <-- throws the exception above
...
#2022-11-0313:50jmmk@mbjarland I see the same as you when attempting to create a Local REPL using the build alias. If you look at the classpath of the repl process (you can see it by clicking on the line right below Starting nREPL server…) it doesn’t seem to be building it correctly for the build alias, but I’m not sure. An easy solution is to create a Remote REPL configuration, start the nrepl in your terminal, and connect to it, e.g. • Create a Run Configuration Clojure REPL -> Remote with Connection type: nREPL and Use port from nREPL file • Start an nREPL for the build alias (you will need an alias like repl with the nrepl dependency) ◦ clojure -M:build:repl • Run the Run Configuration for the Remote REPL in IntelliJ and it should connect and you should be able to load in build.clj#2022-11-0313:55mbjarland@jmmk - facepalm thank you! Failed miserably to think about the remote repl option. Yes, there seems to be something off with the alias handling within intellij/cursive.#2022-11-0314:02mbjarlandand that works, thanks again @jmmk#2022-11-0318:00folconThis is a bit strange, is there some reader macro going on to work out how to format this in cursive?
{:count 0, :queue <-, (:add-1-then-2 :add-10-then-20) -<, :stack []}
It seems to think the :queue <-(:add-1-then-2 :add-10-then-20)-<, is two map entries instead of one.
#2022-11-0401:24steveb8nQ: how do I configure Cursive to suppress “foo cannot be resolved” warnings in the right gutter for macros correctly required and used in a ns?#2022-11-0401:25steveb8nOh, I think I can resolve-as….#2022-11-0401:28steveb8nso now my question becomes, for Specter navigation macros, what should I resolve-as to remove the warning?#2022-11-0403:58cflemingI don’t think there’s a good way to do that, sorry - I’ve been meaning to look at Specter but surprisingly few people have asked for it.#2022-11-0403:58cflemingI’ll take another look and see if there are some easy wins.#2022-11-0404:56steveb8nThanks. I realise I’ve just been ignoring all the extra colours in the IDE but it’s spring so want to clean 🙂#2022-11-0404:57steveb8nbtw it was easy for the camel-snake-kebab macros. the problem seems to be Specter specific#2022-11-0423:23cflemingYeah, Specter is much more complicated than csk#2022-11-1013:28onetomi only had to set the resolve as for a few def* specter macros and most of the symbols are resolved#2022-11-1107:33steveb8n@U086D6TBN thanks. I tried this and got “select” resolved. still struggling with navigators e.g. ALL. which macro did you resolve to fix the uppercase nav macros?#2022-11-0417:07kendall.buchananI’ve confirmed this works in Calva, I wondered if there was a way to navigate to symbols found in EDN files. For example:#2022-11-0417:07kendall.buchanan
["/resources"
    ["/:resource"
     {:summary    "Show an individual resource page"
      :name       :banzai.pendant.front.routes/resource
      ...
      :view       banzai.pendant.front.resource.page/View}]]]
#2022-11-0521:27cflemingWhat would you want to navigate there? The banzai.pendant.front.resource.page/View bit?#2022-11-0616:06kendall.buchananYes, that’s correct.#2022-11-0616:06kendall.buchananIt’s a function var. #2022-11-0702:15onetomDatomic Cloud has an ion-config.edn file, which also has a bunch of fully-qualified symbols and I was also hoping I could just jump to their definitions from there 🙂 https://docs.datomic.com/cloud/ions/ions-reference.html#ion-config It pains me to say, but since I hardly ever need this, I think this should be a low-priority issue. For example I suffer more from unnecessary reloads caused by Cmd-Shift-M, which can completely hose a live environment. My workaround for such navigation issue, is: 1. jump to the beginning or the end (`Ctrl-A/E`) of the fully-qualified symbol 2. select it with Extend selection (`2x Opt-Up`) 3. then Go to symbol... (`Cmd-Opt-O`)#2022-11-0715:01kendall.buchanan@U086D6TBN Somehow I’d never noticed you could highlight something and open the search bar with the item pre-filled. Great, thank you.#2022-11-0417:07kendall.buchananThat’s sample data from a Reitit config sitting in EDN.#2022-11-0714:44GGfpcIs it possible to use structural editing to convert nested inline code to a threaded form? It only seems to work one s-expression at a time and that's not very useful so maybe I'm missing how it's supposed to work#2022-11-0714:44GGfpcWhen I select the whole form it says it needs to be in a list to work#2022-11-0714:58imrehow I use the feature is that I put the caret to the innermost form (i.e. what I want to be the first arg in the thread) and then repeatedly execute "thread form" until the threading macro is where I want it to be#2022-11-0719:17onetomexactly! think of it as picking up the end of the thread and start pulling it.#2022-11-0811:05sbIs that possible add custom buttons for REPL tool bar? like at Navigation Toolbar?#2022-11-1003:29cflemingIt looks like that is not configurable at the moment. Could you add an issue for that and I’ll fix it, please?#2022-11-1007:11sbOk! Im going to add as “issue”. Thank you very much!! #2022-11-0811:06sbI added the “Repl Commands” there.#2022-11-0818:49hadilsHi! I am using malli/experimental with Cursive. The mx/defn is almost identical syntacically to Prismatic schema. I got the function definition to resolve, but not the arg list, which has type specifiers like this: (mx/defn function :- RetType [arg1 :- ArgType] …) Is there a way to resolve the arg list in Cursive? I am using IntelliJ IDEA 2022.2.3 (Ultimate Edition).#2022-11-0913:52tony.kayUsing latest stable Cursive. I have a project (not all projects do it) where if I try to load any CLJC file into a CLJ repl I get:#2022-11-0921:36cflemingHi Tony, go to Help | Diagnostic Tools | Debug Log Settings… and add #cursive.namespace to the popup window. Then reproduce, and you should get an equivalent message in the logs with more info.#2022-11-1013:30onetomim having a similar issue with tick.core -> tick.file -> tick.core (on tick/tick {:mvn/version "0.5.0"}) will try to see if i can repro it too. it's intermittent...#2022-11-1013:48tony.kayOK, I just invalidated caches and restarted…I’ll do that now…#2022-11-1013:50tony.kayAh, that’s way more helpful: 2022-11-10 08:50:16,699 [ 212790] DEBUG - #cursive.namespace - Dependency cycle /Users/tonykay/.m2/repository/com/taoensso/tufte/2.3.0/tufte-2.3.0.jar!/taoensso/tufte/impl.cljc -> /Users/tonykay/.m2/repository/com/taoensso/tufte/2.3.0/tufte-2.3.0.jar!/taoensso/tufte/impl_new.cljc -> /Users/tonykay/.m2/repository/com/taoensso/tufte/2.3.0/tufte-2.3.0.jar!/taoensso/tufte/impl.cljc Looks like I have two versions of tufte on the classpath#2022-11-1013:51tony.kaybut I know how to figure it out now, thanks!#2022-11-1014:47tony.kay@U0567Q30W general feedback. I know you’re trying to keep the UI clean, but that popup needs to show full ns names. I know it is messy, but the popup was completely useless to me because I didn’t know which of my MANY deps was the problem I just knew it wasn’t my code.#2022-11-1014:48tony.kaywhich created drag for me, a question to answer for you, and serious drag for several of my team members yesterday that could have probably been avoided if the full ns would have just been in the error that was user-visible.#2022-11-1014:49tony.kayand now I have to figure out where to document how to do the special logging for future reference in case it happens again, and then I have to remember where I documented it (and the fact that I did document it) when it does happen again (which it will…this isn’t the first time in 4 years)#2022-11-1014:50tony.kaywhich means it will eventually cause another crappy day…#2022-11-1023:45cflemingOk, how about if the log continues to show full file info (which is useful for finding which dep contains them etc), and the popup contains full ns names?#2022-11-1023:47cflemingOh, actually, I’ll have to look at that code again. There are actually two layers of checks here, one for namespaces which have cycles, and one for files which have cycles. I’ll look at that again, but even in the file case it could show the file path back to the local root (like taoensso/tufte/impl.cljc in this case).#2022-11-1023:50cflemingI’ll also look at that case to see if I can figure out why it’s occurring.#2022-11-1100:23tony.kayYeah, anything that lets you pinpoint it to the dependency would be invaluable#2022-12-0206:53onetomI tried to set this debug log option, but even after restarting intellij, im not getting any logs about the dependency cycle, although i can reliable trigger it at the moment. I did see, that the log option change has been registered though:
2022-12-02 14:47:43,976 [9550328]   INFO - #c.i.d.DebugLogManager - Set DEBUG for the following categories: #cursive.namespace, cursive.namespace
#2022-12-0206:58onetomtried it in both 2022.2.4 & 2022.3#2022-11-0913:53tony.kaybut there is no such file in my source anywhere (impl), nor can I find such a file in the dependencis.#2022-11-0913:53tony.kayideas?#2022-11-1100:38onetomIs it just me, or others are getting these exceptions on startup in IntelliJ IDEA 2022.3 Beta (Ultimate Edition) Build #IU-223.7571.4, built on November 9, 2022 ? 1. Cursive (1.12.5-eap-2-2022.3) java.lang.Throwable: Activities registered via registerPostStartupActivity must be dumb-aware: cursive.build.BuildSystemUtil$$Lambda$1473/ 2. IDEA core java.lang.IllegalStateException: java.lang.IllegalStateException: No HighlightingSession found for ClojureFile (class cursive.repl.ReplFragment) in ProgressIndicator 670549150: running=true; canceled=false in map: ClojureFile (class cursive.psi.impl.ClojureFileImpl) -&gt; HighlightingSessionImpl: myVisibleRange:(2697,5816); myPsiFile: ClojureFile; ClojureFile (class cursive.psi.impl.ClojureFileImpl) -&gt; HighlightingSessionImpl: myVisibleRange:(0,2813); myPsiFile: ClojureFile #2022-11-1108:08cflemingIt’s not just you - I have the first one fixed for the next build. I haven’t seen the second though, but I’ll check it out tomorrow.#2022-11-1402:06cflemingThe first one is fixed in the current EAP, out now. However I haven’t seen the second one, and no-one else has reported it through the tracker as far as I can see. Is that when you’re debugging? I can’t see how you’d receive it at startup.#2022-11-1402:06cflemingDo you have a full stacktrace from the logs for that one?#2022-11-1100:54onetomOn 2022.2.2 I'm having issues with cursor focus being lost, especially, when pair programming over the native client of http://pop.com On 2022.2.3 Load File in REPL (`Cmd-Shift-L`) is loading unnecessary files into remote nREPLs On 2022.3.x I'm getting the mentioned exceptions constantly, which is very distracting, but we found other small issues too, as expected from EAP versions I'm feeling like when I have a small rock get stuck in my shoe and i can't get it out 🙂 It feels like IntelliJ is constantly getting faster and smoother, so I would really like to be on the latest version. I found the new UI pretty good too, after some tweaking, so that has a strong draw too 🙂#2022-11-1101:07onetomah, yeah, i can completely lose symbol resolution in 2022.3.x, within minutes after opening a project, despite it being fine initially#2022-11-1101:08onetomso it's not really usable at the moment 😞#2022-11-1101:03onetomI must be fatiguing to build a Clojure plugin on top of this hyper-object-oriented JetBrains editor platform 🙂 I just peeked into java.net.HttpCookie recently and I was baffled to see, that it's still relying on System.currentTimeMillis() for it's constructor and hasExpired() method and even some expiryDate2DeltaSeconds() private method, used from some assignors java.util.Map... My head is spinning from it and I'm still not sure, how could I mock the time in it. If it would be using java.time.Clock, I could just use a different one...#2022-11-1101:05onetomI mean, even the JDK is so convoluted, so I can imagine that the JetBrains API being even crazier.#2022-11-1413:46Ivar RefsdalI was able to (in practice) override System.currentTimeMillis using javassist/bytecode rewriting. Test verification: https://github.com/ivarref/hookd/blob/main/agentuser/test/agentuser/core_test.clj#L53 I've seen a few test libraries and byte-buddy do this as well... Welp. I spent way too much time on this 😕#2022-11-1603:01onetomoh, that's reassuring, if clojure libs are doing such wizardry too!#2022-11-1603:04onetomfor java.time use-cases i gave a try to the tick.core/with-clock macro (from https://github.com/juxt/tick) and it works reasonably well, just needs some practice and getting familiar with the various clock options...#2022-11-1603:08onetomi see you were also testing with java.net.HttpCookie 🙂 so much time is wasted on this issue world-wide probably. either because ppl can't believe it's not supported to fake time or they actually write tests, which use wall-clock time, constantly slowing down test feedback loops...#2022-11-1113:13Felipe Nascimentohey guys, Can cursive auto complete node depedence?#2022-11-1119:54cflemingNo, sadly - I’m considering some options for that.#2022-11-1113:14Felipe Nascimento#2022-11-1201:58Sam AdamsSeems like cursive has trouble identifying call sites of functions whose names include "-$"? (Although autocomplete works, and the call site links me to the function definition just fine). I can file an issue if it would be helpful.#2022-11-1201:59cflemingYes, please!#2022-11-1202:19Sam Adamshttps://github.com/cursive-ide/cursive/issues/2746#2022-11-1313:39Dustin GetzI found this cool cursive repl hook : https://www.reddit.com/r/Clojure/comments/lzx0zb/did_you_know_that_ideacursive_repl_results_may_be/. Is there a intellij API that we can call to put that contents into the clipboard?#2022-11-1313:44Dustin Getzhttps://plugins.jetbrains.com/docs/intellij/working-with-text.html#safely-replacing-selected-text-in-the-document seems pretty close#2022-11-1313:52Dustin Getzhttps://github.com/JetBrains/intellij-community/blob/4bec5270ac967904d8a874eb5d12749e8e3510a2/platform/platform-impl/src/com/intellij/openapi/editor/actions/CopyAction.java#L111#2022-11-1313:53Dustin Getzhttps://github.com/JetBrains/intellij-community/blob/0e2aa4030ee763c9b0c828f0b5119f4cdcc66f35/platform/editor-ui-api/src/com/intellij/openapi/ide/CopyPasteManager.java#2022-11-1313:55Dustin Getzpublic abstract void setContents(@NotNull Transferable content); Transferrable content = ...; CopyPasteManager.getInstance().setContents(content);#2022-11-1313:55Dustin Getzhttps://github.com/JetBrains/intellij-community/search?q=setContents#2022-11-1313:56Dustin GetzCopyPasteManager.getInstance().setContents(new StringSelection("hello world"));#2022-11-1314:04Dustin GetzSo the real q is: how do i "cross the streams" and run some code in the cursive process?#2022-11-1320:39cflemingSomething like this? https://clojurians.slack.com/archives/C0744GXCJ/p1644978986077219#2022-11-1320:48Dustin Getz
(let [s (java.util.UUID/randomUUID)]
  (.setContents (.getSystemClipboard (java.awt.Toolkit/getDefaultToolkit))
    (java.awt.datatransfer.StringSelection (str s))
    nil))
yeah looks great
#2022-11-1320:50cflemingI’m planning to update the REPL commands to have options to do this more automatically, but that’s a nice workaround in the meantime.#2022-11-1402:00cfleminghttps://twitter.com/CursiveIDE/status/1591973561316491264#2022-11-1403:27onetomi have on more issues on starting IntelliJ 2022.3 Beta Build #IU-223.7571.4, built on November 9, 2022 i still get this exception though, when i start a local nREPL:
java.lang.IllegalStateException: java.lang.IllegalStateException: No HighlightingSession found for ClojureFile (class cursive.repl.ReplFragment) in ProgressIndicator 1762953232: running=true; canceled=false in map: ClojureFile (class cursive.psi.impl.ClojureFileImpl) -> HighlightingSessionImpl: myVisibleRange:(0,3380); myPsiFile: ClojureFile
#2022-11-1403:34onetomthe funny thing is, that im getting this error even a JS-only project...#2022-11-1407:50cfleming> i have on more issues on starting Was that: I have one more issue, or: I have no more issues?#2022-11-1416:31onetomoops, sorry, i meant NO more issues - as in exceptions in the Notifications tool window - on startup. that No HighlightingSession found for ClojureFile exception appears when im starting the REPL. in the meantime, i did find an issue though, after startup has settled, scanned all the files for indexing and whatever it does about the dependencies afterwards and i have no symbol resolution for my src & test deps.edn :paths, BUT i have for the dev directory... same project doesn't have this issue under 2022.2.{2,3} of course. i tried to run Refresh Clojure Deps Projects manually, but that didn't fix it. i've deleted my compiled classes/* - which is also on my classpath - no difference either. i tried to use tools.deps version 0.15.1244 directly and also clojure cli 1.11.1.1189; makes no difference either.#2022-11-1423:12cflemingThat’s really weird. Are those folders marked as sources in the project view?#2022-11-1602:23onetomyes, they are correctly marked as both source and test roots. the strange thing is that the src dir has a library root annotation next to it in the Project tool window, but those are the sources, which can't resolve even clojure.core. while the dev & test paths don't have this library root indication, yet they have no issue with the symbol resolution. dev & test are also added via :extra-paths in 2 different tools.deps aliases.#2022-11-1602:25onetomah, i found something strange! there is no Deps tool window! despite having IntelliJ sub-modules, with a Clojure configuration tabs. i can email a screenshot.#2022-11-1602:27onetomnvm, the Deps tool window was just hidden from the Tool Window Bars#2022-11-1406:19onetomi've accidentally opened the Profiler tool window, where I saw a clojure.main Process. when I left-clicked on it, I got a menu with an Attach IntelliJ Profiler item. after clicking that, it has started to collect profiling info, which i could explore on a flame-graph, after stopping the profiling. it captures way more info, that what i would usually want, but at least it's built-in to intellij 🙂 the flame-graph navigation was very choppy though (in IntelliJ IDEA 2022.2.3; i think they improved on it recently)#2022-11-1613:21souenzzonot exactly a cursive question but while using the Terminal from intellij, many tools, like kondo report things in /home/file.clj:<line_no>:<column_no>: <message> format Is possible to have a "goto reference" behavior by clicking on this terminal output?#2022-11-1706:08cflemingI’m not sure about this sorry, I haven’t seen anything like this but it may be possible.#2022-11-2209:39Jordan RobinsonJust a quick note to say I just found this setting and having worked with a multi-module setup with ~100 filenames being the same if they're truncated, I'm so glad this is an option, changing it to full namespace from the default immediately improved my day, thanks Colin!#2022-11-2211:06seriogaFor me the “File name” option works better than namespaces.#2022-11-2218:45dvingoI'm on 1.12.5-eap3-2022.2 and still not able to load namespaces in a Clojure REPL that use :as-alias because of the "dependency cycle" erroneous message. IntelliJ IDEA 2022.2.3 (Ultimate Edition) I see in the changelog this is supposed to work https://github.com/cursive-ide/cursive/blob/master/CHANGELOG.md#2022-11-2420:50cfleming@U051V5LLP Is that for Clojure or CLJS?#2022-11-2514:06dvingoIt is happening for both - it is a .cljc file where the problem is happening#2022-11-2514:07dvingoone .cljc file is using :as-alias of another .cljc file#2022-11-2404:30Ian Fernandez#2022-11-2404:30Ian Fernandezhow can I proceed on running a project that has figwheel-sidecar error like this by "Run with IntelliJ Classpath" ???#2022-11-2404:52onetom1. u can downgrade clojure to 1.10.x 2. u can transition to https://figwheel.org/. while figwheel-sidecar doesn't explicitly states it, but in practice, u can consider it deprecated, as the A new Figwheel!! heading hints at it, at the top of its README: https://github.com/bhauman/lein-figwheel here are more thoughts on the topic: https://clojureverse.org/t/what-is-the-difference-between-figwheel-main-and-figwheel-sidecar/6832/5#2022-11-2407:04wontheone1Have you tried to use remote REPL?#2022-11-2509:11onetomnot sure I understand the question, but i haven't worked with ClojureScript or figwheel-main running in a browser for many years. but i do connect to remote nREPLs often (running within Datomic Cloud ion servers). why?#2022-11-2509:30wontheone1That was a suggestion for Ian 🙂#2022-11-2408:50Ian FernandezHow can I force IntelliJ to run with clojure 1.10.1 for example??#2022-11-2410:00wontheone1Isn’t the version specified in deps.edn or project.clj ?#2022-11-2413:39Ian Fernandezyes, it is but the IntelliJ classpath is enforcing clojure 1.11.1#2022-11-2413:43imreDo you by any chance have an alias/profile ticked in tge relevant tool window which pulls in 1.11.1¿#2022-11-2413:44imreHave you done refresh deps/lein project and the restarting the repl?#2022-11-2413:46Ian FernandezI'm using a maven project :')#2022-11-2413:46Ian FernandezDo you by any chance have an alias/profile ticked in tge relevant tool window which pulls in 1.11.1¿ No, inspected the tree#2022-11-2413:47imreOh I see. Maven+clojure is unknown territory to me I'm afraid#2022-11-2413:48Ian FernandezI've inspected the maven dependency tree with mvn dependency:tree -Dverbose=true and nothing pulls clojure 1.11.1#2022-11-2413:49imreAnd does anything specifically pull the desired version?#2022-11-2413:51Ian FernandezSyntax error macroexpanding clojure.core.async/go Attempting to call unbound fn: #'clojure.tools.analyzer.utils/update-vals#2022-11-2413:51Ian FernandezAnd does anything specifically pull the desired version? Yes, I'm pulling in clojure 1.10.1#2022-11-2414:29imrewhat version of clojure tools.analyzer is being pulled in and by what?#2022-11-2414:36Ian FernandezI'm pulling out tools.analyzer 1.1.0#2022-11-2414:55imreand what version of core async?#2022-11-2413:39Ian Fernandezyes, it is but the IntelliJ classpath is enforcing clojure 1.11.1#2022-11-2415:55Shantanu KumarHi. Probably a Noob question - how do I re-indent a line (or selection) correctly after I mistakenly moved it?#2022-11-2416:31wontheone1cmd alt L works for me in my mac#2022-11-2512:38Shantanu Kumar@U354VUKQA Thanks, I got it working with Ctrl+Alt+L on Linux. Selecting text and the key combination applies re-indentation to just the selected text.#2022-11-2420:11ericdalloIn case anyone with Intellij plugin knowledge knows how to help :)#2022-11-2510:07devurandomHello! Is it possible to make Cursive always run tests via the REPL (cf. https://cursive-ide.com/userguide/testing.html) when I click the green arrow next to deftest or the green double arrow next to ns ,,,-test? I know I can go via the "Tools" menu, but I got quite accustomed to clicking the green arrows. Firing up a whole test runner for my current project takes quite some time, so I would like to know a convenient way to run tests via the REPL in a similar manner.#2022-11-2510:54cflemingThere isn’t at the moment, no, but I get that people would like that option. I’ll think about ways to achieve that.#2022-11-2601:46kennytiltonWhat I did was bind the run and re-run commands to ^Q and shift-^Q. Iteration heaven. I can even use ^Q when I have navigated to different source file and made a change. I almost never take the trouble to customize key bindings, but here I saw a bigggg win.#2022-11-2515:57octahedrionis there any way to suppress warnings output to the REPL from Clojure or Java code over which one hasn't got control ?#2022-11-2516:02respatializedif it's Java code that uses java.util.logging, I've used the following in the past to suppress messages:
(import '[java.util.logging Logger])

(.setLevel (Logger/getLogger "org.javacode.mylib.MyClass") java.util.logging.Level/SEVERE)
But this requires you to know the name of the class triggering the warnings, which isn't always obvious or easy to discover if it's somewhere down in your dependencies.
#2022-11-2516:03octahedrionsadly it's not#2022-11-2810:07octahedrionit's actually coming from C code fprintfing to stderr#2022-11-2810:07octahedrion(via JNA)#2022-11-2610:42onetom@cfleming I just tried IntelliJ 2022.3 RC2 Build #IU-223.7571.123, built on November 23, 2022 and im getting a new kind of error, which i haven't seen before. i hope this helps pinning down the issues with symbol resolution:
In file: file:///Users/onetom/.../api_repl.clj

java.lang.IllegalStateException: Attempting to call unbound fn: #'cursive.annotator/create-visitor
	at clojure.lang.Var$Unbound.throwArity(Var.java:45)
	at clojure.lang.AFn.invoke(AFn.java:32)
	at clojure.lang.Var.invoke(Var.java:384)
	at cursive.api.DelayedFn.invoke(DelayedFn.java:31)
	at cursive.annotator.ClojureAnnotator.createVisitor(Annotator.kt:25)
	at cursive.annotator.ClojureAnnotator.annotate(Annotator.kt:20)
	at com.intellij.codeInsight.daemon.impl.DefaultHighlightVisitor.runAnnotators(DefaultHighlightVisitor.java:131)
	at com.intellij.codeInsight.daemon.impl.DefaultHighlightVisitor.visit(DefaultHighlightVisitor.java:108)
	at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.runVisitors(GeneralHighlightingPass.java:344)
...
(this one i was able to submit to you successfully, via the intellij error reporter)
#2022-11-2701:37onetomyes, it has always happened for those 3-4 times i tried. but since i have no symbol resolution everywhere, i can't really use this version combination to see if there are any more errors.#2022-11-2804:24Lusia@cfleming Manage to see this stub generation issue in IntelliJ IDEA 2022.2.4 (Ultimate Edition) Build #IU-222.4459.24, built on November 22, 2022 (on @onetom’s team), which we haven't seen before:
java.io.FileNotFoundException: /Users/lusia/Library/Caches/JetBrains/IntelliJIdea2022.2/cursive_stubs_3176d153/342a3e14-tmp/73746538.clj (No such file or directory)
at java.base/java.io.FileOutputStream.open0(Native Method)
at java.base/java.io.FileOutputStream.open(FileOutputStream.java:293)
at java.base/java.io.FileOutputStream. (FileOutputStream.java:235)
at $fn__11619.invokeStatic(io.clj:230)
at $fn__11619.invoke(io.clj:230)
at $fn__11543$G__11525__11550.invoke(io.clj:69)
at $fn__11631.invokeStatic(io.clj:263)
at $fn__11631.invoke(io.clj:259)
at $fn__11543$G__11525__11550.invoke(io.clj:69)
at $fn__11593.invokeStatic(io.clj:166)
at $fn__11593.invoke(io.clj:166)
at $fn__11556$G__11521__11563.invoke(io.clj:69)
at $writer.invokeStatic(io.clj:119)
at $writer.doInvoke(io.clj:104)
at clojure.lang.RestFn.invoke(RestFn.java:410)
at clojure.lang.AFn.applyToHelper(AFn.java:154)
at clojure.lang.RestFn.applyTo(RestFn.java:132)
at clojure.core$apply.invokeStatic(core.clj:669)
at clojure.core$spit.invokeStatic(core.clj:7021)
at clojure.core$spit.doInvoke(core.clj:7021)
at clojure.lang.RestFn.invoke(RestFn.java:425)
at user$eval253.invokeStatic(create-stub5683523002239954284.clj:2)
at user$eval253.invoke(create-stub5683523002239954284.clj:2)
at clojure.lang.Compiler.eval(Compiler.java:7194)
at clojure.lang.Compiler.load(Compiler.java:7653)
at clojure.lang.Compiler.loadFile(Compiler.java:7591)
at clojure.main$load_script.invokeStatic(main.clj:475)
at clojure.main$init_opt.invokeStatic(main.clj:477)
at clojure.main$init_opt.invoke(main.clj:477)
at clojure.main$initialize.invokeStatic(main.clj:508)
at clojure.main$null_opt.invokeStatic(main.clj:542)
at clojure.main$null_opt.invoke(main.clj:539)
at clojure.main$main.invokeStatic(main.clj:664)
at clojure.main$main.doInvoke(main.clj:616)
at clojure.lang.RestFn.applyTo(RestFn.java:137)
at clojure.lang.Var.applyTo(Var.java:705)
at clojure.main.main(main.java:40)
#2022-11-2808:05cflemingCould you check which of those files exist? Does the file cursive_stubs_3176d153/342a3e14-tmp/73746538.clj exist? What about the cursive_stubs_3176d153/342a3e14-tmp or the cursive_stubs_3176d153 directories? Using the full path from the error message, of course.#2022-11-2809:33Lusiasubfolder 342a3e14-tmp doesn't exist
ls /Users/lusia/Library/Caches/JetBrains/IntelliJIdea2022.2/cursive_stubs_3176d153                          
7d8a2494  83c6d90e
#2022-12-0105:24onetomthis has just happened to me again too, during stub generation on IJ Build #IU-223.7571.182, built on November 29, 2022 & Cursive 1.12.5-2022.3:
java.io.FileNotFoundException: /Users/onetom/Library/Caches/JetBrains/IntelliJIdea2022.3/cursive_stubs_1c381054/82249e8f-tmp/62a3afe9.clj (No such file or directory)
at java.base/java.io.FileOutputStream.open0(Native Method)
<same stack trace as above; i've spot-checked most line number and they matched>
checked the file hierarchy:
❯ cat /Users/onetom/Library/Caches/JetBrains/IntelliJIdea2022.3/cursive_stubs_1c381054/82249e8f-tmp/62a3afe9.clj
cat: /Users/onetom/Library/Caches/JetBrains/IntelliJIdea2022.3/cursive_stubs_1c381054/82249e8f-tmp/62a3afe9.clj: No such file or directory

❯ ls /Users/onetom/Library/Caches/JetBrains/IntelliJIdea2022.3/cursive_stubs_1c381054/82249e8f-tmp/          
ls: cannot access '/Users/onetom/Library/Caches/JetBrains/IntelliJIdea2022.3/cursive_stubs_1c381054/82249e8f-tmp/': No such file or directory

❯ ls /Users/onetom/Library/Caches/JetBrains/IntelliJIdea2022.3/cursive_stubs_1c381054/             
27a67855  82249e8f  a66d1e33
#2022-12-0105:25onetomnoticed this, after i did a cache invalidation, because i still don't have symbol resolution everywhere in this project#2022-12-0105:30onetomi've disabled
;com.clojure-goes-fast/clj-async-profiler
    ;{:mvn/version "1.0.0"}
so i have no errors or warning during opening this project, no errors in the project structure dialog either and no errors in the run configurations, but still no symbol resolution, even for clojure.core.
#2022-11-3009:43Thomas MoermanQ about the test-runner in Cursive: in my current setup a failing test is reported with expected and actual value reversed in comparison to clojure.test and kaocha output. Could this be a bug or is it a configuration?#2022-11-3013:03onetomCan you share screenshot of some trivial repro case, like (is (= 3 (+ 1 2))?#2022-11-3013:05Thomas Moerman#2022-11-3013:09Thomas Moermankaocha output:#2022-11-3013:14onetomindeed, im seeing the exact same results. also, for the record, loading this file:
(ns cursive.test-runner-test
  (:require [clojure.test :refer :all]))

(deftest expected-actual-order-test
  (is (= 2 (+ 3 3))))

(run-test expected-actual-order-test)
results in this REPL output:
Loading test/cursive/test_runner_test.clj... 

Testing cursive.test-runner-test

FAIL in (expected-actual-order-test) (test_runner_test.clj:5)
expected: (= 2 (+ 3 3))
  actual: (not (= 2 6))

Ran 1 tests containing 1 assertions.
1 failures, 0 errors.
Loaded
#2022-11-3013:20onetomtried it from the command line too, without any kaocha or matcher combinators being present on the classpath and the result is the same:
❯ time clojure -Srepro -Sdeps '{:paths ["test"]}' -M -e "(require 'cursive.test-runner-test)"

Testing cursive.test-runner-test

FAIL in (expected-actual-order-test) (test_runner_test.clj:5)
expected: (= 2 (+ 3 3))
  actual: (not (= 2 6))

Ran 1 tests containing 1 assertions.
1 failures, 0 errors.
clojure -Srepro -Sdeps '{:paths ["test"]}' -M -e   0.98s user 0.08s system 80% cpu 1.326 total
so, i agree, it seems, that the built-in cursive reporter explanation is backwards.
#2022-11-3021:13cflemingThe thing is that there’s no defined order - kaocha might have a convention, but (is (= x y)) just checks that two things are equal, with no concept of which is expected and which has been calculated. However, that message in the test runner doesn’t come from Cursive so it must be coming from either the IntelliJ test runner or clojure.test - I’ll check. It’s possible I’m swapping the first and second values somewhere.#2022-12-0106:23onetomI was also thinking about where did the convention of the ordering come from. I think the most authorative suggestion is the docstring of the is macro:
(defmacro is
  "Generic assertion macro.  'form' is any predicate test.
  'msg' is an optional message to attach to the assertion.
  
  Example: (is (= 4 (+ 2 2)) "Two plus two should be 4")
...
which is also in-line with tests of Clojure itself, eg: https://github.com/clojure/clojure/blob/828d82fb5bae9a985f32279b819e22ae436022da/test/clojure/test_clojure/string.clj though u can see an order reversal here: https://github.com/clojure/clojure/blob/7b102d84c60ed88d62989d6fd4a6994bd33b3bec/test/clojure/test_clojure/parse.clj#L10-L14 but still, it's been made explicit, that the 1st argument of the predicate within is is the expected one.
#2022-12-0111:35Thomas MoermanThank you @U0567Q30W and @U086D6TBN for looking into this gratitude . That said, it's not a critical issue so don't feel pressed.#2022-12-0500:35onetomBTW, there is a package for kaocha, which flips the order of actual and expected: https://github.com/magnars/kaocha-noyoda it's mentioned here: https://github.com/lambdaisland/kaocha/blob/main/README.md?plain=1#L261-L262#2022-12-0502:51cflemingRight, I definitely think the order of expected/actual is pretty loosely defined here. I’d have to check, but I’m pretty sure the Cursive diff view uses “Left” and “Right” instead of “Expected” and “Actual”. But I’ll have to figure out where that message is actually coming from first.#2022-12-0100:23cfleminghttps://twitter.com/CursiveIDE/status/1598110203349585920#2022-12-0618:17Mr. Savyi just switched to intellij’s new ui and lost all my cursive/repl stuff. is cursive supported in the new ui or should i downgrade for now?#2022-12-0618:19Mr. Savythe new cursive release says support, so i assume it should still work.#2022-12-0618:39kennytiltonSorry, what exactly do you mean by "lost all my cursive/repl stuff"? Is the plugin still installed?#2022-12-0618:45kennytiltonFWIW, I just now upgraded to Community 2021.2.4 and all is well.#2022-12-0618:49Mr. Savynone of the buttons are there, and i can’t seem to manually run the repl by selecting the project.clj file.#2022-12-0618:51R.A. PorterI believe you’ve talked past each other. @U012MJU8XNU you mean the experimental New UI that can be switched to in version 2022.3, correct?#2022-12-0618:51R.A. PorterI haven’t tried switching to it (and now am afraid to do so) yet.#2022-12-0619:22Sam AdamsI’ve been using the new UI pretty successfully with a deps project, REPL etc. Sometimes the deps, repl icons don’t show up in the right side gutter, but i can access that functionality via e.g. double-shift “search everywhere” #2022-12-0619:44Mr. Savy@U01GXCWSRMW correct. i also tried what @U016C0EGHUN suggested but i didn’t get any prompts to show up. will try again though to be doubly sure.#2022-12-0619:44Mr. Savy*by prompts i mean any cursive repl commands#2022-12-0619:58Mr. Savyyeah no dice#2022-12-0623:03cflemingI haven’t tried the new UI, but I know a few people (e.g. @U086D6TBN) are using it.#2022-12-0712:41imreI've been using the new UI since I got into the preview round and haven't noticed problems. Mind you I mostly drive IJ via keyboard shortcuts and IJ's action search#2022-12-0715:05onetomi only used the new UI with a deps project. i had to enable the deps tool window first with the ... menu on the top-left toolbar. can't remember why did I do that though. afterwards i was able to start both local and remote nREPL run configurations. I'm often getting a IDEA core error about syntax highlighting, but that doesn't seem to affect functionality in any perceivable way. I did switch back to the default UI though, because I think it's atrocious, how I can't shrink the left gutter to something minimal. 1. it wastes my screen estate 2. it's worse UX than before, because my code just hangs in the air and I can't tell how much is it indented. it's it in a Rich-content or not? 3. the gutter is the same color as the editor area, which makes things even worse#2022-12-0715:10R.A. PorterI've turned it on, because I might as well start getting used to it now before they kill the old UI. I did, however, just switch from their "preferred" font, Inter, to Jetbrains mono. Who the HELL wants a proportional font when editing code? That, and not all the ligatures worked with Inter. Terrible font.#2022-12-0715:10onetomhere is a comparison. look at the bottom right area.#2022-12-0715:14onetom@U01GXCWSRMW i would love to use a proportional font. i did use proportional fonts, until i started working with clojure. before that, i was indenting code with tab, so even with proportional fonts, the indentations at the beginning of lines corresponded to the nesting level. with clojure though, the indentation varies based on the form, so we had to indent with spaces and every editor invariable renders leading spaces very narrowly, as if they were in-between words. if only they would render them em width, then the indentations would stay consistent (more or less) with the level of nesting they represent.#2022-12-0715:15kennytiltonCrazy thought. We do not get the Tools/REPL menu item until we start a configuration. I never noticed that so I lost a couple hours once when I happened not to have started a config and was struggling to find the Tools/REPL.#2022-12-0715:15onetomwith proportional fonts u can fit 10-20% more characters within the same horizontal space and they look even more pleasing and more legible too.#2022-12-0715:17R.A. PorterIf the editor were intelligent enough to understand alignment with a proportional, then I'd agree. That would require quite a bit, though.#2022-12-0715:17onetom@U0PUGPSFR yes, u don't get a Tools / REPL menu, until u start a REPL#2022-12-0715:58onetom@U01GXCWSRMW as a little comparison of the same clojure/changes.md & clojure.{datafy,core} content between monospaced Comic Code Ligatures & the proportional Lato fonts. aside from the broken indentation, I would much rather use the Lato font... i think what the algorithm should be is to render leading spaces in a way that they end up under the same characters as they would, when the previous line were rendered as a monospaced font. i tried to implement this logic actually, when VS Code came up, but their class hierarchy was just an unpenetrable jungle to me... 😞 im not sure which editor could i use to test this idea on... probably Emacs would be the most approachable, though at this low level, it's probably just as messy as other editors. or maybe https://github.com/fredoverflow/freditor / https://github.com/fredoverflow/clopad ?#2022-12-0715:59R.A. PorterI agree that it looks better in general, but alignment is a must-have for me for Clojure, indentation from the margin being a subset of alignment.#2022-12-0802:21salamAh, the New UI… 😆 I’ve been using it since I got accepted to the internal preview program and haven’t had any problem related to Cursive. As mentioned above, overly large paddings in UI components were one of the things I didn’t like about it. But this doesn’t bother me that much since, like most of us, I drive the IDE using keyboard shortcuts and thus configured the IDE to hide most of the UI components including editor tabs (except the status bar, which is where the Navigation Bar and VCS widgets currently are.) The other thing that felt stuck out like a sore thumb to me was the so-called Main Toolbar (the one that’s at the top of the main IDE window that has the VCS, and Run Configuration widgets in it) but I was delighted when I found out you can now completely get rid of it in the latest version of IntelliJ IDEA (2022.3).#2022-12-0802:55salamYeah, that left gutter in the New UI screenshot does look slightly wider than what I have. #2022-12-0802:57cflemingI’m curious, for those using the new UI - why did you switch? What do you think?#2022-12-0803:01salamI was, well, curious when it was announced... 😄 I gave it a try, didn't see much of a difference (since I'm a heavy keyboard shortcut user and hide most of the UI stuff) and never bothered to switch back to the soon-legacy UI...#2022-12-0803:06R.A. PorterI switched but because I know I'll have to eventually. I figured I'd rip off the band-aid.#2022-12-0803:07cflemingI’m not sure it’s a given that the old UI is going away, or did I miss something?#2022-12-0803:08R.A. PorterOne of their stated reasons to do it is to modernize their codebase. In that case, I can't imagine they'd want to maintain that quantity of old code alongside the new.#2022-12-0803:11salamform one of their blogs: > The current UI will remain available for at least two years, and we’re not going to remove it until we’ve seen that the vast majority of our users have successfully made the switch to the new UI.#2022-12-0803:12R.A. PorterSounds about right.#2022-12-0803:13salamand we all know "vast majority of" us are https://blog.codinghorror.com/the-magpie-developer/ 😄#2022-12-0803:13cflemingOk, thanks. I think I’ll wait a while for the feedback to percolate before ripping the band-aid off. I should put some effort into making sure that Cursive works ok with it though.#2022-12-0803:13cflemingHa, the older I get, the more I like boring. I customise my IDE to the absolute minimum.#2022-12-0803:14salamsame here. I actually followed your IDE customization guide and Hadi Hariri's suggestions (hiding tabs, etc.) 😛#2022-12-0803:15R.A. PorterYeah. My IJ key mappings are the ones they had back in their first release. If I felt confident the legacy UI would never go away, I would not have shifted.#2022-12-0803:16salamI don't think keyboard shortcuts (at least, those for pure actions) will change depending on which UI we are using... at least, I haven't noticed.#2022-12-0803:17R.A. PorterThey seem the same so far.#2022-12-0803:17salamyeah#2022-12-0803:18salamby the way, Colin, have you thought about "modernizing" the source file icons? the current Clojure file icons look too bright in otherwise dark UI...#2022-12-0803:19salamI really like the source file icons in Clojure Kit, they seem to blend in well with both the light and dark themes: https://github.com/gregsh/Clojure-Kit/tree/master/resources/icons#2022-12-0803:20cflemingI have thought about it, but haven’t got around to it. I’ll check clojure-kit’s ones, thanks for the tip.#2022-12-0803:21cflemingI guess now I have to test my icons not only in light and dark themes, but also old-ui and new-ui 😛#2022-12-0806:30eskosIn fairness, Clojure-Kit’s icons are probably drawn/edited by same people as the entire IDEA iconset, since Clojure-Kit is made by a JetBrains employee 🙂#2022-12-1315:26imre> Main Toolbar (the one that’s at the top of the main IDE window that has the VCS, and Run Configuration widgets in it) but I was delighted when I found out you can now completely get rid of it in the latest version of IntelliJ IDEA (2022.3). @UDCGPTV9R could you please share how to get rid of it?#2022-12-1317:32salamSure. There are two ways to do it: - directly on the UI: right click on the widgets and remove everything under the Main Toolbar Left or Main Toolbar Right tree nodes - under IntelliJ IDEA’s Settings / Appearance & Behavior / Menus and Toolbars / Main Toolbar Left and Main Toolbar Right, remove everything under those two tree nodes. This is also where you can reset them to their original states. #2022-12-0711:33Ernesto GarciaIf you exactly type a previously used ns alias plus a var defined in that ns (like pprint/pprint, Cursive will suggest "Require namespace". It would be useful to just offer autocompletion+require for known ns aliases, without the need of typing the exact ns alias + var combination. Or is this available already somehow?#2022-12-0715:58markbastianNote quite a Cursive question, but IntelliJ/Mac/Cursive. I got a new Mac running Ventura synced my shortcuts from the cloud and the raise shortcut doesn't work. Should be cmd+'. Anyone else have this issue and know what the solution is? I'm wondering if there's some reserved global shortcut or something.#2022-12-0716:01onetomyes, i've experienced that too before, but i can't remember what was the solution. in fact, i vaguely remember, that restarting intellij fixed the issue for awhile, until it occurred again. which version combination are you using? im also using Karabiner Elements, so i thought it could be related to that, but it think it wasn't.#2022-12-0722:19cflemingYou can check to see if there’s a conflict in IntelliJ at Preferences | Keymap, using Find Actions by Shortcut (this icon here:)#2022-12-0722:20cflemingThat will show you if there are any conflicts in IntelliJ that might be a problem. Note that there will be some other actions there since actions are context sensitive, but hopefully you’ll be able to tell if they’re ones that might conflict in the context of an editor.#2022-12-0722:21cflemingThe other thing to check is OS shortcuts, under System Preferences | Keyboard. I don’t think there’s a good way to search there, though. I seem to recall using a Mac tool to debug a similar problem once, but I can’t remember what it was.#2022-12-0717:54kanweiI've got an issue where there's a huge amount of memory being generated which causes everything to be slow:#2022-12-0717:54kanwei#2022-12-0723:45astrasheThis is a small thing, but is anyone else having trouble downloading ClojureDocs? It's timing out for me.#2022-12-0809:04Jordan Robinsonmine also seems to be timing out this morning#2022-12-0910:24Ivar RefsdalSame problem here. I reported it here: https://github.com/zk/clojuredocs/issues/245#issuecomment-1344123111#2022-12-0911:48Lauri LehmijokiSame problem here as well.#2022-12-1400:52cflemingThis apparently was a disk issue, and should be fixed now.#2022-12-1400:54astrasheIt's working for me. Thanks!#2022-12-0811:10henryw374hello. is there an easy way to open deps.edn files from up the hierarchy? ie the one in ~/.clojure#2022-12-0911:13conanHi, I'm running intellij/cursive in wslg, and can't download clojuredocs. I can hit the URL via wget in a terminal; any ideas why this is happening?#2022-12-0911:18Ivar RefsdalThere is a thread about this here: https://clojurians.slack.com/archives/C0744GXCJ/p1670456748195419#2022-12-0912:27henryw374hi again . just checking, there's still no way to configure your own test runner to use when doing 'run tests in ns'..?#2022-12-0913:08Jakub Holý (HolyJak)Any chance that https://github.com/cursive-ide/cursive/issues/1945 will be addressed eventually? I is soon going to celebrate its 5th birthday… Of course I understand there is a LOT to do (I see there is 1.2*k* issues 😰 ) but I just again run into this and wasted couple of hours due to not seeing a test assertion failed…#2022-12-0923:23cflemingYes, this is scheduled for the next release (it was scheduled for the last one, but 2022.3 put paid to that).#2022-12-1214:00Jakub Holý (HolyJak)awesome! :star-struck:#2022-12-1016:20UlisesMACHi all, Is there a way to automatically align case, cond or cond-> pairs like the pairs inside the let's vector? Thanks!#2022-12-1108:52gravAn alternative approach is to use line breaks between pairs:
(case x
  1
  "hello"

  2 
  "goodbye")
#2022-12-1110:14eskosThat IMO looks ugly, but eh, formatting is always a matter of taste... 🙂 You can tell Cursive to (re)format specific symbols as something else, see https://cursive-ide.com/userguide/formatting.html Basically, you can tell Cursive to format case/cond/cond-> as let and it'll work the same.#2022-12-1113:58UlisesMAC@U052XLL3A yep, when the expression is too big I usually style using what you suggested, but it's not very common. @U8SFC8HLP Have you found an expression to assign to style cond and case? Since let aligns the pairs inside the first argument (a vector), and case's first parameter is a var, I'd like to style the rest arguments that aren't inside a vector and I haven't found an expression that performs that alignment.#2022-12-1121:03cflemingNo, there isn’t a good way to do this at the moment, sorry.#2022-12-1121:23UlisesMACOk, thanks!#2022-12-1217:41serioga@U02TF2JU3M4 I use commas to align#2022-12-1406:28seriogaYes, like this https://github.com/strojure/parsesso/blob/df52f4058bc164991fdd9d67bda7244ee4e40fbb/src/strojure/parsesso/impl/error.cljc#L16-L28#2022-12-1604:27staypufdNice trick since comma’s are considered whitespace. 🙂#2022-12-1216:33Miķelis VindavsIt seems like lately Cursive is having trouble again finding usages across deps E.g. we have a main app and it has a local dependency :deps {blah/shared {:local/root "../shared"}} When trying to find usages of a function in shared, it only finds call sites that are also in shared but not in the whole project. This used to be severely broken ~6months ago, then worked just fine, and now seems to be broken again. Is there any workaround for this that we could try? Also, many multimethod implementations are not picked up by find usages, even if they are in the same file. I can’t make out a pattern either, it seems random#2022-12-1304:11onetomi think, i've experienced these exact issues too, but i just fall back to namespace search, symbol search of plain text search in such cases.#2022-12-1308:26cflemingI have a change in the works (prompted by https://github.com/cursive-ide/cursive/issues/2554, but it’s a general deps fix which will help with that issue, not specifically for Polylith) which I’m hoping will fix this.#2022-12-1317:24Miķelis VindavsThanks for replying, looking forward to it!#2022-12-1400:12cfleminghttps://twitter.com/CursiveIDE/status/1602818627232681984#2022-12-1421:02cfleminghttps://twitter.com/CursiveIDE/status/1603132925431930880#2022-12-1521:25Sam AdamsIntelliJ question -- as of ~weeks ago, when I command-` between IntelliJ windows, it often bounces back to the original window -- it's super annoying -- is anyone else having this issue? Edit: apparently so: https://youtrack.jetbrains.com/issue/IDEA-225577/JetBrains-apps-trap-cmd-commandbacktick-and-dont-respect-it-as-a-system-shortcut#2022-12-1521:31Sam AdamsAnd to close the loop: fixed for me by unbinding IntelilliJ's Activate Next Window keymap#2022-12-1913:25helios@cfleming did you ever get around to implement the support for matcher combinators? https://github.com/nubank/matcher-combinators/issues/31#issuecomment-1165997443#2022-12-1920:08cflemingI actually have this half done in a branch, and it’s still slated for the next release.#2022-12-1916:18markaddlemanMy workflow includes frequently printing a SQL string to the REPL and then copying the string to the clipboard so I can paste it into a db tool. I’d like to automate copying the string to the clipboard. Is there some intellij scripting magic for this?
#2022-12-1917:12imregoogling for clojure string clipboard gave me https://gist.github.com/brake/c944229350e91f295a1762d3274393ef#2022-12-1917:13markaddlemanYour google fu is more powerful than mine 🙂#2022-12-1917:13markaddlemanThanks!#2022-12-1917:13imreI think it would probably be easier to go straight to the clipboard from clojure than get intellij involved#2022-12-1917:13markaddlemanI had assumed that intellij had to be involved but your solution is better#2022-12-1917:14imreputting to the clipboard is just another side effect, like printing to out is#2022-12-1917:14markaddlemanmakes sense#2022-12-2010:15simongrayUpdating to the latest intellij nuked all my settings and destroyed my custom theme… welp… Almost back where I was before, but I can’t figure out how to prevent intellij from needlessly abbreviating my namespaces in e.g. Recent Files. Anyone here know how to disable this one-character namespace abbreviation stuff?#2022-12-2010:16Jordan Robinsonthis I think: https://clojurians.slack.com/archives/C0744GXCJ/p1669109986233719#2022-12-2010:19simongrayThank you!#2022-12-2100:56d5pwith the new feature in 1.12.5 that inserts requires from completions etc, it breaks our formatting if the insert makes it the first require entry like the following:
(ns converter.coerce
  (:require [clojure.string :as str]
            [clojure.tools.logging :as log]))
if I insert say a clj-time requirement from a completion, it formats it as:
(ns converter.coerce
  (:require
    [clj-time.core :as t]
    [clojure.string :as str]
    [clojure.tools.logging :as log]))
instead of retaining our existing formatting (which is fine when it inserts it in other positions)
#2022-12-2109:36cflemingLooks like a bug, yes - could you file an issue please, and I’ll get that fixed for the next build.#2022-12-2100:56d5pi can't see a way to customise this , bug?#2022-12-2112:19Miķelis VindavsWhen searching for usages of a symbol, the line items only show the file name. There doesn’t seem to be anyway to include the full path or the full namespace. The “File structure” toggle doesn’t change anything either. If there are multiple files with the same name it’s impossible to tell them apart. I think this is a regression#2022-12-2112:21Miķelis VindavsIt would be nice if it added just enough information to disambiguate between files in the result set. But even always showing the full NS / file path would be ok. Currently the only workaround is opening the full find tool window#2022-12-2112:22Miķelis VindavsAnd in the full find tool window, a similar problem exists - the file structure setting is ignored, the only way to tell them apart is by enabling group by package which adds a lot of noise#2022-12-2112:22Miķelis Vindavsis there any way to customize this that I’m missing?#2022-12-2112:24Miķelis Vindavsalso note that even enabling the preview (cut off in my screenshot above) only shows the file name, not the path or anything else#2022-12-2112:24Miķelis Vindavsby comparison, the find in files dialog always shows the full path of each file#2022-12-2121:47cflemingI looked into this a while ago. Unfortunately this is an IntelliJ dialog that I can’t customise, and I don’t think there’s any way to achieve this. I’ll ask again in the plugin support slack.#2022-12-2219:13imreIf this bothers you, go and upvote https://youtrack.jetbrains.com/issue/IDEA-195508 - I did#2022-12-2219:13imreIf this bothers you, go and upvote https://youtrack.jetbrains.com/issue/IDEA-195508 - I did#2022-12-2312:47SudipI have a deps project. When I run it from cli clj -A:alias1:alias2, and do require '... the relevant ns, it works fine. However, when I try to do the same on Intellij, by setting the aliases in run configuration, it errors with Execution error (ClassNotFoundException) at jdk.internal.loader.BuiltinClassLoader/loadClass (BuiltinClassLoader.java:641). ..a classapath... What might be going wrong? I don't explicitly provide any path in the cli.#2022-12-2402:25cfleminghttps://twitter.com/CursiveIDE/status/1606475848462503936#2022-12-2917:09Jakub Holý (HolyJak)Is it recommended to upgrade from IntelliJ 2022.3 to 2022.3.1? Do you know? I have latest stable Cursive.#2022-12-2917:21markaddlemanfwiw, I’m using the latest IntelliJ with no problems. I have switched to the (experimental?) UI and I really like it#2022-12-2917:21Jakub Holý (HolyJak)thanks!#2023-01-0202:33kennytiltonHunh. I let IntelliJ upgrade to 2022.3.1. It seems to want to waste a line to tell me I wrote every function. Anyone know how to make those (apparently git blame) annotations go away?#2023-01-0203:05R.A. PorterThis might help: https://www.jetbrains.com/help/idea/investigate-changes.html#show-author-of-changes#2023-01-0203:10kennytiltonThx, @U01GXCWSRMW! I just found this insanity, too:
We’ve implemented Code Vision inlay hints for JavaScript and TypeScript. These hints provide you with instant insights about your code right in the editor, displaying metrics like inheritors, usages, code authors, and related problems. The hints are interactive. For example, you can click on the usages hint to see all usages of the class or method in the project.

The metrics are all enabled by default now and can be modified in Settings/Preferences | Editor | Inlay Hints | Code vision. 
"enabled by default"? sigh So I disabled the whole Code Vision suite, clicked "apply", and nothing happened. When I saved it finally took effect. Yay. Now I just have to figure out whether a .cljc file is JS or TypeScript. :rolling_on_the_floor_laughing:
#2023-01-0317:18genekim@cfleming and all — thanks for making Cursive, and making the REPL experience so easy. Posting this here only for amusement. At the request of the author, I recently added some docs to https://github.com/lilactown/7-humble-guis on how to get the REPL running on Cursive, because there was only documentation on cider. The top box is what I wrote (two bullet points), versus the documentation on getting cider running. I thought the contrast was pretty dramatic. 🙂#2023-01-0321:06kennytiltonFYI Since somewhat absent-mindedly upgrading to 2022.3.1 I have run into the dread yellow highlighting symbols not recognized on two projects, both ClojureDart, and worked around it by recreating the IntelliJ projects from scratch. Hth!#2023-01-0505:56seriogaClear cache should work in such cases#2023-01-0511:50kennytilton@U0HJNJWJH Sorry, I should have mentioned that I tried clearing cache in each case before turning to the more Draconian solution of creating a whole new .idea project. Only the latter worked.#2023-01-0505:56seriogaClear cache should work in such cases#2023-01-0507:51gravIs there a way to not show the whole stack on AssertFailed?#2023-01-0507:51gravI remember Alex Miller mentioning on the ClojureStream podcast that it wasn't the default behaviour#2023-01-0509:21cflemingUnder which circumstances? Where do you want it to be truncated?#2023-01-0509:24gravIn this case I ran a fn that invoked clojure.walk/prewalk, and the java.lang.AssertionError happened at a place where the stack was quite large. So in the repl, it was difficult to see where what was going on.#2023-01-0509:25cflemingOk, do you have a link to the discussion mentioning different behaviour for that exception? I don’t think Cursive does anything along those lines right now but I’m open to adding it. It sounds like it’s possible that might be something you could control at the Clojure level too, possibly?#2023-01-0509:26gravYeah, might be. I might have misunderstood Alex' comment though 🙂 I'll try digging it up, one mo#2023-01-0509:27cflemingThanks. I’m putting my daughter to bed shortly, but drop it here if you find it and I’ll take a look when I get a chance.#2023-01-0509:35gravGood luck 😉 Here's the episode: https://podcasts.apple.com/us/podcast/e86-2022-in-review-datomic-and-clojure-with-jaret/id1461500416?i=1000590958632&amp;itsct=podcast_box_player&amp%3Bitscg=30200&amp%3Bls=1&amp%3Btheme=auto The part where he speaks about tools is around 34:40.#2023-01-0509:37gravAt 35:45 he mentions the the Clojure Repl never automatically prints stack-traces, so that was my reference#2023-01-0514:35folconFor some reason cursive isn't resolving functions / vars that have been imported using an import macro, this is in a library, so code changing would be a bit of a pain, is there anything that can be done to improve resolution so stuff like autocomplete works? I'm hoping there's some special resolution that I can use which tells cursive to treat the vars differently? Resolve as declare is ok, but it would be good if I could see things like args and docstrings.#2023-01-0514:39folconThis is the macro: https://github.com/HumbleUI/HumbleUI/blob/main/src/io/github/humbleui/core.clj#L409 This is where the vars are being imported that cursive can't see: https://github.com/HumbleUI/HumbleUI/blob/main/src/io/github/humbleui/ui.clj#L42#2023-01-0517:03folconAlso it would be super helpful if there was a place where I could lookup if custom resolves are defined in cursive. I've just realised that in a project I've gotten a resolve working, but it's not clear what symbol I used to make it work.#2023-01-0900:59cflemingYou can see the resolves at: Preferences | Languages &amp; Frameworks | Clojure | Symbol Resolution#2023-01-0900:59cflemingI’ll take a look at that import macro and see if it might be possible to resolve it as a built-in option.#2023-01-1013:32folconThanks a bunch @U0567Q30W 😃...#2023-01-0517:03folconAlso it would be super helpful if there was a place where I could lookup if custom resolves are defined in cursive. I've just realised that in a project I've gotten a resolve working, but it's not clear what symbol I used to make it work.#2023-01-0519:30sjharmsIs there a way to make Cursive work with nbb? It looks like some dependencies can be put in an unused deps.edn , any other suggestions?#2023-01-0900:58cflemingThere are some open issues to fix around this, slated for fixes soon: https://github.com/cursive-ide/cursive/issues/2749, https://github.com/cursive-ide/cursive/issues/2696#2023-01-1114:38wilkerlucioalso stumbled in this: https://clojurians.slack.com/archives/C029PTWD3HR/p1673447742868659#2023-01-0522:22souenzzoI'm using :resource-paths ["target/cljsbuild"] lein classpath shows target/cljsbuild but cursive REPL, using "intellij classpath", do not have target/cljsbuild in the (System/getProperty "java.class.path") • why • how can I see which classpath cursive is using? #2023-01-0901:00cflemingThe classpath is available as part of the executed Java command line, which is folded at the top of each REPL when it’s run.#2023-01-0901:01cflemingI’m not sure why that would not be working though, I’ll look into that.#2023-01-0600:50cfleminghttps://twitter.com/CursiveIDE/status/1611163112492904450#2023-01-0613:06polymerisYay, new lein versions 🥳 Thanks, @U0567Q30W#2023-01-0701:10cflemingNo worries, sorry that one took so long!#2023-01-0908:54Al Z. HeymerWhen I use defmethod with a named fn (i.e. (defmethod multi-name dispatch-val fn-name ...) , the fn-name is shown as unresolved by cursive. I see that defmethod does not specify to name a dispatch fn , which is quite annoying by itself, but is there any chance that this could be fixed in cursive? I surely could open a ticket for this. Otherwise, is it possible to suppress this very specific resolve error?#2023-01-1011:45Al Z. HeymerApparently this was already roadmapped for 1.12 https://github.com/cursive-ide/cursive/issues/899#2023-01-1106:22heliosPrevious thread: https://clojurians.slack.com/archives/C0744GXCJ/p1655298871487369#2023-01-1003:09markbastianI have an interesting issue and I'm not sure if it's Cursive or Clojure. I have this protocol:
(defprotocol IOutbox
  (outbox-write! [this event])
  (outbox-read [this])
  (outbox-get [this event])
  (outbox-delete! [this event]))
The implementation looks like this
#2023-01-1005:40cflemingThat issue is Cursive mistaking that line for an invocation. Which version of Cursive are you running?#2023-01-1005:41cflemingAlso, what is the form there, is it a deftype, defrecord, or something else with similar syntax?#2023-01-1005:43cflemingThis should have been fixed in 1.12.5: https://github.com/cursive-ide/cursive/issues/2346#2023-01-1005:55markbastian1.12.7-eap1-2022.3#2023-01-1005:57markbastianIn the code above, I have the following setup: 1. The IOutbox protocol is defined in one ns. 2. In the displayed ns there is a record: (defrecord RefChat [db outbox]) 3. The above snippet is in a extend-type RefChat form and is one of the extended types. #2023-01-1007:55seriogaDoes this implementation work? I've never seen implementing function names with namespaces...#2023-01-1013:15imreYeah I think you are only supposed to use the namespace part with the protocol itself#2023-01-1013:15imre
planex-api/IOutbox
(outbox-write! ...
#2023-01-1014:33markbastianIt does work. TIL....#2023-01-1014:33markbastianThanks!#2023-01-1014:33markbastianAnd yes, removing the ns part fixes everything.#2023-01-1014:33imreI recall running into this every now and then#2023-01-1003:10markbastianNotice the red line. It says "Incorrect arity 2 for" that method. Any idea what's up with that?#2023-01-1106:21heliosAny advice in how to teach cursive about how to resolve this macro?
(deflambda :a/keyword
 {option-map}
 [args]
 body)
#2023-01-1107:08seriogaLooks like defn#2023-01-1108:54heliosresolving it like a defn doesn't help unfortunately 😞#2023-01-1108:55seriogawhat library is that?#2023-01-1108:55helioscustom macro, no library#2023-01-1108:55helios
(defmacro deflambda
  [dispatch-val metadata fn-binding & fn-body]
  `(let [metadata# (assoc ~metadata :handler ~dispatch-val)]
    (. ~(with-meta 'ductile.lambda/handle {:tag 'clojure.lang.MultiFn})
       addMethod
       ~dispatch-val
       (with-meta
         (fn [req#] (enter-chain req# metadata# (fn [
#2023-01-1109:00serioga> resolving it like a defn doesn't help unfortunately well, it does not work because :foo/bar is keyword not symbol...#2023-01-1109:00heliosyep#2023-01-1109:04seriogaSeems only solution is to resolve as None to suppress Cursive warning.#2023-01-1116:31Joe R. SmithWhy not just accept a symbol? It can still be ns-qualified (nd since it's a macro, you can do whatever w/ it in the macro body)#2023-01-1116:32Joe R. SmithI do that for some of my macros- cursive doesn't care if the symbol has a namespace, e.g.:#2023-01-1118:15Sam AdamsIs there currently any way to get Run test under carat in REPL working with a defspec test? I see this issue was closed: https://github.com/cursive-ide/cursive/issues/632. Resolving as deftest doesn't seem to work#2023-01-1210:37simongrayHow can I make Cursive indent Rum macros properly?#2023-01-1210:58imreI would set them to 'indent only' https://cursive-ide.com/userguide/formatting.html#code-style-settings#2023-01-1210:41gregI noticed that if I require clojure.core with :refer lots of symbols is highlighted. Possibly a bug. Have a look at the screenshots. I'm using Idea 2022.3.1 (IU-223.8214.52) & Cursive 1.12.7-2022.3.#2023-01-1309:13cflemingLooks like a bug, yeah - could you file an issue for that, please?#2023-01-1309:44imreOOC why do you require clojure.core?#2023-01-1309:45imreas opposed to using (:refer-clojure ...)#2023-01-1404:12cflemingYes, probably a better question I should have asked would be: what are you trying to achieve with that? Since clojure.core symbols are usually all referred anyway.#2023-01-1410:44gregTbh possibly I added it by mistake, what I realised when @U08BJGV6E pointed it out, still, acting like the previous refer (in this case the implicit refer of clojure.core) is cancelled, therefore highlighting all symbols from the first one, doesn't reflect how clojure namespace works. Another example:
(ns dev-client.test
  (:require
   [clojure.set :refer [union]]
   [clojure.set :refer [intersection]]))

(union #{:a :b} #{:a})
(intersection #{:a :b} #{:a})
Despite an error of duplicated require it is working example, but Cursive highlights the symbols required in the first refer line.
#2023-01-1410:48gregIf something should be highlighted or suggested (eg. via IntelliJ inspections) is "redundant refer" or "duplicated refer".#2023-01-1411:03greg> Looks like a bug, yeah - could you file an issue for that, please? I opened the issue here: https://github.com/cursive-ide/cursive/issues/2761#2023-01-1307:44steveb8nQ: I want to start using Cursive on a laptop (Intel OSX) to connect to a REPL running on a M1 Mac Mini on the same network. The connection part should be simple but I’m trying to figure out which file-system hosts the source files. Any tips for this setup?#2023-01-1307:46steveb8nMy thinking is that I can expose the project from the M1 filesystem as a network drive and open that project on the laptop. That way the REPL server and the IDE are both loading the same source files. Is this the best way to do this or is there a better way?#2023-01-1307:46steveb8nIn other words, I’m looking for “this is the way” for a remote REPL dev workflow#2023-01-1414:25gregTbh I haven't done anything like that but in theory the minimal setup is that the code has to be available at least to the REPL client while the REPL server can start with literally nothing and load anything you want after start from client (incl. libs via clojure.tools.deps.alpha.repl). Although hosting sources with REPL server has advantages that you can load whatever you need at the process start. Therefore the setup you describe, with same network and sharing sources to client via network drive sounds nice.#2023-01-1707:43steveb8nThanks. Yes I think it's at least the right direction#2023-01-1623:20markbastianIs there a way to export or at least view the cursive formatting rules (e.g. to use with cljfmt)?#2023-01-1623:30markbastianActually, looks like it’s spelled out fairly plainly in Editor -> Code Style -> Clojure -> Form Parameters. What I’m really looking for is how to translate the UI dialog into something I can also use with external formatting tools like cljfmt. Like “Export to cljfmt.edn.”#2023-01-1709:38cflemingUnfortunately the cljfmt model doesn’t map very well onto how Cursive formats things. I’m planning to try to improve this, and improve the interop between the two, but there isn’t a good way to do this except manually right now.#2023-01-1713:18jdmthat's good to know. Would love to see this come to fruition#2023-01-1715:08markbastianIs one of the standard formatting tools (zprint, cljfmt (sounds like not), cljstyle) used under the hood or is it custom? Just curious. If I were trying to configure a pre-commit hook it would be nice to at least start with the same baseline formatter.#2023-01-1720:06cflemingIt’s custom, because it has to be built on the IntelliJ formatter. However, it’s very old code now and I’m planning to re-work it and try to make it more compatible with cljfmt.#2023-01-1716:31markbastianHow might I configure Cursive to format require blocks to align on the colon instead of two spaces. Example:
(:require
   [clojure.tools.logging :as log]
instead of
(:require
  [clojure.tools.logging :as log]
?
#2023-01-1716:40markbastianI think “One space list indent” did it.#2023-01-1819:45markbastianIs there a location in IJ Settings where we can see our “Resolve as…” selections?#2023-01-1820:08cflemingYes, Preferences | Languages &amp; Frameworks | Clojure | Symbol Resolution#2023-01-2010:22Rachel Westmacottis there a way to make the output of REPL commands replace the current selection?#2023-01-2010:23Rachel WestmacottI'm currently hacking it by putting data on the clipboard and then using a java.awt.Robot to Crtl+V .#2023-01-2014:12caleb.macdonaldblackWould love this feature too. #2023-01-2020:11cflemingI’m planning to add this.#2023-02-0902:06cflemingI’ve just released an EAP build which allows this: https://clojurians.slack.com/archives/C0744GXCJ/p1675908328557129#2023-02-0909:20Rachel WestmacottThis looks amazing. Thank you so much! gratitude#2023-01-2015:51Ernesto GarciaHi, this seems like an issue: When requiring [chime.core :as chime] , chime/chime is being highlighted by Cursive as deprecated, due to its deprecation in the bare chime namespace. But it's not deprecated in chime.core.#2023-01-2020:09cflemingThat does look like a bug, I’ll check that.#2023-01-2016:29markbastianIs there an option to align the logic in cond statements, like:
(cond
  :a     "this"
  :bbbbb "that"
  :c     "the other")
vs
(cond
  :a "this"
  :bbbbb "that"
  :c "the other")
?
#2023-01-2020:10cflemingNo, there isn’t at the moment but I’m planning to add this.#2023-01-2416:41JurkoHi, can someone help me with Clojure Deps in Cursive. How to change "config dir"?
{:version "1.11.1.1113"
 :config-files ["/usr/local/Cellar/
#2023-01-2416:43Alex Miller (Clojure team)the config dir is determined from the following info (the "user" deps.edn): https://clojure.org/reference/deps_and_cli#deps_sources#2023-01-2416:43Alex Miller (Clojure team)I suspect you have $XDG_CONFIG_HOME set#2023-01-2416:44Jurkoyes#2023-01-2416:44Alex Miller (Clojure team)so you can override by setting CLJ_CONFIG#2023-01-2416:45JurkoI saw this, but haven't understand#2023-01-2416:47JurkoIs it problem of Cursive or Clojure?#2023-01-2416:48Alex Miller (Clojure team)that's an environment variable, so you'll want to export a new setting wherever you do things like that, in such a way that Cursive sees the effects of that#2023-01-2416:49Alex Miller (Clojure team)Cursive can either use the clojure CLI or use an embedded library (tools.deps). In both cases, those use the described environment variables#2023-01-2416:49Jurkoas I understand clojure know what is "config-dir". Why Cursive can't see it?#2023-01-2416:50Alex Miller (Clojure team)I don't understand, sorry#2023-01-2416:50Alex Miller (Clojure team)from the original post, you said you wanted to change the config dir - you do that by setting environment variables#2023-01-2416:51JurkoResult of clojure -Sdescribe is
:config-dir "/Users/jurko/.config/clojure"
#2023-01-2416:51Alex Miller (Clojure team)what problem are you seeing?#2023-01-2416:52Jurkobut for Cursive config dir is /Users/jurko/.clojure#2023-01-2416:53Alex Miller (Clojure team)ok, I would guess that at the terminal, you have $XDG_CONFIG_HOME set, but that Cursive is not seeing that environment variable due to how it is configured or started#2023-01-2416:53Alex Miller (Clojure team)you can check that by doing something like (System/getenv "XDG_CONFIG_HOME") at a repl in Cursive#2023-01-2416:55Alex Miller (Clojure team)so then the question is how to set environment variables in a way that Cursive sees them - I don't know the answer to that, but it probably depends on how you start it#2023-01-2417:04JurkoThank you.#2023-01-2417:50JurkoFollowing @U064X3EF3 suggestion, I've check at local and remote repl:#2023-01-2417:51Alex Miller (Clojure team)well in the remote case, you're checking the environment of the remote jvm, so not sure that's relevant#2023-01-2417:51JurkoRemote does see variable, local - doesn't#2023-01-2418:26dvingoyou can set env vars in the run config#2023-01-2500:04cflemingIn Cursive, you can use Preferences | Build, Execution, Deployment | Build Tools | Clojure Deps | Project Settings | Path to config directory#2023-01-2518:20dimaHello 👋 defn and some other functions from clojure.core are not resolved. I tried solutions from https://cursive-ide.com/userguide/troubleshooting.html#help-lots-of-symbols-don-t-resolve but nothing has helped. def for example is resolved, i can see docstring when i hover it. But still cannot cmd+click to navigate to definition.#2023-01-2612:18dimaAlso, local binding from let are not resolved, i.e. i cannot cmd+click on them to navigate#2023-01-2710:01dima"cannot find declaration to go to" when i click on local variables. I believe it was working before. I'm on IDEA 2022.3 and Cursive 1.12.7-2022.3#2023-01-2710:22dimaIt works well with IDEA 2022.2. I would suggest not to upgrade to IDEA 2023.x for anyones who having similar issue.#2023-01-2719:55cflemingYes, Cursive does not support 2023.1 yet, I’m working on that, should be out soon.#2023-01-2710:22dimaIt works well with IDEA 2022.2. I would suggest not to upgrade to IDEA 2023.x for anyones who having similar issue.#2023-01-2610:28gravA collegeue of mine cannot see the diff for failing tests. The orange dot is simply not shown next to the code. What can the issue be?#2023-01-2708:42grav@U0567Q30W any hints for this issue? 🙂#2023-01-2715:40grega100kThere was a pretty long thread on November 2, 2022 that sounds like the same issue#2023-01-2718:47gravThanks @U2FQAF90R, seems this is the thread: https://clojurians.slack.com/archives/C0744GXCJ/p1667397700150869 Haven't had time to look it through yet with my colleque#2023-01-2719:54cflemingYes, I was going to add some debug logging, but Empperi then wasn’t working on that project any more. I’ll check whether I got around to adding it, and perhaps @U052XLL3A’s co-worker could test it out.#2023-01-2721:02gravSure, I'll ask him to try it out 👍#2023-01-2722:50cflemingI’ll check how it works and let you know.#2023-02-0114:57grega100kI am also seeing this issue so could also help test this.#2023-01-2617:26roklenarcicsometimes when using Add import autofix in my code the namespace declaration structure is updated by Cursive:
(ns user
  (:require [ :as io]
            [clojure.string :as string]
            [clojure.pprint :refer (pprint)]
            [clojure.repl :as repl]
            [clojure.test :as test]
to
(ns user
  (:require
    [clj-http.client :as http]
    [ :as io]
    [clojure.string :as string]
I’d rather it didn’t do that. How? Also I see there’s support for single space ident, but does that correctly handle if macros and such… it seems not…
#2023-01-2621:08cflemingThat’s https://github.com/cursive-ide/cursive/issues/2763, which is fixed for the next build.#2023-01-2621:08cflemingI think the single space indent should handle if forms.#2023-01-2708:11roklenarcicin my testing it works like this:
(if a
  b
  c)
but if you break before first argument it does single space for the condition and 2 for clauses:
(if
 a
  b
  c)
also something like or does single space where I would expect 2:
(or
 a
 b)
This is mostly an issue where other members of the team use the typical single space solution where things have single space ident and some macros have 2 space ident, and I keep breaking this formatting. Also for import, I’d prefer that the existing formatting wasn’t changed when imports are added.
#2023-01-2708:12cflemingI’ll look at the if problem, thanks.#2023-01-2708:12cflemingWhat are the problems you’re seeing with imports?#2023-01-2708:14roklenarcicin our files we have a mix of different require statement formats:
(:require [....
also
(:require
 [.....
also
(:require
  [.....
I just don’t like it when it reformats the thing (and introduces many lines of git changes)
#2023-01-2711:03onetom@helios are you using the cursive test runner? how quick can u run a single unit test? for us, even a simple unit test takes 4+ seconds to run, because so many things are initialized. Eg. pretty-printing Datomic Cloud datoms is initialized in a xxx.test-harness namespace, which we require in every test NS, for the sake of simplicity and consistent testing experience.#2023-01-2711:05onetomand that's on an M1 Mac Mini, with the biggest libraries clojure.core/compiled...#2023-01-2711:07onetom
(time (require 'xxx.test-harness))
"Elapsed time: 3801.725792 msecs"
and without compiled libs:
(time (require 'xxx.test-harness))
"Elapsed time: 6548.884583 msecs"
#2023-01-2718:26jpmonettashi everybody! I'm trying to start a repl in Cursive pointing to a custom version of the Clojure compiler currently on my local mvn repo as clojure-1.12.0-master-SNAPSHOT so I can run Clojure expressions and debug Java code. I added the new compiler version to my deps.edn and the repl is working fine. My question is how do I attach the clojure sources as an external library so I can jump into java code, debug, etc ?#2023-01-2719:57cflemingAre you adding it in an alias in your deps.edn? If so, selecting that alias in the deps toolwindow (as described here: https://cursive-ide.com/userguide/deps.html#working-with-aliases) then refreshing your project should work.#2023-01-2720:01jpmonettasNo, my deps edn contains just this `
{:deps {org.clojure/clojure {:mvn/version "1.12.0-master-SNAPSHOT"}}}
`
#2023-01-2720:02cflemingAnd that doesn’t appear in your external libraries view?#2023-01-2720:02jpmonettasbut then on externali libraries I see this#2023-01-2720:03cflemingHave you refreshed your project since you made the change to add it?#2023-01-2720:03cflemingIf you look in Dependencies in the Deps toolwindow, what does that look like?#2023-01-2720:03jpmonettas> Have you refreshed your project since you made the change to add it? oh, that did the trick#2023-01-2720:04jpmonettasThanks!!#2023-01-2720:04cflemingGreat, I like an easy fix 🙂#2023-01-3115:16octahedrionis there any way to change the font size in the REPL the way I can for editor windows (with keybindings) ?#2023-01-3122:03cflemingI think Preferences | Editor | Color Scheme | Console Font is what you’re looking for?#2023-02-0107:49octahedrionyes but that's for all REPLs and it's not keybindable#2023-02-0107:53octahedrioni.e. in a normal editor I can do ⌘= to increase font size and ⌘-to decrease it without having to go into preferences, and it's for only that editor pane#2023-02-0118:59kkruitHey all I'm having an issue with my current setup. I'm on windows developing a project in WSL2 but when I try to add my clojure deps project I get a stub execution error because it's trying to use the linux java jdk in windows. I've tried changing the sdk to a windows one but it only shows the linux/wsl ones in the project settings. Any recomendations?#2023-02-0121:18kkruitSo I ended up fixing it by copying my windows jdk to my wsl environment setting that as the sdk running refresh clojure deps projects and then switching my sdk back to the wsl one. Seems like there could be a bug there though.#2023-02-0122:08kkruitthis also seems to still be an issue for me any ideas there?#2023-02-0122:08kkruithttps://github.com/cursive-ide/cursive/issues/394#2023-02-0122:35kkruitI'm currently on version 1.12.7-2022.3 if that's useful#2023-02-0208:55gravWe have a "private" repo defined in our project.clj like so:
:repositories [["private-repo"        {:url ""
                                       :username      :env/PRIVATE_MVN_USERNAME
                                       :password      :env/PRIVATE_MVN_PASSWORD
                                       :sign-releases false
                                       :checksum      :fail}]]
#2023-02-0208:58gravWhenever I use Refresh Leiningen Projects, I get a dependency resolution error. Works fine from the cli with lein deps, as long as the env-vars are set up correctly. So I'm thinking it's related to the missing env vars. Can I somehow get Cursive to resolve those?#2023-02-0308:38grav@U0567Q30W Hope it's okay to ping you (again 😉) - threads get burried pretty quickly here#2023-02-0309:13cflemingIt is! I’ll try to take a look at this over the weekend.#2023-02-0309:13cflemingWhich platform are you on? Getting IntelliJ to see env vars can be a real pain.#2023-02-0309:14gravI'm on Linux. Can also test on Mac#2023-02-0309:15cflemingSo the issue here is that IntelliJ invokes lein in-process to do that operation. That means that IntelliJ itself will have to see those env vars for this to work. Do you know how to make that happen on your distribution?#2023-02-0309:15cflemingDepends how you invoke IntelliJ, I guess.#2023-02-0309:15gravAh, okay, that makes sense. I can try launching IntelliJ from bash and see if it will pick up the env vars 👍#2023-02-0309:15gravAnd if it does then I can probably get my app launcher to pass them on#2023-02-0309:16cflemingLet me know if that doesn’t work.#2023-02-0309:16gravWill do! Thanks for the suggestions 🙏#2023-02-0309:16cflemingNo worries! I was thinking about some way to pass env var values to lein through the UI, but I’m guessing you don’t want to be configuring your secrets in the preferences.#2023-02-0309:17cflemingSo if you can inherit from the environment that’s probably a better solution.#2023-02-0309:18gravWell, it wouldn't be a no-go in this case. I was looking for a place to do that, but I gave up 🤷 It would be nice if it were per-project (like I have .envrc setup per project-dir), not sure if that would be an IntelliJ feature or a Cursive feature?#2023-02-0309:19gravIn any case, it's not a deal-breaker if I need to launch IDEA with those env vars, so I'll look into that first#2023-02-0309:19cflemingSo there’s this: https://github.com/ashald/EnvFile, which I did some work to support a while back. But that’s just for run configs. I’ll see if I can hook into it somehow.#2023-02-0211:07anovickHello friends, I am new to using Cursive. What action can I use to send an expression to a working REPL in the side pane?#2023-02-0211:14onetomboth#2023-02-0211:15onetomu should put your whole question into a single message next time, so it's easier to respond to it on a thread. u can also number the options, so we can refer back to it easily in a response.#2023-02-0211:16anovickok#2023-02-0211:16onetomhttps://cursive-ide.com/userguide/repl.html#interaction-with-the-editor#2023-02-0211:16onetomhere u can find some animations showing how these operations work#2023-02-0211:17onetomif i remember correctly#2023-02-0211:18anovickWhat is the difference between the two actions?#2023-02-0211:18anovickwhat does Top form mean?#2023-02-0211:19onetomi usually just use the "Send top form to REPL", because i can be in the middle of a deeply nested expression and it would still evaluate the whole expression up to the top-level of the file (or to the (comment ...) expression containing it)#2023-02-0211:19anovickoh#2023-02-0211:19anovickI see now#2023-02-0211:19anovickmakes sense#2023-02-0211:20onetomtop-form means, it's not within some other expression. a (comment ...) expression is an exception though. everything within it is still considered top-level#2023-02-0211:22onetomif u leave expressions within a (comment ...) in your source code, those are referred to as "Rich comments", because Rich Hickey popularized this tactic. u can provide examples of how to use adjacent code within such blocks or show the REPL session of the thinking process, which lead to a specific implementation.#2023-02-0211:22anovickoh haha that's interesting#2023-02-0211:07anovickthanks :hugging_face:#2023-02-0211:09anovickis that "Send top form to REPL" ?#2023-02-0211:09anovickor "Send Form before Caret to REPL"#2023-02-0211:21anovickI just learned I can go to implementation code with the action "Go to implementation" is there a way to return back to the file where I called this action from?#2023-02-0211:22onetomyes, with cmd-opt-left#2023-02-0211:23anovickoh that's great but do you know what action this is?#2023-02-0211:23anovickor maybe I can look up in keymaps#2023-02-0211:23onetomit's the Navigate / Back action in the menu#2023-02-0211:23anovickoh#2023-02-0211:23onetomu can look up actions based on their keyboard shortcuts too btw#2023-02-0211:24anovickworked#2023-02-0211:24onetomif u hop on this screen sharing session, i can show u around https://pop.com/j/895-310-241#2023-02-0211:24anovickthis is sweet 🙂#2023-02-0211:24onetomi have ~30 mins to help, if u want#2023-02-0211:24anovickyou're very generous#2023-02-0211:25anovickcan I use this opportunity another time perhaps when you're available?#2023-02-0211:25anovickI have other obligations to attend to at this hour...#2023-02-0211:25onetomsure. i live in GMT+8 and i usually have some time around this hour#2023-02-0211:25onetomjust DM me to see if im available#2023-02-0211:26anovickvery happy to receive your kind attention 🙂 thanks and have a great day#2023-02-0211:26onetomi love to help with the workflow, because that can make ppl a loooot lot more effective at learning clojure. they can focus on the meat of the language and the std lib, instead of fighting with the tooling.#2023-02-0211:27anovickyea it's hard to set everything up! glad to have people like you around to help out#2023-02-0211:27onetomvery little effort at the beginning can save tremendous amount of pain later, so i think it makes a lot of sense to help ppl out, so there can be more clojure programmers out there 🙂#2023-02-0211:28anovickdefinitely appreciated#2023-02-0211:29onetomwell, see u later then, when u have more time! but keep asking in the meantime and also read thru the official cursive users manual, because it's pretty good and relatively short too.#2023-02-0211:29anovickwill do. take care :hugging_face:#2023-02-0211:32onetomalso https://clojure.org/guides/getting_started is pretty useful im still referring to it after almost a decade of using clojure, because it's getting extended with docs about newer features, like tools.build#2023-02-0211:37onetomdoes anyone have a list of ALL Cursive menu items in markdown format? it would be helpful to help others out faster, because we can just copy-paste things, like
`Main Menu` / `Tools` / `REPL` / `Send Form Before Caret to REPL
` because we can just full-text search such a file.
#2023-02-0222:39cflemingThis is actually trickier to generate than you might think. However I do generate a similar list as part of my documentation generation. I could potentially create a doc page containing this, as well as the settings.#2023-02-0305:05onetomi didn't say generate, just asked if anyone has a list 🙂 if no one has, i will just start typing up a list as need arises#2023-02-0309:12cflemingTrue, but after maintaining my doc by hand for ages, whenever I hear anything like that, I immediately think: generate, don’t maintain by hand 🙂. I’ll see if I can get that into the doc.#2023-02-0211:39onetomsimilarly a file for the various cursive / clojure preferences would be helpful too, so it's easier to put together a documentation for company-specific, recommended settings#2023-02-0211:40onetomfor example, we have a Notion page like this now#2023-02-0211:42onetomi have to say, that emacs is better in this respect, because i could communicate a set of settings via a trivial program, which sets customization or regular variables, regardless of the categorization (because the setting category is already encoded in the setting name)#2023-02-0211:50anovickI'm not sure why but "Send Form Before Caret to REPL" key binding doesn't seem to work for me I also don't have this action listed in "Find Action" menu#2023-02-0212:48onetomu have to have some expression before your caret. if u r inside some symbol, string or keyword, then there is no complete form before the caret#2023-02-0212:50onetommaybe u can think of this operation as "(the previous complete) form left of the cursor or above the cursor, if there are only spaces left of it"#2023-02-0212:58onetomCIDER for Emacs has a cider-eval-last-sexp operation and explains last-sexp as: > the form preceding the cursor — https://docs.cider.mx/cider/usage/code_evaluation.html#2023-02-0213:04onetomthere is a "form before caret" if the cursor - shown as - is at the following positions:
(prn• "asd")  123
(prn "asd"•)  123
(prn "asd")•  123
(prn "asd") • 123
but u the form before caret is deemed ambiguous, if the cursor is in the following positions:
(pr•n "asd")  123
(prn •"asd")  123
(prn "as•d")  123
(prn "asd")  •123
(prn "asd")  12•3
so u won't have the Send Form Before Caret to REPL operation available
#2023-02-0213:10onetomat the beginning, i recommend to use the Opt-Up/Down aka Extend / Shrink Selection commands to see where the expression boundaries are, until u can see it without explicit selection too.#2023-02-0213:11onetomand when u have already selected some valid and complete forms with these commands, u can use either Send ... to REPL operations to evaluate that selection.#2023-02-0213:13onetomthis way u can even ignore the Send Form Before Caret to REPL commands and always just use the Send Top Form to REPL with or without a selection. it would 2 multiple keystrokes, but since it's a rarely needed operation, it might worth using it, since it requires a simpler mental model.#2023-02-0218:57anovick@U086D6TBN that's so awesome#2023-02-0218:58anovick#2023-02-0305:06onetomMVP? Minimal Viable Product? 🙂#2023-02-0216:12Rachel WestmacottWould it be possible for REPL configurations to come pre-populated with the selected aliases in a deps.edn project? I have to select the aliases I'm using in the 'Clojure Deps' pane to make the IDE understand my project, and then I also have to specify them in the run configuration for the REPL to make my REPL work. It would be great if Cursive did something clever here (though I confess I've not thought through the consequences), even if it just pre-filled the currently selected aliases at the time you create the run REPL configuration.#2023-02-0222:33cflemingThe issue that I can think of is that for syncing aliases to a project I usually use the superset of all aliases I might want, to ensure that all the sources are available. For example, you might not want your test alias enabled in your REPL, but you definitely want it for editing.#2023-02-0909:26Rachel WestmacottIt's rare that i don't want the test alias enabled in my REPL - or at least I see no harm in having the source on the classpath, but it would be nice not to have the :main-opts. This clearly relates to the other thread: https://clojurians.slack.com/archives/C0744GXCJ/p1675354446280009#2023-02-0216:14Rachel WestmacottOn the subject of REPLs and deps.edn files, it would also be nice if the REPL run configurations ignored the :main-opts of the specified aliases. If you're running a REPL I can't imagine them being useful.#2023-02-0222:36cflemingSo I recently fixed this (or broke it, depending on your point of view). See https://github.com/cursive-ide/cursive/issues/2322 for some discussion.#2023-02-0816:31cap10morganI switch those to :exec-fn to solve that issue. And I assumed that was (part of) the motivation for that feature in tools.deps? But it's not a drop-in replacement.#2023-02-0218:59anovickJust learned I can make my parens rainbow colored 😮 and also I can separate the REPL outputs 🤯 man I'm having so much fun with this#2023-02-0219:04kennytiltonWe call this "the Lisp curse". It's so much fun we forget to do the work intended.#2023-02-0309:09cfleminghttps://twitter.com/CursiveIDE/status/1621435555119792128#2023-02-0311:34onetomwe tried it quickly for an hour and seemed to work flawlessly so far!#2023-02-0311:54kennytiltonHmm, I recall an option to include EAPs, but not finding it in the IntelliJ Plugins interface. Do I have to uninstall and reinstall or sth? I'll check the Cursive doc itself.#2023-02-0312:07kennytiltonAh, all set. I switched to IJ EAP. (Duh.)#2023-02-0319:47salamApparently, [Option - ⬆️] is my favorite keyboard shortcut. What’s yours? 🙂 #2023-02-0323:06cflemingIt’s mine as well, but I complete code much more than you :-)#2023-02-0407:40thhellerthat seems to be grouped incorrectly? I have never used that and its still in my top3? or is that just "any" syntax aware selection and the example just happens to be one I don't use?#2023-02-0408:16cflemingSyntax aware selection is the Alt-up, which expands the selection by semantic units.#2023-02-0408:17thhellerI don't use that though 😛#2023-02-0410:12imreWhat is this dialog? Never saw it#2023-02-0411:07thhellerhelp -> my productivity#2023-02-0502:34Tom H.oh wow I was not aware of alt-up, that’s amazing#2023-02-0502:34Tom H.here’s mine#2023-02-0502:37Tom H.recent files popup is a great one I hadn’t used either, I need to learn more hotkeys 😄#2023-02-0508:19cflemingTime to read the doc! https://cursive-ide.com/userguide/navigation.html#2023-02-0802:56onetomThese are my stats in the EAP version#2023-02-0802:56onetomRelease version#2023-02-0803:00onetomstructural editing commands doesn't seem to be counted in these stats. those would be an interesting metric from cursive perspective, imho.#2023-02-0815:13steveb8nQ: does the organise imports command support cljc or is that too hard?#2023-02-0902:00cflemingCurrently, it will work on CLJC (modulo one bug: https://github.com/cursive-ide/cursive/issues/2724), but it will skip clauses that are too hard. I’m also planning to improve this soon.#2023-02-0902:31steveb8nHappy days. I'll give it a whirl#2023-02-0902:05cfleminghttps://twitter.com/CursiveIDE/status/1623503156310335488#2023-02-0903:50caleb.macdonaldblackWow. Love these changes!
#2023-02-0905:55onetomgreat changes, indeed! the File Sync: Sync all modified files setting still works a bit fishy though. it's not reloading everything i expect. 😕#2023-02-0908:51cflemingI wonder if that’s because it’s asynchronous, and Cursive kicks off that operation and then the repl op executes faster than the sync.#2023-02-0919:30mike_ananev@U0567Q30W I can't save new configuration on M1 Idea 2022.2.4 - Apply button is not active. If I press OK then nothing saved.#2023-02-0919:38mike_ananevMay be I should fill something? Is there any docs how to use it?#2023-02-0921:01cflemingIt’s probably because the name is blank. But it should show an error in that field, I’ll check why it’s not showing.#2023-02-0921:01cfleming@U097654L8 ^^#2023-02-0908:13thhellerHow do I find out what %1 is here? Or asked differently which program is it trying to execute when I try to create a "New Project from existing Sources" using clerk deps.edn?#2023-02-0908:14thhellerI configured it to use tools.deps directly? is that maybe the cause? using 1.12.8-eap2-2022.3#2023-02-0908:47thhellerapparently it was missing git.#2023-02-0908:52cflemingThat’s weird. In that case, I’m pretty sure that message just comes straight back from deps.#2023-02-1006:41onetom@cfleming i don't think the File Sync: Sync all modified files is async timing related, because it was not even attempting to reload the changed file 😕 im still not sure how to repro this in a minimal case though, but it happens most of the time, so i just use the File Sync: Load current file option instead and be more manual, more gradual, do cmd-shift-m/l to get into a consistent state between the file and the REPL again.#2023-02-1018:50cflemingI’ve actually noticed a lot of the file sync stuff being buggy under 2023.1. I’m hoping it will work itself out during the EAP program. But this could be a problem in Cursive too, I’ll check to see what debug logging is available.#2023-02-1012:26Jakub Holý (HolyJak)@cfleming have you any thoughts about adding support for Call Hierarchy? (https://github.com/cursive-ide/cursive/issues/475) I see it has been hanging there since 2014 so I guess it won’t be fixed anytime soon / ever?#2023-02-1018:44cflemingYes, I do want to support this. I’m currently on a drive to fix a bunch of stuff that should have been fixed ages ago, and this is one I want to get to soon.#2023-02-1019:47Dustin GetzIs there a way to make this highlight properly and if so how? note it is almost for but not quite, so resolve-as fails here (unless I am missing a comparable form). It also needs to indent 2 spaces (like other macros that take & body); typically that is achieved with resolve-as defn, def, etc but those all highlight the kv wrong#2023-02-1019:56Dustin GetzOk, just discovered in the Cursive settings Editor -> Code Style -> Clojure -> General you can set "Default To Only Indent".#2023-02-1022:22kennyCurious, does setting that solve the resolve issue? Seems like it’d just deal with formatting?#2023-02-1022:42Dustin Getzsetting resolves the indentation only; the highlighting still is wrong#2023-02-1104:58cflemingThis can’t be fully fixed yet. What you can do is set it to Resolve as: None, which will disable the warnings in the body of that macro. It’s not ideal, but it helps. https://cursive-ide.com/userguide/macros.html#2023-02-1122:18danielcomptonHas anything changed recently with namespace require formatting? Cursive seems to want to start them on a new line, rather than keeping them inline with the :require e.g.
(ns my.ns
  (:require [account.client :as client]
            [account.client :as a.client]
            [cemerick.url :as curl]
vs
(ns my.ns
  (:require
    [account.client :as client]
    [account.client :as a.client]
    [cemerick.url :as curl]
#2023-02-1200:59cflemingThat’s https://github.com/cursive-ide/cursive/issues/2763, which is fixed in the current EAPs.